{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# SF Salaries\n", "In this notebook i explore San Francisco city employee salary data, which can be found on kaggle: \n", "https://www.kaggle.com/kaggle/sf-salaries" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Importing libraries" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window.Plotly) {{require(['plotly'],function(plotly) {window.Plotly=plotly;});}}</script>" ], "text/vnd.plotly.v1+html": [ "<script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window.Plotly) {{require(['plotly'],function(plotly) {window.Plotly=plotly;});}}</script>" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "<script type='text/javascript'>if(!window.Plotly){define('plotly', function(require, exports, module) {/**\n", "* plotly.js v1.33.1\n", "* Copyright 2012-2018, Plotly, Inc.\n", "* All rights reserved.\n", "* Licensed under the MIT license\n", "*/\n", "!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).Plotly=t()}}(function(){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 c=new Error(\"Cannot find module '\"+o+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){var r=e[o][1][t];return i(r||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=\"function\"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){\"use strict\";var n=t(\"../src/lib\"),i={\"X,X div\":\"font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\",\"X input,X button\":\"font-family:'Open Sans', verdana, arial, sans-serif;\",\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg\":\"overflow:hidden;\",\"X svg a\":\"fill:#447adb;\",\"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;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);\",\"X .modebar--hover\":\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\",\"X:hover .modebar--hover\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-group:first-child\":\"margin-left:0px;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;cursor:pointer;line-height:normal;box-sizing:border-box;\",\"X .modebar-btn svg\":\"position:relative;top:2px;\",\"X .modebar-btn path\":\"fill:rgba(0,31,95,0.3);\",\"X .modebar-btn.active path,X .modebar-btn:hover path\":\"fill:rgba(0,22,72,0.5);\",\"X .modebar-btn.modebar-btn--logo\":\"padding:3px 1px;\",\"X .modebar-btn.modebar-btn--logo path\":\"fill:#447adb !important;\",\"X [data-title]:before,X [data-title]:after\":\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":\"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;\",\"X [data-title]:after\":\"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\",\"X .select-outline\":\"fill:none;stroke-width:1;shape-rendering:crispEdges;\",\"X .select-outline-1\":\"stroke:white;\",\"X .select-outline-2\":\"stroke:black;stroke-dasharray:2px 2px;\",Y:\"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;\",\"Y p\":\"margin:0;\",\"Y .notifier-note\":\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\",\"Y .notifier-close\":\"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\",\"Y .notifier-close:hover\":\"color:#444;text-decoration:none;cursor:pointer;\"};for(var a in i){var o=a.replace(/^,/,\" ,\").replace(/X/g,\".js-plotly-plot .plotly\").replace(/Y/g,\".plotly-notifier\");n.addStyleRule(o,i[a])}},{\"../src/lib\":743}],2:[function(t,e,r){\"use strict\";e.exports={undo:{width:857.1,path:\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\",ascent:850,descent:-150},home:{width:928.6,path:\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\",ascent:850,descent:-150},\"camera-retro\":{width:1e3,path:\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\",ascent:850,descent:-150},zoombox:{width:1e3,path:\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\",ascent:850,descent:-150},pan:{width:1e3,path:\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\",ascent:850,descent:-150},zoom_plus:{width:1e3,path:\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\",ascent:850,descent:-150},zoom_minus:{width:1e3,path:\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\",ascent:850,descent:-150},autoscale:{width:1e3,path:\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\",ascent:850,descent:-150},tooltip_basic:{width:1500,path:\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\",ascent:850,descent:-150},tooltip_compare:{width:1125,path:\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\",ascent:850,descent:-150},plotlylogo:{width:1542,path:\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\",ascent:850,descent:-150},\"z-axis\":{width:1e3,path:\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\",ascent:850,descent:-150},\"3d_rotate\":{width:1e3,path:\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\",ascent:850,descent:-150},camera:{width:1e3,path:\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\",ascent:850,descent:-150},movie:{width:1e3,path:\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\",ascent:850,descent:-150},question:{width:857.1,path:\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\",ascent:850,descent:-150},disk:{width:857.1,path:\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\",ascent:850,descent:-150},lasso:{width:1031,path:\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\",ascent:850,descent:-150},selectbox:{width:1e3,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:1e3,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}}},{}],3:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/aggregate\")},{\"../src/transforms/aggregate\":1166}],4:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/bar\")},{\"../src/traces/bar\":887}],5:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/box\")},{\"../src/traces/box\":900}],6:[function(t,e,r){\"use strict\";e.exports=t(\"../src/components/calendars\")},{\"../src/components/calendars\":616}],7:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/candlestick\")},{\"../src/traces/candlestick\":909}],8:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/carpet\")},{\"../src/traces/carpet\":930}],9:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/choropleth\")},{\"../src/traces/choropleth\":945}],10:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contour\")},{\"../src/traces/contour\":958}],11:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contourcarpet\")},{\"../src/traces/contourcarpet\":973}],12:[function(t,e,r){\"use strict\";e.exports=t(\"../src/core\")},{\"../src/core\":724}],13:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/filter\")},{\"../src/transforms/filter\":1167}],14:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/groupby\")},{\"../src/transforms/groupby\":1168}],15:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmap\")},{\"../src/traces/heatmap\":986}],16:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmapgl\")},{\"../src/traces/heatmapgl\":996}],17:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram\")},{\"../src/traces/histogram\":1007}],18:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2d\")},{\"../src/traces/histogram2d\":1013}],19:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2dcontour\")},{\"../src/traces/histogram2dcontour\":1017}],20:[function(t,e,r){\"use strict\";var n=t(\"./core\");n.register([t(\"./bar\"),t(\"./box\"),t(\"./heatmap\"),t(\"./histogram\"),t(\"./histogram2d\"),t(\"./histogram2dcontour\"),t(\"./pie\"),t(\"./contour\"),t(\"./scatterternary\"),t(\"./violin\"),t(\"./scatter3d\"),t(\"./surface\"),t(\"./mesh3d\"),t(\"./scattergeo\"),t(\"./choropleth\"),t(\"./scattergl\"),t(\"./pointcloud\"),t(\"./heatmapgl\"),t(\"./parcoords\"),t(\"./scattermapbox\"),t(\"./sankey\"),t(\"./table\"),t(\"./carpet\"),t(\"./scattercarpet\"),t(\"./contourcarpet\"),t(\"./ohlc\"),t(\"./candlestick\"),t(\"./scatterpolar\"),t(\"./scatterpolargl\")]),n.register([t(\"./aggregate\"),t(\"./filter\"),t(\"./groupby\"),t(\"./sort\")]),n.register([t(\"./calendars\")]),e.exports=n},{\"./aggregate\":3,\"./bar\":4,\"./box\":5,\"./calendars\":6,\"./candlestick\":7,\"./carpet\":8,\"./choropleth\":9,\"./contour\":10,\"./contourcarpet\":11,\"./core\":12,\"./filter\":13,\"./groupby\":14,\"./heatmap\":15,\"./heatmapgl\":16,\"./histogram\":17,\"./histogram2d\":18,\"./histogram2dcontour\":19,\"./mesh3d\":21,\"./ohlc\":22,\"./parcoords\":23,\"./pie\":24,\"./pointcloud\":25,\"./sankey\":26,\"./scatter3d\":27,\"./scattercarpet\":28,\"./scattergeo\":29,\"./scattergl\":30,\"./scattermapbox\":31,\"./scatterpolar\":32,\"./scatterpolargl\":33,\"./scatterternary\":34,\"./sort\":35,\"./surface\":36,\"./table\":37,\"./violin\":38}],21:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/mesh3d\")},{\"../src/traces/mesh3d\":1023}],22:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/ohlc\")},{\"../src/traces/ohlc\":1028}],23:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/parcoords\")},{\"../src/traces/parcoords\":1037}],24:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pie\")},{\"../src/traces/pie\":1047}],25:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pointcloud\")},{\"../src/traces/pointcloud\":1056}],26:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/sankey\")},{\"../src/traces/sankey\":1062}],27:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatter3d\")},{\"../src/traces/scatter3d\":1096}],28:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattercarpet\")},{\"../src/traces/scattercarpet\":1102}],29:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergeo\")},{\"../src/traces/scattergeo\":1109}],30:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergl\")},{\"../src/traces/scattergl\":1115}],31:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattermapbox\")},{\"../src/traces/scattermapbox\":1121}],32:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolar\")},{\"../src/traces/scatterpolar\":1128}],33:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolargl\")},{\"../src/traces/scatterpolargl\":1132}],34:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterternary\")},{\"../src/traces/scatterternary\":1138}],35:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/sort\")},{\"../src/transforms/sort\":1170}],36:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/surface\")},{\"../src/traces/surface\":1145}],37:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/table\")},{\"../src/traces/table\":1153}],38:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/violin\")},{\"../src/traces/violin\":1160}],39:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(e,r,i,a){var o=1/t.clientHeight,s=o*(r-m),l=o*(i-g),u=p.flipX?1:-1,h=p.flipY?1:-1,d=Math.PI*p.rotateSpeed,y=n();if(1&e)a.shift?c.rotate(y,0,0,-s*d):c.rotate(y,u*d*s,-h*d*l,0);else if(2&e)c.pan(y,-p.translateSpeed*s*f,p.translateSpeed*l*f,0);else if(4&e){var x=p.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}m=r,g=i,v=a}t=t||document.body;var l=[.01,1/0];\"distanceLimits\"in(e=e||{})&&(l[0]=e.distanceLimits[0],l[1]=e.distanceLimits[1]),\"zoomMin\"in e&&(l[0]=e.zoomMin),\"zoomMax\"in e&&(l[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\"orbit\",distanceLimits:l}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,d=t.clientHeight,p={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===d;return h=t.clientWidth,d=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(p,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(l)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\"contextmenu\",function(t){return t.preventDefault(),!1});var m=0,g=0,v={shift:!1,control:!1,alt:!1,meta:!1};return a(t,r),t.addEventListener(\"touchstart\",function(e){var n=s(e.changedTouches[0],t);r(0,n[0],n[1],v),r(1,n[0],n[1],v)}),t.addEventListener(\"touchmove\",function(e){var n=s(e.changedTouches[0],t);r(1,n[0],n[1],v)}),t.addEventListener(\"touchend\",function(e){s(e.changedTouches[0],t),r(0,m,g,v)}),o(t,function(t,e,r){var i=p.flipX?1:-1,a=p.flipY?1:-1,o=n();if(Math.abs(t)>Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),p};var n=t(\"right-now\"),i=t(\"3d-view\"),a=t(\"mouse-change\"),o=t(\"mouse-wheel\"),s=t(\"mouse-event-offset\")},{\"3d-view\":40,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446,\"right-now\":509}],40:[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}e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||\"turntable\",u=i(),f=a(),h=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new n({turntable:u,orbit:f,matrix:h},c)};var i=t(\"turntable-camera-controller\"),a=t(\"orbit-camera-controller\"),o=t(\"matrix-camera-controller\"),s=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<t[1];++n)r.push(\"a\"+n);var i=\"var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i].\"+t[0]+\"(\"+r.join()+\")}\";s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,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}}},s.getMode=function(){return this._mode}},{\"matrix-camera-controller\":441,\"orbit-camera-controller\":464,\"turntable-camera-controller\":551}],41:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\"),t(\"d3-collection\"),t(\"d3-interpolate\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)}(this,function(t,e,r,n){\"use strict\";t.sankey=function(){function t(){for(var t,e=h,r=0;e.length;)t=[],e.forEach(function(e){e.x=r,e.dx=c,e.sourceLinks.forEach(function(e){t.indexOf(e.target)<0&&t.push(e.target)})}),e=t,++r;!function(t){h.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})}(r),function(t){h.forEach(function(e){e.x*=t})}((f[0]-c)/(r-1))}function i(t){function n(){a.forEach(function(t){var e,r,n,a=0,o=t.length;for(t.sort(i),n=0;n<o;++n)(r=a-(e=t[n]).y)>0&&(e.y+=r),a=e.y+e.dy+u;if((r=a-u-f[1])>0)for(a=e.y-=r,n=o-2;n>=0;--n)(r=(e=t[n]).y+e.dy+u-a)>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(h).map(function(t){return t.values});!function(){var t=e.min(a,function(t){return(f[1]-(t.length-1)*u)/e.sum(t,s)});a.forEach(function(e){e.forEach(function(e,r){e.y=r,e.dy=e.value*t})}),d.forEach(function(e){e.dy=e.value*t})}(),n();for(var l=1;t>0;--t)!function(t){function r(t){return o(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,s);n.y+=(i-o(n))*t}})})}(l*=.99),n(),function(t){function r(t){return o(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,s);n.y+=(i-o(n))*t}})})}(l),n()}function a(){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}h.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),h.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 o(t){return t.y+t.dy/2}function s(t){return t.value}var l={},c=24,u=8,f=[1,1],h=[],d=[];return l.nodeWidth=function(t){return arguments.length?(c=+t,l):c},l.nodePadding=function(t){return arguments.length?(u=+t,l):u},l.nodes=function(t){return arguments.length?(h=t,l):h},l.links=function(t){return arguments.length?(d=t,l):d},l.size=function(t){return arguments.length?(f=t,l):f},l.layout=function(r){return h.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),d.forEach(function(t,e){var r=t.source,n=t.target;\"number\"==typeof r&&(r=t.source=h[t.source]),\"number\"==typeof n&&(n=t.target=h[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),h.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,s),e.sum(t.targetLinks,s))}),t(),i(r),a(),l},l.relayout=function(){return a(),l},l.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,c=l+t.dy,u=t.target.y+t.ty,f=u+t.dy;return\"M\"+r+\",\"+l+\"C\"+o+\",\"+l+\" \"+s+\",\"+u+\" \"+i+\",\"+u+\"L\"+i+\",\"+f+\"C\"+s+\",\"+f+\" \"+o+\",\"+c+\" \"+r+\",\"+c+\"Z\"}var e=.5;return t.curvature=function(r){return arguments.length?(e=+r,t):e},t},l},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-array\":120,\"d3-collection\":121,\"d3-interpolate\":125}],42:[function(t,e,r){\"use strict\";var n=\"undefined\"==typeof WeakMap?t(\"weak-map\"):WeakMap,i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{\"gl-buffer\":165,\"gl-vao\":259,\"weak-map\":573}],43:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case\"a\":t[6]+=n,t[7]+=i;break;case\"v\":t[1]+=i;break;case\"h\":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case\"Z\":n=e,i=r;break;case\"H\":n=t[1];break;case\"V\":i=t[1];break;case\"M\":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],44:[function(t,e,r){var n=t(\"pad-left\");e.exports=function(t,e,r){e=\"number\"==typeof e?e:1,r=r||\": \";var i=t.split(/\\r?\\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length;return n(o,a-s)+r+t}).join(\"\\n\")}},{\"pad-left\":465}],45:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(e+1),n=0;n<t.length;++n)r[n]=t[n];for(n=0;n<=t.length;++n){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-n,s);r[a]=o}if(i.apply(void 0,r))return!0}return!1}e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,i=[t[0]],a=[0],o=1;o<e;++o)if(i.push(t[o]),n(i,r)){if(a.push(o),a.length===r+1)return a}else i.pop();return a};var i=t(\"robust-orientation\")},{\"robust-orientation\":515}],46:[function(t,e,r){\"use strict\";e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1})};var n=t(\"delaunay-triangulate\"),i=t(\"circumradius\")},{circumradius:92,\"delaunay-triangulate\":130}],47:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(\"alpha-complex\"),i=t(\"simplicial-complex-boundary\")},{\"alpha-complex\":46,\"simplicial-complex-boundary\":523}],48:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(!t||null==t.length)throw Error(\"Argument should be an array\");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],49:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\");e.exports=function(t,e,r){if(!t||null==t.length)throw Error(\"Argument should be an array\");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s<l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{\"array-bounds\":48}],50:[function(t,e,r){\"use strict\";e.exports=function(){var t={},e=/^rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,.*)?\\)$/,r=/^rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,?\\s*(.*)?\\)$/;return t.isPlainObject=function(t){return!Array.isArray(t)&&null!==t&&\"object\"==typeof t},t.linspace=function(t,e,r){for(var n=(e-t)/Math.max(r-1,1),i=[],a=0;a<r;a++)i.push(t+a*n);return i},t.zip3=function(t,e,r){for(var n=Math.min.apply(null,[t.length,e.length,r.length]),i=[],a=0;a<n;a++)i.push([t[a],e[a],r[a]]);return i},t.sum=function(t){function e(t){for(var n=0;n<t.length;n++)Array.isArray(t[n])?e(t[n]):r+=t[n]}var r=0;return e(t),r},t.zip=function(){for(var t=[].slice.call(arguments),e=t.map(function(t){return t.length}),r=Math.min.apply(null,e),n=[],i=0;i<r;i++){n[i]=[];for(var a=0;a<t.length;++a)n[i][a]=t[a][i]}return n},t.isEqual=function(t,e){if(t.length!==e.length)return!1;for(var r=t.length;r--;)if(t[r]!==e[r])return!1;return!0},t.copy2D=function(t){for(var e=[],r=0;r<t.length;++r){e[r]=[];for(var n=0;n<t[r].length;++n)e[r][n]=t[r][n]}return e},t.copy1D=function(t){for(var e=[],r=0;r<t.length;++r)e[r]=t[r];return e},t.str2RgbArray=function(t,n){var i,a;if(\"string\"!=typeof t)return t;if(i=[],\"#\"===t[0]?(3===(t=t.substr(1)).length&&(t+=t),a=parseInt(t,16),i[0]=a>>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3])),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t.str2RgbaArray=function(t,n){var i,a;if(\"string\"!=typeof t)return t;if(i=[],\"#\"===t[0]?(3===(t=t.substr(1)).length&&(t+=t),a=parseInt(t,16),i[0]=a>>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3]),a[4]?i[3]=parseFloat(a[4]):i[3]=1),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t}()},{}],51:[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<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return r.Buffer&&\"function\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function a(t){return Object.prototype.toString.call(t)}function o(t){return!i(t)&&(\"function\"==typeof r.ArrayBuffer&&(\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function s(t){if(v.isFunction(t)){if(b)return t.name;var e=t.toString().match(w);return e&&e[1]}}function l(t,e){return\"string\"==typeof t?t.length<e?t:t.slice(0,e):t}function c(t){if(b||!v.isFunction(t))return v.inspect(t);var e=s(t);return\"[Function\"+(e?\": \"+e:\"\")+\"]\"}function u(t,e,r,n,i){throw new _.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function f(t,e){t||u(t,!0,e,\"==\",_.ok)}function h(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(v.isDate(t)&&v.isDate(e))return t.getTime()===e.getTime();if(v.isRegExp(t)&&v.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\"object\"==typeof t||null!==e&&\"object\"==typeof e){if(o(t)&&o(e)&&a(t)===a(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(v.isPrimitive(t)||v.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),a=d(e);if(i&&!a||!i&&a)return!1;if(i)return t=x.call(t),e=x.call(e),h(t,e,r);var o,s,l=M(t),c=M(e);if(l.length!==c.length)return!1;for(l.sort(),c.sort(),s=l.length-1;s>=0;s--)if(l[s]!==c[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!h(t[o],e[o],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function d(t){return\"[object Arguments]\"==Object.prototype.toString.call(t)}function p(t,e,r){h(t,e,!0)&&u(t,e,r,\"notDeepStrictEqual\",p)}function m(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 g(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=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\" (\"+r.name+\").\":\".\")+(n?\" \"+n:\".\"),t&&!i&&u(i,r,\"Missing expected exception\"+n);var a=\"string\"==typeof n,o=!t&&v.isError(i),s=!t&&i&&!r;if((o&&a&&m(i,r)||s)&&u(i,r,\"Got unwanted exception\"+n),t&&i&&r&&!m(i,r)||!t&&i)throw i}var v=t(\"util/\"),y=Object.prototype.hasOwnProperty,x=Array.prototype.slice,b=\"foo\"===function(){}.name,_=e.exports=f,w=/\\s*function\\s+([^\\(\\s]*)\\s*/;_.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=function(t){return l(c(t.actual),128)+\" \"+t.operator+\" \"+l(c(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||u;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}}},v.inherits(_.AssertionError,Error),_.fail=u,_.ok=f,_.equal=function(t,e,r){t!=e&&u(t,e,r,\"==\",_.equal)},_.notEqual=function(t,e,r){t==e&&u(t,e,r,\"!=\",_.notEqual)},_.deepEqual=function(t,e,r){h(t,e,!1)||u(t,e,r,\"deepEqual\",_.deepEqual)},_.deepStrictEqual=function(t,e,r){h(t,e,!0)||u(t,e,r,\"deepStrictEqual\",_.deepStrictEqual)},_.notDeepEqual=function(t,e,r){h(t,e,!1)&&u(t,e,r,\"notDeepEqual\",_.notDeepEqual)},_.notDeepStrictEqual=p,_.strictEqual=function(t,e,r){t!==e&&u(t,e,r,\"===\",_.strictEqual)},_.notStrictEqual=function(t,e,r){t===e&&u(t,e,r,\"!==\",_.notStrictEqual)},_.throws=function(t,e,r){g(!0,t,e,r)},_.doesNotThrow=function(t,e,r){g(!1,t,e,r)},_.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)y.call(t,r)&&e.push(r);return e}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"util/\":563}],52:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],53:[function(t,e,r){\"use strict\";function n(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}for(a[r]=new Array(r+1),o=0;o<=r;++o)a[r][o]=1;var c=new Array(r+1);for(o=0;o<r;++o)c[o]=e[o];c[r]=1;var u=i(a,c),f=n(u[r+1]);0===f&&(f=1);var h=new Array(r+1);for(o=0;o<=r;++o)h[o]=n(u[o])/f;return h};var i=t(\"robust-linear-solve\")},{\"robust-linear-solve\":514}],54:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],55:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],56:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{\"./lib/rationalize\":64}],57:[function(t,e,r){\"use strict\";function n(t,e){if(i(t))return e?c(t,n(e)):[t[0].clone(),t[1].clone()];var r,u,f=0;if(a(t))r=t.clone();else if(\"string\"==typeof t)r=s(t);else{if(0===t)return[o(0),o(1)];if(t===Math.floor(t))r=o(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),f-=256;r=o(t)}}if(i(e))r.mul(e[1]),u=e[0].clone();else if(a(e))u=e.clone();else if(\"string\"==typeof e)u=s(e);else if(e)if(e===Math.floor(e))u=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),f+=256;u=o(e)}else u=o(1);return f>0?r=r.ushln(f):f<0&&(u=u.ushln(-f)),l(r,u)}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\"),c=t(\"./div\");e.exports=n},{\"./div\":56,\"./is-rat\":58,\"./lib/is-bn\":62,\"./lib/num-to-bn\":63,\"./lib/rationalize\":64,\"./lib/str-to-bn\":65}],58:[function(t,e,r){\"use strict\";var n=t(\"./lib/is-bn\");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{\"./lib/is-bn\":62}],59:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return t.cmp(new n(0))}},{\"bn.js\":73}],60:[function(t,e,r){\"use strict\";var n=t(\"./bn-sign\");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++)i+=r[a]*Math.pow(67108864,a);return n(t)*i}},{\"./bn-sign\":59}],61:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=t(\"bit-twiddle\").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));return r>20?52:r+32}},{\"bit-twiddle\":71,\"double-bits\":131}],62:[function(t,e,r){\"use strict\";t(\"bn.js\");e.exports=function(t){return t&&\"object\"==typeof t&&Boolean(t.words)}},{\"bn.js\":73}],63:[function(t,e,r){\"use strict\";var n=t(\"bn.js\"),i=t(\"double-bits\");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{\"bn.js\":73,\"double-bits\":131}],64:[function(t,e,r){\"use strict\";var n=t(\"./num-to-bn\"),i=t(\"./bn-sign\");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},{\"./bn-sign\":59,\"./num-to-bn\":63}],65:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return new n(t)}},{\"bn.js\":73}],66:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],67:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-sign\");e.exports=function(t){return n(t[0])*n(t[1])}},{\"./lib/bn-sign\":59}],68:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],69:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-to-num\"),i=t(\"./lib/ctz\");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(h=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{\"./lib/bn-to-num\":60,\"./lib/ctz\":61}],70:[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)}},{}],71:[function(t,e,r){\"use strict\";\"use restrict\";function n(t){var e=32;return(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)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<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<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>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}},{}],72:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o,s){for(var l=0;l<e;l++){for(var c=0;c<r;c++)n[c]=t[c*e+l];for(i(n,a,o,s,r),c=0;c<r;c++)t[c*e+l]=a[c]}for(c=0;c<r;c++){for(l=0;l<e;l++)n[l]=t[c*e+l];for(i(n,a,o,s,e),l=0;l<e;l++)t[c*e+l]=Math.sqrt(a[l])}}function i(t,e,r,n,i){r[0]=0,n[0]=-o,n[1]=+o;for(var a=1,s=0;a<i;a++){for(var l=(t[a]+a*a-(t[r[s]]+r[s]*r[s]))/(2*a-2*r[s]);l<=n[s];)s--,l=(t[a]+a*a-(t[r[s]]+r[s]*r[s]))/(2*a-2*r[s]);r[++s]=a,n[s]=l,n[s+1]=+o}for(a=0,s=0;a<i;a++){for(;n[s+1]<a;)s++;e[a]=(a-r[s])*(a-r[s])+t[r[s]]}}var a=t(\"clamp\");e.exports=function(t,e){e||(e={});var r,i,s,l,c,u,f,h,d,p,m,g=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(\"For raw data width and height should be provided by options\");r=e.width,i=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/i)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(\"2d\"),r=h.width,i=h.height,l=(d=f.getImageData(0,0,r,i)).data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t,r=(h=t.canvas).width,i=h.height,l=(d=f.getImageData(0,0,r,i)).data,u=4):window.ImageData&&t instanceof window.ImageData&&(d=t,r=t.width,i=t.height,l=d.data,u=4);if(s=Math.max(r,i),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*i),p=0,m=c.length;p<m;p++)l[p]=c[p*u+y]/255;else if(1!==u)throw Error(\"Raw data can have only 1 value per pixel\");var x=Array(r*i),b=Array(r*i),_=Array(s),w=Array(s),M=Array(s+1),k=Array(s);for(p=0,m=r*i;p<m;p++){var A=l[p];x[p]=1===A?0:0===A?o:Math.pow(Math.max(0,.5-A),2),b[p]=1===A?o:0===A?0:Math.pow(Math.max(0,A-.5),2)}n(x,r,i,_,w,k,M),n(b,r,i,_,w,k,M);var T=window.Float32Array?new Float32Array(r*i):new Array(r*i);for(p=0,m=r*i;p<m;p++)T[p]=a(1-((x[p]-b[p])/v+g),0,1);return T};var o=1e20},{clamp:93}],73:[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<i;a++){var o=t.charCodeAt(a)-48;n<<=4,n|=o>=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<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}function l(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 c=1;c<n;c++){for(var u=l>>>26,f=67108863&l,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[d])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}function c(t,e,r){return(new u).mulp(t,e,r)}function u(t,e){this.x=t,this.y=e}function f(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 h(){f.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function d(){f.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function p(){f.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function m(){f.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function g(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 v(t){g.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 y;try{y=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);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[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<this.length;i++)this.words[i]=0;var a,o,s=0;if(\"be\"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if(\"le\"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>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<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r>=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=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,c=0,u=r;u<l;u+=n)c=s(t,u,u+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=s(t,u,t.length,e),u=0;u<o;u++)f*=e;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&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?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var x=[\"\",\"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\"],b=[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],_=[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<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!==(a=s>>>24-i&16777215)||o!==this.length-1?x[6-l.length]+l+r:l+r,(i+=2)>=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 c=b[t],u=_[t];r=\"\";var f=this.clone();for(f.negative=0;!f.isZero();){var h=f.modn(u).toString(t);r=(f=f.idivn(u)).isZero()?h+r:x[c-h.length]+h+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!==y),this.toArrayLike(y,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,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();var r,n;this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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<i.length;o++)a=(e=(0|n.words[o])-(0|i.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<n.length;o++)a=(e=(0|n.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var w=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&u,h=u>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>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,F=P>>>13,R=0|o[9],N=8191&R,j=R>>>13,B=0|s[0],U=8191&B,V=B>>>13,q=0|s[1],H=8191&q,G=q>>>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,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var yt=(c+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0;var xt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var Mt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(F,U)|0,a=Math.imul(F,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,V))+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(F,H)|0,a=a+Math.imul(F,G)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var At=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((a=a+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,G))+Math.imul(j,H)|0,a=Math.imul(j,G),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,X)|0,n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,X))+Math.imul(j,W)|0,a=Math.imul(j,X),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(F,J)|0,a=a+Math.imul(F,K)|0,n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((a=a+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,K))+Math.imul(j,J)|0,a=Math.imul(j,K),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((a=a+Math.imul(_,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(F,rt)|0,a=a+Math.imul(F,nt)|0,n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Lt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(j,rt)|0,a=Math.imul(j,nt),n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(F,at)|0,a=a+Math.imul(F,ot)|0,n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ct)|0,n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((a=a+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,at),i=(i=Math.imul(N,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(F,lt)|0,a=a+Math.imul(F,ct)|0,n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var zt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((a=a+Math.imul(C,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(F,ft)|0,a=a+Math.imul(F,ht)|0;var Dt=(c+(n=n+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((a=a+Math.imul(I,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(j,ft)|0,a=Math.imul(j,ht);var It=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(F,pt)|0))<<13)|0;c=((a=a+Math.imul(F,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,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!==c&&(l[19]=c,r.length++),r};Math.imul||(w=l),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?w(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):c(this,t,e)},u.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},u.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},u.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},u.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var f=l,h=c,d=0;d<o;d++){var p=r[u+d],m=n[u+d],g=r[u+d+o],v=n[u+d+o],y=f*g-h*v;v=f*v+h*g,g=y,r[u+d]=p+g,n[u+d]=m+v,r[u+d+o]=p-g,n[u+d+o]=m-v,d!==s&&(y=l*f-c*h,h=l*h+c*f,f=y)}},u.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},u.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},u.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},u.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},u.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},u.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var d=0;d<n;d++){var p=s[d]*u[d]-l[d]*f[d];l[d]=s[d]*f[d]+l[d]*u[d],s[d]=p}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),c(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=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<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>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<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){n(\"number\"==typeof t&&t>=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<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),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<<e;if(this.length<=r)return!1;return!!(this.words[r]&i)},a.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a=t.length+r;this._expand(a);var o,s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>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)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}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),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),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(u),l.isub(f)),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(c)}},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,c=1;0==(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var u=0,f=1;0==(r.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(r.iushrn(u);u-- >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 h;return(h=0===e.cmpn(1)?i:o).cmpn(0)<0&&h.iadd(t),h},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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>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:i<t?-1:1}return 0!==this.negative?0|-r:r},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 g(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 M={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},f.prototype.split=function(t,e){t.iushrn(this.n,0,e)},f.prototype.imulK=function(t){return t.imul(this.k)},i(h,f),h.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},h.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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(d,f),i(p,f),i(m,f),m.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(M[t])return M[t];var e;if(\"k256\"===t)e=new h;else if(\"p224\"===t)e=new d;else if(\"p192\"===t)e=new p;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new m}return M[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},g.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\")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.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)},g.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},g.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)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.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(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=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<p);var v=this.pow(f,new a(1).iushln(p-g-1));h=h.redMul(v),f=v.redSqr(),d=d.redMul(f),p=g}return h},g.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},g.prototype.pow=function(t,e){if(e.isZero())return new a(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new v(t)},i(v,g),v.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},v.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},v.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)},v.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)},v.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],74:[function(t,e,r){\"use strict\";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],c=l.length;for(r=0;r<c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n<c;++n)n!==r&&(u[f++]=l[n]);if(1&r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],75:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function i(t,e,r,i){for(var a=0,o=0,s=0,l=t.length;s<l;++s){var c=t[s];if(!n(e,c)){for(var u=0;u<2*e;++u)r[a++]=c[u];i[o++]=s}}return o}function a(t,e,r,n){var a=t.length,o=e.length;if(!(a<=0||o<=0)){var s=t[0].length>>>1;if(!(s<=0)){var f,h=l.mallocDouble(2*s*a),d=l.mallocInt32(a);if((a=i(t,s,h,d))>0){if(1===s&&n)c.init(a),f=c.sweepComplete(s,r,0,a,h,d,0,a,h,d);else{var p=l.mallocDouble(2*s*o),m=l.mallocInt32(o);(o=i(e,s,p,m))>0&&(c.init(a+o),f=1===s?c.sweepBipartite(s,r,0,a,h,d,0,o,p,m):u(s,r,n,a,h,d,o,p,m),l.free(p),l.free(m))}l.free(h),l.free(d)}return f}}}function o(t,e){s.push([t,e])}e.exports=function(t,e,r){switch(arguments.length){case 1:return function(t){return s=[],a(t,t,o,!0),s}(t);case 2:return\"function\"==typeof e?a(t,t,e,!0):function(t,e){return s=[],a(t,e,o,!1),s}(t,e);case 3:return a(t,e,r,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}};var s,l=t(\"typedarray-pool\"),c=t(\"./lib/sweep\"),u=t(\"./lib/intersect\")},{\"./lib/intersect\":77,\"./lib/sweep\":81,\"typedarray-pool\":554}],76:[function(t,e,r){\"use strict\";function n(t){function e(e,r){var s=function(t,e,r){var n=\"bruteForce\"+(t?\"Red\":\"Blue\")+(e?\"Flip\":\"\")+(r?\"Full\":\"\"),s=[\"function \",n,\"(\",_.join(),\"){\",\"var \",l,\"=2*\",i,\";\"],w=\"for(var i=\"+c+\",\"+d+\"=\"+l+\"*\"+c+\";i<\"+u+\";++i,\"+d+\"+=\"+l+\"){var x0=\"+f+\"[\"+a+\"+\"+d+\"],x1=\"+f+\"[\"+a+\"+\"+d+\"+\"+i+\"],xi=\"+h+\"[i];\",M=\"for(var j=\"+p+\",\"+y+\"=\"+l+\"*\"+p+\";j<\"+m+\";++j,\"+y+\"+=\"+l+\"){var y0=\"+g+\"[\"+a+\"+\"+y+\"],\"+(r?\"y1=\"+g+\"[\"+a+\"+\"+y+\"+\"+i+\"],\":\"\")+\"yi=\"+v+\"[j];\";return t?s.push(w,b,\":\",M):s.push(M,b,\":\",w),r?s.push(\"if(y1<x0||x1<y0)continue;\"):e?s.push(\"if(y0<=x0||x1<y0)continue;\"):s.push(\"if(y0<x0||x1<y0)continue;\"),s.push(\"for(var k=\"+a+\"+1;k<\"+i+\";++k){var r0=\"+f+\"[k+\"+d+\"],r1=\"+f+\"[k+\"+i+\"+\"+d+\"],b0=\"+g+\"[k+\"+y+\"],b1=\"+g+\"[k+\"+i+\"+\"+y+\"];if(r1<b0||b1<r0)continue \"+b+\";}var \"+x+\"=\"+o+\"(\"),e?s.push(\"yi,xi\"):s.push(\"xi,yi\"),s.push(\");if(\"+x+\"!==void 0)return \"+x+\";}}}\"),{name:n,code:s.join(\"\")}}(e,r,t);n.push(s.code),M.push(\"return \"+s.name+\"(\"+_.join()+\");\")}var r=\"bruteForce\"+(t?\"Full\":\"Partial\"),n=[],w=_.slice();t||w.splice(3,0,s);var M=[\"function \"+r+\"(\"+w.join()+\"){\"];M.push(\"if(\"+u+\"-\"+c+\">\"+m+\"-\"+p+\"){\"),t?(e(!0,!1),M.push(\"}else{\"),e(!1,!1)):(M.push(\"if(\"+s+\"){\"),e(!0,!0),M.push(\"}else{\"),e(!0,!1),M.push(\"}}else{if(\"+s+\"){\"),e(!1,!0),M.push(\"}else{\"),e(!1,!1),M.push(\"}\")),M.push(\"}}return \"+r);var k=n.join(\"\")+M.join(\"\");return new Function(k)()}var i=\"d\",a=\"ax\",o=\"vv\",s=\"fp\",l=\"es\",c=\"rs\",u=\"re\",f=\"rb\",h=\"ri\",d=\"rp\",p=\"bs\",m=\"be\",g=\"bb\",v=\"bi\",y=\"bp\",x=\"rv\",b=\"Q\",_=[i,a,o,c,u,f,h,p,m,g,v];r.partial=n(!1),r.full=n(!0)},{}],77:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l){var c=M*t;A[c]=e,A[c+1]=r,A[c+2]=n,A[c+3]=i,A[c+4]=a,A[c+5]=o;var u=k*t;T[u]=s,T[u+1]=l}function i(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,d=c[h+e];t:for(var p=i,m=i*f;p<a;++p,m+=f){var g=o[m+e],v=o[m+e+t];if(!(d<g||v<d)&&(!n||d!==g)){for(var y=s[p],x=e+1;x<t;++x){g=o[m+x],v=o[m+x+t];var b=c[h+x],_=c[h+x+t];if(v<b||_<g)continue t}var w;if(void 0!==(w=n?r(u,y):r(y,u)))return w}}}function a(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var d=n,p=n*u;d<i;++d,p+=u){var m=o[d];if(m!==c){var g=a[p+e],v=a[p+e+t];if(!(h<g||v<h)){for(var y=e+1;y<t;++y){g=a[p+y],v=a[p+y+t];var x=l[f+y],b=l[f+y+t];if(v<x||b<g)continue t}var _=r(m,c);if(void 0!==_)return _}}}}e.exports=function(t,e,r,l,d,S,E,L,C){!function(t,e){var r=8*s.log2(e+1)*(t+1)|0,n=s.nextPow2(M*r);A.length<n&&(o.free(A),A=o.mallocInt32(n));var i=s.nextPow2(k*r);T<i&&(o.free(T),T=o.mallocDouble(i))}(t,l+E);var z,D=0,I=2*t;for(n(D++,0,0,l,0,E,r?16:0,-1/0,1/0),r||n(D++,0,0,E,0,l,1,-1/0,1/0);D>0;){var P=(D-=1)*M,O=A[P],F=A[P+1],R=A[P+2],N=A[P+3],j=A[P+4],B=A[P+5],U=D*k,V=T[U],q=T[U+1],H=1&B,G=!!(16&B),Y=d,W=S,X=L,Z=C;if(H&&(Y=L,W=C,X=d,Z=S),!(2&B&&(R=x(t,O,F,R,Y,W,q),F>=R)||4&B&&(F=b(t,O,F,R,Y,W,V))>=R)){var J=R-F,K=j-N;if(G){if(t*J*(J+K)<g){if(void 0!==(z=f.scanComplete(t,O,e,F,R,Y,W,N,j,X,Z)))return z;continue}}else{if(t*Math.min(J,K)<p){if(void 0!==(z=c(t,O,e,H,F,R,Y,W,N,j,X,Z)))return z;continue}if(t*J*K<m){if(void 0!==(z=f.scanBipartite(t,O,e,H,F,R,Y,W,N,j,X,Z)))return z;continue}}var Q=v(t,O,F,R,Y,W,V,q);if(F<Q)if(t*(Q-F)<p){if(void 0!==(z=u(t,O+1,e,F,Q,Y,W,N,j,X,Z)))return z}else if(O===t-2){if(void 0!==(z=H?f.sweepBipartite(t,e,N,j,X,Z,F,Q,Y,W):f.sweepBipartite(t,e,F,Q,Y,W,N,j,X,Z)))return z}else n(D++,O+1,F,Q,N,j,H,-1/0,1/0),n(D++,O+1,N,j,F,Q,1^H,-1/0,1/0);if(Q<R){var $=h(t,O,N,j,X,Z),tt=X[I*$+O],et=y(t,O,$,j,X,Z,tt);if(et<j&&n(D++,O,Q,R,et,j,(4|H)+(G?16:0),tt,q),N<$&&n(D++,O,Q,R,N,$,(2|H)+(G?16:0),V,tt),$+1===et){if(void 0!==(z=G?a(t,O,e,Q,R,Y,W,$,X,Z[$]):i(t,O,e,H,Q,R,Y,W,$,X,Z[$])))return z}else if($<et){var rt;if(G){if(rt=_(t,O,Q,R,Y,W,tt),Q<rt){var nt=y(t,O,Q,rt,Y,W,tt);if(O===t-2){if(Q<nt&&void 0!==(z=f.sweepComplete(t,e,Q,nt,Y,W,$,et,X,Z)))return z;if(nt<rt&&void 0!==(z=f.sweepBipartite(t,e,nt,rt,Y,W,$,et,X,Z)))return z}else Q<nt&&n(D++,O+1,Q,nt,$,et,16,-1/0,1/0),nt<rt&&(n(D++,O+1,nt,rt,$,et,0,-1/0,1/0),n(D++,O+1,$,et,nt,rt,1,-1/0,1/0))}}else Q<(rt=H?w(t,O,Q,R,Y,W,tt):_(t,O,Q,R,Y,W,tt))&&(O===t-2?z=H?f.sweepBipartite(t,e,$,et,X,Z,Q,rt,Y,W):f.sweepBipartite(t,e,Q,rt,Y,W,$,et,X,Z):(n(D++,O+1,Q,rt,$,et,H,-1/0,1/0),n(D++,O+1,$,et,Q,rt,1^H,-1/0,1/0)))}}}}};var o=t(\"typedarray-pool\"),s=t(\"bit-twiddle\"),l=t(\"./brute\"),c=l.partial,u=l.full,f=t(\"./sweep\"),h=t(\"./median\"),d=t(\"./partition\"),p=128,m=1<<22,g=1<<22,v=d(\"!(lo>=p0)&&!(p1>=hi)\",[\"p0\",\"p1\"]),y=d(\"lo===p0\",[\"p0\"]),x=d(\"lo<p0\",[\"p0\"]),b=d(\"hi<=p0\",[\"p0\"]),_=d(\"lo<=p0&&p0<=hi\",[\"p0\"]),w=d(\"lo<p0&&p0<=hi\",[\"p0\"]),M=6,k=2,A=o.mallocInt32(1024),T=o.mallocDouble(1024)},{\"./brute\":76,\"./median\":78,\"./partition\":79,\"./sweep\":81,\"bit-twiddle\":71,\"typedarray-pool\":554}],78:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u>r&&i[f+e]>c;--u,f-=o){for(var h=f,d=f+o,p=0;p<o;++p,++h,++d){var m=i[h];i[h]=i[d],i[d]=m}var g=a[u];a[u]=a[u-1],a[u-1]=g}}e.exports=function(t,e,r,o,s,l){if(o<=r+1)return r;for(var c=r,u=o,f=o+r>>>1,h=2*t,d=f,p=s[h*f+e];c<u;){if(u-c<a){n(t,e,c,u,s,l),p=s[h*f+e];break}var m=u-c,g=Math.random()*m+c|0,v=s[h*g+e],y=Math.random()*m+c|0,x=s[h*y+e],b=Math.random()*m+c|0,_=s[h*b+e];v<=x?_>=x?(d=y,p=x):v>=_?(d=g,p=v):(d=b,p=_):x>=_?(d=y,p=x):_>=v?(d=g,p=v):(d=b,p=_);for(var w=h*(u-1),M=h*d,k=0;k<h;++k,++w,++M){var A=s[w];s[w]=s[M],s[M]=A}var T=l[u-1];for(l[u-1]=l[d],l[d]=T,w=h*(u-1),M=h*(d=i(t,e,c,u-1,s,l,p)),k=0;k<h;++k,++w,++M)A=s[w],s[w]=s[M],s[M]=A;if(T=l[u-1],l[u-1]=l[d],l[d]=T,f<d){for(u=d-1;c<u&&s[h*(u-1)+e]===p;)u-=1;u+=1}else{if(!(d<f))break;for(c=d+1;c<u&&s[h*c+e]===p;)c+=1}}return i(t,e,r,f,s,l,s[h*f+e])};var i=t(\"./partition\")(\"lo<p0\",[\"p0\"]),a=8},{\"./partition\":79}],79:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=\"abcdef\".split(\"\").concat(e),i=[];return t.indexOf(\"lo\")>=0&&i.push(\"lo=e[k+n]\"),t.indexOf(\"hi\")>=0&&i.push(\"hi=e[k+o]\"),r.push(n.replace(\"_\",i.join()).replace(\"$\",t)),Function.apply(void 0,r)};var n=\"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\"},{}],80:[function(t,e,r){\"use strict\";function n(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 c=r[l-2],u=r[l-1];if(c<a)break;if(c===a&&u<o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function i(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function a(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function o(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function s(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function l(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function c(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}function u(t,e,r){var h=(e-t+1)/6|0,d=t+h,p=e-h,m=t+e>>1,g=m-h,v=m+h,y=d,x=g,b=m,_=v,w=p,M=t+1,k=e-1,A=0;l(y,x,r)&&(A=y,y=x,x=A),l(_,w,r)&&(A=_,_=w,w=A),l(y,b,r)&&(A=y,y=b,b=A),l(x,b,r)&&(A=x,x=b,b=A),l(y,_,r)&&(A=y,y=_,_=A),l(b,_,r)&&(A=b,b=_,_=A),l(x,w,r)&&(A=x,x=w,w=A),l(x,b,r)&&(A=x,x=b,b=A),l(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*x],S=r[2*x+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*b,D=2*w,I=2*d,P=2*m,O=2*p,F=0;F<2;++F){var R=r[C+F],N=r[z+F],j=r[D+F];r[I+F]=R,r[P+F]=N,r[O+F]=j}a(g,t,r),a(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&i(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(o(B,M,k,r),++M,--k):(i(B,k,r),--k);break}if(--k<B)break}s(t,M-1,T,S,r),s(e,k+1,E,L,r),M-2-t<=f?n(t,M-2,r):u(t,M-2,r),e-(k+2)<=f?n(k+2,e,r):u(k+2,e,r),k-M<=f?n(M,k,r):u(M,k,r)}e.exports=function(t,e){e<=4*f?n(0,e-1,t):u(0,e-1,t)};var f=32},{}],81:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function i(t,e,r,n){t[r]=n,e[n]=r}e.exports={init:function(t){var e=o.nextPow2(t);c.length<e&&(a.free(c),c=a.mallocInt32(e)),u.length<e&&(a.free(u),u=a.mallocInt32(e)),f.length<e&&(a.free(f),f=a.mallocInt32(e)),h.length<e&&(a.free(h),h=a.mallocInt32(e)),d.length<e&&(a.free(d),d=a.mallocInt32(e)),p.length<e&&(a.free(p),p=a.mallocInt32(e));var r=8*e;m.length<r&&(a.free(m),m=a.mallocDouble(r))},sweepBipartite:function(t,e,r,a,o,d,p,g,v,y){for(var x=0,b=2*t,_=t-1,w=b-1,M=r;M<a;++M){var k=d[M],A=b*M;m[x++]=o[A+_],m[x++]=-(k+1),m[x++]=o[A+w],m[x++]=k}for(M=p;M<g;++M){k=y[M]+l;var T=b*M;m[x++]=v[T+_],m[x++]=-k,m[x++]=v[T+w],m[x++]=k}var S=x>>>1;s(m,S);var E=0,L=0;for(M=0;M<S;++M){var C=0|m[2*M+1];if(C>=l)n(f,h,L--,C=C-l|0);else if(C>=0)n(c,u,E--,C);else if(C<=-l){C=-C-l|0;for(var z=0;z<E;++z)if(void 0!==(D=e(c[z],C)))return D;i(f,h,L++,C)}else{for(C=-C-1|0,z=0;z<L;++z){var D;if(void 0!==(D=e(C,f[z])))return D}i(c,u,E++,C)}}},sweepComplete:function(t,e,r,a,o,l,g,v,y,x){for(var b=0,_=2*t,w=t-1,M=_-1,k=r;k<a;++k){var A=l[k]+1<<1,T=_*k;m[b++]=o[T+w],m[b++]=-A,m[b++]=o[T+M],m[b++]=A}for(k=g;k<v;++k){A=x[k]+1<<1;var S=_*k;m[b++]=y[S+w],m[b++]=1|-A,m[b++]=y[S+M],m[b++]=1|A}var E=b>>>1;s(m,E);var L=0,C=0,z=0;for(k=0;k<E;++k){var D=0|m[2*k+1],I=1&D;if(k<E-1&&D>>1==m[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O<z;++O)if(void 0!==(F=e(d[O],P)))return F;if(0!==I)for(O=0;O<L;++O)if(void 0!==(F=e(c[O],P)))return F;if(1!==I)for(O=0;O<C;++O){var F;if(void 0!==(F=e(f[O],P)))return F}0===I?i(c,u,L++,P):1===I?i(f,h,C++,P):2===I&&i(d,p,z++,P)}else P=(D>>1)-1,0===I?n(c,u,L--,P):1===I?n(f,h,C--,P):2===I&&n(d,p,z--,P)}},scanBipartite:function(t,e,r,a,o,f,h,d,p,g,v,y){var x=0,b=2*t,_=e,w=e+t,M=1,k=1;a?k=l:M=l;for(var A=o;A<f;++A){var T=A+M,S=b*A;m[x++]=h[S+_],m[x++]=-T,m[x++]=h[S+w],m[x++]=T}for(A=p;A<g;++A){T=A+k;var E=b*A;m[x++]=v[E+_],m[x++]=-T}var L=x>>>1;s(m,L);var C=0;for(A=0;A<L;++A){var z=0|m[2*A+1];if(z<0){var D=!1;if((T=-z)>=l?(D=!a,T-=l):(D=!!a,T-=1),D)i(c,u,C++,T);else{var I=y[T],P=b*T,O=v[P+e+1],F=v[P+e+1+t];t:for(var R=0;R<C;++R){var N=c[R],j=b*N;if(!(F<h[j+e+1]||h[j+e+1+t]<O)){for(var B=e+2;B<t;++B)if(v[P+B+t]<h[j+B]||h[j+B+t]<v[P+B])continue t;var U,V=d[N];if(void 0!==(U=a?r(I,V):r(V,I)))return U}}}}else n(c,u,C--,z-M)}},scanComplete:function(t,e,r,n,i,a,o,u,f,h,d){for(var p=0,g=2*t,v=e,y=e+t,x=n;x<i;++x){var b=x+l,_=g*x;m[p++]=a[_+v],m[p++]=-b,m[p++]=a[_+y],m[p++]=b}for(x=u;x<f;++x){b=x+1;var w=g*x;m[p++]=h[w+v],m[p++]=-b}var M=p>>>1;s(m,M);var k=0;for(x=0;x<M;++x){var A=0|m[2*x+1];if(A<0)if((b=-A)>=l)c[k++]=b-l;else{var T=d[b-=1],S=g*b,E=h[S+e+1],L=h[S+e+1+t];t:for(var C=0;C<k;++C){var z=c[C],D=o[z];if(D===T)break;var I=g*z;if(!(L<a[I+e+1]||a[I+e+1+t]<E)){for(var P=e+2;P<t;++P)if(h[S+P+t]<a[I+P]||a[I+P+t]<h[S+P])continue t;var O=r(D,T);if(void 0!==O)return O}}}else{for(b=A-l,C=k-1;C>=0;--C)if(c[C]===b){for(P=C+1;P<k;++P)c[P-1]=c[P];break}--k}}}};var a=t(\"typedarray-pool\"),o=t(\"bit-twiddle\"),s=t(\"./sort\"),l=1<<28,c=a.mallocInt32(1024),u=a.mallocInt32(1024),f=a.mallocInt32(1024),h=a.mallocInt32(1024),d=a.mallocInt32(1024),p=a.mallocInt32(1024),m=a.mallocDouble(8192)},{\"./sort\":80,\"bit-twiddle\":71,\"typedarray-pool\":554}],82:[function(t,e,r){\"use strict\";function n(t){if(t>P)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 s(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?function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<e+(r||0))throw new RangeError(\"'length' is out of bounds\");var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=i.prototype,n}(t,e,r):\"string\"==typeof t?function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!i.isEncoding(e))throw new TypeError('\"encoding\" must be a valid string encoding');var r=0|u(t,e),a=n(r),o=a.write(t,e);o!==r&&(a=a.slice(0,o));return a}(t,e):function(t){if(i.isBuffer(t)){var e=0|c(t.length),r=n(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(t){if(C(t)||\"length\"in t)return\"number\"!=typeof t.length||z(t.length)?n(0):l(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return l(t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(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){return o(t),n(t<0?0:0|c(t))}function l(t){for(var e=t.length<0?0:0|c(t.length),r=n(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function c(t){if(t>=P)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+P.toString(16)+\" bytes\");return 0|t}function u(t,e){if(i.isBuffer(t))return t.length;if(C(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 S(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return E(t).length;default:if(n)return S(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function f(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 function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||r>n)&&(r=n);for(var i=\"\",a=e;a<r;++a)i+=function(t){return t<16?\"0\"+t.toString(16):t.toString(16)}(t[a]);return i}(this,e,r);case\"utf8\":case\"utf-8\":return _(this,e,r);case\"ascii\":return function(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case\"latin1\":case\"binary\":return function(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case\"base64\":return function(t,e,r){return 0===e&&r===t.length?D.fromByteArray(t):D.fromByteArray(t.slice(e,r))}(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return function(t,e,r){for(var n=t.slice(e,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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,z(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:p(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):p(t,[e],r,n,a);throw new TypeError(\"val must be string, number or Buffer\")}function p(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 c;if(i){var u=-1;for(c=r;c<s;c++)if(a(t,c)===a(e,-1===u?0:c-u)){if(-1===u&&(u=c),c-u+1===l)return u*o}else-1!==u&&(c-=c-u),u=-1}else for(r+l>s&&(r=s-l),c=r;c>=0;c--){for(var f=!0,h=0;h<l;h++)if(a(t,c+h)!==a(e,h)){f=!1;break}if(f)return c}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(z(s))return o;t[r+o]=s}return o}function g(t,e,r,n){return L(S(e,t.length-r),t,r,n)}function v(t,e,r,n){return L(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function y(t,e,r,n){return v(t,e,r,n)}function x(t,e,r,n){return L(E(e),t,r,n)}function b(t,e,r,n){return L(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,c,u,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(f=(15&a)<<12|(63&l)<<6|63&c)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(f=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&f<1114112&&(o=f)}}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 function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}function w(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function M(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>a||e<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function k(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 A(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,4),I.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,8),I.write(t,e,r,n,52,8),r+8}function S(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&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 E(t){return D.toByteArray(function(t){if((t=t.trim().replace(F,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function L(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function C(t){return\"function\"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function z(t){return t!=t}var D=t(\"base64-js\"),I=t(\"ieee754\");r.Buffer=i,r.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},r.INSPECT_MAX_BYTES=50;var P=2147483647;r.kMaxLength=P,(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}}())||\"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 function(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)}(t,e,r)},i.allocUnsafe=function(t){return s(t)},i.allocUnsafeSlow=function(t){return s(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);a<o;++a)if(t[a]!==e[a]){r=t[a],n=e[a];break}return r<n?-1:n<r?1:0},i.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},i.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return i.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=i.allocUnsafe(e),a=0;for(r=0;r<t.length;++r){var o=t[r];if(!i.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},i.byteLength=u,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var e=0;e<t;e+=2)h(this,e,e+1);return this},i.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var e=0;e<t;e+=4)h(this,e,e+3),h(this,e+1,e+2);return this},i.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var e=0;e<t;e+=8)h(this,e,e+7),h(this,e+1,e+6),h(this,e+2,e+5),h(this,e+3,e+4);return this},i.prototype.toString=function(){var t=this.length;return 0===t?\"\":0===arguments.length?_(this,0,t):f.apply(this,arguments)},i.prototype.equals=function(t){if(!i.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===i.compare(this,t)},i.prototype.inspect=function(){var t=\"\",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,e).match(/.{2}/g).join(\" \"),this.length>e&&(t+=\" ... \")),\"<Buffer \"+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),c=this.slice(n,a),u=t.slice(e,r),f=0;f<l;++f)if(c[f]!==u[f]){o=c[f],s=u[f];break}return o<s?-1:s<o?1:0},i.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},i.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},i.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},i.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=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 m(this,t,e,r);case\"utf8\":case\"utf-8\":return g(this,t,e,r);case\"ascii\":return v(this,t,e,r);case\"latin1\":case\"binary\":return y(this,t,e,r);case\"base64\":return x(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return b(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 O=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<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},i.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(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||w(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(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||w(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||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(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||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||w(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||w(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||w(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||w(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||w(t,4,this.length),I.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),I.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){M(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},i.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){M(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||M(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||M(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||M(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||M(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||M(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);M(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(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.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(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||M(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||M(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||M(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||M(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||M(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 A(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return T(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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},i.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),1===t.length){var a=t.charCodeAt(0);a<256&&(t=a)}if(void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!i.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n)}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if(\"number\"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=i.isBuffer(t)?t:new i(t,n),l=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%l]}return this};var F=/[^+/0-9A-Za-z-_]/g},{\"base64-js\":83,ieee754:277}],83:[function(t,e,r){\"use strict\";function n(t){var e=t.length;if(e%4>0)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 o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function a(t,e,r){for(var n,a=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],a.push(i(n));return a.join(\"\")}r.byteLength=function(t){return 3*t.length/4-n(t)},r.toByteArray=function(t){var e,r,i,a,o,c,u=t.length;o=n(t),c=new l(3*u/4-o),i=o>0?u-4:u;var f=0;for(e=0,r=0;e<i;e+=4,r+=3)a=s[t.charCodeAt(e)]<<18|s[t.charCodeAt(e+1)]<<12|s[t.charCodeAt(e+2)]<<6|s[t.charCodeAt(e+3)],c[f++]=a>>16&255,c[f++]=a>>8&255,c[f++]=255&a;return 2===o?(a=s[t.charCodeAt(e)]<<2|s[t.charCodeAt(e+1)]>>4,c[f++]=255&a):1===o&&(a=s[t.charCodeAt(e)]<<10|s[t.charCodeAt(e+1)]<<4|s[t.charCodeAt(e+2)]>>2,c[f++]=a>>8&255,c[f++]=255&a),c},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i=\"\",s=[],l=0,c=r-n;l<c;l+=16383)s.push(a(t,l,l+16383>c?c:l+16383));return 1===n?(e=t[r-1],i+=o[e>>2],i+=o[e<<4&63],i+=\"==\"):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=o[e>>10],i+=o[e>>4&63],i+=o[e<<2&63],i+=\"=\"),s.push(i),s.join(\"\")};for(var o=[],s=[],l=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,c=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",u=0,f=c.length;u<f;++u)o[u]=c[u],s[c.charCodeAt(u)]=u;s[\"-\".charCodeAt(0)]=62,s[\"_\".charCodeAt(0)]=63},{}],84:[function(t,e,r){\"use strict\";function n(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function i(t,e){return t[0]-e[0]||t[1]-e[1]}function a(t,e,r){return e in t?t[e]:r}var o=t(\"./lib/monotone\"),s=t(\"./lib/triangulation\"),l=t(\"./lib/delaunay\"),c=t(\"./lib/filter\");e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!a(r,\"delaunay\",!0),f=!!a(r,\"interior\",!0),h=!!a(r,\"exterior\",!0),d=!!a(r,\"infinity\",!1);if(!f&&!h||0===t.length)return[];var p=o(t,e);if(u||f!==h||d){for(var m=s(t.length,function(t){return t.map(n).sort(i)}(e)),g=0;g<p.length;++g){var v=p[g];m.addTriangle(v[0],v[1],v[2])}return u&&l(t,m),h?f?d?c(m,0,d):m.cells():c(m,1,d):c(m,-1)}return p}},{\"./lib/delaunay\":85,\"./lib/filter\":86,\"./lib/monotone\":87,\"./lib/triangulation\":88}],85:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o){var s=e.opposite(n,a);if(!(s<0)){if(a<n){var l=n;n=a,a=l,l=o,o=s,s=l}e.isConstraint(n,a)||i(t[n],t[a],t[o],t[s])<0&&r.push(n,a)}}var i=t(\"robust-in-sphere\")[4];t(\"binary-search-bounds\");e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],c=1;c<l.length;c+=2)if(!((d=l[c])<s||e.isConstraint(s,d))){for(var u=l[c-1],f=-1,h=1;h<l.length;h+=2)if(l[h-1]===d){f=l[h];break}f<0||i(t[s],t[d],t[u],t[f])<0&&r.push(s,d)}for(;r.length>0;){for(var d=r.pop(),p=(u=-1,f=-1,l=o[s=r.pop()],1);p<l.length;p+=2){var m=l[p-1],g=l[p];m===d?f=g:g===d&&(u=m)}u<0||f<0||i(t[s],t[d],t[u],t[f])>=0||(e.flip(s,d),n(t,e,r,u,s,f),n(t,e,r,s,f,u),n(t,e,r,f,d,u),n(t,e,r,d,u,f))}}},{\"binary-search-bounds\":89,\"robust-in-sphere\":513}],86:[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]}var a=t(\"binary-search-bounds\");e.exports=function(t,e,r){var a=function(t,e){for(var r=t.cells(),a=r.length,o=0;o<a;++o){var s=(v=r[o])[0],l=v[1],c=v[2];l<c?l<s&&(v[0]=l,v[1]=c,v[2]=s):c<s&&(v[0]=c,v[1]=s,v[2]=l)}r.sort(i);var u=new Array(a);for(o=0;o<u.length;++o)u[o]=0;var f=[],h=[],d=new Array(3*a),p=new Array(3*a),m=null;e&&(m=[]);var g=new n(r,d,p,u,f,h,m);for(o=0;o<a;++o)for(var v=r[o],y=0;y<3;++y){s=v[y],l=v[(y+1)%3];var x=d[3*o+y]=g.locate(l,s,t.opposite(l,s)),b=p[3*o+y]=t.isConstraint(s,l);x<0&&(b?h.push(o):(f.push(o),u[o]=1),e&&m.push([l,s,-1]))}return g}(t,r);if(0===e)return r?a.cells.concat(a.boundary):a.cells;for(var o=1,s=a.active,l=a.next,c=a.flags,u=a.cells,f=a.constraint,h=a.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var d=s.pop();if(c[d]!==-o){c[d]=o,u[d];for(var p=0;p<3;++p){var m=h[3*d+p];m>=0&&0===c[m]&&(f[3*d+p]?l.push(m):(s.push(m),c[m]=o))}}}var g=l;l=s,s=g,l.length=0,o=-o}var v=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(u,c,e);return r?v.concat(a.boundary):v};n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var o=e,s=r,l=n;return r<n?r<e&&(o=r,s=n,l=e):n<e&&(o=n,s=e,l=r),o<0?-1:(t[0]=o,t[1]=s,t[2]=l,a.eq(this.cells,t,i))}}()},{\"binary-search-bounds\":89}],87:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function i(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function a(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==d&&(r=h(t.a,t.b,e.b))?r:t.idx-e.idx)}function o(t,e){return h(t.a,t.b,e)}function s(t,e,r,n,i){for(var a=f.lt(e,n,o),s=f.gt(e,n,o),l=a;l<s;++l){for(var c=e[l],u=c.lowerIds,d=u.length;d>1&&h(r[u[d-2]],r[u[d-1]],n)>0;)t.push([u[d-1],u[d-2],i]),d-=1;u.length=d,u.push(i);var p=c.upperIds;for(d=p.length;d>1&&h(r[p[d-2]],r[p[d-1]],n)<0;)t.push([p[d-2],p[d-1],i]),d-=1;p.length=d,p.push(i)}}function l(t,e){var r;return(r=t.a[0]<e.a[0]?h(t.a,t.b,e.a):h(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?h(t.a,t.b,e.b):h(e.b,e.a,t.b))||t.idx-e.idx}function c(t,e,r){var i=f.le(t,r,l),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new n(r.a,r.b,r.idx,[s],o))}function u(t,e,r){var n=r.a;r.a=r.b,r.b=n;var i=f.eq(t,r,l),a=t[i];t[i-1].upperIds=a.upperIds,t.splice(i,1)}var f=t(\"binary-search-bounds\"),h=t(\"robust-orientation\")[3],d=0,p=1,m=2;e.exports=function(t,e){for(var r=t.length,o=e.length,l=[],f=0;f<r;++f)l.push(new i(t[f],null,d,f));for(f=0;f<o;++f){var h=e[f],g=t[h[0]],v=t[h[1]];g[0]<v[0]?l.push(new i(g,v,m,f),new i(v,g,p,f)):g[0]>v[0]&&l.push(new i(v,g,m,f),new i(g,v,p,f))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),x=[new n([y,1],[y,0],-1,[],[],[],[])],b=[],_=(f=0,l.length);f<_;++f){var w=l[f],M=w.type;M===d?s(b,x,t,w.a,w.idx):M===m?c(x,0,w):u(x,0,w)}return b}},{\"binary-search-bounds\":89,\"robust-orientation\":515}],88:[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<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}var a=t(\"binary-search-bounds\");e.exports=function(t,e){for(var r=new Array(t),i=0;i<t;++i)r[i]=[];return new n(r,e)};var o=n.prototype;o.isConstraint=function(){function t(t,e){return t[0]-e[0]||t[1]-e[1]}var e=[0,0];return function(r,n){return e[0]=Math.min(r,n),e[1]=Math.max(r,n),a.eq(this.edges,e,t)>=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},o.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},o.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},o.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{\"binary-search-bounds\":89}],89:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=[\"function \",t,\"(a,l,h,\",n.join(\",\"),\"){\",i?\"\":\"var i=\",r?\"l-1\":\"h+1\",\";while(l<=h){var m=(l+h)>>>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)}},{}],90:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],91:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function i(t){var e=t.length;if(0===e)return[];t[0].length;var r=o([t.length+1,t.length+1],1),i=o([t.length+1],1);r[e][e]=0;for(var a=0;a<e;++a){for(var l=0;l<=a;++l)r[l][a]=r[a][l]=2*n(t[a],t[l]);i[a]=n(t[a],t[a])}var c=s(r,i),u=0,f=c[e+1];for(a=0;a<f.length;++a)u+=f[a];var h=new Array(e);for(a=0;a<e;++a){f=c[a];var d=0;for(l=0;l<f.length;++l)d+=f[l];h[a]=d/u}return h}function a(t){if(0===t.length)return[];for(var e=t[0].length,r=o([e]),n=i(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*n[a];return r}var o=t(\"dup\"),s=t(\"robust-linear-solve\");a.barycenetric=i,e.exports=a},{dup:134,\"robust-linear-solve\":514}],92:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(\"circumcenter\")},{circumcenter:91}],93:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},{}],94:[function(t,e,r){\"use strict\";function n(t){var e=m(t);return[v(e,-1/0),v(e,1/0)]}function i(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[v(n[0],-1/0),v(n[1],-1/0),v(n[0],1/0),v(n[1],1/0)]}return e}function a(t,e,r){for(var i=e.length,a=new u(i),o=[],s=0;s<e.length;++s){var l=e[s],c=n(l[0]),h=n(l[1]);o.push([v(c[0],-1/0),v(h[0],-1/0),v(c[1],1/0),v(h[1],1/0)])}f(o,function(t,e){a.link(t,e)});var d=!0,p=new Array(i);for(s=0;s<i;++s){(g=a.find(s))!==s&&(d=!1,t[g]=[Math.min(t[s][0],t[g][0]),Math.min(t[s][1],t[g][1])])}if(d)return null;var m=0;for(s=0;s<i;++s){var g;(g=a.find(s))===s?(p[s]=m,t[m++]=t[s]):p[s]=-1}t.length=m;for(s=0;s<i;++s)p[s]<0&&(p[s]=p[a.find(s)]);return p}function o(t,e){return t[0]-e[0]||t[1]-e[1]}function s(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function l(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(l=t[n])[0]],a=e[l[1]];l[0]=Math.min(i,a),l[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var l;i=(l=t[n])[0],a=l[1];l[0]=Math.min(i,a),l[1]=Math.max(i,a)}r?t.sort(s):t.sort(o);var c=1;for(n=1;n<t.length;++n){var u=t[n-1],f=t[n];(f[0]!==u[0]||f[1]!==u[1]||r&&f[2]!==u[2])&&(t[c++]=f)}t.length=c}}function c(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[v(Math.min(a[0],o[0]),-1/0),v(Math.min(a[1],o[1]),-1/0),v(Math.max(a[0],o[0]),1/0),v(Math.max(a[1],o[1]),1/0)]}return r}(t,e),o=function(t,e,r){var n=[];return f(r,function(r,i){var a=e[r],o=e[i];if(a[0]!==o[0]&&a[0]!==o[1]&&a[1]!==o[0]&&a[1]!==o[1]){var s=t[a[0]],l=t[a[1]],c=t[o[0]],u=t[o[1]];h(s,l,c,u)&&n.push([r,i])}}),n}(t,e,n),s=i(t),c=function(t,e,r,n){var i=[];return f(r,n,function(r,n){var a=e[r];if(a[0]!==n&&a[1]!==n){var o=t[n],s=t[a[0]],l=t[a[1]];h(s,l,o,o)&&i.push([r,n])}}),i}(t,e,n,s),u=a(t,function(t,e,r,n,i){var a,o,s=t.map(function(t){return[d(t[0]),d(t[1])]});for(a=0;a<r.length;++a){var l=r[a];o=l[0];var c=l[1],u=e[o],f=e[c],h=y(g(t[u[0]]),g(t[u[1]]),g(t[f[0]]),g(t[f[1]]));if(h){var v=t.length;t.push([m(h[0]),m(h[1])]),s.push(h),n.push([o,v],[c,v])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=s[t[1]],n=s[e[1]];return p(r[0],n[0])||p(r[1],n[1])}),a=n.length-1;a>=0;--a){var x=e[o=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],M=t[_];if((w[0]-M[0]||w[1]-M[1])<0){var k=b;b=_,_=k}x[0]=b;var A,T=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===o;){var S,E=(S=n[--a])[1];i?e.push([T,E,A]):e.push([T,E]),T=E}i?e.push([T,_,A]):e.push([T,_])}return s}(t,e,o,c,r));return l(e,u,r),!!u||(o.length>0||c.length>0)}e.exports=function(t,e,r){var n;if(r){n=e;for(var o=new Array(e.length),s=0;s<e.length;++s){var u=e[s];o[s]=[u[0],u[1],r[s]]}e=o}for(var f=function(t,e,r){var n=a(t,[],i(t));return l(e,n,r),!!n}(t,e,!!r);c(t,e,!!r);)f=!0;if(r&&f)for(n.length=0,r.length=0,s=0;s<e.length;++s)u=e[s],n.push([u[0],u[1]]),r.push(u[2]);return f};var u=t(\"union-find\"),f=t(\"box-intersect\"),h=t(\"robust-segment-intersect\"),d=t(\"big-rat\"),p=t(\"big-rat/cmp\"),m=t(\"big-rat/to-float\"),g=t(\"rat-vec\"),v=t(\"nextafter\"),y=t(\"./lib/rat-seg-intersect\")},{\"./lib/rat-seg-intersect\":95,\"big-rat\":57,\"big-rat/cmp\":55,\"big-rat/to-float\":69,\"box-intersect\":75,nextafter:459,\"rat-vec\":496,\"robust-segment-intersect\":518,\"union-find\":555}],95:[function(t,e,r){\"use strict\";function n(t,e){return o(i(t[0],e[1]),i(t[1],e[0]))}e.exports=function(t,e,r,i){var o=l(e,t),f=l(i,r),h=n(o,f);if(0===s(h))return null;var d=n(f,l(t,r)),p=a(d,h),m=u(o,p);return c(t,m)};var i=t(\"big-rat/mul\"),a=t(\"big-rat/div\"),o=t(\"big-rat/sub\"),s=t(\"big-rat/sign\"),l=t(\"rat-vec/sub\"),c=t(\"rat-vec/add\"),u=t(\"rat-vec/muls\")},{\"big-rat/div\":56,\"big-rat/mul\":66,\"big-rat/sign\":67,\"big-rat/sub\":68,\"rat-vec/add\":495,\"rat-vec/muls\":497,\"rat-vec/sub\":498}],96:[function(t,e,r){(function(t){var r=function(){\"use strict\";function e(r,i,a,o){function s(r,a){if(null===r)return null;if(0==a)return r;var f,h;if(\"object\"!=typeof r)return r;if(e.__isArray(r))f=[];else if(e.__isRegExp(r))f=new RegExp(r.source,n(r)),r.lastIndex&&(f.lastIndex=r.lastIndex);else if(e.__isDate(r))f=new Date(r.getTime());else{if(u&&t.isBuffer(r))return f=new t(r.length),r.copy(f),f;void 0===o?(h=Object.getPrototypeOf(r),f=Object.create(h)):(f=Object.create(o),h=o)}if(i){var d=l.indexOf(r);if(-1!=d)return c[d];l.push(r),c.push(f)}for(var p in r){var m;h&&(m=Object.getOwnPropertyDescriptor(h,p)),m&&null==m.set||(f[p]=s(r[p],a-1))}return f}\"object\"==typeof i&&(a=i.depth,o=i.prototype,i.filter,i=i.circular);var l=[],c=[],u=void 0!==t;return void 0===i&&(i=!0),void 0===a&&(a=1/0),s(r,a)}function r(t){return Object.prototype.toString.call(t)}function n(t){var e=\"\";return t.global&&(e+=\"g\"),t.ignoreCase&&(e+=\"i\"),t.multiline&&(e+=\"m\"),e}return e.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},e.__objToStr=r,e.__isDate=function(t){return\"object\"==typeof t&&\"[object Date]\"===r(t)},e.__isArray=function(t){return\"object\"==typeof t&&\"[object Array]\"===r(t)},e.__isRegExp=function(t){return\"object\"==typeof t&&\"[object RegExp]\"===r(t)},e.__getRegExpFlags=n,e}();\"object\"==typeof e&&e.exports&&(e.exports=r)}).call(this,t(\"buffer\").Buffer)},{buffer:82}],97:[function(t,e,r){\"use strict\";function n(t,e){null==e&&(e=!0);var r=t[0],n=t[1],a=t[2],o=t[3];null==o&&(o=e?1:255),e&&(r*=255,n*=255,a*=255,o*=255);return 16777216*(r=255&i(r,0,255))+((n=255&i(n,0,255))<<16)+((a=255&i(a,0,255))<<8)+(o=255&i(o,0,255))}var i=t(\"clamp\");e.exports=n,e.exports.to=n,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:93}],98:[function(t,e,r){\"use strict\";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],99:[function(t,e,r){\"use strict\";var n=t(\"color-rgba\"),i=t(\"clamp\"),a=t(\"dtype\");e.exports=function(t,e){\"float\"!==e&&e||(e=\"array\"),\"uint\"===e&&(e=\"uint8\"),\"uint_clamped\"===e&&(e=\"uint8_clamped\");var r=a(e),o=new r(4);if(t instanceof r)return Array.isArray(t)?t.slice():(o.set(t),o);var s=\"uint8\"!==e&&\"uint8_clamped\"!==e;return t instanceof Uint8Array||t instanceof Uint8ClampedArray?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255),o):(t.length&&\"string\"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),s?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:1):(o[0]=i(Math.round(255*t[0]),0,255),o[1]=i(Math.round(255*t[1]),0,255),o[2]=i(Math.round(255*t[2]),0,255),o[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),o)}},{clamp:93,\"color-rgba\":101,dtype:133}],100:[function(t,e,r){(function(r){\"use strict\";var n=t(\"color-name\"),i=t(\"is-plain-obj\"),a=t(\"defined\");e.exports=function(t){var e,s,l=[],c=1;if(\"string\"==typeof t)if(n[t])l=n[t].slice(),s=\"rgb\";else if(\"transparent\"===t)c=0,s=\"rgb\",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1);c=1,(h=u.length)<=4?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=\"rgb\"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(t)){var f=e[1];s=u=f.replace(/a$/,\"\");var h=\"cmyk\"===u?4:\"gray\"===u?1:3;l=e[2].trim().split(/\\s*,\\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:\"rgb\"===u?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),f===u&&l.push(1),c=void 0===l[h]?1:l[h],l=l.slice(0,h)}else t.length>10&&/[0-9](?:\\s|\\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(\"\").toLowerCase());else if(\"number\"==typeof t)s=\"rgb\",l=[t>>>16,(65280&t)>>>8,255&t];else if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=\"rgb\",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=\"hsl\",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s=\"rgb\",c=4===t.length?t[3]:1);return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":98,defined:129,\"is-plain-obj\":286}],101:[function(t,e,r){\"use strict\";var n=t(\"color-parse\"),i=t(\"color-space/hsl\"),a=t(\"clamp\");e.exports=function(t){var e;if(\"string\"!=typeof t)throw Error(\"Argument should be a string\");var r=n(t);return r.space?(e=Array(3),e[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),\"h\"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:93,\"color-parse\":100,\"color-space/hsl\":102}],102:[function(t,e,r){\"use strict\";var n=t(\"./rgb\");e.exports={name:\"hsl\",min:[0,0,0],max:[360,100,100],channel:[\"hue\",\"saturation\",\"lightness\"],alias:[\"HSL\"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return a=255*l,[a,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&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[c]=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),c=l-s;return l===s?e=0:i===l?e=(a-o)/c:a===l?e=2+(o-i)/c:o===l&&(e=4+(i-a)/c),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?c/(l+s):c/(2-l-s),[e,100*r,100*n]}},{\"./rgb\":103}],103:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],104:[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]}]}},{}],105:[function(t,e,r){\"use strict\";function n(t){for(var e,r=\"#\",n=0;n<3;++n)r+=(\"00\"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function i(t){return\"rgba(\"+t.join(\",\")+\")\"}var a=t(\"arraytools\"),o=t(\"clone\"),s=t(\"./colorScales\");e.exports=function(t){var e,r,l,c,u,f,h,d,p,m,g,v,y,x=[],b=[],_=[],w=[];if(a.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||\"hex\",(h=t.colormap)||(h=\"jet\"),\"string\"==typeof h){if(h=h.toLowerCase(),!s[h])throw Error(h+\" not a supported colorscale\");f=o(s[h])}else{if(!Array.isArray(h))throw Error(\"unsupported colormap option\",h);f=o(h)}if(f.length>p)throw new Error(h+\" map requires nshades to be at least size \"+f.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:o(t.alpha):\"number\"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=f.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<e.length;++y)v=f[y].index,4===(r=f[y].rgb).length&&r[3]>=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y<e.length-1;++y)u=e[y+1]-e[y],l=f[y].rgb,c=f[y+1].rgb,x=x.concat(a.linspace(l[0],c[0],u)),b=b.concat(a.linspace(l[1],c[1],u)),_=_.concat(a.linspace(l[2],c[2],u)),w=w.concat(a.linspace(l[3],c[3],u));return x=x.map(Math.round),b=b.map(Math.round),_=_.map(Math.round),m=a.zip(x,b,_,w),\"hex\"===d&&(m=m.map(n)),\"rgbaString\"===d&&(m=m.map(i)),m}},{\"./colorScales\":104,arraytools:50,clone:96}],106:[function(t,e,r){\"use strict\";function n(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),a=o(r[0],-e[0]),c=o(r[1],-e[1]),u=l(s(n,a),s(i,c));return u[u.length-1]>=0}e.exports=function(t,e,r,o){var s=i(e,r,o);if(0===s){var l=a(i(t,e,r)),c=a(i(t,e,o));if(l===c){if(0===l){var u=n(t,e,r);return u===n(t,e,o)?0:u?1:-1}return 0}return 0===c?l>0?-1:n(t,e,o)?-1:1:0===l?c>0?1:n(t,e,r)?1:-1:a(c-l)}var f=i(t,e,r);return f>0?s>0&&i(t,e,o)>0?1:-1:f<0?s>0||i(t,e,o)>0?1:-1:i(t,e,o)>0?1:n(t,e,r)?1:-1};var i=t(\"robust-orientation\"),a=t(\"signum\"),o=t(\"two-sum\"),s=t(\"robust-product\"),l=t(\"robust-sum\")},{\"robust-orientation\":515,\"robust-product\":516,\"robust-sum\":520,signum:522,\"two-sum\":553}],107:[function(t,e,r){function n(t,e){return t-e}e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=i(t[0],t[1]),c=i(e[0],e[1]);return i(l,t[2])-i(c,e[2])||i(l+t[2],o)-i(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return u+f+h+d-(p+m+g+v)||i(u,f,h,d)-i(p,m,g,v,p)||i(u+f,u+h,u+d,f+h,f+d,h+d)-i(p+m,p+g,p+v,m+g,m+v,g+v)||i(u+f+h,u+f+d,u+h+d,f+h+d)-i(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),x=e.slice().sort(n),b=0;b<r;++b)if(a=y[b]-x[b])return a;return 0}};var i=Math.min},{}],108:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"cell-orientation\");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{\"cell-orientation\":90,\"compare-cell\":107}],109:[function(t,e,r){\"use strict\";var n=t(\"./lib/ch1d\"),i=t(\"./lib/ch2d\"),a=t(\"./lib/chnd\");e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;return 0===r?[]:1===r?n(t):2===r?i(t):a(t,r)}},{\"./lib/ch1d\":110,\"./lib/ch2d\":111,\"./lib/chnd\":112}],110:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},{}],111:[function(t,e,r){\"use strict\";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(\"monotone-convex-hull-2d\")},{\"monotone-convex-hull-2d\":442}],112:[function(t,e,r){\"use strict\";e.exports=function(t,e){try{return n(t,!0)}catch(o){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];var a=e.length;for(i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t(\"incremental-convex-hull\"),i=t(\"affine-hull\")},{\"affine-hull\":45,\"incremental-convex-hull\":278}],113:[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\"}},{}],114:[function(t,e,r){function n(t){return(t=Math.round(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 c)return c[e].slice();if(\"#\"===e[0]){if(4===e.length){return(r=parseInt(e.substr(1),16))>=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;return(r=parseInt(e.substr(1),16))>=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 u=e.substr(0,i),f=e.substr(i+1,l-(i+1)).split(\",\"),h=1;switch(u){case\"rgba\":if(4!==f.length)return null;h=o(f.pop());case\"rgb\":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case\"hsla\":if(4!==f.length)return null;h=o(f.pop());case\"hsl\":if(3!==f.length)return null;var d=(parseFloat(f[0])%360+360)%360/360,p=o(f[1]),m=o(f[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)),h];default:return null}}return null}var c={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){}},{}],115:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=c*t[d]+u*e[d]+f*r[d]+h*n[d];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(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,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],116:[function(t,e,r){\"use strict\";var n=t(\"./lib/thunk.js\");e.exports=function(t){var e=new function(){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};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;i<r.length;++i){var a=r[i];if(\"array\"===a||\"object\"==typeof a&&a.blockIndices){if(e.argTypes[i]=\"array\",e.arrayArgs.push(i),e.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),e.shimArgs.push(\"array\"+i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error(\"cwise: pre() block may not reference array args\");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error(\"cwise: post() block may not reference array args\")}else if(\"scalar\"===a)e.scalarArgs.push(i),e.shimArgs.push(\"scalar\"+i);else if(\"index\"===a){if(e.indexArgs.push(i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error(\"cwise: pre() block may not reference array index\");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error(\"cwise: body() block may not write to array index\");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error(\"cwise: post() block may not reference array index\")}else if(\"shape\"===a){if(e.shapeArgs.push(i),i<e.pre.args.length&&e.pre.args[i].lvalue)throw new Error(\"cwise: pre() block may not write to array shape\");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error(\"cwise: body() block may not write to array shape\");if(i<e.post.args.length&&e.post.args[i].lvalue)throw new Error(\"cwise: post() block may not write to array shape\")}else{if(\"object\"!=typeof a||!a.offset)throw new Error(\"cwise: Unknown argument type \"+r[i]);e.argTypes[i]=\"offset\",e.offsetArgs.push({array:a.array,offset:a.offset}),e.offsetArgIndex.push(i)}}if(e.arrayArgs.length<=0)throw new Error(\"cwise: No array arguments specified\");if(e.pre.args.length>r.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,n(e)}},{\"./lib/thunk.js\":118}],117:[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=[],c=[],u=0,f=0;for(n=0;n<a;++n)c.push([\"i\",n,\"=0\"].join(\"\"));for(i=0;i<o;++i)for(n=0;n<a;++n)f=u,u=t[n],0===n?c.push([\"d\",i,\"s\",n,\"=t\",i,\"p\",u].join(\"\")):c.push([\"d\",i,\"s\",n,\"=(t\",i,\"p\",u,\"-s\",f,\"*t\",i,\"p\",f,\")\"].join(\"\"));for(l.push(\"var \"+c.join(\",\")),n=a-1;n>=0;--n)u=t[n],l.push([\"for(i\",n,\"=0;i\",n,\"<s\",u,\";++i\",n,\"){\"].join(\"\"));for(l.push(r),n=0;n<a;++n){for(f=u,u=t[n],i=0;i<o;++i)l.push([\"p\",i,\"+=d\",i,\"s\",n].join(\"\"));s&&(n>0&&l.push([\"index[\",f,\"]-=s\",f].join(\"\")),l.push([\"++index[\",u,\"]\"].join(\"\"))),l.push(\"}\")}return l.join(\"\\n\")}function i(t,e,r){for(var n=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,\"g\"),c=\"\",u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case\"offset\":var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=\"+q\"+f;case\"array\":c=\"p\"+u+c;var h=\"l\"+o,d=\"a\"+u;if(0===e.arrayBlockIndices[u])1===s.count?\"generic\"===r[u]?s.lvalue?(i.push([\"var \",h,\"=\",d,\".get(\",c,\")\"].join(\"\")),n=n.replace(l,h),a.push([d,\".set(\",c,\",\",h,\")\"].join(\"\"))):n=n.replace(l,[d,\".get(\",c,\")\"].join(\"\")):n=n.replace(l,[d,\"[\",c,\"]\"].join(\"\")):\"generic\"===r[u]?(i.push([\"var \",h,\"=\",d,\".get(\",c,\")\"].join(\"\")),n=n.replace(l,h),s.lvalue&&a.push([d,\".set(\",c,\",\",h,\")\"].join(\"\"))):(i.push([\"var \",h,\"=\",d,\"[\",c,\"]\"].join(\"\")),n=n.replace(l,h),s.lvalue&&a.push([d,\"[\",c,\"]=\",h].join(\"\")));else{for(var p=[s.name],m=[c],g=0;g<Math.abs(e.arrayBlockIndices[u]);g++)p.push(\"\\\\s*\\\\[([^\\\\]]+)\\\\]\"),m.push(\"$\"+(g+1)+\"*t\"+u+\"b\"+g);if(l=new RegExp(p.join(\"\"),\"g\"),c=m.join(\"+\"),\"generic\"===r[u])throw new Error(\"cwise: Generic arrays not supported in combination with blocks!\");n=n.replace(l,[d,\"[\",c,\"]\"].join(\"\"))}break;case\"scalar\":n=n.replace(l,\"Y\"+e.scalarArgs.indexOf(o));break;case\"index\":n=n.replace(l,\"index\");break;case\"shape\":n=n.replace(l,\"shape\")}}}return[i.join(\"\\n\"),n,a.join(\"\\n\")].join(\"\\n\").trim()}var a=t(\"uniq\");e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l<t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],d=[];for(l=0;l<t.arrayArgs.length;++l){t.arrayBlockIndices[l]<0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var p=[],m=0;m<o[l].length;m++)f[l]<=o[l][m]&&o[l][m]<h[l]&&p.push(o[l][m]-f[l]);d.push(p)}var g=[\"SS\"],v=[\"'use strict'\"],y=[];for(m=0;m<r;++m)y.push([\"s\",m,\"=SS[\",m,\"]\"].join(\"\"));for(l=0;l<t.arrayArgs.length;++l){for(g.push(\"a\"+l),g.push(\"t\"+l),g.push(\"p\"+l),m=0;m<r;++m)y.push([\"t\",l,\"p\",m,\"=t\",l,\"[\",f[l]+m,\"]\"].join(\"\"));for(m=0;m<Math.abs(t.arrayBlockIndices[l]);++m)y.push([\"t\",l,\"b\",m,\"=t\",l,\"[\",c[l]+m,\"]\"].join(\"\"))}for(l=0;l<t.scalarArgs.length;++l)g.push(\"Y\"+l);if(t.shapeArgs.length>0&&y.push(\"shape=SS.slice(0)\"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l<r;++l)x[l]=\"0\";y.push([\"index=[\",x.join(\",\"),\"]\"].join(\"\"))}for(l=0;l<t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(m=0;m<b.offset.length;++m)0!==b.offset[m]&&(1===b.offset[m]?_.push([\"t\",b.array,\"p\",m].join(\"\")):_.push([b.offset[m],\"*t\",b.array,\"p\",m].join(\"\")));0===_.length?y.push(\"q\"+l+\"=0\"):y.push([\"q\",l,\"=\",_.join(\"+\")].join(\"\"))}var w=a([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for(y=y.concat(w),v.push(\"var \"+y.join(\",\")),l=0;l<t.arrayArgs.length;++l)v.push(\"p\"+l+\"|=0\");t.pre.body.length>3&&v.push(i(t.pre,t,s));var M=i(t.body,t,s),k=function(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(d);k<r?v.push(function(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,c=[],u=0;u<o;++u)c.push([\"var offset\",u,\"=p\",u].join(\"\"));for(u=t;u<a;++u)c.push([\"for(var j\"+u+\"=SS[\",e[u],\"]|0;j\",u,\">0;){\"].join(\"\")),c.push([\"if(j\",u,\"<\",s,\"){\"].join(\"\")),c.push([\"s\",e[u],\"=j\",u].join(\"\")),c.push([\"j\",u,\"=0\"].join(\"\")),c.push([\"}else{s\",e[u],\"=\",s].join(\"\")),c.push([\"j\",u,\"-=\",s,\"}\"].join(\"\")),l&&c.push([\"index[\",e[u],\"]=j\",u].join(\"\"));for(u=0;u<o;++u){for(var f=[\"offset\"+u],h=t;h<a;++h)f.push([\"j\",h,\"*t\",u,\"p\",e[h]].join(\"\"));c.push([\"p\",u,\"=(\",f.join(\"+\"),\")\"].join(\"\"))}for(c.push(n(e,r,i)),u=t;u<a;++u)c.push(\"}\");return c.join(\"\\n\")}(k,d[0],t,M)):v.push(n(d[0],t,M)),t.post.body.length>3&&v.push(i(t.post,t,s)),t.debug&&console.log(\"-----Generated cwise routine for \",e,\":\\n\"+v.join(\"\\n\")+\"\\n----------\");var A=[t.funcName||\"unnamed\",\"_cwise_loop_\",o[0].join(\"s\"),\"m\",k,function(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var i=t[n],a=i.match(/\\d+/);a=a?a[0]:\"\",0===i.charAt(0)?e[n]=\"u\"+i.charAt(1)+a:e[n]=i.charAt(0)+a,n>0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join(\"\")}(s)].join(\"\");return new Function([\"function \",A,\"(\",g.join(\",\"),\"){\",v.join(\"\\n\"),\"} return \",A].join(\"\"))()}},{uniq:556}],118:[function(t,e,r){\"use strict\";var n=t(\"./compile.js\");e.exports=function(t){var e=[\"'use strict'\",\"var CACHED={}\"],r=[],i=t.funcName+\"_cwise_thunk\";e.push([\"return function \",i,\"(\",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=[],c=[],u=0;u<t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([\"t\",f,\"=array\",f,\".dtype,\",\"r\",f,\"=array\",f,\".order\"].join(\"\")),a.push(\"t\"+f),a.push(\"r\"+f),o.push(\"t\"+f),o.push(\"r\"+f+\".join()\"),s.push(\"array\"+f+\".data\"),s.push(\"array\"+f+\".stride\"),s.push(\"array\"+f+\".offset|0\"),u>0&&(l.push(\"array\"+t.arrayArgs[0]+\".shape.length===array\"+f+\".shape.length+\"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(\"array\"+t.arrayArgs[0]+\".shape[shapeIndex+\"+Math.max(0,t.arrayBlockIndices[0])+\"]===array\"+f+\".shape[shapeIndex+\"+Math.max(0,t.arrayBlockIndices[u])+\"]\"))}for(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 (!(\"+c.join(\" && \")+\")) throw new Error('cwise: Arrays do not all have the same shape!')\"),e.push(\"}\")),u=0;u<t.scalarArgs.length;++u)s.push(\"scalar\"+t.scalarArgs[u]);return r.push([\"type=[\",o.join(\",\"),\"].join()\"].join(\"\")),r.push(\"proc=CACHED[type]\"),e.push(\"var \"+r.join(\",\")),e.push([\"if(!proc){\",\"CACHED[type]=proc=compile([\",a.join(\",\"),\"])}\",\"return proc(\",s.join(\",\"),\")}\"].join(\"\")),t.debug&&console.log(\"-----Generated thunk:\\n\"+e.join(\"\\n\")+\"\\n----------\"),new Function(\"compile\",e.join(\"\\n\"))(n.bind(void 0,t))}},{\"./compile.js\":117}],119:[function(t,e,r){e.exports=t(\"cwise-compiler\")},{\"cwise-compiler\":116}],120:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(t,e){return[t,e]}function r(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=b?10:a>=_?5:a>=w?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=b?10:a>=_?5:a>=w?2:1)}function n(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=b?i*=10:a>=_?i*=5:a>=w&&(i*=2),e<t?-i:i}function i(t){return t.length}var a=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},o=function(t){return 1===t.length&&(t=function(t){return function(e,r){return a(t(e),r)}}(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>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<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}},s=o(a),l=s.right,c=s.left,u=function(t){return null===t?NaN:+t},f=function(t,e){var r,n,i=t.length,a=0,o=-1,s=0,l=0;if(null==e)for(;++o<i;)isNaN(r=u(t[o]))||(l+=(n=r-s)*(r-(s+=n/++a)));else for(;++o<i;)isNaN(r=u(e(t[o],o,t)))||(l+=(n=r-s)*(r-(s+=n/++a)));if(a>1)return l/(a-1)},h=function(t,e){var r=f(t,e);return r?Math.sqrt(r):r},d=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r>=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]},p=Array.prototype,m=p.slice,g=p.map,v=function(t){return function(){return t}},y=function(t){return t},x=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a},b=Math.sqrt(50),_=Math.sqrt(10),w=Math.sqrt(2),M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},k=function(t,e,r){if(null==r&&(r=u),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=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)}},A=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&n>r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n>r&&(n=r);return n},T=function(t){if(!(a=t.length))return[];for(var e=-1,r=A(t,i),n=new Array(r);++e<r;)for(var a,o=-1,s=n[e]=new Array(a);++o<a;)s[o]=t[o][e];return n};t.bisect=l,t.bisectRight=l,t.bisectLeft=c,t.ascending=a,t.bisector=o,t.cross=function(t,r,n){var i,a,o,s,l=t.length,c=r.length,u=new Array(l*c);for(null==n&&(n=e),i=o=0;i<l;++i)for(s=t[i],a=0;a<c;++a,++o)u[o]=n(s,r[a]);return u},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=h,t.extent=d,t.histogram=function(){function t(t){var a,o,s=t.length,c=new Array(s);for(a=0;a<s;++a)c[a]=e(t[a],a,t);var u=r(c),f=u[0],h=u[1],d=i(c,f,h);Array.isArray(d)||(d=n(f,h,d),d=x(Math.ceil(f/d)*d,Math.floor(h/d)*d,d));for(var p=d.length;d[0]<=f;)d.shift(),--p;for(;d[p-1]>h;)d.pop(),--p;var m,g=new Array(p+1);for(a=0;a<=p;++a)(m=g[a]=[]).x0=a>0?d[a-1]:f,m.x1=a<p?d[a]:h;for(a=0;a<s;++a)f<=(o=c[a])&&o<=h&&g[l(d,o,0,p)].push(t[a]);return g}var e=y,r=d,i=M;return t.value=function(r){return arguments.length?(e=\"function\"==typeof r?r:v(r),t):e},t.domain=function(e){return arguments.length?(r=\"function\"==typeof e?e:v([e[0],e[1]]),t):r},t.thresholds=function(e){return arguments.length?(i=\"function\"==typeof e?e:v(Array.isArray(e)?m.call(e):e),t):i},t},t.thresholdFreedmanDiaconis=function(t,e,r){return t=g.call(t,u).sort(a),Math.ceil((r-e)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*h(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=M,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&r>n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r>n&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=u(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=u(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,e){var r,n=t.length,i=-1,o=[];if(null==e)for(;++i<n;)isNaN(r=u(t[i]))||o.push(r);else for(;++i<n;)isNaN(r=u(e(t[i],i,t)))||o.push(r);return k(o.sort(a),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=A,t.pairs=function(t,r){null==r&&(r=e);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n<i;)o[n]=r(a,a=t[++n]);return o},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=x,t.scan=function(t,e){if(r=t.length){var r,n,i=0,o=0,s=t[o];for(null==e&&(e=a);++i<r;)(e(n=t[i],s)<0||0!==e(s,s))&&(s=n,o=i);return 0===e(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,n){var i,a,o,s=e<t,l=-1;if(s&&(i=t,t=e,e=i),0===(o=r(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return s&&a.reverse(),a},t.tickIncrement=r,t.tickStep=n,t.transpose=T,t.variance=f,t.zip=function(){return T(arguments)},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],121:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}function l(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}e.prototype=r.prototype={constructor:e,has:function(t){return\"$\"+t in this},get:function(t){return this[\"$\"+t]},set:function(t,e){return this[\"$\"+t]=e,this},remove:function(t){var e=\"$\"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)\"$\"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)\"$\"===e[0]&&++t;return t},empty:function(){for(var t in this)if(\"$\"===t[0])return!1;return!0},each:function(t){for(var e in this)\"$\"===e[0]&&t(this[e],e.slice(1),this)}};var 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};t.nest=function(){function t(e,n,i,a){if(n>=u.length)return null!=l?l(e):null!=s?e.sort(s):e;for(var o,c,f,h=-1,d=e.length,p=u[n++],m=r(),g=i();++h<d;)(f=m.get(o=p(c=e[h])+\"\"))?f.push(c):m.set(o,[c]);return m.each(function(e,r){a(g,r,t(e,n,i,a))}),g}function e(t,r){if(++r>u.length)return t;var n,i=f[r-1];return null!=l&&r>=u.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,c,u=[],f=[];return c={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 u.push(t),c},sortKeys:function(t){return f[u.length-1]=t,c},sortValues:function(t){return s=t,c},rollup:function(t){return l=t,c}}},t.set=l,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],122:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.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=E.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=L.exec(t))?i(parseInt(e[1],16)):(e=C.exec(t))?new l(e[1],e[2],e[3],1):(e=z.exec(t))?new l(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=D.exec(t))?a(e[1],e[2],e[3],e[4]):(e=I.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=P.exec(t))?c(e[1],e[2]/100,e[3]/100,1):(e=O.exec(t))?c(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?i(F[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 c(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 u(t,e,i,a){return 1===arguments.length?function(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;var e=(t=t.rgb()).r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),l=NaN,c=s-o,u=(s+o)/2;return c?(l=e===s?(i-a)/c+6*(i<a):i===s?(a-e)/c+2:(e-i)/c+4,c/=u<.5?s+o:2-s-o,l*=60):c=u>0&&u<1?0:l,new f(l,c,u,t.opacity)}(t):new f(t,e,i,null==a?1:a)}function f(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function h(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 d(t){if(t instanceof m)return new m(t.l,t.a,t.b,t.opacity);if(t instanceof _){var e=t.h*R;return new m(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=g((.4124564*r+.3575761*n+.1804375*i)/j),s=g((.2126729*r+.7151522*n+.072175*i)/B);return new m(116*s-16,500*(a-s),200*(s-g((.0193339*r+.119192*n+.9503041*i)/U)),t.opacity)}function p(t,e,r,n){return 1===arguments.length?d(t):new m(t,e,r,null==n?1:n)}function m(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function g(t){return t>G?Math.pow(t,1/3):t/H+V}function v(t){return t>q?t*t*t:H*(t-V)}function y(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 b(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof _)return new _(t.h,t.c,t.l,t.opacity);t instanceof m||(t=d(t));var e=Math.atan2(t.b,t.a)*N;return new _(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function w(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof M)return new M(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=(K*n+Z*e-J*r)/(K+Z-J),a=n-i,s=(X*(r-i)-Y*a)/W,c=Math.sqrt(s*s+a*a)/(X*i*(1-i)),u=c?Math.atan2(s,a)*N-120:NaN;return new M(u<0?u+360:u,c,i,t.opacity)}(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}var k=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t},A=\"\\\\s*([+-]?\\\\d+)\\\\s*\",T=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",S=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",E=/^#([0-9a-f]{3})$/,L=/^#([0-9a-f]{6})$/,C=new RegExp(\"^rgb\\\\(\"+[A,A,A]+\"\\\\)$\"),z=new RegExp(\"^rgb\\\\(\"+[S,S,S]+\"\\\\)$\"),D=new RegExp(\"^rgba\\\\(\"+[A,A,A,T]+\"\\\\)$\"),I=new RegExp(\"^rgba\\\\(\"+[S,S,S,T]+\"\\\\)$\"),P=new RegExp(\"^hsl\\\\(\"+[T,S,S]+\"\\\\)$\"),O=new RegExp(\"^hsla\\\\(\"+[T,S,S,T]+\"\\\\)$\"),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};k(r,n,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+\"\"}}),k(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(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"rgb(\":\"rgba(\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\")\":\", \"+t+\")\")}})),k(f,u,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(h(t>=240?t-240:t+120,i,n),h(t,i,n),h(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 R=Math.PI/180,N=180/Math.PI,j=.95047,B=1,U=1.08883,V=4/29,q=6/29,H=3*q*q,G=q*q*q;k(m,p,e(r,{brighter:function(t){return new m(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new m(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=B*v(t),e=j*v(e),r=U*v(r),new l(y(3.2404542*e-1.5371385*t-.4985314*r),y(-.969266*e+1.8760108*t+.041556*r),y(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),k(_,b,e(r,{brighter:function(t){return new _(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new _(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return d(this).rgb()}}));var Y=-.29227,W=-.90649,X=1.97294,Z=X*W,J=1.78277*X,K=1.78277*Y- -.14861*W;k(M,w,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*R,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*(-.14861*n+1.78277*i)),255*(e+r*(Y*n+W*i)),255*(e+r*(X*n)),this.opacity)}})),t.color=n,t.rgb=s,t.hsl=u,t.lab=p,t.hcl=b,t.cubehelix=w,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],123:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+\"\")||t in i)throw new Error(\"illegal type: \"+t);i[t]=[]}return new r(i)}function r(t){this._=t}function n(t,e,r){for(var n=0,a=t.length;n<a;++n)if(t[n].name===e){t[n]=i,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}var i={value:function(){}};r.prototype=e.prototype={constructor:r,on:function(t,e){var r,i=this._,a=function(t,e){return t.trim().split(/^|\\s+/).map(function(t){var r=\"\",n=t.indexOf(\".\");if(n>=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}})}(t+\"\",i),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&\"function\"!=typeof e)throw new Error(\"invalid callback: \"+e);for(;++o<s;)if(r=(t=a[o]).type)i[r]=n(i[r],t.name,e);else if(null==e)for(r in i)i[r]=n(i[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=function(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new r(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=e,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],124:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-quadtree\"),t(\"d3-collection\"),t(\"d3-dispatch\"),t(\"d3-timer\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)}(this,function(t,e,r,n,i){\"use strict\";function a(t){return t.x+t.vx}function o(t){return t.y+t.vy}function s(t){return t.index}function l(t,e){var r=t.get(e);if(!r)throw new Error(\"missing: \"+e);return r}function c(t){return t.x}function u(t){return t.y}var f=function(t){return function(){return t}},h=function(){return 1e-6*(Math.random()-.5)},d=10,p=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}var n;return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},t.forceCollide=function(t){function r(){function t(t,e,r,n,i){var a=t.data,o=t.r,s=m+o;if(!a)return e>d+s||n<d-s||r>p+s||i<p-s;if(a.index>f.index){var l=d-a.x-a.vx,u=p-a.y-a.vy,v=l*l+u*u;v<s*s&&(0===l&&(l=h(),v+=l*l),0===u&&(u=h(),v+=u*u),v=(s-(v=Math.sqrt(v)))/v*c,f.vx+=(l*=v)*(s=(o*=o)/(g+o)),f.vy+=(u*=v)*s,a.vx-=l*(s=1-s),a.vy-=u*s)}}for(var r,i,f,d,p,m,g,v=s.length,y=0;y<u;++y)for(i=e.quadtree(s,a,o).visitAfter(n),r=0;r<v;++r)f=s[r],m=l[f.index],g=m*m,d=f.x+f.vx,p=f.y+f.vy,i.visit(t)}function n(t){if(t.data)return t.r=l[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function i(){if(s){var e,r,n=s.length;for(l=new Array(n),e=0;e<n;++e)r=s[e],l[r.index]=+t(r,e,s)}}var s,l,c=1,u=1;return\"function\"!=typeof t&&(t=f(null==t?1:+t)),r.initialize=function(t){s=t,i()},r.iterations=function(t){return arguments.length?(u=+t,r):u},r.strength=function(t){return arguments.length?(c=+t,r):c},r.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:f(+e),i(),r):t},r},t.forceLink=function(t){function e(e){for(var r=0,n=t.length;r<y;++r)for(var i,a,s,l,u,f,d,m=0;m<n;++m)a=(i=t[m]).source,l=(s=i.target).x+s.vx-a.x-a.vx||h(),u=s.y+s.vy-a.y-a.vy||h(),l*=f=((f=Math.sqrt(l*l+u*u))-c[m])/f*e*o[m],u*=f,s.vx-=l*(d=p[m]),s.vy-=u*d,a.vx+=l*(d=1-d),a.vy+=u*d}function n(){if(u){var e,n,s=u.length,f=t.length,h=r.map(u,m);for(e=0,d=new Array(s);e<f;++e)(n=t[e]).index=e,\"object\"!=typeof n.source&&(n.source=l(h,n.source)),\"object\"!=typeof n.target&&(n.target=l(h,n.target)),d[n.source.index]=(d[n.source.index]||0)+1,d[n.target.index]=(d[n.target.index]||0)+1;for(e=0,p=new Array(f);e<f;++e)n=t[e],p[e]=d[n.source.index]/(d[n.source.index]+d[n.target.index]);o=new Array(f),i(),c=new Array(f),a()}}function i(){if(u)for(var e=0,r=t.length;e<r;++e)o[e]=+g(t[e],e,t)}function a(){if(u)for(var e=0,r=t.length;e<r;++e)c[e]=+v(t[e],e,t)}var o,c,u,d,p,m=s,g=function(t){return 1/Math.min(d[t.source.index],d[t.target.index])},v=f(30),y=1;return null==t&&(t=[]),e.initialize=function(t){u=t,n()},e.links=function(r){return arguments.length?(t=r,n(),e):t},e.id=function(t){return arguments.length?(m=t,e):m},e.iterations=function(t){return arguments.length?(y=+t,e):y},e.strength=function(t){return arguments.length?(g=\"function\"==typeof t?t:f(+t),i(),e):g},e.distance=function(t){return arguments.length?(v=\"function\"==typeof t?t:f(+t),a(),e):v},e},t.forceManyBody=function(){function t(t){var r,l=a.length,f=e.quadtree(a,c,u).visitAfter(n);for(s=t,r=0;r<l;++r)o=a[r],f.visit(i)}function r(){if(a){var t,e,r=a.length;for(l=new Array(r),t=0;t<r;++t)e=a[t],l[e.index]=+d(e,t,a)}}function n(t){var e,r,n,i,a,o=0;if(t.length){for(n=i=a=0;a<4;++a)(e=t[a])&&(r=e.value)&&(o+=r,n+=r*e.x,i+=r*e.y);t.x=n/o,t.y=i/o}else{(e=t).x=e.data.x,e.y=e.data.y;do{o+=l[e.data.index]}while(e=e.next)}t.value=o}function i(t,e,r,n){if(!t.value)return!0;var i=t.x-o.x,a=t.y-o.y,c=n-e,u=i*i+a*a;if(c*c/g<u)return u<m&&(0===i&&(i=h(),u+=i*i),0===a&&(a=h(),u+=a*a),u<p&&(u=Math.sqrt(p*u)),o.vx+=i*t.value*s/u,o.vy+=a*t.value*s/u),!0;if(!(t.length||u>=m)){(t.data!==o||t.next)&&(0===i&&(i=h(),u+=i*i),0===a&&(a=h(),u+=a*a),u<p&&(u=Math.sqrt(p*u)));do{t.data!==o&&(c=l[t.data.index]*s/u,o.vx+=i*c,o.vy+=a*c)}while(t=t.next)}}var a,o,s,l,d=f(-30),p=1,m=1/0,g=.81;return t.initialize=function(t){a=t,r()},t.strength=function(e){return arguments.length?(d=\"function\"==typeof e?e:f(+e),r(),t):d},t.distanceMin=function(e){return arguments.length?(p=e*e,t):Math.sqrt(p)},t.distanceMax=function(e){return arguments.length?(m=e*e,t):Math.sqrt(m)},t.theta=function(e){return arguments.length?(g=e*e,t):Math.sqrt(g)},t},t.forceSimulation=function(t){function e(){a(),y.call(\"tick\",l),c<u&&(v.stop(),y.call(\"end\",l))}function a(){var e,r,n=t.length;for(c+=(h-c)*f,g.each(function(t){t(c)}),e=0;e<n;++e)null==(r=t[e]).fx?r.x+=r.vx*=m:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=m:(r.y=r.fy,r.vy=0)}function o(){for(var e,r=0,n=t.length;r<n;++r){if(e=t[r],e.index=r,isNaN(e.x)||isNaN(e.y)){var i=d*Math.sqrt(r),a=r*p;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function s(e){return e.initialize&&e.initialize(t),e}var l,c=1,u=.001,f=1-Math.pow(u,1/300),h=0,m=.6,g=r.map(),v=i.timer(e),y=n.dispatch(\"tick\",\"end\");return null==t&&(t=[]),o(),l={tick:a,restart:function(){return v.restart(e),l},stop:function(){return v.stop(),l},nodes:function(e){return arguments.length?(t=e,o(),g.each(s),l):t},alpha:function(t){return arguments.length?(c=+t,l):c},alphaMin:function(t){return arguments.length?(u=+t,l):u},alphaDecay:function(t){return arguments.length?(f=+t,l):+f},alphaTarget:function(t){return arguments.length?(h=+t,l):h},velocityDecay:function(t){return arguments.length?(m=1-t,l):1-m},force:function(t,e){return arguments.length>1?(null==e?g.remove(t):g.set(t,s(e)),l):g.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c<u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)<n&&(l=s,n=o);return l},on:function(t,e){return arguments.length>1?(y.on(t,e),l):y.on(t)}}},t.forceX=function(t){function e(t){for(var e,r=0,o=n.length;r<o;++r)(e=n[r]).vx+=(a[r]-e.x)*i[r]*t}function r(){if(n){var e,r=n.length;for(i=new Array(r),a=new Array(r),e=0;e<r;++e)i[e]=isNaN(a[e]=+t(n[e],e,n))?0:+o(n[e],e,n)}}var n,i,a,o=f(.1);return\"function\"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){n=t,r()},e.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:f(+t),r(),e):o},e.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:f(+n),r(),e):t},e},t.forceY=function(t){function e(t){for(var e,r=0,o=n.length;r<o;++r)(e=n[r]).vy+=(a[r]-e.y)*i[r]*t}function r(){if(n){var e,r=n.length;for(i=new Array(r),a=new Array(r),e=0;e<r;++e)i[e]=isNaN(a[e]=+t(n[e],e,n))?0:+o(n[e],e,n)}}var n,i,a,o=f(.1);return\"function\"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){n=t,r()},e.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:f(+t),r(),e):o},e.y=function(n){return arguments.length?(t=\"function\"==typeof n?n:f(+n),r(),e):t},e},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-collection\":121,\"d3-dispatch\":123,\"d3-quadtree\":126,\"d3-timer\":127}],125:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i(n.d3=n.d3||{},n.d3)}(this,function(t,e){\"use strict\";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t,e){return function(r){return t+r*e}}function i(t,e){var r=e-t;return r?n(t,r>180||r<-180?r-360*Math.round(r/360):r):x(isNaN(t)?e:t)}function a(t){return 1==(t=+t)?o:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):x(isNaN(e)?r:e)}}function o(t,e){var r=e-t;return r?n(t,r):x(isNaN(t)?e:t)}function s(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;n<a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+\"\"}}}function l(t,e,r,n){function i(t){return t.length?t.pop()+\" \":\"\"}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(\"translate(\",null,e,null,r);s.push({i:l-4,x:A(t,i)},{i:l-2,x:A(n,a)})}else(i||a)&&o.push(\"translate(\"+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:A(t,e)})):e&&r.push(i(r)+\"rotate(\"+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+\"skewX(\",null,n)-2,x:A(t,e)}):e&&r.push(i(r)+\"skewX(\"+e+n)}(a.skewX,o.skewX,s,l),function(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:A(t,r)},{i:s-2,x:A(e,n)})}else 1===r&&1===n||a.push(i(a)+\"scale(\"+r+\",\"+n+\")\")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join(\"\")}}}function c(t){return((t=Math.exp(t))+1/t)/2}function u(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=o(r.s,n.s),s=o(r.l,n.l),l=o(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=s(t),r.opacity=l(t),r+\"\"}}}function f(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=o(r.c,n.c),s=o(r.l,n.l),l=o(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=s(t),r.opacity=l(t),r+\"\"}}}function h(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),s=o(r.s,i.s),l=o(r.l,i.l),c=o(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=s(t),r.l=l(Math.pow(t,n)),r.opacity=c(t),r+\"\"}}return n=+n,i.gamma=r,i}(1)}var d,p,m,g,v=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=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=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}},y=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}},x=function(t){return function(){return t}},b=function t(r){function n(t,r){var n=i((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=i(t.g,r.g),s=i(t.b,r.b),l=o(t.opacity,r.opacity);return function(e){return t.r=n(e),t.g=a(e),t.b=s(e),t.opacity=l(e),t+\"\"}}var i=a(r);return n.gamma=t,n}(1),_=s(v),w=s(y),M=function(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(n),o=new Array(n);for(r=0;r<i;++r)a[r]=C(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}},k=function(t,e){var r=new Date;return t=+t,e-=t,function(n){return r.setTime(t+e*n),r}},A=function(t,e){return t=+t,e-=t,function(r){return t+e*r}},T=function(t,e){var r,n={},i={};null!==t&&\"object\"==typeof t||(t={}),null!==e&&\"object\"==typeof e||(e={});for(r in e)r in t?n[r]=C(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}},S=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,E=new RegExp(S.source,\"g\"),L=function(t,e){var r,n,i,a=S.lastIndex=E.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=S.exec(t))&&(n=E.exec(e));)(i=n.index)>a&&(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:A(r,n)})),a=E.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+\"\"}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})},C=function(t,r){var n,i=typeof r;return null==r||\"boolean\"===i?x(r):(\"number\"===i?A:\"string\"===i?(n=e.color(r))?(r=n,b):L:r instanceof e.color?b:r instanceof Date?k:Array.isArray(r)?M:isNaN(r)?T:A)(t,r)},z=180/Math.PI,D={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},I=function(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*z,skewX:Math.atan(l)*z,scaleX:o,scaleY:s}},P=l(function(t){return\"none\"===t?D:(d||(d=document.createElement(\"DIV\"),p=document.documentElement,m=document.defaultView),d.style.transform=t,t=m.getComputedStyle(p.appendChild(d),null).getPropertyValue(\"transform\"),p.removeChild(d),t=t.slice(7,-1).split(\",\"),I(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},\"px, \",\"px)\",\"deg)\"),O=l(function(t){return null==t?D:(g||(g=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),g.setAttribute(\"transform\",t),(t=g.transform.baseVal.consolidate())?(t=t.matrix,I(t.a,t.b,t.c,t.d,t.e,t.f)):D)},\", \",\")\",\")\"),F=Math.SQRT2,R=u(i),N=u(o),j=f(i),B=f(o),U=h(i),V=h(o);t.interpolate=C,t.interpolateArray=M,t.interpolateBasis=v,t.interpolateBasisClosed=y,t.interpolateDate=k,t.interpolateNumber=A,t.interpolateObject=T,t.interpolateRound=function(t,e){return t=+t,e-=t,function(r){return Math.round(t+e*r)}},t.interpolateString=L,t.interpolateTransformCss=P,t.interpolateTransformSvg=O,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],f=s-i,h=l-a,d=f*f+h*h;if(d<1e-12)n=Math.log(u/o)/F,r=function(t){return[i+t*f,a+t*h,o*Math.exp(F*t*n)]};else{var p=Math.sqrt(d),m=(u*u-o*o+4*d)/(2*o*2*p),g=(u*u-o*o-4*d)/(2*u*2*p),v=Math.log(Math.sqrt(m*m+1)-m),y=Math.log(Math.sqrt(g*g+1)-g);n=(y-v)/F,r=function(t){var e=t*n,r=c(v),s=o/(2*p)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(F*e+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+s*f,a+s*h,o*r/c(F*e+v)]}}return r.duration=1e3*n,r},t.interpolateRgb=b,t.interpolateRgbBasis=_,t.interpolateRgbBasisClosed=w,t.interpolateHsl=R,t.interpolateHslLong=N,t.interpolateLab=function(t,r){var n=o((t=e.lab(t)).l,(r=e.lab(r)).l),i=o(t.a,r.a),a=o(t.b,r.b),s=o(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=s(e),t+\"\"}},t.interpolateHcl=j,t.interpolateHclLong=B,t.interpolateCubehelix=U,t.interpolateCubehelixLong=V,t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-color\":122}],126:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,d=t._root,p={data:n},m=t._x0,g=t._y0,v=t._x1,y=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o,i=d,!(d=d[f=u<<1|c]))return i[f]=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[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}function r(t,e,r){var i=new n(null==e?function(t){return t[0]}:e,null==r?function(t){return t[1]}:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function n(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function i(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var a=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i},o=r.prototype=n.prototype;o.copy=function(){var t,e,r=new n(this._x,this._y,this._x0,this._y0,this._x1,this._y1),a=this._root;if(!a)return r;if(!a.length)return r._root=i(a),r;for(t=[{source:a,target:r._root=new Array(4)}];a=t.pop();)for(var o=0;o<4;++o)(e=a.source[o])&&(e.length?t.push({source:e,target:a.target[o]=new Array(4)}):a.target[o]=i(e));return r},o.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},o.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i<c&&(c=i),i>f&&(f=i),a<u&&(u=a),a>h&&(h=a));for(f<c&&(c=this._x0,f=this._x1),h<u&&(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n<o;++n)e(this,s[n],l[n],t[n]);return this},o.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r>t||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,a=n+l,t>i||e>a);break;case 1:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,a=n+l,r>t||e>a);break;case 2:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,n=a-l,t>i||n>e);break;case 3:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,n=a-l,r>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},o.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},o.extent=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]]},o.find=function(t,e,r){var n,i,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new a(g,f,h,d,p)),null==r?r=1/0:(f=t-r,h=e-r,d=t+r,p=e+r,r*=r);c=m.pop();)if(!(!(g=c.node)||(i=c.x0)>d||(o=c.y0)>p||(s=c.x1)<f||(l=c.y1)<h))if(g.length){var v=(i+s)/2,y=(o+l)/2;m.push(new a(g[3],v,y,s,l),new a(g[2],i,y,v,l),new a(g[1],v,o,s,y),new a(g[0],i,o,v,y)),(u=(e>=y)<<1|t>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_<r){var w=Math.sqrt(r=_);f=t-w,h=e-w,d=t+w,p=e+w,n=g.data}}return n},o.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,d=this._root,p=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,e=d,!(d=d[f=u<<1|c]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}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[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(r?r[h]=d:this._root=d),this):(this._root=i,this)},o.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},o.root=function(){return this._root},o.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},o.visit=function(t){var e,r,n,i,o,s,l=[],c=this._root;for(c&&l.push(new a(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,n=e.x0,i=e.y0,o=e.x1,s=e.y1)&&c.length){var u=(n+o)/2,f=(i+s)/2;(r=c[3])&&l.push(new a(r,u,f,o,s)),(r=c[2])&&l.push(new a(r,n,f,u,s)),(r=c[1])&&l.push(new a(r,u,i,o,f)),(r=c[0])&&l.push(new a(r,n,i,u,f))}return this},o.visitAfter=function(t){var e,r=[],n=[];for(this._root&&r.push(new a(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var i=e.node;if(i.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=i[0])&&r.push(new a(o,s,l,f,h)),(o=i[1])&&r.push(new a(o,f,l,c,h)),(o=i[2])&&r.push(new a(o,s,h,f,u)),(o=i[3])&&r.push(new a(o,f,h,c,u))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},o.x=function(t){return arguments.length?(this._x=t,this):this._x},o.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=r,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],127:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){return g||(x(r),g=y.now()+v)}function r(){g=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=g-r._time)>=0&&r._call.call(null,t),r=r._next;--f}function o(){g=(m=y.now())+v,f=h=0;try{a()}finally{f=0,function(){var t,e,r=c,n=1/0;for(;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);u=t,l(n)}(),g=0}}function s(){var t=y.now(),e=t-m;e>p&&(v-=e,m=t)}function l(t){if(!f){h&&(h=clearTimeout(h));var e=t-g;e>24?(t<1/0&&(h=setTimeout(o,e)),d&&(d=clearInterval(d))):(d||(m=g,d=setInterval(s,p)),f=1,x(o))}}var c,u,f=0,h=0,d=0,p=1e3,m=0,g=0,v=0,y=\"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||u===this||(u?u._next=this:c=this,u=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=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},t.interval=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)},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],128:[function(t,e,r){!function(){function t(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 n(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function i(t){return null===t?NaN:+t}function a(t){return!isNaN(t)}function o(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>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<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function s(t){return t.length}function l(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function c(){this._=Object.create(null)}function u(t){return(t+=\"\")===oa||t[0]===sa?sa+t:t}function f(t){return(t+=\"\")[0]===sa?t.slice(1):t}function h(t){return u(t)in this._}function d(t){return(t=u(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(f(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(t){return t}function x(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=la.length;r<n;++r){var i=la[r]+e;if(i in t)return i}}function b(){}function _(){}function w(t){function e(){for(var e,n=r,i=-1,a=n.length;++i<a;)(e=n[i].on)&&e.apply(this,arguments);return t}var r=[],n=new c;return e.on=function(e,i){var a,o=n.get(e);return arguments.length<2?o&&o.on:(o&&(o.on=null,r=r.slice(0,a=r.indexOf(o)).concat(r.slice(a+1)),n.remove(e)),i&&r.push(n.set(e,{on:i})),t)},e}function M(){Zi.event.preventDefault()}function k(){for(var t,e=Zi.event;t=e.sourceEvent;)e=t;return e}function A(t){for(var e=new _,r=0,n=arguments.length;++r<n;)e[arguments[r]]=w(e);return e.of=function(r,n){return function(i){try{var a=i.sourceEvent=Zi.event;i.target=t,Zi.event=i,e[i.type].apply(r,n)}finally{Zi.event=a}}},e}function T(t){return ua(t,pa),t}function S(t){return\"function\"==typeof t?t:function(){return fa(t,this)}}function E(t){return\"function\"==typeof t?t:function(){return ha(t,this)}}function L(t,e){return t=Zi.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:\"function\"==typeof e?t.local?function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}:function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function C(t){return t.trim().replace(/\\s+/g,\" \")}function z(t){return new RegExp(\"(?:^|\\\\s+)\"+Zi.requote(t)+\"(?:\\\\s+|$)\",\"g\")}function D(t){return(t+\"\").trim().split(/^|\\s+/)}function I(t,e){var r=(t=D(t).map(P)).length;return\"function\"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function P(t){var e=z(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(\"class\")||\"\";n?(e.lastIndex=0,e.test(i)||r.setAttribute(\"class\",C(i+\" \"+t))):r.setAttribute(\"class\",C(i.replace(e,\" \")))}}function O(t,e,r){return null==e?function(){this.style.removeProperty(t)}:\"function\"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function F(t,e){return null==e?function(){delete this[t]}:\"function\"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function R(t){return\"function\"==typeof t?t:(t=Zi.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===ma&&e.documentElement.namespaceURI===ma?e.createElement(t):e.createElementNS(r,t)}}function N(){var t=this.parentNode;t&&t.removeChild(this)}function j(t){return{__data__:t}}function B(t){return function(){return da(this,t)}}function U(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function V(t){return ua(t,va),t}function q(t,e,r){function n(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}var i=\"__on\"+t,a=t.indexOf(\".\"),o=H;a>0&&(t=t.slice(0,a));var s=ya.get(t);return s&&(t=s,o=G),a?e?function(){var a=o(e,Ki(arguments));n.call(this),this.addEventListener(t,this[i]=a,a.$=r),a._=e}:n:e?b:function(){var e,r=new RegExp(\"^__on([^.]+)\"+Zi.requote(t)+\"$\");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}function H(t,e){return function(r){var n=Zi.event;Zi.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{Zi.event=n}}}function G(t,e){var r=H(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}function Y(e){var n=\".dragsuppress-\"+ ++ba,i=\"click\"+n,a=Zi.select(r(e)).on(\"touchmove\"+n,M).on(\"dragstart\"+n,M).on(\"selectstart\"+n,M);if(null==xa&&(xa=!(\"onselectstart\"in e)&&x(e.style,\"userSelect\")),xa){var o=t(e).style,s=o[xa];o[xa]=\"none\"}return function(t){if(a.on(n,null),xa&&(o[xa]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){M(),e()},!0),setTimeout(e,0)}}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(_a<0){var a=r(t);if(a.scrollX||a.scrollY){var o=(n=Zi.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\"))[0][0].getScreenCTM();_a=!(o.f||o.e),n.remove()}}return _a?(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 X(){return Zi.event.changedTouches[0].identifier}function Z(t){return t>0?1:t<0?-1:0}function J(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function K(t){return t>1?0:t<-1?ka:Math.acos(t)}function Q(t){return t>1?Sa:t<-1?-Sa:Math.asin(t)}function $(t){return((t=Math.exp(t))+1/t)/2}function tt(t){return(t=Math.sin(t/2))*t}function et(){}function rt(t,e,r){return this instanceof rt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof rt?new rt(t.h,t.s,t.l):gt(\"\"+t,vt,rt):new rt(t,e,r)}function nt(t,e,r){function n(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i}(t))}var i,a;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,a=r<=.5?r*(1+e):r+e-r*e,i=2*r-a,new ht(n(t+120),n(t),n(t-120))}function it(t,e,r){return this instanceof it?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof it?new it(t.h,t.c,t.l):t instanceof ot?lt(t.l,t.a,t.b):lt((t=yt((t=Zi.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new it(t,e,r)}function at(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ot(r,Math.cos(t*=Ea)*e,Math.sin(t)*e)}function ot(t,e,r){return this instanceof ot?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof ot?new ot(t.l,t.a,t.b):t instanceof it?at(t.h,t.c,t.l):yt((t=ht(t)).r,t.g,t.b):new ot(t,e,r)}function st(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=ct(i)*Ra,n=ct(n)*Na,a=ct(a)*ja,new ht(ft(3.2404542*i-1.5371385*n-.4985314*a),ft(-.969266*i+1.8760108*n+.041556*a),ft(.0556434*i-.2040259*n+1.0572252*a))}function lt(t,e,r){return t>0?new it(Math.atan2(r,e)*La,Math.sqrt(e*e+r*r),t):new it(NaN,NaN,t)}function ct(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ut(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ft(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ht(t,e,r){return this instanceof ht?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ht?new ht(t.r,t.g,t.b):gt(\"\"+t,ht,nt):new ht(t,e,r)}function dt(t){return new ht(t>>16,t>>8&255,255&t)}function pt(t){return dt(t)+\"\"}function mt(t){return t<16?\"0\"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function gt(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(bt(i[0]),bt(i[1]),bt(i[2]))}return(a=Va.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 vt(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+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new rt(n,i,l)}function yt(t,e,r){var n=ut((.4124564*(t=xt(t))+.3575761*(e=xt(e))+.1804375*(r=xt(r)))/Ra),i=ut((.2126729*t+.7151522*e+.072175*r)/Na);return ot(116*i-16,500*(n-i),200*(i-ut((.0193339*t+.119192*e+.9503041*r)/ja)))}function xt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function bt(t){var e=parseFloat(t);return\"%\"===t.charAt(t.length-1)?Math.round(2.55*e):e}function _t(t){return\"function\"==typeof t?t:function(){return t}}function wt(t){return function(e,r,n){return 2===arguments.length&&\"function\"==typeof r&&(n=r,r=null),Mt(e,r,t,n)}}function Mt(t,e,r,n){function i(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&\"text\"!==e?t.response:t.responseText}(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=Zi.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),s={},l=new XMLHttpRequest,c=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=Zi.event;Zi.event=t;try{o.progress.call(a,l)}finally{Zi.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?(c=t,a):c},a.response=function(t){return r=t,a},[\"get\",\"post\"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Ki(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 u in s)l.setRequestHeader(u,s[u]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),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},Zi.rebind(a,o,\"on\"),null==n?a:a.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}function kt(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return Ha?Ha.n=i:qa=i,Ha=i,Ga||(Ya=clearTimeout(Ya),Ga=1,Wa(At)),i}function At(){var t=Tt(),e=St()-t;e>24?(isFinite(e)&&(clearTimeout(Ya),Ya=setTimeout(At,e)),Ga=0):(Ga=1,Wa(At))}function Tt(){for(var t=Date.now(),e=qa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function St(){for(var t,e=qa,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:qa=e.n;return Ha=t,r}function Et(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Lt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ct(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r<n-e?r:n}function i(r){return e(r=t(new Qa(r-1)),1),r}function a(t,r){return e(t=new Qa(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a>1)for(;o<n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o<n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=zt(t);return s.floor=s,s.round=zt(n),s.ceil=zt(i),s.offset=zt(a),s.range=function(t,e,r){try{Qa=Lt;var n=new Lt;return n._=t,o(n,e,r)}finally{Qa=Date}},t}function zt(t){return function(e,r){try{Qa=Lt;var n=new Lt;return n._=e,t(n,r)._}finally{Qa=Date}}}function Dt(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function It(t){return new RegExp(\"^(?:\"+t.map(Zi.requote).join(\"|\")+\")\",\"i\")}function Pt(t){for(var e=new c,r=-1,n=t.length;++r<n;)e.set(t[r].toLowerCase(),r);return e}function Ot(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Ft(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Rt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Nt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function jt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.y=function(t){return t+(t>68?1900:2e3)}(+n[0]),r+n[0].length):-1}function Bt(t,e,r){return/^[+-]\\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ut(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Vt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function qt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function Ht(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Gt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Yt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Wt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Xt(t){var e=t.getTimezoneOffset(),r=e>0?\"-\":\"+\",n=aa(e)/60|0,i=aa(e)%60;return r+Dt(n,\"0\",2)+Dt(i,\"0\",2)}function Zt(t,e,r){ro.lastIndex=0;var n=ro.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Jt(t){for(var e=t.length,r=-1;++r<e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}function Kt(){}function Qt(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function $t(t,e){t&&oo.hasOwnProperty(t.type)&&oo[t.type](t,e)}function te(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function ee(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)te(t[r],e,1);e.polygonEnd()}function re(){function t(t,e){e=e*Ea/2+ka/4;var r=(t*=Ea)-n,o=r>=0?1:-1,s=o*r,l=Math.cos(e),c=Math.sin(e),u=a*c,f=i*l+u*Math.cos(s),h=u*o*Math.sin(s);lo.add(Math.atan2(h,f)),n=t,i=l,a=c}var e,r,n,i,a;co.point=function(o,s){co.point=t,n=(e=o)*Ea,i=Math.cos(s=(r=s)*Ea/2+ka/4),a=Math.sin(s)},co.lineEnd=function(){t(e,r)}}function ne(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 ie(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ae(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 oe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function se(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function le(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 ce(t){return[Math.atan2(t[1],t[0]),Q(t[2])]}function ue(t,e){return aa(t[0]-e[0])<wa&&aa(t[1]-e[1])<wa}function fe(t,e){t*=Ea;var r=Math.cos(e*=Ea);he(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function he(t,e,r){ho+=(t-ho)/++uo,po+=(e-po)/uo,mo+=(r-mo)/uo}function de(){function t(t,i){t*=Ea;var a=Math.cos(i*=Ea),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=r*l-n*s)*c+(c=n*o-e*l)*c+(c=e*s-r*o)*c),e*o+r*s+n*l);fo+=c,go+=c*(e+(e=o)),vo+=c*(r+(r=s)),yo+=c*(n+(n=l)),he(e,r,n)}var e,r,n;wo.point=function(i,a){i*=Ea;var o=Math.cos(a*=Ea);e=o*Math.cos(i),r=o*Math.sin(i),n=Math.sin(a),wo.point=t,he(e,r,n)}}function pe(){wo.point=fe}function me(){function t(t,e){t*=Ea;var r=Math.cos(e*=Ea),o=r*Math.cos(t),s=r*Math.sin(t),l=Math.sin(e),c=i*l-a*s,u=a*o-n*l,f=n*s-i*o,h=Math.sqrt(c*c+u*u+f*f),d=n*o+i*s+a*l,p=h&&-K(d)/h,m=Math.atan2(h,d);xo+=p*c,bo+=p*u,_o+=p*f,fo+=m,go+=m*(n+(n=o)),vo+=m*(i+(i=s)),yo+=m*(a+(a=l)),he(n,i,a)}var e,r,n,i,a;wo.point=function(o,s){e=o,r=s,wo.point=t,o*=Ea;var l=Math.cos(s*=Ea);n=l*Math.cos(o),i=l*Math.sin(o),a=Math.sin(s),he(n,i,a)},wo.lineEnd=function(){t(e,r),wo.lineEnd=pe,wo.point=fe}}function ge(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,n){return(r=e.invert(r,n))&&t.invert(r[0],r[1])}),r}function ve(){return!0}function ye(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r=t[0],n=t[e];if(ue(r,n)){i.lineStart();for(var s=0;s<e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new be(r,t,null,!0),c=new be(r,null,l,!1);l.o=c,a.push(l),o.push(c),c=new be(n,null,l=new be(n,t,null,!1),!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),xe(a),xe(o),a.length){for(var s=0,l=r,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var d=h,p=!0;d.v;)if((d=d.n)===h)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else n(d.x,d.n.x,1,i);d=d.n}else{if(p)for(s=(u=d.p.z).length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else n(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function xe(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function be(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function _e(t,e,r,n){return function(i,a){function o(e,r){var n=i(e,r);t(e=n[0],r=n[1])&&a.point(e,r)}function s(t,e){var r=i(t,e);g.point(r[0],r[1])}function l(){y.point=s,g.lineStart()}function c(){y.point=o,g.lineEnd()}function u(t,e){m.push([t,e]);var r=i(t,e);b.point(r[0],r[1])}function f(){b.lineStart(),m=[]}function h(){u(m[0][0],m[0][1]),b.lineEnd();var t,e=b.clean(),r=x.buffer(),n=r.length;if(m.pop(),p.push(m),m=null,n)if(1&e){var i,o=-1;if((n=(t=r[0]).length-1)>0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o<n;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else n>1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(we))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:c,polygonStart:function(){y.point=u,y.lineStart=f,y.lineEnd=h,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=c,d=Zi.merge(d);var t=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;lo.reset();for(var s=0,l=e.length;s<l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],d=f[1]/2+ka/4,p=Math.sin(d),m=Math.cos(d),g=1;;){g===u&&(g=0);var v=(t=c[g])[0],y=t[1]/2+ka/4,x=Math.sin(y),b=Math.cos(y),_=v-h,w=_>=0?1:-1,M=w*_,k=M>ka,A=p*x;if(lo.add(Math.atan2(A*w*Math.sin(M),m*b+A*Math.cos(M))),a+=k?_+w*Aa:_,k^h>=r^v>=r){var T=ae(ne(f),ne(t));le(T);var S=ae(i,T);le(S);var E=(k^_>=0?-1:1)*Q(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;h=v,p=x,m=b,f=t}}return(a<-wa||a<wa&&lo<-wa)^1&o}(v,p);d.length?(_||(a.polygonStart(),_=!0),ye(d,ke,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()}},x=Me(),b=e(x),_=!1;return y}}function we(t){return t.length>1}function Me(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:b,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function ke(t,e){return((t=t.x)[0]<0?t[1]-Sa-wa:Sa-t[1])-((e=e.x)[0]<0?e[1]-Sa-wa:Sa-e[1])}function Ae(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,d=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<f&&(f=a)}if(a=e-c,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<f&&(f=a)}else if(d>0){if(a>f)return;a>u&&(u=a)}if(a=n-c,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<f&&(f=a)}return u>0&&(i.a={x:l+u*h,y:c+u*d}),f<1&&(i.b={x:l+f*h,y:c+f*d}),i}}}}}}function Te(t,e,r,n){function i(n,i){return aa(n[0]-t)<wa?i>0?0:3:aa(n[0]-r)<wa?i>0?2:1:aa(n[1]-e)<wa?i>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(a,s,l,c){var u=0,f=0;if(null==a||(u=i(a,l))!==(f=i(s,l))||o(a,s)<0^l>0)do{c.point(0===u||3===u?t:r,u>1?n:e)}while((u=(u+l+4)%4)!==f);else c.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function u(t,e){c(t,e)&&s.point(t,e)}function f(t,e){var r=c(t=Math.max(-ko,Math.min(ko,t)),e=Math.max(-ko,Math.min(ko,e)));if(d&&p.push([t,e]),_)m=t,g=e,v=r,_=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&b)s.point(t,e);else{var n={a:{x:y,y:x},b:{x:t,y:e}};A(n)?(b||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),w=!1):r&&(s.lineStart(),s.point(t,e),w=!1)}y=t,x=e,b=r}var h,d,p,m,g,v,y,x,b,_,w,M=s,k=Me(),A=Ae(t,e,r,n),T={point:u,lineStart:function(){T.point=f,d&&d.push(p=[]),_=!0,b=!1,y=x=NaN},lineEnd:function(){h&&(f(m,g),v&&b&&k.rejoin(),h.push(k.buffer())),T.point=u,b&&s.lineEnd()},polygonStart:function(){s=k,h=[],d=[],w=!0},polygonEnd:function(){s=M,h=Zi.merge(h);var e=function(t){for(var e=0,r=d.length,n=t[1],i=0;i<r;++i)for(var a,o=1,s=d[i],l=s.length,c=s[0];o<l;++o)a=s[o],c[1]<=n?a[1]>n&&J(c,a,t)>0&&++e:a[1]<=n&&J(c,a,t)<0&&--e,c=a;return 0!==e}([t,n]),r=w&&e,i=h.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),l(null,null,1,s),s.lineEnd()),i&&ye(h,a,e,l,s),s.polygonEnd()),h=d=p=null}};return T}}function Se(t){var e=0,r=ka/3,n=je(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*ka/180,r=t[1]*ka/180):[e/ka*180,r/ka*180]},i}function Ee(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,Q((a-(t*t+r*r)*i*i)/(2*i))]},r}function Le(){function t(t,e){To+=i*t-n*e,n=t,i=e}var e,r,n,i;zo.point=function(a,o){zo.point=t,e=n=a,r=i=o},zo.lineEnd=function(){t(e,r)}}function Ce(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function ze(t,e){ho+=t,po+=e,++mo}function De(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);go+=o*(e+t)/2,vo+=o*(r+n)/2,yo+=o,ze(e=t,r=n)}var e,r;Io.point=function(n,i){Io.point=t,ze(e=n,r=i)}}function Ie(){Io.point=ze}function Pe(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);go+=o*(n+t)/2,vo+=o*(i+e)/2,yo+=o,xo+=(o=i*t-n*e)*(n+t),bo+=o*(i+e),_o+=3*o,ze(n=t,i=e)}var e,r,n,i;Io.point=function(a,o){Io.point=t,ze(e=n=a,r=i=o)},Io.lineEnd=function(){t(e,r)}}function Oe(t){function e(e){return(a?function(e){function n(r,n){r=t(r,n),e.point(r[0],r[1])}function i(){x=NaN,k.point=o,e.lineStart()}function o(n,i){var o=ne([n,i]),s=t(n,i);r(x,b,y,_,w,M,x=s[0],b=s[1],y=n,_=o[0],w=o[1],M=o[2],a,e),e.point(x,b)}function s(){k.point=n,e.lineEnd()}function l(){i(),k.point=c,k.lineEnd=u}function c(t,e){o(f=t,h=e),d=x,p=b,m=_,g=w,v=M,k.point=o}function u(){r(x,b,y,_,w,M,d,p,f,m,g,v,a,e),k.lineEnd=s,s()}var f,h,d,p,m,g,v,y,x,b,_,w,M,k={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=i}};return k}:function(e){return Re(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function r(e,a,o,s,l,c,u,f,h,d,p,m,g,v){var y=u-e,x=f-a,b=y*y+x*x;if(b>4*n&&g--){var _=s+d,w=l+p,M=c+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=aa(aa(M)-1)<wa||aa(o-h)<wa?(o+h)/2:Math.atan2(w,_),S=t(T,A),E=S[0],L=S[1],C=E-e,z=L-a,D=x*C-y*z;(D*D/b>n||aa((y*C+x*z)/b-.5)>.3||s*d+l*p+c*m<i)&&(r(e,a,o,s,l,c,E,L,T,_/=k,w/=k,M,g,v),v.point(E,L),r(E,L,T,_,w,M,u,f,h,d,p,m,g,v))}}var n=.5,i=Math.cos(30*Ea),a=16;return e.precision=function(t){return arguments.length?(a=(n=t*t)>0&&16,e):Math.sqrt(n)},e}function Fe(t){this.stream=t}function Re(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 Ne(t){return je(function(){return t})()}function je(t){function e(t){return t=o(t[0]*Ea,t[1]*Ea),[t[0]*f+s,l-t[1]*f]}function r(){o=ge(a=qe(g,v,x),i);var t=i(p,m);return s=h-t[0]*f,l=d+t[1]*f,n()}function n(){return c&&(c.valid=!1,c=null),e}var i,a,o,s,l,c,u=Oe(function(t,e){return t=i(t,e),[t[0]*f+s,l-t[1]*f]}),f=150,h=480,d=250,p=0,m=0,g=0,v=0,x=0,b=Mo,_=y,w=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=Be(b(a,u(_(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(b=null==t?(w=t,Mo):function(t){function e(t,e){return Math.cos(t)*Math.cos(e)>i}function r(t,e,r){var n=[1,0,0],a=ae(ne(t),ne(e)),o=ie(a,a),s=a[0],l=o-s*s;if(!l)return!r&&t;var c=i*o/l,u=-i*s/l,f=ae(n,a),h=se(n,c);oe(h,se(a,u));var d=f,p=ie(h,d),m=ie(d,d),g=p*p-m*(ie(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=se(d,(-p-v)/m);if(oe(y,h),y=ce(y),!r)return y;var x,b=t[0],_=e[0],w=t[1],M=e[1];_<b&&(x=b,b=_,_=x);var k=_-b,A=aa(k-ka)<wa;if(!A&&M<w&&(x=w,w=M,M=x),A||k<wa?A?w+M>0^y[1]<(aa(y[0]-b)<wa?w:M):w<=y[1]&&y[1]<=M:k>ka^(b<=y[0]&&y[0]<=_)){var T=se(d,(-p+v)/m);return oe(T,h),[y,ce(T)]}}}function n(e,r){var n=a?t:ka-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var i=Math.cos(t),a=i>0,o=aa(i)>wa;return _e(e,function(t){var i,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var d,p=[f,h],m=e(f,h),g=a?m?0:n(f,h):m?n(f+(f<0?ka:-ka),h):0;if(!i&&(c=l=m)&&t.lineStart(),m!==l&&(d=r(i,p),(ue(i,d)||ue(p,d))&&(p[0]+=wa,p[1]+=wa,m=e(p[0],p[1]))),m!==l)u=0,m?(t.lineStart(),d=r(p,i),t.point(d[0],d[1])):(d=r(i,p),t.point(d[0],d[1]),t.lineEnd()),i=d;else if(o&&i&&a^m){var v;g&s||!(v=r(p,i,!0))||(u=0,a?(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||i&&ue(i,p)||t.point(p[0],p[1]),i=p,l=m,s=g},lineEnd:function(){l&&t.lineEnd(),i=null},clean:function(){return u|(c&&l)<<1}}},We(t,6*Ea),a?[0,-t]:[-ka,t-ka])}((w=+t)*Ea),n()):w},e.clipExtent=function(t){return arguments.length?(M=t,_=t?Te(t[0][0],t[0][1],t[1][0],t[1][1]):y,n()):M},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],r()):[h,d]},e.center=function(t){return arguments.length?(p=t[0]%360*Ea,m=t[1]%360*Ea,r()):[p*La,m*La]},e.rotate=function(t){return arguments.length?(g=t[0]%360*Ea,v=t[1]%360*Ea,x=t.length>2?t[2]%360*Ea:0,r()):[g*La,v*La,x*La]},Zi.rebind(e,u,\"precision\"),function(){return i=t.apply(this,arguments),e.invert=i.invert&&function(t){return(t=o.invert((t[0]-s)/f,(l-t[1])/f))&&[t[0]*La,t[1]*La]},r()}}function Be(t){return Re(t,function(e,r){t.point(e*Ea,r*Ea)})}function Ue(t,e){return[t,e]}function Ve(t,e){return[t>ka?t-Aa:t<-ka?t+Aa:t,e]}function qe(t,e,r){return t?e||r?ge(Ge(t),Ye(e,r)):Ge(t):e||r?Ye(e,r):Ve}function He(t){return function(e,r){return e+=t,[e>ka?e-Aa:e<-ka?e+Aa:e,r]}}function Ge(t){var e=He(t);return e.invert=He(-t),e}function Ye(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,c=Math.sin(e),u=c*n+s*i;return[Math.atan2(l*a-u*o,s*n-c*i),Q(u*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,c=Math.sin(e),u=c*a-l*o;return[Math.atan2(l*a+c*o,s*n+u*i),Q(u*n-s*i)]},r}function We(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Xe(r,i),a=Xe(r,a),(o>0?i<a:i>a)&&(i+=o*Aa)):(i=t+o*Aa,a=t-.5*l);for(var c,u=i;o>0?u>a:u<a;u-=l)s.point((c=ce([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Xe(t,e){var r=ne(e);r[0]-=t,le(r);var n=K(-r[1]);return((-r[2]<0?-n:n)+2*Math.PI-wa)%(2*Math.PI)}function Ze(t,e,r){var n=Zi.range(t,e-wa,r).concat(e);return function(t){return n.map(function(e){return[t,e]})}}function Je(t,e,r){var n=Zi.range(t,e-wa,r).concat(e);return function(t){return n.map(function(e){return[e,t]})}}function Ke(t){return t.source}function Qe(t){return t.target}function $e(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}function tr(t,e){function r(t,e){o>0?e<-Sa+wa&&(e=-Sa+wa):e>Sa-wa&&(e=Sa-wa);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(ka/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=Z(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Sa]},r):rr}function er(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 aa(i)<wa?Ue:(r.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/i,a-Z(i)*Math.sqrt(t*t+r*r)]},r)}function rr(t,e){return[t,Math.log(Math.tan(ka/4+e/2))]}function nr(t){var e,r=Ne(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=ka*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(o=null);return o},r.clipExtent(null)}function ir(t,e){return[Math.log(Math.tan(ka/4+e/2)),-t]}function ar(t){return t[0]}function or(t){return t[1]}function sr(t){for(var e=t.length,r=[0,1],n=2,i=2;i<e;i++){for(;n>1&&J(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function lr(t,e){return t[0]-e[0]||t[1]-e[1]}function cr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function ur(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function fr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function hr(t){var e=Wo.pop()||new function(){Sr(this),this.edge=this.site=this.circle=null};return e.site=t,e}function dr(t){_r(t),Ho.remove(t),Wo.push(t),Sr(t)}function pr(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];dr(t);for(var l=a;l.circle&&aa(r-l.circle.x)<wa&&aa(n-l.circle.cy)<wa;)a=l.P,s.unshift(l),dr(l),l=a;s.unshift(l),_r(l);for(var c=o;c.circle&&aa(r-c.circle.x)<wa&&aa(n-c.circle.cy)<wa;)o=c.N,s.push(c),dr(c),c=o;s.push(c),_r(c);var u,f=s.length;for(u=1;u<f;++u)c=s[u],l=s[u-1],kr(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Mr(l.site,c.site,null,i),br(l),br(c)}function mr(t){for(var e,r,n,i,a=t.x,o=t.y,s=Ho._;s;)if((n=gr(s,o)-a)>wa)s=s.L;else{if(!((i=a-function(t,e){var r=t.N;if(r)return gr(r,e);var n=t.site;return n.y===e?n.x:1/0}(s,o))>wa)){n>-wa?(e=s.P,r=s):i>-wa?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=hr(t);if(Ho.insert(e,l),e||r){if(e===r)return _r(e),r=hr(e.site),Ho.insert(l,r),l.edge=r.edge=Mr(e.site,l.site),br(e),void br(r);if(r){_r(e),_r(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,d=t.y-f,p=r.site,m=p.x-u,g=p.y-f,v=2*(h*g-d*m),y=h*h+d*d,x=m*m+g*g,b={x:(g*y-d*x)/v+u,y:(h*x-m*y)/v+f};kr(r.edge,c,p,b),l.edge=Mr(c,t,null,b),r.edge=Mr(t,p,null,b),br(e),br(r)}else l.edge=Mr(e.site,l.site)}}function gr(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;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function vr(t){this.site=t,this.edges=[]}function yr(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],m=qo,g=m.length;g--;)if((a=m[g])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(aa(n-e)>wa||aa(i-r)>wa)&&(s.splice(o,0,new Ar(function(t,e,r){var n=new wr(t,null);return n.a=e,n.b=r,Vo.push(n),n}(a.site,u,aa(n-f)<wa&&p-i>wa?{x:f,y:aa(e-f)<wa?r:p}:aa(i-p)<wa&&h-n>wa?{x:aa(r-p)<wa?e:h,y:p}:aa(n-h)<wa&&i-d>wa?{x:h,y:aa(e-h)<wa?r:d}:aa(i-d)<wa&&n-f>wa?{x:aa(r-d)<wa?e:f,y:d}:null),a.site,null)),++l)}function xr(t,e){return e.angle-t.angle}function br(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(g=a.y-s)-c*u);if(!(f>=-Ma)){var h=l*l+c*c,d=u*u+g*g,p=(g*h-c*d)/f,m=(l*d-u*h)/f,g=m+s,v=Xo.pop()||new function(){Sr(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=t,v.site=i,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,x=Yo._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Yo.insert(y,v),y||(Go=v)}}}}function _r(t){var e=t.circle;e&&(e.P||(Go=e.N),Yo.remove(e),Xo.push(e),Sr(e),t.circle=null)}function wr(t,e){this.l=t,this.r=e,this.a=this.b=null}function Mr(t,e,r,n){var i=new wr(t,e);return Vo.push(i),r&&kr(i,t,e,r),n&&kr(i,e,t,n),qo[t.i].edges.push(new Ar(i,t,e)),qo[e.i].edges.push(new Ar(i,e,t)),i}function kr(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Ar(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Tr(){this._=null}function Sr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Er(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function Lr(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Cr(t){for(;t.L;)t=t.L;return t}function zr(t,e){var r,n,i,a=t.sort(Dr).pop();for(Vo=[],qo=new Array(t.length),Ho=new Tr,Yo=new Tr;;)if(i=Go,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(qo[a.i]=new vr(a),mr(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;pr(i.arc)}e&&(function(t){for(var e,r=Vo,n=Ae(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!function(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,d=u.y,p=f.x,m=f.y,g=(h+p)/2,v=(d+m)/2;if(m===d){if(g<o||g>=s)return;if(h>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y<l)return}else a={x:g,y:c};r={x:g,y:l}}}else if(n=(h-p)/(m-d),i=v-n*g,n<-1||n>1)if(h>p){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y<l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(d<m){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}(e=r[i],t)||!n(e)||aa(e.a.x-e.b.x)<wa&&aa(e.a.y-e.b.y)<wa)&&(e.a=e.b=null,r.splice(i,1))}(e),yr(e));var o={cells:qo,edges:Vo};return Ho=Yo=Vo=qo=null,o}function Dr(t,e){return e.y-t.y||e.x-t.x}function Ir(t){return t.x}function Pr(t){return t.y}function Or(t,e,r,n,i,a){if(!t(e,r,n,i,a)){var o=.5*(r+i),s=.5*(n+a),l=e.nodes;l[0]&&Or(t,l[0],r,n,o,s),l[1]&&Or(t,l[1],o,n,i,s),l[2]&&Or(t,l[2],r,s,o,a),l[3]&&Or(t,l[3],o,s,i,a)}}function Fr(t,e){t=Zi.rgb(t),e=Zi.rgb(e);var r=t.r,n=t.g,i=t.b,a=e.r-r,o=e.g-n,s=e.b-i;return function(t){return\"#\"+mt(Math.round(r+a*t))+mt(Math.round(n+o*t))+mt(Math.round(i+s*t))}}function Rr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Br(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Nr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function jr(t,e){var r,n,i,a=Jo.lastIndex=Ko.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=Jo.exec(t))&&(n=Ko.exec(e));)(i=n.index)>a&&(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:Nr(r,n)})),a=Ko.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+\"\"}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})}function Br(t,e){for(var r,n=Zi.interpolators.length;--n>=0&&!(r=Zi.interpolators[n](t,e)););return r}function Ur(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Br(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}function Vr(t){return function(e){return 1-t(1-e)}}function qr(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Hr(t){return t*t}function Gr(t){return t*t*t}function Yr(t){return 1-Math.cos(t*Sa)}function Wr(t){return Math.pow(2,10*(t-1))}function Xr(t){return 1-Math.sqrt(1-t*t)}function Zr(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 Jr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Kr(t){var e=[t.a,t.b],r=[t.c,t.d],n=$r(e),i=Qr(e,r),a=$r(function(t,e,r){return t[0]+=r*e[0],t[1]+=r*e[1],t}(r,e,-i))||0;e[0]*r[1]<r[0]*e[1]&&(e[0]*=-1,e[1]*=-1,n*=-1,i*=-1),this.rotate=(n?Math.atan2(e[1],e[0]):Math.atan2(-r[0],r[1]))*La,this.translate=[t.e,t.f],this.scale=[n,a],this.skew=a?Math.atan2(i,a)*La:0}function Qr(t,e){return t[0]*e[0]+t[1]*e[1]}function $r(t){var e=Math.sqrt(Qr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function tn(t){return t.length?t.pop()+\",\":\"\"}function en(t,e){var r=[],n=[];return t=Zi.transform(t),e=Zi.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(\"translate(\",null,\",\",null,\")\");n.push({i:i-4,x:Nr(t[0],e[0])},{i:i-2,x:Nr(t[1],e[1])})}else(e[0]||e[1])&&r.push(\"translate(\"+e+\")\")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(tn(r)+\"rotate(\",null,\")\")-2,x:Nr(t,e)})):e&&r.push(tn(r)+\"rotate(\"+e+\")\")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(tn(r)+\"skewX(\",null,\")\")-2,x:Nr(t,e)}):e&&r.push(tn(r)+\"skewX(\"+e+\")\")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(tn(r)+\"scale(\",null,\",\",null,\")\");n.push({i:i-4,x:Nr(t[0],e[0])},{i:i-2,x:Nr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(tn(r)+\"scale(\"+e+\")\")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i<a;)r[(e=n[i]).i]=e.x(t);return r.join(\"\")}}function rn(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=nn(t),n=nn(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function nn(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function an(t){t.fixed|=2}function on(t){t.fixed&=-7}function sn(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ln(t){t.fixed&=-5}function cn(t,e,r){var n=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)null!=(a=o[l])&&(cn(a,e,r),t.charge+=a.charge,n+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=e*r[t.point.index];t.charge+=t.pointCharge=c,n+=c*t.point.x,i+=c*t.point.y}t.cx=n/t.charge,t.cy=i/t.charge}function un(t,e){return Zi.rebind(t,e,\"sort\",\"children\",\"value\"),t.nodes=t,t.links=gn,t}function fn(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function hn(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;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function dn(t){return t.children}function pn(t){return t.value}function mn(t,e){return e.value-t.value}function gn(t){return Zi.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function vn(t){return t.x}function yn(t){return t.y}function xn(t,e,r){t.y0=e,t.y=r}function bn(t){return Zi.range(t.length)}function _n(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function wn(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function Mn(t){return t.reduce(kn,0)}function kn(t,e){return t+e[1]}function An(t,e){return Tn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Tn(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 Sn(t){return[Zi.min(t),Zi.max(t)]}function En(t,e){return t.value-e.value}function Ln(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Cn(t,e){t._pack_next=e,e._pack_prev=t}function zn(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 Dn(t){function e(t){u=Math.min(t.x-t.r,u),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(c=r.length)){var r,n,i,a,o,s,l,c,u=1/0,f=-1/0,h=1/0,d=-1/0;if(r.forEach(In),n=r[0],n.x=-n.r,n.y=0,e(n),c>1&&(i=r[1],i.x=i.r,i.y=0,e(i),c>2))for(Fn(n,i,a=r[2]),e(a),Ln(n,a),n._pack_prev=a,Ln(a,i),i=n._pack_next,o=3;o<c;o++){Fn(n,i,a=r[o]);var p=0,m=1,g=1;for(s=i._pack_next;s!==i;s=s._pack_next,m++)if(zn(s,a)){p=1;break}if(1==p)for(l=n._pack_prev;l!==s._pack_prev&&!zn(l,a);l=l._pack_prev,g++);p?(m<g||m==g&&i.r<n.r?Cn(n,i=s):Cn(n=l,i),o--):(Ln(n,a),i=a,e(a))}var v=(u+f)/2,y=(h+d)/2,x=0;for(o=0;o<c;o++)(a=r[o]).x-=v,a.y-=y,x=Math.max(x,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=x,r.forEach(Pn)}}function In(t){t._pack_next=t._pack_prev=t}function Pn(t){delete t._pack_next,delete t._pack_prev}function On(t,e,r,n){var i=t.children;if(t.x=e+=n*t.x,t.y=r+=n*t.y,t.r*=n,i)for(var a=-1,o=i.length;++a<o;)On(i[a],e,r,n)}function Fn(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function Rn(t,e){return t.parent==e.parent?1:2}function Nn(t){var e=t.children;return e.length?e[0]:t.t}function jn(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function Bn(t){var e=t.children;return e&&e.length?Bn(e[0]):t}function Un(t){var e,r=t.children;return r&&(e=r.length)?Un(r[e-1]):t}function Vn(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qn(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 Hn(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function Gn(t){return t.rangeExtent?t.rangeExtent():Hn(t.range())}function Yn(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function Wn(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:ls}function Xn(t,e,r,n){function i(){var i=Math.min(t.length,e.length)>2?function(t,e,r,n){var i=[],a=[],o=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<=s;)i.push(r(t[o-1],t[o])),a.push(n(e[o-1],e[o]));return function(e){var r=Zi.bisect(t,e,1,s)-1;return a[r](i[r](e))}}:function(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}},l=n?function(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}:function(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}};return o=i(t,e,l,r),s=i(e,t,l,Br),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(Jr)},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 Qn(t,e)},a.tickFormat=function(e,r){return $n(t,e,r)},a.nice=function(e){return Jn(t,e),i()},a.copy=function(){return Xn(t,e,r,n)},i()}function Zn(t,e){return Zi.rebind(t,e,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Jn(t,e){return Yn(t,Wn(Kn(t,e)[2])),Yn(t,Wn(Kn(t,e)[2])),t}function Kn(t,e){null==e&&(e=10);var r=Hn(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 Qn(t,e){return Zi.range.apply(Zi,Kn(t,e))}function $n(t,e,r){var n=Kn(t,e);if(r){var i=Za.exec(r);if(i.shift(),\"s\"===i[8]){var a=Zi.formatPrefix(Math.max(aa(n[0]),aa(n[1])));return i[7]||(i[7]=\".\"+ti(a.scale(n[2]))),i[8]=\"f\",r=Zi.format(i.join(\"\")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]=\".\"+function(t,e){var r=ti(e[2]);return t in cs?Math.abs(r-ti(Math.max(aa(e[0]),aa(e[1]))))+ +(\"e\"!==t):r-2*(\"%\"===t)}(i[8],n)),r=i.join(\"\")}else r=\",.\"+ti(n[2])+\"f\";return Zi.format(r)}function ti(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ei(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=Yn(n.map(i),r?Math:fs);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Hn(n),o=[],s=t[0],l=t[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(u-c)){if(r){for(;c<u;c++)for(var h=1;h<f;h++)o.push(a(c)*h);o.push(a(c))}else for(o.push(a(c));c++<u;)for(h=f-1;h>0;h--)o.push(a(c)*h);for(c=0;o[c]<s;c++);for(u=o.length;o[u-1]>l;u--);o=o.slice(c,u)}return o},o.tickFormat=function(t,r){if(!arguments.length)return us;arguments.length<2?r=us:\"function\"!=typeof r&&(r=Zi.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*e<e-.5&&(o*=e),o<=n?r(t):\"\"}},o.copy=function(){return ei(t.copy(),e,r,n)},Zn(o,t)}function ri(t,e,r){function n(e){return t(i(e))}var i=ni(e),a=ni(1/e);return n.invert=function(e){return a(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(i)),n):r},n.ticks=function(t){return Qn(r,t)},n.tickFormat=function(t,e){return $n(r,t,e)},n.nice=function(t){return n.domain(Jn(r,t))},n.exponent=function(o){return arguments.length?(i=ni(e=o),a=ni(1/e),t.domain(r.map(i)),n):e},n.copy=function(){return ri(t.copy(),e,r)},Zn(n,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){function r(r){return a[((i.get(r)||(\"range\"===e.t?i.set(r,t.push(r)):NaN))-1)%a.length]}function n(e,r){return Zi.range(t.length).map(function(t){return e+r*t})}var i,a,o;return r.domain=function(n){if(!arguments.length)return t;t=[],i=new c;for(var a,o=-1,s=n.length;++o<s;)i.has(a=n[o])||i.set(a,t.push(a));return r[e.t].apply(r,e.a)},r.range=function(t){return arguments.length?(a=t,o=0,e={t:\"range\",a:arguments},r):a},r.rangePoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],c=i[1],u=t.length<2?(l=(l+c)/2,0):(c-l)/(t.length-1+s);return a=n(l+u*s/2,u),o=0,e={t:\"rangePoints\",a:arguments},r},r.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],c=i[1],u=t.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(t.length-1+s)|0;return a=n(l+Math.round(u*s/2+(c-l-(t.length-1+s)*u)/2),u),o=0,e={t:\"rangeRoundPoints\",a:arguments},r},r.rangeBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=i[1]<i[0],u=i[c-0],f=(i[1-c]-u)/(t.length-s+2*l);return a=n(u+f*l,f),c&&a.reverse(),o=f*(1-s),e={t:\"rangeBands\",a:arguments},r},r.rangeRoundBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=i[1]<i[0],u=i[c-0],f=i[1-c],h=Math.floor((f-u)/(t.length-s+2*l));return a=n(u+Math.round((f-u-(t.length-s)*h)/2),h),c&&a.reverse(),o=Math.round(h*(1-s)),e={t:\"rangeRoundBands\",a:arguments},r},r.rangeBand=function(){return o},r.rangeExtent=function(){return Hn(e.a[0])},r.copy=function(){return ii(t,e)},r.domain(t)}function ai(t,e){function r(){var r=0,n=e.length;for(s=[];++r<n;)s[r-1]=Zi.quantile(t,r/n);return o}function o(t){if(!isNaN(t=+t))return e[Zi.bisect(s,t)]}var s;return o.domain=function(e){return arguments.length?(t=e.map(i).filter(a).sort(n),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.quantiles=function(){return s},o.invertExtent=function(r){return(r=e.indexOf(r))<0?[NaN,NaN]:[r>0?s[r-1]:t[0],r<s.length?s[r]:t[t.length-1]]},o.copy=function(){return ai(t,e)},r()}function oi(t,e,r){function n(e){return r[Math.max(0,Math.min(o,Math.floor(a*(e-t))))]}function i(){return a=r.length/(e-t),o=r.length-1,n}var a,o;return n.domain=function(r){return arguments.length?(t=+r[0],e=+r[r.length-1],i()):[t,e]},n.range=function(t){return arguments.length?(r=t,i()):r},n.invertExtent=function(e){return e=r.indexOf(e),e=e<0?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return oi(t,e,r)},i()}function si(t,e){function r(r){if(r<=r)return e[Zi.bisect(t,r)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(t){return arguments.length?(e=t,r):e},r.invertExtent=function(r){return r=e.indexOf(r),[t[r-1],t[r]]},r.copy=function(){return si(t,e)},r}function li(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=r.map(e),e):t},e.ticks=function(e){return Qn(t,e)},e.tickFormat=function(e,r){return $n(t,e,r)},e.copy=function(){return li(t)},e}function ci(){return 0}function ui(t){return t.innerRadius}function fi(t){return t.outerRadius}function hi(t){return t.startAngle}function di(t){return t.endAngle}function pi(t){return t&&t.padAngle}function mi(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function gi(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,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,d=e[1]+c,p=(u+h)/2,m=(f+d)/2,g=h-u,v=d-f,y=g*g+v*v,x=r-n,b=u*d-h*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,M=(-b*g-v*_)/y,k=(b*v+g*_)/y,A=(-b*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-c],[w*r/x,M*r/x]]}function vi(t){function e(e){function o(){c.push(\"M\",a(t(u),s))}for(var l,c=[],u=[],f=-1,h=e.length,d=_t(r),p=_t(n);++f<h;)i.call(this,l=e[f],f)?u.push([+d.call(this,l,f),+p.call(this,l,f)]):u.length&&(o(),u=[]);return u.length&&o(),c.length?c.join(\"\"):null}var r=ar,n=or,i=ve,a=yi,o=a.key,s=.7;return e.x=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(n=t,e):n},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(o=\"function\"==typeof t?a=t:(a=vs.get(t)||yi).key,e):o},e.tension=function(t){return arguments.length?(s=t,e):s},e}function yi(t){return t.length>1?t.join(\"L\"):t+\"Z\"}function xi(t){return t.join(\"L\")+\"Z\"}function bi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"V\",(n=t[e])[1],\"H\",n[0]);return i.join(\"\")}function _i(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n=t[e])[0],\"V\",n[1]);return i.join(\"\")}function wi(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return yi(t);var r=t.length!=e.length,n=\"\",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+=\"Q\"+(a[0]-2*o[0]/3)+\",\"+(a[1]-2*o[1]/3)+\",\"+a[0]+\",\"+a[1],i=t[1],l=2),e.length>1){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 c=2;c<e.length;c++,l++)a=t[l],s=e[c],n+=\"S\"+(a[0]-s[0])+\",\"+(a[1]-s[1])+\",\"+a[0]+\",\"+a[1]}if(r){var u=t[l];n+=\"Q\"+(a[0]+2*s[0]/3)+\",\"+(a[1]+2*s[1]/3)+\",\"+u[0]+\",\"+u[1]}return n}function Mi(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function ki(t){if(t.length<3)return yi(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,\",\",a,\"L\",Ai(bs,o),\",\",Ai(bs,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Ti(l,o,s);return t.pop(),l.push(\"L\",n),l.join(\"\")}function Ai(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Ti(t,e,r){t.push(\"C\",Ai(ys,e),\",\",Ai(ys,r),\",\",Ai(xs,e),\",\",Ai(xs,r),\",\",Ai(bs,e),\",\",Ai(bs,r))}function Si(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ei(t){for(var e,r,n,i,a=[],o=function(t){for(var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=Si(i,a);++e<r;)n[e]=(o+(o=Si(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;++s<l;)e=Si(t[s],t[s+1]),aa(e)<wa?o[s]=o[s+1]=0:(i=(r=o[s]/e)*r+(n=o[s+1]/e)*n)>9&&(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 Li(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Sa,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function Ci(t){function e(e){function l(){m.push(\"M\",s(t(v),f),u,c(t(g.reverse()),f),\"Z\")}for(var h,d,p,m=[],g=[],v=[],y=-1,x=e.length,b=_t(r),_=_t(i),w=r===n?function(){return d}:_t(n),M=i===a?function(){return p}:_t(a);++y<x;)o.call(this,h=e[y],y)?(g.push([d=+b.call(this,h,y),p=+_.call(this,h,y)]),v.push([+w.call(this,h,y),+M.call(this,h,y)])):g.length&&(l(),g=[],v=[]);return g.length&&l(),m.length?m.join(\"\"):null}var r=ar,n=ar,i=0,a=or,o=ve,s=yi,l=s.key,c=s,u=\"L\",f=.7;return e.x=function(t){return arguments.length?(r=n=t,e):n},e.x0=function(t){return arguments.length?(r=t,e):r},e.x1=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=a=t,e):a},e.y0=function(t){return arguments.length?(i=t,e):i},e.y1=function(t){return arguments.length?(a=t,e):a},e.defined=function(t){return arguments.length?(o=t,e):o},e.interpolate=function(t){return arguments.length?(l=\"function\"==typeof t?s=t:(s=vs.get(t)||yi).key,c=s.reverse||s,u=s.closed?\"M\":\"L\",e):l},e.tension=function(t){return arguments.length?(f=t,e):f},e}function zi(t){return t.radius}function Di(t){return[t.x,t.y]}function Ii(){return 64}function Pi(){return\"circle\"}function Oi(t){var e=Math.sqrt(t/ka);return\"M0,\"+e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+-e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+e+\"Z\"}function Fi(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Ri(t,e,r){return ua(t,Ss),t.namespace=e,t.id=r,t}function Ni(t,e,r,n){var i=t.id,a=t.namespace;return U(t,\"function\"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function ji(t){return null==t&&(t=\"\"),function(){this.textContent=t}}function Bi(t){return null==t?\"__transition__\":\"__transition_\"+t+\"__\"}function Ui(t,e,r,n,i){function a(t){var e=m.delay;if(u.t=e+l,e<=t)return o(t-e);u.c=o}function o(r){var i=p.active,a=p[i];a&&(a.timer.c=null,a.timer.t=NaN,--p.count,delete p[i],a.event&&a.event.interrupt.call(t,t.__data__,a.index));for(var o in p)if(+o<n){var c=p[o];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[o]}u.c=s,kt(function(){return u.c&&s(r||1)&&(u.c=null,u.t=NaN),1},0,l),p.active=n,m.event&&m.event.start.call(t,t.__data__,e),d=[],m.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&&d.push(n)}),h=m.ease,f=m.duration}function s(i){for(var a=i/f,o=h(a),s=d.length;s>0;)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,f,h,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=kt(a,0,l),m=p[n]={tween:new c,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function Vi(t,e,r){t.attr(\"transform\",function(t){var n=e(t);return\"translate(\"+(isFinite(n)?n:r(t))+\",0)\"})}function qi(t,e,r){t.attr(\"transform\",function(t){var n=e(t);return\"translate(0,\"+(isFinite(n)?n:r(t))+\")\"})}function Hi(t){return t.toISOString()}function Gi(t,e,r){function n(e){return t(e)}function i(t,r){var n=(t[1]-t[0])/r,i=Zi.bisect(Fs,n);return i==Fs.length?[e.year,Kn(t.map(function(t){return t/31536e6}),r)[2]]:i?e[n/Fs[i-1]<Fs[i]/n?i-1:i]:[js,Kn(t,r)[2]]}return n.invert=function(e){return Yi(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain(e),n):t.domain().map(Yi)},n.nice=function(t,e){function r(r){return!isNaN(r)&&!t.range(r,Yi(+r+1),e).length}var a=n.domain(),o=Hn(a),s=null==t?i(o,10):\"number\"==typeof t&&i(o,t);return s&&(t=s[0],e=s[1]),n.domain(Yn(a,e>1?{floor:function(e){for(;r(e=t.floor(e));)e=Yi(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=Yi(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Hn(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],Yi(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return Gi(t.copy(),e,r)},Zn(n,t)}function Yi(t){return new Date(t)}function Wi(t){return JSON.parse(t.responseText)}function Xi(t){var e=Qi.createRange();return e.selectNode(Qi.body),e.createContextualFragment(t.responseText)}var Zi={version:\"3.5.17\"},Ji=[].slice,Ki=function(t){return Ji.call(t)},Qi=this.document;if(Qi)try{Ki(Qi.documentElement.childNodes)[0].nodeType}catch(t){Ki=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}),Qi)try{Qi.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(t){var $i=this.Element.prototype,ta=$i.setAttribute,ea=$i.setAttributeNS,ra=this.CSSStyleDeclaration.prototype,na=ra.setProperty;$i.setAttribute=function(t,e){ta.call(this,t,e+\"\")},$i.setAttributeNS=function(t,e,r){ea.call(this,t,e,r+\"\")},ra.setProperty=function(t,e,r){na.call(this,t,e+\"\",r)}}Zi.ascending=n,Zi.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Zi.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},Zi.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},Zi.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},Zi.sum=function(t,e){var r,n=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)a(r=+t[o])&&(n+=r);else for(;++o<i;)a(r=+e.call(t,t[o],o))&&(n+=r);return n},Zi.mean=function(t,e){var r,n=0,o=t.length,s=-1,l=o;if(1===arguments.length)for(;++s<o;)a(r=i(t[s]))?n+=r:--l;else for(;++s<o;)a(r=i(e.call(t,t[s],s)))?n+=r:--l;if(l)return n/l},Zi.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},Zi.median=function(t,e){var r,o=[],s=t.length,l=-1;if(1===arguments.length)for(;++l<s;)a(r=i(t[l]))&&o.push(r);else for(;++l<s;)a(r=i(e.call(t,t[l],l)))&&o.push(r);if(o.length)return Zi.quantile(o.sort(n),.5)},Zi.variance=function(t,e){var r,n,o=t.length,s=0,l=0,c=-1,u=0;if(1===arguments.length)for(;++c<o;)a(r=i(t[c]))&&(l+=(n=r-s)*(r-(s+=n/++u)));else for(;++c<o;)a(r=i(e.call(t,t[c],c)))&&(l+=(n=r-s)*(r-(s+=n/++u)));if(u>1)return l/(u-1)},Zi.deviation=function(){var t=Zi.variance.apply(this,arguments);return t?Math.sqrt(t):t};var ia=o(n);Zi.bisectLeft=ia.left,Zi.bisect=Zi.bisectRight=ia.right,Zi.bisector=function(t){return o(1===t.length?function(e,r){return n(t(e),r)}:t)},Zi.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},Zi.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},Zi.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},Zi.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,r=Zi.min(t,s),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n},Zi.zip=function(){return Zi.transpose(arguments)},Zi.keys=function(t){var e=[];for(var r in t)e.push(r);return e},Zi.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},Zi.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Zi.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var aa=Math.abs;Zi.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=function(t){for(var e=1;t*e%1;)e*=10;return e}(aa(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},Zi.map=function(t,e){var r=new c;if(t instanceof c)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var oa=\"__proto__\",sa=\"\\0\";l(c,{has:h,get:function(t){return this._[u(t)]},set:function(t,e){return this._[u(t)]=e},remove:d,keys:p,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:f(e),value:this._[e]});return t},size:m,empty:g,forEach:function(t){for(var e in this._)t.call(this,f(e),this._[e])}}),Zi.nest=function(){function t(e,o,s){if(s>=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,f,h,d=-1,p=o.length,m=a[s++],g=new c;++d<p;)(h=g.get(l=m(u=o[d])))?h.push(u):g.set(l,[u]);return e?(u=e(),f=function(r,n){u.set(r,t(e,n,s))}):(u={},f=function(r,n){u[r]=t(e,n,s)}),g.forEach(f),u}function e(t,r){if(r>=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(Zi.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},Zi.set=function(t){var e=new v;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},l(v,{has:h,add:function(t){return this._[u(t+=\"\")]=!0,t},remove:d,values:p,size:m,empty:g,forEach:function(t){for(var e in this._)t.call(this,f(e))}}),Zi.behavior={},Zi.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=function(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}(t,e,e[r]);return t};var la=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];Zi.dispatch=function(){for(var t=new _,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t},_.prototype.on=function(t,e){var r=t.indexOf(\".\"),n=\"\";if(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}},Zi.event=null,Zi.requote=function(t){return t.replace(ca,\"\\\\$&\")};var ca=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,ua={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},fa=function(t,e){return e.querySelector(t)},ha=function(t,e){return e.querySelectorAll(t)},da=function(t,e){var r=t.matches||t[x(t,\"matchesSelector\")];return(da=function(t,e){return r.call(t,e)})(t,e)};\"function\"==typeof Sizzle&&(fa=function(t,e){return Sizzle(t,e)[0]||null},ha=Sizzle,da=Sizzle.matchesSelector),Zi.selection=function(){return Zi.select(Qi.documentElement)};var pa=Zi.selection.prototype=[];pa.select=function(t){var e,r,n,i,a=[];t=S(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l<c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&\"__data__\"in i&&(r.__data__=i.__data__)):e.push(null)}return T(a)},pa.selectAll=function(t){var e,r,n=[];t=E(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],s=-1,l=o.length;++s<l;)(r=o[s])&&(n.push(e=Ki(t.call(r,r.__data__,s,i))),e.parentNode=r);return T(n)};var ma=\"http://www.w3.org/1999/xhtml\",ga={svg:\"http://www.w3.org/2000/svg\",xhtml:ma,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};Zi.ns={prefix:ga,qualify:function(t){var e=t.indexOf(\":\"),r=t;return e>=0&&\"xmlns\"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),ga.hasOwnProperty(r)?{space:ga[r],local:t}:t}},pa.attr=function(t,e){if(arguments.length<2){if(\"string\"==typeof t){var r=this.node();return(t=Zi.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(L(e,t[e]));return this}return this.each(L(t,e))},pa.classed=function(t,e){if(arguments.length<2){if(\"string\"==typeof t){var r=this.node(),n=(t=D(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(\"class\");++i<n;)if(!z(t[i]).test(e))return!1;return!0}for(e in t)this.each(I(e,t[e]));return this}return this.each(I(t,e))},pa.style=function(t,e,n){var i=arguments.length;if(i<3){if(\"string\"!=typeof t){i<2&&(e=\"\");for(n in t)this.each(O(n,t[n],e));return this}if(i<2){var a=this.node();return r(a).getComputedStyle(a,null).getPropertyValue(t)}n=\"\"}return this.each(O(t,e,n))},pa.property=function(t,e){if(arguments.length<2){if(\"string\"==typeof t)return this.node()[t];for(e in t)this.each(F(e,t[e]));return this}return this.each(F(t,e))},pa.text=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?\"\":e}:null==t?function(){this.textContent=\"\"}:function(){this.textContent=t}):this.node().textContent},pa.html=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\"\":e}:null==t?function(){this.innerHTML=\"\"}:function(){this.innerHTML=t}):this.node().innerHTML},pa.append=function(t){return t=R(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},pa.insert=function(t,e){return t=R(t),e=S(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},pa.remove=function(){return this.each(N)},pa.data=function(t,e){function r(t,r){var n,i,a,o=t.length,f=r.length,h=Math.min(o,f),d=new Array(f),p=new Array(f),m=new Array(o);if(e){var g,v=new c,y=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(v.has(g=e.call(i,i.__data__,n))?m[n]=i:v.set(g,i),y[n]=g);for(n=-1;++n<f;)(i=v.get(g=e.call(r,a=r[n],n)))?!0!==i&&(d[n]=i,i.__data__=a):p[n]=j(a),v.set(g,!0);for(n=-1;++n<o;)n in y&&!0!==v.get(y[n])&&(m[n]=t[n])}else{for(n=-1;++n<h;)i=t[n],a=r[n],i?(i.__data__=a,d[n]=i):p[n]=j(a);for(;n<f;++n)p[n]=j(r[n]);for(;n<o;++n)m[n]=t[n]}p.update=d,p.parentNode=d.parentNode=m.parentNode=t.parentNode,s.push(p),l.push(d),u.push(m)}var n,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(n=this[0]).length);++a<o;)(i=n[a])&&(t[a]=i.__data__);return t}var s=V([]),l=T([]),u=T([]);if(\"function\"==typeof t)for(;++a<o;)r(n=this[a],t.call(n,n.parentNode.__data__,a));else for(;++a<o;)r(n=this[a],t);return l.enter=function(){return s},l.exit=function(){return u},l},pa.datum=function(t){return arguments.length?this.property(\"__data__\",t):this.property(\"__data__\")},pa.filter=function(t){var e,r,n,i=[];\"function\"!=typeof t&&(t=B(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return T(i)},pa.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},pa.sort=function(t){t=function(t){return arguments.length||(t=n),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},pa.each=function(t){return U(this,function(e,r,n){t.call(e,e.__data__,r,n)})},pa.call=function(t){var e=Ki(arguments);return t.apply(e[0]=this,e),this},pa.empty=function(){return!this.node()},pa.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},pa.size=function(){var t=0;return U(this,function(){++t}),t};var va=[];Zi.selection.enter=V,Zi.selection.enter.prototype=va,va.append=pa.append,va.empty=pa.empty,va.node=pa.node,va.call=pa.call,va.size=pa.size,va.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return T(o)},va.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,r;return function(n,i,a){var o,s=t[a].update,l=s.length;for(a!=r&&(r=a,e=0),i>=e&&(e=i+1);!(o=s[e])&&++e<l;);return o}}(this)),pa.insert.call(this,t,e)},Zi.select=function(e){var r;return\"string\"==typeof e?(r=[fa(e,Qi)]).parentNode=Qi.documentElement:(r=[e]).parentNode=t(e),T([r])},Zi.selectAll=function(t){var e;return\"string\"==typeof t?(e=Ki(ha(t,Qi))).parentNode=Qi.documentElement:(e=Ki(t)).parentNode=null,T([e])},pa.on=function(t,e,r){var n=arguments.length;if(n<3){if(\"string\"!=typeof t){n<2&&(e=!1);for(r in t)this.each(q(r,t[r],e));return this}if(n<2)return(n=this.node()[\"__on\"+t])&&n._;r=!1}return this.each(q(t,e,r))};var ya=Zi.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});Qi&&ya.forEach(function(t){\"on\"+t in Qi&&ya.remove(t)});var xa,ba=0;Zi.mouse=function(t){return W(t,k())};var _a=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;Zi.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=k().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return W(t,n)},Zi.behavior.drag=function(){function t(){this.on(\"mousedown.drag\",a).on(\"touchstart.drag\",o)}function e(t,e,r,a,o){return function(){var s,l=Zi.event.target.correspondingElement||Zi.event.target,c=this.parentNode,u=n.of(this,arguments),f=0,h=t(),d=\".drag\"+(null==h?\"\":\"-\"+h),p=Zi.select(r(l)).on(a+d,function(){var t,r,n=e(c,h);n&&(t=n[0]-g[0],r=n[1]-g[1],f|=t|r,g=n,u({type:\"drag\",x:n[0]+s[0],y:n[1]+s[1],dx:t,dy:r}))}).on(o+d,function(){e(c,h)&&(p.on(a+d,null).on(o+d,null),m(f),u({type:\"dragend\"}))}),m=Y(l),g=e(c,h);s=i?[(s=i.apply(this,arguments)).x-g[0],s.y-g[1]]:[0,0],u({type:\"dragstart\"})}}var n=A(t,\"drag\",\"dragstart\",\"dragend\"),i=null,a=e(b,Zi.mouse,r,\"mousemove\",\"mouseup\"),o=e(X,Zi.touch,y,\"touchmove\",\"touchend\");return t.origin=function(e){return arguments.length?(i=e,t):i},Zi.rebind(t,n,\"on\")},Zi.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?Ki(e).map(function(e){var r=W(t,e);return r.identifier=e.identifier,r}):[]};var wa=1e-6,Ma=wa*wa,ka=Math.PI,Aa=2*ka,Ta=Aa-wa,Sa=ka/2,Ea=ka/180,La=180/ka,Ca=Math.SQRT2;Zi.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<Ma)n=Math.log(c/o)/Ca,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Ca*t*n)]};else{var d=Math.sqrt(h),p=(c*c-o*o+4*h)/(2*o*2*d),m=(c*c-o*o-4*h)/(2*c*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Ca,r=function(t){var e=t*n,r=$(g),s=o/(2*d)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Ca*e+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+s*u,a+s*f,o*r/$(Ca*e+g)]}}return r.duration=1e3*n,r},Zi.behavior.zoom=function(){function t(t){t.on(C,u).on(Da+\".zoom\",h).on(\"dblclick.zoom\",d).on(I,f)}function e(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function n(t){k.k=Math.max(S[0],Math.min(S[1],t))}function i(t,e){e=function(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function a(e,r,a,o){e.__chart__={x:k.x,y:k.y,k:k.k},n(Math.pow(2,o)),i(m=r,a),e=Zi.select(e),E>0&&(e=e.transition().duration(E)),e.call(t.event)}function o(){b&&b.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(t){return(t-k.y)/k.k}).map(_.invert))}function s(t){L++||t({type:\"zoomstart\"})}function l(t){o(),t({type:\"zoom\",scale:k.k,translate:[k.x,k.y]})}function c(t){--L||(t({type:\"zoomend\"}),m=null)}function u(){var t=this,n=P.of(t,arguments),a=0,o=Zi.select(r(t)).on(z,function(){a=1,i(Zi.mouse(t),u),l(n)}).on(D,function(){o.on(z,null).on(D,null),f(a),c(n)}),u=e(Zi.mouse(t)),f=Y(t);Ts.call(t),s(n)}function f(){function t(){var t=Zi.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=Zi.event.target;Zi.select(e).on(b,o).on(_,h),w.push(e);for(var r=Zi.event.changedTouches,n=0,i=r.length;n<i;++n)g[r[n].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(l-y<500){var c=s[0];a(p,c,g[c.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),M()}y=l}else if(s.length>1){c=s[0];var u=s[1],f=c[0]-u[0],d=c[1]-u[1];v=f*f+d*d}}function o(){var t,e,r,a,o=Zi.touches(p);Ts.call(p);for(var s=0,c=o.length;s<c;++s,a=null)if(r=o[s],a=g[r.identifier]){if(e)break;t=r,e=a}if(a){var u=(u=r[0]-t[0])*u+(u=r[1]-t[1])*u,f=v&&Math.sqrt(u/v);t=[(t[0]+r[0])/2,(t[1]+r[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],n(f*d)}y=null,i(t,e),l(m)}function h(){if(Zi.event.touches.length){for(var e=Zi.event.changedTouches,r=0,n=e.length;r<n;++r)delete g[e[r].identifier];for(var i in g)return void t()}Zi.selectAll(w).on(x,null),A.on(C,u).on(I,f),T(),c(m)}var d,p=this,m=P.of(p,arguments),g={},v=0,x=\".zoom-\"+Zi.event.changedTouches[0].identifier,b=\"touchmove\"+x,_=\"touchend\"+x,w=[],A=Zi.select(p),T=Y(p);r(),s(m),A.on(C,null).on(I,r)}function h(){var t=P.of(this,arguments);v?clearTimeout(v):(Ts.call(this),p=e(m=g||Zi.mouse(this)),s(t)),v=setTimeout(function(){v=null,c(t)},50),M(),n(Math.pow(2,.002*za())*k.k),i(m,p),l(t)}function d(){var t=Zi.mouse(this),r=Math.log(k.k)/Math.LN2;a(this,t,e(t),Zi.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}var p,m,g,v,y,x,b,_,w,k={x:0,y:0,k:1},T=[960,500],S=Ia,E=250,L=0,C=\"mousedown.zoom\",z=\"mousemove.zoom\",D=\"mouseup.zoom\",I=\"touchstart.zoom\",P=A(t,\"zoomstart\",\"zoom\",\"zoomend\");return Da||(Da=\"onwheel\"in Qi?(za=function(){return-Zi.event.deltaY*(Zi.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in Qi?(za=function(){return Zi.event.wheelDelta},\"mousewheel\"):(za=function(){return-Zi.event.detail},\"MozMousePixelScroll\")),t.event=function(t){t.each(function(){var t=P.of(this,arguments),e=k;ks?Zi.select(this).transition().each(\"start.zoom\",function(){k=this.__chart__||{x:0,y:0,k:1},s(t)}).tween(\"zoom:zoom\",function(){var r=T[0],n=T[1],i=m?m[0]:r/2,a=m?m[1]:n/2,o=Zi.interpolateZoom([(i-k.x)/k.k,(a-k.y)/k.k,r/k.k],[(i-e.x)/e.k,(a-e.y)/e.k,r/e.k]);return function(e){var n=o(e),s=r/n[2];this.__chart__=k={x:i-n[0]*s,y:a-n[1]*s,k:s},l(t)}}).each(\"interrupt.zoom\",function(){c(t)}).each(\"end.zoom\",function(){c(t)}):(this.__chart__=k,s(t),l(t),c(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},o(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:null},n(+e),o(),t):k.k},t.scaleExtent=function(e){return arguments.length?(S=null==e?Ia:[+e[0],+e[1]],t):S},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(T=e&&[+e[0],+e[1]],t):T},t.duration=function(e){return arguments.length?(E=+e,t):E},t.x=function(e){return arguments.length?(b=e,x=e.copy(),k={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(w=e,_=e.copy(),k={x:0,y:0,k:1},t):w},Zi.rebind(t,P,\"on\")};var za,Da,Ia=[0,1/0];Zi.color=et,et.prototype.toString=function(){return this.rgb()+\"\"},Zi.hsl=rt;var Pa=rt.prototype=new et;Pa.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new rt(this.h,this.s,this.l/t)},Pa.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new rt(this.h,this.s,t*this.l)},Pa.rgb=function(){return nt(this.h,this.s,this.l)},Zi.hcl=it;var Oa=it.prototype=new et;Oa.brighter=function(t){return new it(this.h,this.c,Math.min(100,this.l+Fa*(arguments.length?t:1)))},Oa.darker=function(t){return new it(this.h,this.c,Math.max(0,this.l-Fa*(arguments.length?t:1)))},Oa.rgb=function(){return at(this.h,this.c,this.l).rgb()},Zi.lab=ot;var Fa=18,Ra=.95047,Na=1,ja=1.08883,Ba=ot.prototype=new et;Ba.brighter=function(t){return new ot(Math.min(100,this.l+Fa*(arguments.length?t:1)),this.a,this.b)},Ba.darker=function(t){return new ot(Math.max(0,this.l-Fa*(arguments.length?t:1)),this.a,this.b)},Ba.rgb=function(){return st(this.l,this.a,this.b)},Zi.rgb=ht;var Ua=ht.prototype=new et;Ua.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b;return e||r||n?(e&&e<30&&(e=30),r&&r<30&&(r=30),n&&n<30&&(n=30),new ht(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ht(30,30,30)},Ua.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ht(t*this.r,t*this.g,t*this.b)},Ua.hsl=function(){return vt(this.r,this.g,this.b)},Ua.toString=function(){return\"#\"+mt(this.r)+mt(this.g)+mt(this.b)};var Va=Zi.map({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});Va.forEach(function(t,e){Va.set(t,dt(e))}),Zi.functor=_t,Zi.xhr=wt(y),Zi.dsv=function(t,e){function r(t,r,a){arguments.length<3&&(a=r,r=null);var o=Mt(t,e,null==r?n:i(r),a);return o.row=function(t){return arguments.length?o.response(null==(r=t)?n:i(t)):r},o}function n(t){return r.parse(t.responseText)}function i(t){return function(e){return r.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return s.test(t)?'\"'+t.replace(/\\\"/g,'\"\"')+'\"':t}var s=new RegExp('[\"'+t+\"\\n]\"),l=t.charCodeAt(0);return r.parse=function(t,e){var n;return r.parseRows(t,function(t,r){if(n)return n(t,r-1);var i=new Function(\"d\",\"return {\"+t.map(function(t,e){return JSON.stringify(t)+\": d[\"+e+\"]\"}).join(\",\")+\"}\");n=e?function(t,r){return e(i(t),r)}:i})},r.parseRows=function(t,e){function r(){if(u>=c)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++<c;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}u=r+2;return 13===(n=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++u):10===n&&(i=!0),t.slice(e+1,r).replace(/\"\"/g,'\"')}for(;u<c;){var n,s=1;if(10===(n=t.charCodeAt(u++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(u)&&(++u,++s);else if(n!==l)continue;return t.slice(e,u-s)}return t.slice(e)}for(var n,i,a={},o={},s=[],c=t.length,u=0,f=0;(n=r())!==o;){for(var h=[];n!==a&&n!==o;)h.push(n),n=r();e&&null==(h=e(h,f++))||s.push(h)}return s},r.format=function(e){if(Array.isArray(e[0]))return r.formatRows(e);var n=new v,i=[];return e.forEach(function(t){for(var e in t)n.has(e)||i.push(n.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join(\"\\n\")},r.formatRows=function(t){return t.map(a).join(\"\\n\")},r},Zi.csv=Zi.dsv(\",\",\"text/csv\"),Zi.tsv=Zi.dsv(\"\\t\",\"text/tab-separated-values\");var qa,Ha,Ga,Ya,Wa=this[x(this,\"requestAnimationFrame\")]||function(t){setTimeout(t,17)};Zi.timer=function(){kt.apply(this,arguments)},Zi.timer.flush=function(){Tt(),St()},Zi.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Xa=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(function(t,e){var r=Math.pow(10,3*aa(8-e));return{scale:e>8?function(t){return t/r}:function(t){return t*r},symbol:t}});Zi.formatPrefix=function(t,e){var r=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=Zi.round(t,Et(t,e))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Xa[8+r/3]};var Za=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,Ja=Zi.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=Zi.round(t,Et(t,e))).toFixed(Math.max(0,Math.min(20,Et(t*(1+1e-15),e))))}}),Ka=Zi.time={},Qa=Date;Lt.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(){$a.setUTCDate.apply(this._,arguments)},setDay:function(){$a.setUTCDay.apply(this._,arguments)},setFullYear:function(){$a.setUTCFullYear.apply(this._,arguments)},setHours:function(){$a.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){$a.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){$a.setUTCMinutes.apply(this._,arguments)},setMonth:function(){$a.setUTCMonth.apply(this._,arguments)},setSeconds:function(){$a.setUTCSeconds.apply(this._,arguments)},setTime:function(){$a.setTime.apply(this._,arguments)}};var $a=Date.prototype;Ka.year=Ct(function(t){return(t=Ka.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ka.years=Ka.year.range,Ka.years.utc=Ka.year.utc.range,Ka.day=Ct(function(t){var e=new Qa(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}),Ka.days=Ka.day.range,Ka.days.utc=Ka.day.utc.range,Ka.dayOfYear=function(t){var e=Ka.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=Ka[t]=Ct(function(t){return(t=Ka.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=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Ka[t+\"s\"]=r.range,Ka[t+\"s\"].utc=r.utc.range,Ka[t+\"OfYear\"]=function(t){var r=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)}}),Ka.week=Ka.sunday,Ka.weeks=Ka.sunday.range,Ka.weeks.utc=Ka.sunday.utc.range,Ka.weekOfYear=Ka.sundayOfYear;var to={\"-\":\"\",_:\" \",0:\"0\"},eo=/^\\s*\\d+/,ro=/^%/;Zi.locale=function(t){return{numberFormat:function(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)}:y;return function(t){var r=Za.exec(t),n=r[1]||\" \",o=r[2]||\">\",s=r[3]||\"-\",l=r[4]||\"\",c=r[5],u=+r[6],f=r[7],h=r[8],d=r[9],p=1,m=\"\",g=\"\",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||\"0\"===n&&\"=\"===o)&&(c=n=\"0\",o=\"=\"),d){case\"n\":f=!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,h=0;break;case\"s\":p=-1,d=\"r\"}\"$\"===l&&(m=i[0],g=i[1]),\"r\"!=d||h||(d=\"g\"),null!=h&&(\"g\"==d?h=Math.max(1,Math.min(21,h)):\"e\"!=d&&\"f\"!=d||(h=Math.max(0,Math.min(20,h)))),d=Ja.get(d)||function(t){return t+\"\"};var x=c&&f;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=Zi.formatPrefix(t,h);t=l.scale(t),r=l.symbol+g}else t*=p;var b,_,w=(t=d(t,h)).lastIndexOf(\".\");if(w<0){var M=y?t.lastIndexOf(\"e\"):-1;M<0?(b=t,_=\"\"):(b=t.substring(0,M),_=t.substring(M))}else b=t.substring(0,w),_=e+t.substring(w+1);!c&&f&&(b=a(b,1/0));var k=m.length+b.length+_.length+(x?0:i.length),A=k<u?new Array(k=u-k+1).join(n):\"\";return x&&(b=a(A+b,A.length?u-_.length:1/0)),i+=m,t=b+_,(\"<\"===o?i+t+A:\">\"===o?A+i+t:\"^\"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(x?t:A+t))+r}}}(t),timeFormat:function(t){function e(t){function e(e){for(var r,i,a,o=[],s=-1,l=0;++s<n;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=to[r=t.charAt(++s)])&&(r=t.charAt(++s)),(a=b[r])&&(r=a(e,null==i?\"e\"===r?\" \":\"0\":i)),o.push(r),l=s+1);return o.push(t.slice(l,s)),o.join(\"\")}var n=t.length;return e.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(r(n,t,e,0)!=e.length)return null;\"p\"in n&&(n.H=n.H%12+12*n.p);var i=null!=n.Z&&Qa!==Lt,a=new(i?Lt:Qa);return\"j\"in n?a.setFullYear(n.y,0,n.j):\"W\"in n||\"U\"in n?(\"w\"in n||(n.w=\"W\"in n?1:0),a.setFullYear(n.y,0,1),a.setFullYear(n.y,0,\"W\"in n?(n.w+6)%7+7*n.W-(a.getDay()+5)%7:n.w+7*n.U-(a.getDay()+6)%7)):a.setFullYear(n.y,n.m,n.d),a.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),i?a._:a},e.toString=function(){return t},e}function r(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s<l;){if(n>=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=_[o in to?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}var n=t.dateTime,i=t.date,a=t.time,o=t.periods,s=t.days,l=t.shortDays,c=t.months,u=t.shortMonths;e.multi=(e.utc=function(t){function r(t){try{var e=new(Qa=Lt);return e._=t,n(e)}finally{Qa=Date}}var n=e(t);return r.parse=function(t){try{Qa=Lt;var e=n.parse(t);return e&&e._}finally{Qa=Date}},r.toString=n.toString,r}).multi=Jt;var f=Zi.map(),h=It(s),d=Pt(s),p=It(l),m=Pt(l),g=It(c),v=Pt(c),y=It(u),x=Pt(u);o.forEach(function(t,e){f.set(t.toLowerCase(),e)});var b={a:function(t){return l[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return c[t.getMonth()]},c:e(n),d:function(t,e){return Dt(t.getDate(),e,2)},e:function(t,e){return Dt(t.getDate(),e,2)},H:function(t,e){return Dt(t.getHours(),e,2)},I:function(t,e){return Dt(t.getHours()%12||12,e,2)},j:function(t,e){return Dt(1+Ka.dayOfYear(t),e,3)},L:function(t,e){return Dt(t.getMilliseconds(),e,3)},m:function(t,e){return Dt(t.getMonth()+1,e,2)},M:function(t,e){return Dt(t.getMinutes(),e,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,e){return Dt(t.getSeconds(),e,2)},U:function(t,e){return Dt(Ka.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Dt(Ka.mondayOfYear(t),e,2)},x:e(i),X:e(a),y:function(t,e){return Dt(t.getFullYear()%100,e,2)},Y:function(t,e){return Dt(t.getFullYear()%1e4,e,4)},Z:Xt,\"%\":function(){return\"%\"}},_={a:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){h.lastIndex=0;var n=h.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){y.lastIndex=0;var n=y.exec(e.slice(r));return n?(t.m=x.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,n){return r(t,b.c.toString(),e,n)},d:Vt,e:Vt,H:Ht,I:Ht,j:qt,L:Wt,m:Ut,M:Gt,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:Yt,U:Ft,w:Ot,W:Rt,x:function(t,e,n){return r(t,b.x.toString(),e,n)},X:function(t,e,n){return r(t,b.X.toString(),e,n)},y:jt,Y:Nt,Z:Bt,\"%\":Zt};return e}(t)}};var no=Zi.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\"]});Zi.format=no.numberFormat,Zi.geo={},Kt.prototype={s:0,t:0,add:function(t){Qt(t,this.t,io),Qt(io.s,this.s,this),this.s?this.t+=io.t:this.s=io.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var io=new Kt;Zi.geo.stream=function(t,e){t&&ao.hasOwnProperty(t.type)?ao[t.type](t,e):$t(t,e)};var ao={Feature:function(t,e){$t(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)$t(r[n].geometry,e)}},oo={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){te(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)te(r[n],e,0)},Polygon:function(t,e){ee(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)ee(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)$t(r[n],e)}};Zi.geo.area=function(t){return so=0,Zi.geo.stream(t,co),so};var so,lo=new Kt,co={sphere:function(){so+=4*ka},point:b,lineStart:b,lineEnd:b,polygonStart:function(){lo.reset(),co.lineStart=re},polygonEnd:function(){var t=2*lo;so+=t<0?4*ka+t:t,co.lineStart=co.lineEnd=co.point=b}};Zi.geo.bounds=function(){function t(t,e){x.push(b=[u=t,h=t]),e<f&&(f=e),e>d&&(d=e)}function e(e,r){var n=ne([e*Ea,r*Ea]);if(v){var i=ae(v,n),a=ae([i[1],-i[0],0],i);le(a),a=ce(a);var o=e-p,l=o>0?1:-1,c=a[0]*La*l,m=aa(o)>180;if(m^(l*p<c&&c<l*e)){(g=a[1]*La)>d&&(d=g)}else if(c=(c+360)%360-180,m^(l*p<c&&c<l*e)){var g;(g=-a[1]*La)<f&&(f=g)}else r<f&&(f=r),r>d&&(d=r);m?e<p?s(u,e)>s(u,h)&&(h=e):s(e,h)>s(u,h)&&(u=e):h>=u?(e<u&&(u=e),e>h&&(h=e)):e>p?s(u,e)>s(u,h)&&(h=e):s(e,h)>s(u,h)&&(u=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){b[0]=u,b[1]=h,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=aa(n)>180?n+(n>0?360:-360):n}else m=t,g=r;co.point(t,r),e(t,r)}function a(){co.lineStart()}function o(){i(m,g),co.lineEnd(),aa(y)>wa&&(u=-(h=180)),b[0]=u,b[1]=h,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var u,f,h,d,p,m,g,v,y,x,b,_={point:t,lineStart:r,lineEnd:n,polygonStart:function(){_.point=i,_.lineStart=a,_.lineEnd=o,y=0,co.polygonStart()},polygonEnd:function(){co.polygonEnd(),_.point=t,_.lineStart=r,_.lineEnd=n,lo<0?(u=-(h=180),f=-(d=90)):y>wa?d=90:y<-wa&&(f=-90),b[0]=u,b[1]=h}};return function(t){d=h=-(u=f=1/0),x=[],Zi.geo.stream(t,_);if(i=x.length){x.sort(l);for(var e=1,r=[p=x[0]];e<i;++e)c((a=x[e])[0],p)||c(a[1],p)?(s(p[0],a[1])>s(p[0],p[1])&&(p[1]=a[1]),s(a[0],p[1])>s(p[0],p[1])&&(p[0]=a[0])):r.push(p=a);for(var n,i,a,o=-1/0,p=(e=0,r[i=r.length-1]);e<=i;p=a,++e)a=r[e],(n=s(p[1],a[0]))>o&&(o=n,u=a[0],h=p[1])}return x=b=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[h,d]]}}(),Zi.geo.centroid=function(t){uo=fo=ho=po=mo=go=vo=yo=xo=bo=_o=0,Zi.geo.stream(t,wo);var e=xo,r=bo,n=_o,i=e*e+r*r+n*n;return i<Ma&&(e=go,r=vo,n=yo,fo<wa&&(e=ho,r=po,n=mo),(i=e*e+r*r+n*n)<Ma)?[NaN,NaN]:[Math.atan2(r,e)*La,Q(n/Math.sqrt(i))*La]};var uo,fo,ho,po,mo,go,vo,yo,xo,bo,_o,wo={sphere:b,point:fe,lineStart:de,lineEnd:pe,polygonStart:function(){wo.lineStart=me},polygonEnd:function(){wo.lineStart=de}},Mo=_e(ve,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?ka:-ka,l=aa(a-r);aa(l-ka)<wa?(t.point(r,n=(n+o)/2>0?Sa:-Sa),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=ka&&(aa(r-i)<wa&&(r-=i*wa),aa(a-s)<wa&&(a-=s*wa),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return aa(o)>wa?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}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Sa,n.point(-ka,i),n.point(0,i),n.point(ka,i),n.point(ka,0),n.point(ka,-i),n.point(0,-i),n.point(-ka,-i),n.point(-ka,0),n.point(-ka,i);else if(aa(t[0]-e[0])>wa){var a=t[0]<e[0]?ka:-ka;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-ka,-ka/2]),ko=1e9;Zi.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(s){return arguments.length?(a=Te(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(Zi.geo.conicEqualArea=function(){return Se(Ee)}).raw=Ee,Zi.geo.albers=function(){return Zi.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Zi.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}var e,r,n,i,a=Zi.geo.albers(),o=Zi.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Zi.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};return t.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;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 c=a.scale(),u=+e[0],f=+e[1];return r=a.translate(e).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(l).point,n=o.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+wa,f+.12*c+wa],[u-.214*c-wa,f+.234*c-wa]]).stream(l).point,i=s.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+wa,f+.166*c+wa],[u-.115*c-wa,f+.234*c-wa]]).stream(l).point,t},t.scale(1070)};var Ao,To,So,Eo,Lo,Co,zo={point:b,lineStart:b,lineEnd:b,polygonStart:function(){To=0,zo.lineStart=Le},polygonEnd:function(){zo.lineStart=zo.lineEnd=zo.point=b,Ao+=aa(To/2)}},Do={point:function(t,e){t<So&&(So=t),t>Lo&&(Lo=t),e<Eo&&(Eo=e),e>Co&&(Co=e)},lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Io={point:ze,lineStart:De,lineEnd:Ie,polygonStart:function(){Io.lineStart=Pe},polygonEnd:function(){Io.point=ze,Io.lineStart=De,Io.lineEnd=Ie}};Zi.geo.path=function(){function t(t){return t&&(\"function\"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),Zi.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 Ao=0,Zi.geo.stream(t,i(zo)),Ao},t.centroid=function(t){return ho=po=mo=go=vo=yo=xo=bo=_o=0,Zi.geo.stream(t,i(Io)),_o?[xo/_o,bo/_o]:yo?[go/yo,vo/yo]:mo?[ho/mo,po/mo]:[NaN,NaN]},t.bounds=function(t){return Lo=Co=-(So=Eo=1/0),Zi.geo.stream(t,i(Do)),[[So,Eo],[Lo,Co]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||function(t){var e=Oe(function(e,r){return t([e*La,r*La])});return function(t){return Be(e(t))}}(t):y,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new function(){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=Ce(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=Ce(t),s},result:function(){if(o.length){var t=o.join(\"\");return o=[],t}}};return s}:new function(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Aa)}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:b};return s}(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(Zi.geo.albersUsa()).context(null)},Zi.geo.transform=function(t){return{stream:function(e){var r=new Fe(e);for(var n in t)r[n]=t[n];return r}}},Fe.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()}},Zi.geo.projection=Ne,Zi.geo.projectionMutator=je,(Zi.geo.equirectangular=function(){return Ne(Ue)}).raw=Ue.invert=Ue,Zi.geo.rotation=function(t){function e(e){return e=t(e[0]*Ea,e[1]*Ea),e[0]*=La,e[1]*=La,e}return t=qe(t[0]%360*Ea,t[1]*Ea,t.length>2?t[2]*Ea:0),e.invert=function(e){return e=t.invert(e[0]*Ea,e[1]*Ea),e[0]*=La,e[1]*=La,e},e},Ve.invert=Ue,Zi.geo.circle=function(){function t(){var t=\"function\"==typeof n?n.apply(this,arguments):n,e=qe(-t[0]*Ea,-t[1]*Ea,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=La,t[1]*=La}}),{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=We((e=+n)*Ea,i*Ea),t):e},t.precision=function(n){return arguments.length?(r=We(e*Ea,(i=+n)*Ea),t):i},t.angle(90)},Zi.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ea,i=t[1]*Ea,a=e[1]*Ea,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},Zi.geo.graticule=function(){function t(){return{type:\"MultiLineString\",coordinates:e()}}function e(){return Zi.range(Math.ceil(a/g)*g,i,g).map(h).concat(Zi.range(Math.ceil(c/v)*v,l,v).map(d)).concat(Zi.range(Math.ceil(n/p)*p,r,p).filter(function(t){return aa(t%g)>wa}).map(u)).concat(Zi.range(Math.ceil(s/m)*m,o,m).filter(function(t){return aa(t%v)>wa}).map(f))}var r,n,i,a,o,s,l,c,u,f,h,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:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).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],c=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),c>l&&(e=c,c=l,l=e),t.precision(y)):[[a,c],[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,u=Ze(s,o,90),f=Je(n,r,y),h=Ze(c,l,90),d=Je(a,i,y),t):y},t.majorExtent([[-180,-90+wa],[180,90-wa]]).minorExtent([[-180,-80-wa],[180,80+wa]])},Zi.geo.greatArc=function(){function t(){return{type:\"LineString\",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=Ke,i=Qe;return t.distance=function(){return Zi.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},Zi.geo.interpolate=function(t,e){return function(t,e,r,n){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),l=i*Math.cos(t),c=i*Math.sin(t),u=o*Math.cos(r),f=o*Math.sin(r),h=2*Math.asin(Math.sqrt(tt(n-e)+i*o*tt(r-t))),d=1/Math.sin(h),p=h?function(t){var e=Math.sin(t*=h)*d,r=Math.sin(h-t)*d,n=r*l+e*u,i=r*c+e*f,o=r*a+e*s;return[Math.atan2(i,n)*La,Math.atan2(o,Math.sqrt(n*n+i*i))*La]}:function(){return[t*La,e*La]};return p.distance=h,p}(t[0]*Ea,t[1]*Ea,e[0]*Ea,e[1]*Ea)},Zi.geo.length=function(t){return Po=0,Zi.geo.stream(t,Oo),Po};var Po,Oo={sphere:b,point:b,lineStart:function(){function t(t,i){var a=Math.sin(i*=Ea),o=Math.cos(i),s=aa((t*=Ea)-e),l=Math.cos(s);Po+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=n*a-r*o*l)*s),r*a+n*o*l),e=t,r=a,n=o}var e,r,n;Oo.point=function(i,a){e=i*Ea,r=Math.sin(a*=Ea),n=Math.cos(a),Oo.point=t},Oo.lineEnd=function(){Oo.point=Oo.lineEnd=b}},lineEnd:b,polygonStart:b,polygonEnd:b},Fo=$e(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Zi.geo.azimuthalEqualArea=function(){return Ne(Fo)}).raw=Fo;var Ro=$e(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},y);(Zi.geo.azimuthalEquidistant=function(){return Ne(Ro)}).raw=Ro,(Zi.geo.conicConformal=function(){return Se(tr)}).raw=tr,(Zi.geo.conicEquidistant=function(){return Se(er)}).raw=er;var No=$e(function(t){return 1/t},Math.atan);(Zi.geo.gnomonic=function(){return Ne(No)}).raw=No,rr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Sa]},(Zi.geo.mercator=function(){return nr(rr)}).raw=rr;var jo=$e(function(){return 1},Math.asin);(Zi.geo.orthographic=function(){return Ne(jo)}).raw=jo;var Bo=$e(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Zi.geo.stereographic=function(){return Ne(Bo)}).raw=Bo,ir.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Sa]},(Zi.geo.transverseMercator=function(){var t=nr(ir),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=ir,Zi.geom={},Zi.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=_t(r),a=_t(n),o=t.length,s=[],l=[];for(e=0;e<o;e++)s.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(s.sort(lr),e=0;e<o;e++)l.push([s[e][0],-s[e][1]]);var c=sr(s),u=sr(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[s[c[e]][2]]);for(e=+f;e<u.length-h;++e)d.push(t[s[u[e]][2]]);return d}var r=ar,n=or;return arguments.length?e(t):(e.x=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(n=t,e):n},e)},Zi.geom.polygon=function(t){return ua(t,Uo),t};var Uo=Zi.geom.polygon.prototype=[];Uo.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},Uo.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},Uo.clip=function(t){for(var e,r,n,i,a,o,s=fr(t),l=-1,c=this.length-fr(this),u=this[c-1];++l<c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)cr(o=e[r],u,i)?(cr(a,u,i)||t.push(ur(a,o,u,i)),t.push(o)):cr(a,u,i)&&t.push(ur(a,o,u,i)),a=o;s&&t.push(t[0]),u=i}return t};var Vo,qo,Ho,Go,Yo,Wo=[],Xo=[];vr.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(xr),e.length},Ar.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Tr.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Cr(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(Er(this,r),r=(t=r).U),r.C=!1,n.C=!0,Lr(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(Lr(this,r),r=(t=r).U),r.C=!1,n.C=!0,Er(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Cr(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Er(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Lr(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Er(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Lr(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Er(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Lr(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},Zi.geom.voronoi=function(t){function e(t){var e=new Array(t.length),n=s[0][0],i=s[0][1],a=s[1][0],o=s[1][1];return zr(r(t),s).cells.forEach(function(r,s){var l=r.edges,c=r.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=n&&c.x<=a&&c.y>=i&&c.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)/wa)*wa,y:Math.round(o(t,e)/wa)*wa,i:e}})}var n=ar,i=or,a=n,o=i,s=Zo;return t?e(t):(e.links=function(t){return zr(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 zr(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(xr),s=-1,l=o.length,c=o[l-1].edge,u=c.l===a?c.r:c.l;++s<l;)c,i=u,u=(c=o[s].edge).l===a?c.r:c.l,n<i.i&&n<u.i&&function(t,e,r){return(t.x-r.x)*(e.y-t.y)-(t.x-e.x)*(r.y-t.y)}(a,i,u)<0&&e.push([t[n],t[i.i],t[u.i]])}),e},e.x=function(t){return arguments.length?(a=_t(n=t),e):n},e.y=function(t){return arguments.length?(o=_t(i=t),e):i},e.clipExtent=function(t){return arguments.length?(s=null==t?Zo:t,e):s===Zo?null:s},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):s===Zo?null:s&&s[1]},e)};var Zo=[[-1e6,-1e6],[1e6,1e6]];Zi.geom.delaunay=function(t){return Zi.geom.voronoi().triangles(t)},Zi.geom.quadtree=function(t,e,r,n,i){function a(t){function a(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(aa(l-r)+aa(u-n)<.01)c(t,e,r,n,i,a,o,s);else{var f=t.point;t.x=t.y=t.point=null,c(t,f,l,u,i,a,o,s),c(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else c(t,e,r,n,i,a,o,s)}function c(t,e,r,n,i,o,s,l){var c=.5*(i+s),u=.5*(o+l),f=r>=c,h=n>=u,d=h<<1|f;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),f?i=c:s=c,h?o=u:l=u,a(t,e,r,n,i,o,s,l)}var u,f,h,d,p,m,g,v,y,x=_t(s),b=_t(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),f=[],h=[],p=t.length,o)for(d=0;d<p;++d)(u=t[d]).x<m&&(m=u.x),u.y<g&&(g=u.y),u.x>v&&(v=u.x),u.y>y&&(y=u.y),f.push(u.x),h.push(u.y);else for(d=0;d<p;++d){var _=+x(u=t[d],d),w=+b(u,d);_<m&&(m=_),w<g&&(g=w),_>v&&(v=_),w>y&&(y=w),f.push(_),h.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A={leaf:!0,nodes:[],point:null,x:null,y:null};if(A.add=function(t){a(A,t,+x(t,++d),+b(t,d),m,g,v,y)},A.visit=function(t){Or(t,A,m,g,v,y)},A.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,d){if(!(u>a||f>o||h<n||d<i)){if(p=c.point){var p,m=e-c.x,g=r-c.y,v=m*m+g*g;if(v<l){var y=Math.sqrt(l=v);n=e-y,i=r-y,a=e+y,o=r+y,s=p}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+d),w=(r>=_)<<1|e>=b,M=w+4;w<M;++w)if(c=x[3&w])switch(3&w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,d);break;case 3:t(c,b,_,h,d)}}}(t,n,i,a,o),s}(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d<p;)a(A,t[d],f[d],h[d],m,g,v,y);--d}else t.forEach(A.add);return f=h=t=u=null,A}var o,s=ar,l=or;return(o=arguments.length)?(s=Ir,l=Pr,3===o&&(i=r,n=e,r=e=0),a(t)):(a.x=function(t){return arguments.length?(s=t,a):s},a.y=function(t){return arguments.length?(l=t,a):l},a.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),a):null==e?null:[[e,r],[n,i]]},a.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),a):null==e?null:[n-e,i-r]},a)},Zi.interpolateRgb=Fr,Zi.interpolateObject=Rr,Zi.interpolateNumber=Nr,Zi.interpolateString=jr;var Jo=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Ko=new RegExp(Jo.source,\"g\");Zi.interpolate=Br,Zi.interpolators=[function(t,e){var r=typeof e;return(\"string\"===r?Va.has(e.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(e)?Fr:jr:e instanceof et?Fr:Array.isArray(e)?Ur:\"object\"===r&&isNaN(e)?Rr:Nr)(t,e)}],Zi.interpolateArray=Ur;var Qo=function(){return y},$o=Zi.map({linear:Qo,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Hr},cubic:function(){return Gr},sin:function(){return Yr},exp:function(){return Wr},circle:function(){return Xr},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Aa*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Aa/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return Zr}}),ts=Zi.map({in:y,out:Vr,\"in-out\":qr,\"out-in\":function(t){return qr(Vr(t))}});Zi.ease=function(t){var e=t.indexOf(\"-\"),r=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):\"in\";return r=$o.get(r)||Qo,n=ts.get(n)||y,function(t){return function(e){return e<=0?0:e>=1?1:t(e)}}(n(r.apply(null,Ji.call(arguments,1))))},Zi.interpolateHcl=function(t,e){t=Zi.hcl(t),e=Zi.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 at(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateHsl=function(t,e){t=Zi.hsl(t),e=Zi.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 nt(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateLab=function(t,e){t=Zi.lab(t),e=Zi.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 st(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateRound=Jr,Zi.transform=function(t){var e=Qi.createElementNS(Zi.ns.prefix.svg,\"g\");return(Zi.transform=function(t){if(null!=t){e.setAttribute(\"transform\",t);var r=e.transform.baseVal.consolidate()}return new Kr(r?r.matrix:es)})(t)},Kr.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};var es={a:1,b:0,c:0,d:1,e:0,f:0};Zi.interpolateTransform=en,Zi.layout={},Zi.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(rn(t[r]));return e}},Zi.layout.chord=function(){function t(){var t,c,f,h,d,p={},m=[],g=Zi.range(a),v=[];for(r=[],n=[],t=0,h=-1;++h<a;){for(c=0,d=-1;++d<a;)c+=i[h][d];m.push(c),v.push(Zi.range(a)),t+=c}for(o&&g.sort(function(t,e){return o(m[t],m[e])}),s&&v.forEach(function(t,e){t.sort(function(t,r){return s(i[e][t],i[e][r])})}),t=(Aa-u*a)/t,c=0,h=-1;++h<a;){for(f=c,d=-1;++d<a;){var y=g[h],x=v[y][d],b=i[y][x],_=c,w=c+=b*t;p[y+\"-\"+x]={index:y,subindex:x,startAngle:_,endAngle:w,value:b}}n[y]={index:y,startAngle:f,endAngle:c,value:m[y]},c+=u}for(h=-1;++h<a;)for(d=h-1;++d<a;){var M=p[h+\"-\"+d],k=p[d+\"-\"+h];(M.value||k.value)&&r.push(M.value<k.value?{source:k,target:M}:{source:M,target:k})}l&&e()}function e(){r.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var r,n,i,a,o,s,l,c={},u=0;return c.matrix=function(t){return arguments.length?(a=(i=t)&&i.length,r=n=null,c):i},c.padding=function(t){return arguments.length?(u=t,r=n=null,c):u},c.sortGroups=function(t){return arguments.length?(o=t,r=n=null,c):o},c.sortSubgroups=function(t){return arguments.length?(s=t,r=null,c):s},c.sortChords=function(t){return arguments.length?(l=t,r&&e(),c):l},c.chords=function(){return r||t(),r},c.groups=function(){return n||t(),n},c},Zi.layout.force=function(){function t(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/v<l){if(l<m){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&l&&l<m){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Zi.event.x,t.py=Zi.event.y,l.resume()}var r,n,i,a,o,s,l={},c=Zi.dispatch(\"start\",\"tick\",\"end\"),u=[1,1],f=.9,h=rs,d=ns,p=-30,m=is,g=.1,v=.64,x=[],b=[];return l.tick=function(){if((i*=.99)<.005)return r=null,c.end({type:\"end\",alpha:i=0}),!0;var e,n,l,h,d,m,v,y,_,w=x.length,M=b.length;for(n=0;n<M;++n)h=(l=b[n]).source,(m=(y=(d=l.target).x-h.x)*y+(_=d.y-h.y)*_)&&(y*=m=i*o[n]*((m=Math.sqrt(m))-a[n])/m,_*=m,d.x-=y*(v=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=_*v,h.x+=y*(v=1-v),h.y+=_*v);if((v=i*g)&&(y=u[0]/2,_=u[1]/2,n=-1,v))for(;++n<w;)(l=x[n]).x+=(y-l.x)*v,l.y+=(_-l.y)*v;if(p)for(cn(e=Zi.geom.quadtree(x),i,s),n=-1;++n<w;)(l=x[n]).fixed||e.visit(t(l));for(n=-1;++n<w;)(l=x[n]).fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:\"tick\",alpha:i})},l.nodes=function(t){return arguments.length?(x=t,l):x},l.links=function(t){return arguments.length?(b=t,l):b},l.size=function(t){return arguments.length?(u=t,l):u},l.linkDistance=function(t){return arguments.length?(h=\"function\"==typeof t?t:+t,l):h},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(d=\"function\"==typeof t?t:+t,l):d},l.friction=function(t){return arguments.length?(f=+t,l):f},l.charge=function(t){return arguments.length?(p=\"function\"==typeof t?t:+t,l):p},l.chargeDistance=function(t){return arguments.length?(m=t*t,l):Math.sqrt(m)},l.gravity=function(t){return arguments.length?(g=+t,l):g},l.theta=function(t){return arguments.length?(v=t*t,l):Math.sqrt(v)},l.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(r.c=null,r.t=NaN,r=null,c.end({type:\"end\",alpha:i=0})):t>0&&(c.start({type:\"start\",alpha:i=t}),r=kt(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l<i;++l)r[l]=[];for(l=0;l<c;++l){var a=b[l];r[a.source.index].push(a.target),r[a.target.index].push(a.source)}}for(var o,s=r[e],l=-1,u=s.length;++l<u;)if(!isNaN(o=s[l][t]))return o;return Math.random()*n}var e,r,n,i=x.length,c=b.length,f=u[0],m=u[1];for(e=0;e<i;++e)(n=x[e]).index=e,n.weight=0;for(e=0;e<c;++e)\"number\"==typeof(n=b[e]).source&&(n.source=x[n.source]),\"number\"==typeof n.target&&(n.target=x[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<i;++e)n=x[e],isNaN(n.x)&&(n.x=t(\"x\",f)),isNaN(n.y)&&(n.y=t(\"y\",m)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(a=[],\"function\"==typeof h)for(e=0;e<c;++e)a[e]=+h.call(this,b[e],e);else for(e=0;e<c;++e)a[e]=h;if(o=[],\"function\"==typeof d)for(e=0;e<c;++e)o[e]=+d.call(this,b[e],e);else for(e=0;e<c;++e)o[e]=d;if(s=[],\"function\"==typeof p)for(e=0;e<i;++e)s[e]=+p.call(this,x[e],e);else for(e=0;e<i;++e)s[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(n||(n=Zi.behavior.drag().origin(y).on(\"dragstart.force\",an).on(\"drag.force\",e).on(\"dragend.force\",on)),!arguments.length)return n;this.on(\"mouseover.force\",sn).on(\"mouseout.force\",ln).call(n)},Zi.rebind(l,c,\"on\")};var rs=20,ns=1,is=1/0;Zi.layout.hierarchy=function(){function t(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=r.call(t,a,a.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;n&&(a.value=0),a.children=c}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return hn(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=mn,r=dn,n=pn;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&&(fn(e,function(t){t.children&&(t.value=0)}),hn(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},Zi.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,c=-1;for(n=e.value?n/e.value:0;++c<o;)t(s=a[c],r,l=s.value*n,i),r+=l}}function e(t){var r=t.children,n=0;if(r&&(i=r.length))for(var i,a=-1;++a<i;)n=Math.max(n,e(r[a]));return 1+n}function r(r,a){var o=n.call(this,r,a);return t(o[0],0,i[0],i[1]/e(o[0])),o}var n=Zi.layout.hierarchy(),i=[1,1];return r.size=function(t){return arguments.length?(i=t,r):i},un(r,n)},Zi.layout.pie=function(){function t(o){var s,l=o.length,c=o.map(function(r,n){return+e.call(t,r,n)}),u=+(\"function\"==typeof n?n.apply(this,arguments):n),f=(\"function\"==typeof i?i.apply(this,arguments):i)-u,h=Math.min(Math.abs(f)/l,+(\"function\"==typeof a?a.apply(this,arguments):a)),d=h*(f<0?-1:1),p=Zi.sum(c),m=p?(f-l*d)/p:0,g=Zi.range(l),v=[];return null!=r&&g.sort(r===as?function(t,e){return c[e]-c[t]}:function(t,e){return r(o[t],o[e])}),g.forEach(function(t){v[t]={data:o[t],value:s=c[t],startAngle:u,endAngle:u+=s*m+d,padAngle:h}}),v}var e=Number,r=as,n=0,i=Aa,a=0;return t.value=function(r){return arguments.length?(e=r,t):e},t.sort=function(e){return arguments.length?(r=e,t):r},t.startAngle=function(e){return arguments.length?(n=e,t):n},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(a=e,t):a},t};var as={};Zi.layout.stack=function(){function t(s,l){if(!(h=s.length))return s;var c=s.map(function(r,n){return e.call(t,r,n)}),u=c.map(function(e){return e.map(function(e,r){return[a.call(t,e,r),o.call(t,e,r)]})}),f=r.call(t,u,l);c=Zi.permute(c,f),u=Zi.permute(u,f);var h,d,p,m,g=n.call(t,u,l),v=c[0].length;for(p=0;p<v;++p)for(i.call(t,c[0][p],m=g[p],u[0][p][1]),d=1;d<h;++d)i.call(t,c[d][p],m+=u[d-1][p][1],u[d][p][1]);return s}var e=y,r=bn,n=_n,i=xn,a=vn,o=yn;return t.values=function(r){return arguments.length?(e=r,t):e},t.order=function(e){return arguments.length?(r=\"function\"==typeof e?e:os.get(e)||bn,t):r},t.offset=function(e){return arguments.length?(n=\"function\"==typeof e?e:ss.get(e)||_n,t):n},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var os=Zi.map({\"inside-out\":function(t){var e,r,n=t.length,i=t.map(wn),a=t.map(Mn),o=Zi.range(n).sort(function(t,e){return i[t]-i[e]}),s=0,l=0,c=[],u=[];for(e=0;e<n;++e)r=o[e],s<l?(s+=a[r],c.push(r)):(l+=a[r],u.push(r));return u.reverse().concat(c)},reverse:function(t){return Zi.range(t.length).reverse()},default:bn}),ss=Zi.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,d=[];for(d[0]=l=c=0,r=1;r<h;++r){for(e=0,i=0;e<u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}d[r]=l-=i?a/i*s:0,l<c&&(c=l)}for(r=0;r<h;++r)d[r]-=c;return d},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:_n});Zi.layout.histogram=function(){function t(t,a){for(var o,s,l=[],c=t.map(r,this),u=n.call(this,c,a),f=i.call(this,u,c,a),h=(a=-1,c.length),d=f.length-1,p=e?1:1/h;++a<d;)(o=l[a]=[]).dx=f[a+1]-(o.x=f[a]),o.y=0;if(d>0)for(a=-1;++a<h;)(s=c[a])>=u[0]&&s<=u[1]&&((o=l[Zi.bisect(f,s,1,d)-1]).y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Sn,i=An;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=_t(e),t):n},t.bins=function(e){return arguments.length?(i=\"number\"==typeof e?function(t){return Tn(t,e)}:_t(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},Zi.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:\"function\"==typeof e?e:function(){return e};if(s.x=s.y=0,hn(s,function(t){t.r=+u(t.value)}),hn(s,Dn),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;hn(s,function(t){t.r+=f}),hn(s,Dn),hn(s,function(t){t.r-=f})}return On(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}var e,r=Zi.layout.hierarchy().sort(En),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},un(t,r)},Zi.layout.tree=function(){function t(t,l){var c=i.call(this,t,l),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(hn(f,e),f.parent.m=-f.z,fn(f,r),s)fn(u,n);else{var h=u,d=u,p=u;fn(u,function(t){t.x<h.x&&(h=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)});var m=a(h,d)/2-h.x,g=o[0]/(d.x+a(d,h)/2+m),v=o[1]/(p.depth||1);fn(u,function(t){t.x=(t.x+m)*g,t.y=t.depth*v})}return c}function e(t){var e=t.children,r=t.parent.children,n=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+a(t._,n._),t.m=t.z-i):t.z=i}else n&&(t.z=n.z+a(t._,n._));t.parent.A=function(t,e,r){if(e){for(var n,i=t,o=t,s=e,l=i.parent.children[0],c=i.m,u=o.m,f=s.m,h=l.m;s=jn(s),i=Nn(i),s&&i;)l=Nn(l),(o=jn(o)).a=t,(n=s.z+f-i.z-c+a(s._,i._))>0&&(!function(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}(function(t,e,r){return t.a.parent===e.parent?t.a:r}(s,t,r),t,n),c+=n,u+=n),f+=s.m,c+=i.m,h+=l.m,u+=o.m;s&&!jn(o)&&(o.t=s,o.m+=f-u),i&&!Nn(l)&&(l.t=i,l.m+=c-h,r=t)}return r}(t,n,t.parent.A||r[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function n(t){t.x*=o[0],t.y=t.depth*o[1]}var i=Zi.layout.hierarchy().sort(null).value(null),a=Rn,o=[1,1],s=null;return t.separation=function(e){return arguments.length?(a=e,t):a},t.size=function(e){return arguments.length?(s=null==(o=e)?n:null,t):s?null:o},t.nodeSize=function(e){return arguments.length?(s=null==(o=e)?null:n,t):s?o:null},un(t,i)},Zi.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],c=0;hn(l,function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(e),t.y=function(t){return 1+Zi.max(t,function(t){return t.y})}(e)):(t.x=o?c+=r(t,o):0,t.y=0,o=t)});var u=Bn(l),f=Un(l),h=u.x-r(u,f)/2,d=f.x+r(f,u)/2;return hn(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-h)/(d-h)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=Zi.layout.hierarchy().sort(null).value(null),r=Rn,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},un(t,e)},Zi.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function e(r){var i=r.children;if(i&&i.length){var a,o,s,l=u(r),c=[],f=i.slice(),p=1/0,m=\"slice\"===h?l.dx:\"dice\"===h?l.dy:\"slice-dice\"===h?1&r.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(f,l.dx*l.dy/r.value),c.area=0;(s=f.length)>0;)c.push(a=f[s-1]),c.area+=a.area,\"squarify\"!==h||(o=function(t,e){var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;for(;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return n*=n,e*=e,n?Math.max(e*i*d/n,n/(e*a*d)):1/0}(c,m))<=p?(f.pop(),p=o):(c.area-=c.pop().area,n(c,m,l,!1),m=Math.min(l.dx,l.dy),c.length=c.area=0,p=1/0);c.length&&(n(c,m,l,!0),c.length=c.area=0),i.forEach(e)}}function r(e){var i=e.children;if(i&&i.length){var a,o=u(e),s=i.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&&(n(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);i.forEach(r)}}function n(t,e,r,n){var i,a=-1,o=t.length,l=r.x,c=r.y,u=e?s(t.area/e):0;if(e==r.dx){for((n||u>r.dy)&&(u=r.dy);++a<o;)(i=t[a]).x=l,i.y=c,i.dy=u,l+=i.dx=Math.min(r.x+r.dx-l,u?s(i.area/u):0);i.z=!0,i.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((n||u>r.dx)&&(u=r.dx);++a<o;)(i=t[a]).x=l,i.y=c,i.dx=u,c+=i.dy=Math.min(r.y+r.dy-c,u?s(i.area/u):0);i.z=!1,i.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function i(n){var i=a||o(n),s=i[0];return s.x=s.y=0,s.value?(s.dx=l[0],s.dy=l[1]):s.dx=s.dy=0,a&&o.revalue(s),t([s],s.dx*s.dy/s.value),(a?r:e)(s),f&&(a=i),i}var a,o=Zi.layout.hierarchy(),s=Math.round,l=[1,1],c=null,u=Vn,f=!1,h=\"squarify\",d=.5*(1+Math.sqrt(5));return i.size=function(t){return arguments.length?(l=t,i):l},i.padding=function(t){function e(e){return qn(e,t)}if(!arguments.length)return c;var r;return u=null==(c=t)?Vn:\"function\"==(r=typeof t)?function(e){var r=t.call(i,e,e.depth);return null==r?Vn(e):qn(e,\"number\"==typeof r?[r,r,r,r]:r)}:\"number\"===r?(t=[t,t,t,t],e):e,i},i.round=function(t){return arguments.length?(s=t?Math.round:Number,i):s!=Number},i.sticky=function(t){return arguments.length?(f=t,a=null,i):f},i.ratio=function(t){return arguments.length?(d=t,i):d},i.mode=function(t){return arguments.length?(h=t+\"\",i):h},un(i,o)},Zi.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Zi.random.normal.apply(Zi,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Zi.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},Zi.scale={};var ls={floor:y,ceil:y};Zi.scale.linear=function(){return Xn([0,1],[0,1],Br,!1)};var cs={s:1,g:1,p:1,r:1,e:1};Zi.scale.log=function(){return ei(Zi.scale.linear().domain([0,1]),10,!0,[1,10])};var us=Zi.format(\".0e\"),fs={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Zi.scale.pow=function(){return ri(Zi.scale.linear(),1,[0,1])},Zi.scale.sqrt=function(){return Zi.scale.pow().exponent(.5)},Zi.scale.ordinal=function(){return ii([],{t:\"range\",a:[[]]})},Zi.scale.category10=function(){return Zi.scale.ordinal().range(hs)},Zi.scale.category20=function(){return Zi.scale.ordinal().range(ds)},Zi.scale.category20b=function(){return Zi.scale.ordinal().range(ps)},Zi.scale.category20c=function(){return Zi.scale.ordinal().range(ms)};var hs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(pt),ds=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(pt),ps=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(pt),ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(pt);Zi.scale.quantile=function(){return ai([],[])},Zi.scale.quantize=function(){return oi(0,1,[0,1])},Zi.scale.threshold=function(){return si([.5],[0,1])},Zi.scale.identity=function(){return li([0,1])},Zi.svg={},Zi.svg.arc=function(){function t(){var t=Math.max(0,+r.apply(this,arguments)),c=Math.max(0,+n.apply(this,arguments)),u=o.apply(this,arguments)-Sa,f=s.apply(this,arguments)-Sa,h=Math.abs(f-u),d=u>f?0:1;if(c<t&&(p=c,c=t,t=p),h>=Ta)return e(c,d)+(t?e(t,1-d):\"\")+\"Z\";var p,m,g,v,y,x,b,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===gs?Math.sqrt(t*t+c*c):+a.apply(this,arguments),d||(S*=-1),c&&(S=Q(g/c*Math.sin(v))),t&&(T=Q(g/t*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var L=Math.abs(f-u-2*S)<=ka?0:1;if(S&&mi(y,x,b,_)===d^L){var C=(u+f)/2;y=c*Math.cos(C),x=c*Math.sin(C),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),M=t*Math.sin(f-T),k=t*Math.cos(u+T),A=t*Math.sin(u+T);var z=Math.abs(u-f+2*T)<=ka?0:1;if(T&&mi(w,M,k,A)===1-d^z){var D=(u+f)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(h>wa&&(p=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){m=t<c^d?0:1;var I=p,P=p;if(h<ka){var O=null==k?[w,M]:null==b?[y,x]:ur([y,x],[k,A],[b,_],[w,M]),F=y-O[0],R=x-O[1],N=b-O[0],j=_-O[1],B=1/Math.sin(Math.acos((F*N+R*j)/(Math.sqrt(F*F+R*R)*Math.sqrt(N*N+j*j)))/2),U=Math.sqrt(O[0]*O[0]+O[1]*O[1]);P=Math.min(p,(t-U)/(B-1)),I=Math.min(p,(c-U)/(B+1))}if(null!=b){var V=gi(null==k?[w,M]:[k,A],[y,x],c,I,d),q=gi([b,_],[w,M],c,I,d);p===I?E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 0,\",m,\" \",V[1],\"A\",c,\",\",c,\" 0 \",1-d^mi(V[1][0],V[1][1],q[1][0],q[1][1]),\",\",d,\" \",q[1],\"A\",I,\",\",I,\" 0 0,\",m,\" \",q[0]):E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 1,\",m,\" \",q[0])}else E.push(\"M\",y,\",\",x);if(null!=k){var H=gi([y,x],[k,A],t,-P,d),G=gi([w,M],null==b?[y,x]:[b,_],t,-P,d);p===P?E.push(\"L\",G[0],\"A\",P,\",\",P,\" 0 0,\",m,\" \",G[1],\"A\",t,\",\",t,\" 0 \",d^mi(G[1][0],G[1][1],H[1][0],H[1][1]),\",\",1-d,\" \",H[1],\"A\",P,\",\",P,\" 0 0,\",m,\" \",H[0]):E.push(\"L\",G[0],\"A\",P,\",\",P,\" 0 0,\",m,\" \",H[0])}else E.push(\"L\",w,\",\",M)}else E.push(\"M\",y,\",\",x),null!=b&&E.push(\"A\",c,\",\",c,\" 0 \",L,\",\",d,\" \",b,\",\",_),E.push(\"L\",w,\",\",M),null!=k&&E.push(\"A\",t,\",\",t,\" 0 \",z,\",\",1-d,\" \",k,\",\",A);return E.push(\"Z\"),E.join(\"\")}function e(t,e){return\"M0,\"+t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+-t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+t}var r=ui,n=fi,i=ci,a=gs,o=hi,s=di,l=pi;return t.innerRadius=function(e){return arguments.length?(r=_t(e),t):r},t.outerRadius=function(e){return arguments.length?(n=_t(e),t):n},t.cornerRadius=function(e){return arguments.length?(i=_t(e),t):i},t.padRadius=function(e){return arguments.length?(a=e==gs?gs:_t(e),t):a},t.startAngle=function(e){return arguments.length?(o=_t(e),t):o},t.endAngle=function(e){return arguments.length?(s=_t(e),t):s},t.padAngle=function(e){return arguments.length?(l=_t(e),t):l},t.centroid=function(){var t=(+r.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Sa;return[Math.cos(e)*t,Math.sin(e)*t]},t};var gs=\"auto\";Zi.svg.line=function(){return vi(y)};var vs=Zi.map({linear:yi,\"linear-closed\":xi,step:function(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n[0]+(n=t[e])[0])/2,\"V\",n[1]);return r>1&&i.push(\"H\",n[0]),i.join(\"\")},\"step-before\":bi,\"step-after\":_i,basis:ki,\"basis-open\":function(t){if(t.length<4)return yi(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ai(bs,a)+\",\"+Ai(bs,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ti(r,a,o);return r.join(\"\")},\"basis-closed\":function(t){for(var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);for(e=[Ai(bs,o),\",\",Ai(bs,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Ti(e,o,s);return e.join(\"\")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c<=r;)i=c/r,(n=t[c])[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return ki(t)},cardinal:function(t,e){return t.length<3?yi(t):t[0]+wi(t,Mi(t,e))},\"cardinal-open\":function(t,e){return t.length<4?yi(t):t[1]+wi(t.slice(1,-1),Mi(t,e))},\"cardinal-closed\":function(t,e){return t.length<3?xi(t):t[0]+wi((t.push(t[0]),t),Mi([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?yi(t):t[0]+wi(t,Ei(t))}});vs.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var ys=[0,2/3,1/3,0],xs=[0,1/3,2/3,0],bs=[0,1/6,2/3,1/6];Zi.svg.line.radial=function(){var t=vi(Li);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},bi.reverse=_i,_i.reverse=bi,Zi.svg.area=function(){return Ci(y)},Zi.svg.area.radial=function(){var t=Ci(Li);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Zi.svg.chord=function(){function t(t,o){var s=e(this,i,t,o),l=e(this,a,t,o);return\"M\"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(s,l)?n(s.r,s.p1,s.r,s.p0):n(s.r,s.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+n(l.r,l.p1,s.r,s.p0))+\"Z\"}function e(t,e,r,n){var i=e.call(t,r,n),a=o.call(t,i,n),c=s.call(t,i,n)-Sa,u=l.call(t,i,n)-Sa;return{r:a,a0:c,a1:u,p0:[a*Math.cos(c),a*Math.sin(c)],p1:[a*Math.cos(u),a*Math.sin(u)]}}function r(t,e,r){return\"A\"+t+\",\"+t+\" 0 \"+ +(r>ka)+\",1 \"+e}function n(t,e,r,n){return\"Q 0,0 \"+n}var i=Ke,a=Qe,o=zi,s=hi,l=di;return t.radius=function(e){return arguments.length?(o=_t(e),t):o},t.source=function(e){return arguments.length?(i=_t(e),t):i},t.target=function(e){return arguments.length?(a=_t(e),t):a},t.startAngle=function(e){return arguments.length?(s=_t(e),t):s},t.endAngle=function(e){return arguments.length?(l=_t(e),t):l},t},Zi.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\"M\"+(l=l.map(n))[0]+\"C\"+l[1]+\" \"+l[2]+\" \"+l[3]}var e=Ke,r=Qe,n=Di;return t.source=function(r){return arguments.length?(e=_t(r),t):e},t.target=function(e){return arguments.length?(r=_t(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},Zi.svg.diagonal.radial=function(){var t=Zi.svg.diagonal(),e=Di,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Sa;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},Zi.svg.symbol=function(){function t(t,n){return(_s.get(e.call(this,t,n))||Oi)(r.call(this,t,n))}var e=Pi,r=Ii;return t.type=function(r){return arguments.length?(e=_t(r),t):e},t.size=function(e){return arguments.length?(r=_t(e),t):r},t};var _s=Zi.map({circle:Oi,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*Ms)),r=e*Ms;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/ws),r=e*ws/2;return\"M0,\"+r+\"L\"+e+\",\"+-r+\" \"+-e+\",\"+-r+\"Z\"},\"triangle-up\":function(t){var e=Math.sqrt(t/ws),r=e*ws/2;return\"M0,\"+-r+\"L\"+e+\",\"+r+\" \"+-e+\",\"+r+\"Z\"}});Zi.svg.symbolTypes=_s.keys();var ws=Math.sqrt(3),Ms=Math.tan(30*Ea);pa.transition=function(t){for(var e,r,n=ks||++Es,i=Bi(t),a=[],o=As||{time:Date.now(),ease:function(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)},delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(r=c[u])&&Ui(r,u,i,n,o),e.push(r)}return Ri(a,i,n)},pa.interrupt=function(t){return this.each(null==t?Ts:Fi(Bi(t)))};var ks,As,Ts=Fi(Bi()),Ss=[],Es=0;Ss.call=pa.call,Ss.empty=pa.empty,Ss.node=pa.node,Ss.size=pa.size,Zi.transition=function(t,e){return t&&t.transition?ks?t.transition(e):t:Zi.selection().transition(t)},Zi.transition.prototype=Ss,Ss.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=S(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=t.call(n,n.__data__,u,s))?(\"__data__\"in n&&(r.__data__=n.__data__),Ui(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return Ri(o,a,i)},Ss.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=E(t);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],h=-1,d=f.length;++h<d;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var p=-1,m=r.length;++p<m;)(i=r[p])&&Ui(i,p,s,o,a),e.push(i)}return Ri(l,s,o)},Ss.filter=function(t){var e,r,n=[];\"function\"!=typeof t&&(t=B(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return Ri(n,this.namespace,this.id)},Ss.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):U(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},Ss.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var r=\"transform\"==t?en:Br,n=Zi.ns.qualify(t);return Ni(this,\"attr.\"+t,e,n.local?function(t){return null==t?function(){this.removeAttributeNS(n.space,n.local)}:(t+=\"\",function(){var e,i=this.getAttributeNS(n.space,n.local);return i!==t&&(e=r(i,t),function(t){this.setAttributeNS(n.space,n.local,e(t))})})}:function(t){return null==t?function(){this.removeAttribute(n)}:(t+=\"\",function(){var e,i=this.getAttribute(n);return i!==t&&(e=r(i,t),function(t){this.setAttribute(n,e(t))})})})},Ss.attrTween=function(t,e){var r=Zi.ns.qualify(t);return this.tween(\"attr.\"+t,r.local?function(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}:function(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}})},Ss.style=function(t,e,n){var i=arguments.length;if(i<3){if(\"string\"!=typeof t){i<2&&(e=\"\");for(n in t)this.style(n,t[n],e);return this}n=\"\"}return Ni(this,\"style.\"+t,e,function(e){return null==e?function(){this.style.removeProperty(t)}:(e+=\"\",function(){var i,a=r(this).getComputedStyle(this,null).getPropertyValue(t);return a!==e&&(i=Br(a,e),function(e){this.style.setProperty(t,i(e),n)})})})},Ss.styleTween=function(t,e,n){return arguments.length<3&&(n=\"\"),this.tween(\"style.\"+t,function(i,a){var o=e.call(this,i,a,r(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}})},Ss.text=function(t){return Ni(this,\"text\",t,ji)},Ss.remove=function(){var t=this.namespace;return this.each(\"end.transition\",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Ss.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:(\"function\"!=typeof t&&(t=Zi.ease.apply(Zi,arguments)),U(this,function(n){n[r][e].ease=t}))},Ss.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:U(this,\"function\"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},Ss.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:U(this,\"function\"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},Ss.each=function(t,e){var r=this.id,n=this.namespace;if(arguments.length<2){var i=As,a=ks;try{ks=r,U(this,function(e,i,a){As=e[n][r],t.call(e,e.__data__,i,a)})}finally{As=i,ks=a}}else U(this,function(i){var a=i[n][r];(a.event||(a.event=Zi.dispatch(\"start\",\"end\",\"interrupt\"))).on(t,e)});return this},Ss.transition=function(){for(var t,e,r,n=this.id,i=++Es,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u<f;u++)(e=c[u])&&Ui(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return Ri(o,a,i)},Zi.svg.axis=function(){function t(t){t.each(function(){var t,c=Zi.select(this),u=this.__chart__||r,f=this.__chart__=r.copy(),h=null==l?f.ticks?f.ticks.apply(f,s):f.domain():l,d=null==e?f.tickFormat?f.tickFormat.apply(f,s):y:e,p=c.selectAll(\".tick\").data(h,f),m=p.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",wa),g=Zi.transition(p.exit()).style(\"opacity\",wa).remove(),v=Zi.transition(p.order()).style(\"opacity\",1),x=Math.max(i,0)+o,b=Gn(f),_=c.selectAll(\".domain\").data([0]),w=(_.enter().append(\"path\").attr(\"class\",\"domain\"),Zi.transition(_));m.append(\"line\"),m.append(\"text\");var M,k,A,T,S=m.select(\"line\"),E=v.select(\"line\"),L=p.select(\"text\").text(d),C=m.select(\"text\"),z=v.select(\"text\"),D=\"top\"===n||\"left\"===n?-1:1;if(\"bottom\"===n||\"top\"===n?(t=Vi,M=\"x\",A=\"y\",k=\"x2\",T=\"y2\",L.attr(\"dy\",D<0?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),w.attr(\"d\",\"M\"+b[0]+\",\"+D*a+\"V0H\"+b[1]+\"V\"+D*a)):(t=qi,M=\"y\",A=\"x\",k=\"y2\",T=\"x2\",L.attr(\"dy\",\".32em\").style(\"text-anchor\",D<0?\"end\":\"start\"),w.attr(\"d\",\"M\"+D*a+\",\"+b[0]+\"H0V\"+b[1]+\"H\"+D*a)),S.attr(T,D*i),C.attr(A,D*x),E.attr(k,0).attr(T,D*i),z.attr(M,0).attr(A,D*x),f.rangeBand){var I=f,P=I.rangeBand()/2;u=f=function(t){return I(t)+P}}else u.rangeBand?u=f:g.call(t,f,u);m.call(t,u,f),v.call(t,f,f)})}var e,r=Zi.scale.linear(),n=Ls,i=6,a=6,o=3,s=[10],l=null;return t.scale=function(e){return arguments.length?(r=e,t):r},t.orient=function(e){return arguments.length?(n=e in Cs?e+\"\":Ls,t):n},t.ticks=function(){return arguments.length?(s=Ki(arguments),t):s},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(r){return arguments.length?(e=r,t):e},t.tickSize=function(e){var r=arguments.length;return r?(i=+e,a=+arguments[r-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ls=\"bottom\",Cs={top:1,right:1,bottom:1,left:1};Zi.svg.brush=function(){function t(r){r.each(function(){var r=Zi.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",a).on(\"touchstart.brush\",a),o=r.selectAll(\".background\").data([0]);o.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),r.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var s=r.selectAll(\".resize\").data(m,y);s.exit().remove(),s.enter().append(\"g\").attr(\"class\",function(t){return\"resize \"+t}).style(\"cursor\",function(t){return zs[t]}).append(\"rect\").attr(\"x\",function(t){return/[ew]$/.test(t)?-3:null}).attr(\"y\",function(t){return/^[ns]/.test(t)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),s.style(\"display\",t.empty()?\"none\":null);var l,f=Zi.transition(r),h=Zi.transition(o);c&&(l=Gn(c),h.attr(\"x\",l[0]).attr(\"width\",l[1]-l[0]),n(f)),u&&(l=Gn(u),h.attr(\"y\",l[0]).attr(\"height\",l[1]-l[0]),i(f)),e(f)})}function e(t){t.selectAll(\".resize\").attr(\"transform\",function(t){return\"translate(\"+f[+/e$/.test(t)]+\",\"+h[+/^s/.test(t)]+\")\"})}function n(t){t.select(\".extent\").attr(\"x\",f[0]),t.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",f[1]-f[0])}function i(t){t.select(\".extent\").attr(\"y\",h[0]),t.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",h[1]-h[0])}function a(){function a(){var t=Zi.mouse(x),r=!1;y&&(t[0]+=y[0],t[1]+=y[1]),S||(Zi.event.altKey?(v||(v=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(t[0]<v[0])],L[1]=h[+(t[1]<v[1])]):v=null),A&&m(t,c,0)&&(n(w),r=!0),T&&m(t,u,1)&&(i(w),r=!0),r&&(e(w),_({type:\"brush\",mode:S?\"move\":\"resize\"}))}function m(t,e,r){var n,i,a=Gn(e),l=a[0],c=a[1],u=L[r],m=r?h:f,g=m[1]-m[0];if(S&&(l-=u,c-=g+u),n=(r?p:d)?Math.max(l,Math.min(c,t[r])):t[r],S?i=(n+=u)+g:(v&&(u=Math.max(l,Math.min(c,2*v[r]-n))),u<n?(i=n,n=u):i=u),m[0]!=n||m[1]!=i)return r?s=null:o=null,m[0]=n,m[1]=i,!0}function g(){a(),w.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",t.empty()?\"none\":null),Zi.select(\"body\").style(\"cursor\",null),C.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),E(),_({type:\"brushend\"})}var v,y,x=this,b=Zi.select(Zi.event.target),_=l.of(x,arguments),w=Zi.select(x),k=b.datum(),A=!/^(n|s)$/.test(k)&&c,T=!/^(e|w)$/.test(k)&&u,S=b.classed(\"extent\"),E=Y(x),L=Zi.mouse(x),C=Zi.select(r(x)).on(\"keydown.brush\",function(){32==Zi.event.keyCode&&(S||(v=null,L[0]-=f[1],L[1]-=h[1],S=2),M())}).on(\"keyup.brush\",function(){32==Zi.event.keyCode&&2==S&&(L[0]+=f[1],L[1]+=h[1],S=0,M())});if(Zi.event.changedTouches?C.on(\"touchmove.brush\",a).on(\"touchend.brush\",g):C.on(\"mousemove.brush\",a).on(\"mouseup.brush\",g),w.interrupt().selectAll(\"*\").interrupt(),S)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(k){var z=+/w$/.test(k),D=+/^n/.test(k);y=[f[1-z]-L[0],h[1-D]-L[1]],L[0]=f[z],L[1]=h[D]}else Zi.event.altKey&&(v=L.slice());w.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),Zi.select(\"body\").style(\"cursor\",b.style(\"cursor\")),_({type:\"brushstart\"}),a()}var o,s,l=A(t,\"brushstart\",\"brush\",\"brushend\"),c=null,u=null,f=[0,0],h=[0,0],d=!0,p=!0,m=Ds[0];return t.event=function(t){t.each(function(){var t=l.of(this,arguments),e={x:f,y:h,i:o,j:s},r=this.__chart__||e;this.__chart__=e,ks?Zi.select(this).transition().each(\"start.brush\",function(){o=r.i,s=r.j,f=r.x,h=r.y,t({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var r=Ur(f,e.x),n=Ur(h,e.y);return o=s=null,function(i){f=e.x=r(i),h=e.y=n(i),t({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){o=e.i,s=e.j,t({type:\"brush\",mode:\"resize\"}),t({type:\"brushend\"})}):(t({type:\"brushstart\"}),t({type:\"brush\",mode:\"resize\"}),t({type:\"brushend\"}))})},t.x=function(e){return arguments.length?(c=e,m=Ds[!c<<1|!u],t):c},t.y=function(e){return arguments.length?(u=e,m=Ds[!c<<1|!u],t):u},t.clamp=function(e){return arguments.length?(c&&u?(d=!!e[0],p=!!e[1]):c?d=!!e:u&&(p=!!e),t):c&&u?[d,p]:c?d:u?p:null},t.extent=function(e){var r,n,i,a,l;return arguments.length?(c&&(r=e[0],n=e[1],u&&(r=r[0],n=n[0]),o=[r,n],c.invert&&(r=c(r),n=c(n)),n<r&&(l=r,r=n,n=l),r==f[0]&&n==f[1]||(f=[r,n])),u&&(i=e[0],a=e[1],c&&(i=i[1],a=a[1]),s=[i,a],u.invert&&(i=u(i),a=u(a)),a<i&&(l=i,i=a,a=l),i==h[0]&&a==h[1]||(h=[i,a])),t):(c&&(o?(r=o[0],n=o[1]):(r=f[0],n=f[1],c.invert&&(r=c.invert(r),n=c.invert(n)),n<r&&(l=r,r=n,n=l))),u&&(s?(i=s[0],a=s[1]):(i=h[0],a=h[1],u.invert&&(i=u.invert(i),a=u.invert(a)),a<i&&(l=i,i=a,a=l))),c&&u?[[r,i],[n,a]]:c?[r,n]:u&&[i,a])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],o=s=null),t},t.empty=function(){return!!c&&f[0]==f[1]||!!u&&h[0]==h[1]},Zi.rebind(t,l,\"on\")};var zs={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},Ds=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]],Is=Ka.format=no.timeFormat,Ps=Is.utc,Os=Ps(\"%Y-%m-%dT%H:%M:%S.%LZ\");Is.iso=Date.prototype.toISOString&&+new Date(\"2000-01-01T00:00:00.000Z\")?Hi:Os,Hi.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Hi.toString=Os.toString,Ka.second=Ct(function(t){return new Qa(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ka.seconds=Ka.second.range,Ka.seconds.utc=Ka.second.utc.range,Ka.minute=Ct(function(t){return new Qa(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ka.minutes=Ka.minute.range,Ka.minutes.utc=Ka.minute.utc.range,Ka.hour=Ct(function(t){var e=t.getTimezoneOffset()/60;return new Qa(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ka.hours=Ka.hour.range,Ka.hours.utc=Ka.hour.utc.range,Ka.month=Ct(function(t){return(t=Ka.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ka.months=Ka.month.range,Ka.months.utc=Ka.month.utc.range;var Fs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rs=[[Ka.second,1],[Ka.second,5],[Ka.second,15],[Ka.second,30],[Ka.minute,1],[Ka.minute,5],[Ka.minute,15],[Ka.minute,30],[Ka.hour,1],[Ka.hour,3],[Ka.hour,6],[Ka.hour,12],[Ka.day,1],[Ka.day,2],[Ka.week,1],[Ka.month,1],[Ka.month,3],[Ka.year,1]],Ns=Is.multi([[\".%L\",function(t){return t.getMilliseconds()}],[\":%S\",function(t){return t.getSeconds()}],[\"%I:%M\",function(t){return t.getMinutes()}],[\"%I %p\",function(t){return t.getHours()}],[\"%a %d\",function(t){return t.getDay()&&1!=t.getDate()}],[\"%b %d\",function(t){return 1!=t.getDate()}],[\"%B\",function(t){return t.getMonth()}],[\"%Y\",ve]]),js={range:function(t,e,r){return Zi.range(Math.ceil(t/r)*r,+e,r).map(Yi)},floor:y,ceil:y};Rs.year=Ka.year,Ka.scale=function(){return Gi(Zi.scale.linear(),Rs,Ns)};var Bs=Rs.map(function(t){return[t[0].utc,t[1]]}),Us=Ps.multi([[\".%L\",function(t){return t.getUTCMilliseconds()}],[\":%S\",function(t){return t.getUTCSeconds()}],[\"%I:%M\",function(t){return t.getUTCMinutes()}],[\"%I %p\",function(t){return t.getUTCHours()}],[\"%a %d\",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[\"%b %d\",function(t){return 1!=t.getUTCDate()}],[\"%B\",function(t){return t.getUTCMonth()}],[\"%Y\",ve]]);Bs.year=Ka.year.utc,Ka.scale.utc=function(){return Gi(Zi.scale.linear(),Bs,Us)},Zi.text=wt(function(t){return t.responseText}),Zi.json=function(t,e){return Mt(t,\"application/json\",Wi,e)},Zi.html=function(t,e){return Mt(t,\"text/html\",Xi,e)},Zi.xml=wt(function(t){return t.responseXML}),\"object\"==typeof e&&e.exports?e.exports=Zi:this.d3=Zi}()},{}],129:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],130:[function(t,e,r){\"use strict\";function n(t,e){this.point=t,this.index=e}function i(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}var a=t(\"incremental-convex-hull\"),o=t(\"uniq\");e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}return r&&i.push([-1,i[0][1]],[i[t-1][1],-1]),i}(r,t,e);for(var l=new Array(r),c=1,u=0;u<r;++u){for(var f=t[u],h=new Array(s+1),d=0,p=0;p<s;++p){var m=f[p];h[p]=m,d+=m*m}h[s]=d,l[u]=new n(h,u),c=Math.max(d,c)}o(l,i),r=l.length;var g=new Array(r+s+1),v=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1);for(u=0;u<=s;++u)x[u]=0;for(x[s]=y,g[0]=x.slice(),v[0]=-1,u=0;u<=s;++u)(h=x.slice())[u]=1,g[u+1]=h,v[u+1]=-1;for(u=0;u<r;++u){var b=l[u];g[u+s+1]=b.point,v[u+s+1]=b.index}var _=a(g,!1);if(_=e?_.filter(function(t){for(var e=0,r=0;r<=s;++r){var n=v[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&s)for(u=0;u<_.length;++u)h=(b=_[u])[0],b[0]=b[1],b[1]=h;return _}},{\"incremental-convex-hull\":278,uniq:556}],131:[function(t,e,r){(function(t){var r=!1;if(\"undefined\"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]};function a(t,e){return i[0]=t,i[1]=e,n[0]}e.exports.pack=a;function o(t){return n[0]=t,i[0]}e.exports.lo=o;function s(t){return n[0]=t,i[1]}e.exports.hi=s}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]};function l(t,e){return i[1]=t,i[0]=e,n[0]}e.exports.pack=l;function c(t){return n[0]=t,i[1]}e.exports.lo=c;function u(t){return n[0]=t,i[0]}e.exports.hi=u}else r=!1}if(!r){var f=new t(8);e.exports=function(t){return f.writeDoubleLE(t,0,!0),[f.readUInt32LE(0,!0),f.readUInt32LE(4,!0)]};function h(t,e){return f.writeUInt32LE(t,0,!0),f.writeUInt32LE(e,4,!0),f.readDoubleLE(0,!0)}e.exports.pack=h;function d(t){return f.writeDoubleLE(t,0,!0),f.readUInt32LE(0,!0)}e.exports.lo=d;function p(t){return f.writeDoubleLE(t,0,!0),f.readUInt32LE(4,!0)}e.exports.hi=p}e.exports.sign=function(t){return e.exports.hi(t)>>>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:82}],132:[function(t,e,r){var n=t(\"abs-svg-path\"),i=t(\"normalize-svg-path\"),a={M:\"moveTo\",C:\"bezierCurveTo\"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{\"abs-svg-path\":43,\"normalize-svg-path\":460}],133:[function(t,e,r){e.exports=function(t){switch(t){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}},{}],134:[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;a<i;++a)o[a]=e;else for(a=0;a<i;++a)o[a]=n(t,e,r+1);return o}e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case\"number\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\"object\":if(\"number\"==typeof t.length)return n(t,e,0)}return[]}},{}],135:[function(t,e,r){\"use strict\";function n(t,e,r){r=r||2;var n=e&&e.length,l=n?e[0]*r:t.length,u=i(t,0,l,r,!0),f=[];if(!u)return f;var h,m,g,v,y,x,b;if(n&&(u=function(t,e,r,n){var o,l,u,f,h,m=[];for(o=0,l=e.length;o<l;o++)u=e[o]*n,f=o<l-1?e[o+1]*n:t.length,(h=i(t,u,f,n,!1))===h.next&&(h.steiner=!0),m.push(function(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}(h));for(m.sort(s),o=0;o<m.length;o++)!function(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=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.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,u=r,f=r.x,h=r.y,p=1/0;for(n=r.next;n!==u;)i>=n.x&&n.x>=f&&c(a<h?i:o,a,f,h,a<h?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<p||l===p&&n.x>r.x)&&d(n,t)&&(r=n,p=l),n=n.next;return r}(t,e)){var r=p(e,t);a(r,r.next)}}(m[o],r),r=a(r,r.next);return r}(t,e,u,r)),t.length>80*r){h=g=t[0],m=v=t[1];for(var _=r;_<l;_+=r)y=t[_],x=t[_+1],y<h&&(h=y),x<m&&(m=x),y>g&&(g=y),x>v&&(v=x);b=Math.max(g-h,v-m)}return o(u,f,r,h,m,b),f}function i(t,e,r,n,i){var a,o;if(i===y(t,e,r,n)>0)for(a=e;a<r;a+=n)o=m(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=m(a,t[a],t[a+1],o);return o&&f(o,o.next)&&(g(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||!f(n,n.next)&&0!==u(n.prev,n,n.next))n=n.next;else{if(g(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,s,m){if(t){!m&&s&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=l(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,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||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,c*=2}while(o>1)}(i)}(t,n,i,s);for(var v,y,x=t;t.prev!==t.next;)if(v=t.prev,y=t.next,s?function(t,e,r,n){var i=t.prev,a=t,o=t.next;if(u(i,a,o)>=0)return!1;var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,f=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,h=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,d=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,p=l(s,f,e,r,n),m=l(h,d,e,r,n),g=t.nextZ;for(;g&&g.z<=m;){if(g!==t.prev&&g!==t.next&&c(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&u(g.prev,g,g.next)>=0)return!1;g=g.nextZ}g=t.prevZ;for(;g&&g.z>=p;){if(g!==t.prev&&g!==t.next&&c(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&u(g.prev,g,g.next)>=0)return!1;g=g.prevZ}return!0}(t,n,i,s):function(t){var e=t.prev,r=t,n=t.next;if(u(e,r,n)>=0)return!1;var i=t.next.next;for(;i!==t.prev;){if(c(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&u(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}(t))e.push(v.i/r),e.push(t.i/r),e.push(y.i/r),g(t),t=y.next,x=y.next;else if((t=y)===x){m?1===m?o(t=function(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!f(i,a)&&h(i,n,n.next,a)&&d(i,a)&&d(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),g(n),g(n.next),n=t=a),n=n.next}while(n!==t);return n}(t,e,r),e,r,n,i,s,2):2===m&&function(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(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&&h(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&d(t,e)&&d(e,t)&&function(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}(t,e)}(l,c)){var u=p(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}(t,e,r,n,i,s):o(a(t),e,r,n,i,s,1);break}}}function s(t,e){return t.x-e.x}function l(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 c(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function u(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function f(t,e){return t.x===e.x&&t.y===e.y}function h(t,e,r,n){return!!(f(t,e)&&f(r,n)||f(t,n)&&f(r,e))||u(t,e,r)>0!=u(t,e,n)>0&&u(r,n,t)>0!=u(r,n,e)>0}function d(t,e){return u(t.prev,t,t.next)<0?u(t,e,t.next)>=0&&u(t,t.prev,e)>=0:u(t,e,t.prev)<0||u(t,t.next,e)<0}function p(t,e){var r=new v(t.i,t.x,t.y),n=new v(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 m(t,e,r,n){var i=new v(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 g(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 v(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 y(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,n.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(y(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(y(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;f+=Math.abs((t[h]-t[p])*(t[d+1]-t[h+1])-(t[h]-t[d])*(t[p+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],136:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.length;if(\"number\"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;var o=new Array(e);for(i=0;i<e;++i)o[i]=[];for(i=0;i<r;++i)o[(a=t[i])[0]].push(a[1]),o[a[1]].push(a[0]);for(var s=0;s<e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(\"uniq\")},{uniq:556}],137:[function(t,e,r){(function(n,i){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.ES6Promise=n()}(this,function(){\"use strict\";function e(t){return\"function\"==typeof t}function r(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<A;t+=2){(0,P[t])(P[t+1]),P[t]=void 0,P[t+1]=void 0}A=0}function o(){try{var e=t(\"vertx\");return T=e.runOnLoop||e.runOnContext,function(){T(a)}}catch(t){return r()}}function s(t,e){var r=arguments,n=this,i=new this.constructor(c);void 0===i[F]&&b(i);var a=n._state;return a?function(){var t=r[a-1];E(function(){return x(a,i,t,n._result)})}():g(n,i,t,e),i}function l(t){if(t&&\"object\"==typeof t&&t.constructor===this)return t;var e=new this(c);return h(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return B.error=t,B}}function f(t,r,n){r.constructor===t.constructor&&n===s&&r.constructor.resolve===l?function(t,e){e._state===N?p(t,e._result):e._state===j?m(t,e._result):g(e,void 0,function(e){return h(t,e)},function(e){return m(t,e)})}(t,r):n===B?m(t,B.error):void 0===n?p(t,r):e(n)?function(t,e,r){E(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?h(t,r):p(t,r))},function(e){n||(n=!0,m(t,e))},t._label);!n&&i&&(n=!0,m(t,i))},t)}(t,r,n):p(t,r)}function h(t,e){t===e?m(t,new TypeError(\"You cannot resolve a promise with itself\")):!function(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}(e)?p(t,e):f(t,e,u(e))}function d(t){t._onerror&&t._onerror(t._result),v(t)}function p(t,e){t._state===R&&(t._result=e,t._state=N,0!==t._subscribers.length&&E(v,t))}function m(t,e){t._state===R&&(t._state=j,t._result=e,E(d,t))}function g(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+N]=r,i[a+j]=n,0===a&&t._state&&E(v,t)}function v(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o<e.length;o+=3)n=e[o],i=e[o+r],n?x(r,n,i,a):i(a);t._subscribers.length=0}}function y(){this.error=null}function x(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return U.error=t,U}}(n,i))===U?(c=!0,s=o.error,o=null):l=!0,r===o)return void m(r,new TypeError(\"A promises callback cannot return that same promise.\"))}else o=i,l=!0;r._state!==R||(a&&l?h(r,o):c?m(r,s):t===N?p(r,o):t===j&&m(r,o))}function b(t){t[F]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function _(t,e){this._instanceConstructor=t,this.promise=new t(c),this.promise[F]||b(this.promise),k(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?p(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&p(this.promise,this._result))):m(this.promise,new Error(\"Array Methods must be provided an Array\"))}function w(t){this[F]=V++,this._result=this._state=void 0,this._subscribers=[],c!==t&&(\"function\"!=typeof t&&function(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}(),this instanceof w?function(t,e){try{e(function(e){h(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t):function(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}())}function M(){var t=void 0;if(void 0!==i)t=i;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(t){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(\"[object Promise]\"===r&&!e.cast)return}t.Promise=w}var k=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)},A=0,T=void 0,S=void 0,E=function(t,e){P[A]=t,P[A+1]=e,2===(A+=2)&&(S?S(a):O())},L=\"undefined\"!=typeof window?window:void 0,C=L||{},z=C.MutationObserver||C.WebKitMutationObserver,D=\"undefined\"==typeof self&&void 0!==n&&\"[object process]\"==={}.toString.call(n),I=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel,P=new Array(1e3),O=void 0;O=D?function(){return n.nextTick(a)}:z?function(){var t=0,e=new z(a),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}():I?function(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}():void 0===L&&\"function\"==typeof t?o():r();var F=Math.random().toString(36).substring(16),R=void 0,N=1,j=2,B=new y,U=new y,V=0;return _.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===R&&r<t;r++)this._eachEntry(e[r],r)},_.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===l){var i=u(t);if(i===s&&t._state!==R)this._settledAt(t._state,e,t._result);else if(\"function\"!=typeof i)this._remaining--,this._result[e]=t;else if(r===w){var a=new r(c);f(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},_.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===R&&(this._remaining--,t===j?m(n,r):this._result[e]=r),0===this._remaining&&p(n,this._result)},_.prototype._willSettleAt=function(t,e){var r=this;g(t,void 0,function(t){return r._settledAt(N,e,t)},function(t){return r._settledAt(j,e,t)})},w.all=function(t){return new _(this,t).promise},w.race=function(t){var e=this;return new e(k(t)?function(r,n){for(var i=t.length,a=0;a<i;a++)e.resolve(t[a]).then(r,n)}:function(t,e){return e(new TypeError(\"You must pass an array to race.\"))})},w.resolve=l,w.reject=function(t){var e=new this(c);return m(e,t),e},w._setScheduler=function(t){S=t},w._setAsap=function(t){E=t},w._asap=E,w.prototype={constructor:w,then:s,catch:function(t){return this.then(null,t)}},M(),w.polyfill=M,w.Promise=w,w})}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{_process:488}],138:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return\"function\"==typeof t}function a(t){return\"object\"==typeof t&&null!==t}function o(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!function(t){return\"number\"==typeof t}(t)||t<0||isNaN(t))throw TypeError(\"n must be a positive number\");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,s,l,c;if(this._events||(this._events={}),\"error\"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var u=new Error('Uncaught, unspecified \"error\" event. ('+e+\")\");throw u.context=e,u}if(r=this._events[t],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,l=0;l<n;l++)c[l].apply(this,s);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&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,o,s;if(!i(e))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=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(a(r)){for(s=o;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)}},{}],139:[function(t,e,r){\"use strict\";e.exports=function(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]]]}},{}],140:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;if(\"string\"===e){var r=t;if(0===(t=+t)&&function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&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}(r))return!1}else if(\"number\"!==e)return!1;return t-t<1}},{}],141:[function(t,e,r){\"use strict\";function n(t){if(!t)return\"true\";var e=t[0];if(t.length<=1)return\"any\"===e?\"false\":\"true\";return\"(\"+(\"==\"===e?a(t[1],t[2],\"===\",!1):\"!=\"===e?a(t[1],t[2],\"!==\",!1):\"<\"===e||\">\"===e||\"<=\"===e||\">=\"===e?a(t[1],t[2],e,!0):\"any\"===e?o(t.slice(1),\"||\"):\"all\"===e?o(t.slice(1),\"&&\"):\"none\"===e?c(o(t.slice(1),\"||\")):\"in\"===e?s(t[1],t.slice(2)):\"!in\"===e?c(s(t[1],t.slice(2))):\"has\"===e?l(t[1]):\"!has\"===e?c(l([t[1]])):\"true\")+\")\"}function i(t){return\"$type\"===t?\"f.type\":\"$id\"===t?\"f.id\":\"p[\"+JSON.stringify(t)+\"]\"}function a(t,e,r,n){var a=i(t),o=\"$type\"===t?f.indexOf(e):JSON.stringify(e);return(n?\"typeof \"+a+\"=== typeof \"+o+\"&&\":\"\")+a+r+o}function o(t,e){return t.map(n).join(e)}function s(t,e){\"$type\"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(u)),n=i(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 l(t){return JSON.stringify(t)+\" in p\"}function c(t){return\"!(\"+t+\")\"}function u(t,e){return t<e?-1:t>e?1:0}e.exports=function(t){return new Function(\"f\",\"var p = (f && f.properties || {}); return \"+n(t))};var f=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"]},{}],142:[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<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}function a(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}e.exports=function(t,e,r){switch(arguments.length){case 0:return new i([0],[0],0);case 1:return\"number\"==typeof t?new i(n=a(t),n,0):new i(t,a(t.length),0);case 2:if(\"number\"==typeof e){var n;return new i(t,n=a(t.length),+e)}r=0;case 3:if(t.length!==e.length)throw new Error(\"state and velocity lengths must match\");return new i(t,e,r)}};var o=t(\"cubic-hermite\"),s=t(\"binary-search-bounds\"),l=i.prototype;l.flush=function(t){var e=s.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},l.curve=function(t){var e=this._time,r=e.length,i=s.le(e,t),a=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(i<0)for(var h=u-1,d=0;d<u;++d,--h)a[d]=l[h];else if(i>=r-1){h=l.length-1;var p=t-e[r-1];for(d=0;d<u;++d,--h)a[d]=l[h]+p*c[h]}else{h=u*(i+1)-1;var m=e[i],g=e[i+1]-m||1,v=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(d=0;d<u;++d,--h)v[d]=l[h],x[d]=c[h]*g,y[d]=l[h+u],b[d]=c[h+u]*g,_=_&&v[d]===y[d]&&x[d]===b[d]&&0===x[d];if(_)for(d=0;d<u;++d)a[d]=v[d];else o(v,x,y,b,(t-m)/g,a)}var w=f[0],M=f[1];for(d=0;d<u;++d)a[d]=n(w[d],M[d],a[d]);return a},l.dcurve=function(t){var e=this._time,r=e.length,n=s.le(e,t),i=this._scratch[0],a=this._state,l=this._velocity,c=this.dimension;if(n>=r-1)for(var u=a.length-1,f=(e[r-1],0);f<c;++f,--u)i[f]=l[u];else{u=c*(n+1)-1;var h=e[n],d=e[n+1]-h||1,p=this._scratch[1],m=this._scratch[2],g=this._scratch[3],v=this._scratch[4],y=!0;for(f=0;f<c;++f,--u)p[f]=a[u],g[f]=l[u]*d,m[f]=a[u+c],v[f]=l[u+c]*d,y=y&&p[f]===m[f]&&g[f]===v[f]&&0===g[f];if(y)for(f=0;f<c;++f)i[f]=0;else{o.derivative(p,g,m,v,(t-h)/d,i);for(f=0;f<c;++f)i[f]/=d}}return i},l.lastT=function(){var t=this._time;return t[t.length-1]},l.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},l.jump=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],c=s[1];this._time.push(e,t);for(var u=0;u<2;++u)for(var f=0;f<r;++f)i.push(i[o++]),a.push(0);this._time.push(t);for(f=r;f>0;--f)i.push(n(l[f-1],c[f-1],arguments[f])),a.push(0)}},l.push=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=t-e,l=this.bounds,c=l[0],u=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var d=n(c[h-1],u[h-1],arguments[h]);i.push(d),a.push((d-i[o++])*f)}}},l.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,i=this._velocity,a=this.bounds,o=a[0],s=a[1];this._time.push(t);for(var l=e;l>0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},l.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],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var d=arguments[h];i.push(n(l[h-1],c[h-1],i[o++]+d)),a.push(d*f)}}},l.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,i=this._state,a=this._velocity,o=i.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)i.push(n(l[f],c[f],i[o]+u*a[o])),a.push(0),o+=1}}},{\"binary-search-bounds\":70,\"cubic-hermite\":115}],143:[function(t,e,r){var n=t(\"dtype\");e.exports=function(t,e,r){if(!t)throw new TypeError(\"must specify data as first parameter\");if(r=0|+(r||0),Array.isArray(t)&&Array.isArray(t[0])){var i=t[0].length,a=t.length*i;e&&\"string\"!=typeof e||(e=new(n(e||\"float32\"))(a+r));var o=e.length-r;if(a!==o)throw new Error(\"source length \"+a+\" (\"+i+\"x\"+t.length+\") does not match destination length \"+o);for(var s=0,l=r;s<t.length;s++)for(var c=0;c<i;c++)e[l++]=t[s][c]}else if(e&&\"string\"!=typeof e)e.set(t,r);else{var u=n(e||\"float32\");0===r?e=new u(t):(e=new u(t.length+r)).set(t,r)}return e}},{dtype:133}],144:[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){if(r=l(t,e.left))return r}var r;return(r=t(e.key,e.value))||(e.right?l(t,e.right):void 0)}function c(t,e,r,n){if(e(t,n.key)<=0){if(n.left){if(i=c(t,e,r,n.left))return i}var i;if(i=r(n.key,n.value))return i}if(n.right)return c(t,e,r,n.right)}function u(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=u(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 u(t,e,r,n,i.right)}function f(t,e){this.tree=t,this._stack=e}function h(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}e.exports=function(t){return new s(t||function(t,e){return t<e?-1:t>e?1:0},null)};var d=0,p=1,m=s.prototype;Object.defineProperty(m,\"keys\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(m,\"values\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(m,\"length\",{get:function(){return this.root?this.root._count:0}}),m.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],c=[];i;){var u=r(t,i.key);l.push(i),c.push(u),i=u<=0?i.left:i.right}l.push(new n(d,t,e,null,null,1));for(var f=l.length-2;f>=0;--f){i=l[f];c[f]<=0?l[f]=new n(i._color,i.key,i.value,l[f+1],i.right,i._count+1):l[f]=new n(i._color,i.key,i.value,i.left,l[f+1],i._count+1)}for(f=l.length-1;f>1;--f){var h=l[f-1];i=l[f];if(h._color===p||i._color===p)break;var m=l[f-2];if(m.left===h)if(h.left===i){if(!(g=m.right)||g._color!==d){if(m._color=d,m.left=h.right,h._color=p,h.right=m,l[f-2]=h,l[f-1]=i,o(m),o(h),f>=3){(v=l[f-3]).left===m?v.left=h:v.right=h}break}h._color=p,m.right=a(p,g),m._color=d,f-=1}else{if(!(g=m.right)||g._color!==d){if(h.right=i.left,m._color=d,m.left=i.right,i._color=p,i.left=h,i.right=m,l[f-2]=i,l[f-1]=h,o(m),o(h),o(i),f>=3){(v=l[f-3]).left===m?v.left=i:v.right=i}break}h._color=p,m.right=a(p,g),m._color=d,f-=1}else if(h.right===i){if(!(g=m.left)||g._color!==d){if(m._color=d,m.right=h.left,h._color=p,h.left=m,l[f-2]=h,l[f-1]=i,o(m),o(h),f>=3){(v=l[f-3]).right===m?v.right=h:v.left=h}break}h._color=p,m.left=a(p,g),m._color=d,f-=1}else{var g;if(!(g=m.left)||g._color!==d){if(h.left=i.right,m._color=d,m.right=i.left,i._color=p,i.right=h,i.left=m,l[f-2]=i,l[f-1]=h,o(m),o(h),o(i),f>=3){var v;(v=l[f-3]).right===m?v.right=i:v.left=i}break}h._color=p,m.left=a(p,g),m._color=d,f-=1}}return l[0]._color=p,new s(r,l[0])},m.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return c(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return u(e,r,this._compare,t,this.root)}},Object.defineProperty(m,\"begin\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(m,\"end\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),m.at=function(t){if(t<0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new f(this,[])},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n);r=i<=0?r.left:r.right}return new f(this,[])},m.remove=function(t){var e=this.find(t);return e?e.remove():this},m.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 g=f.prototype;Object.defineProperty(g,\"valid\",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,\"node\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new f(this.tree,this._stack.slice())},g.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 l=t.length-2;l>=0;--l){(r=t[l]).left===t[l+1]?e[l]=new n(r._color,r.key,r.value,e[l+1],r.right,r._count):e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count)}if((r=e[e.length-1]).left&&r.right){var c=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var u=e[c-1];e.push(new n(r._color,u.key,u.value,r.left,r.right,r._count)),e[c-1].key=r.key,e[c-1].value=r.value;for(l=e.length-2;l>=c;--l)r=e[l],e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);e[c-1].left=e[c]}if((r=e[e.length-1])._color===d){var f=e[e.length-2];f.left===r?f.left=null:f.right===r&&(f.right=null),e.pop();for(l=0;l<e.length;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(r.left||r.right){r.left?h(r,r.left):r.right&&h(r,r.right),r._color=p;for(l=0;l<e.length-1;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(1===e.length)return new s(this.tree._compare,null);for(l=0;l<e.length;++l)e[l]._count--;var m=e[e.length-2];return function(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=p);if((r=t[l-1]).left===e){if((n=r.right).right&&n.right._color===d)return 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=p,r._color=p,s._color=p,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),void(t[l-1]=n);if(n.left&&n.left._color===d)return 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=p,n._color=p,e._color=p,o(r),o(n),o(s),l>1&&((c=t[l-2]).left===r?c.left=s:c.right=s),void(t[l-1]=s);if(n._color===p){if(r._color===d)return r._color=p,void(r.right=a(d,n));r.right=a(d,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=d,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}else{if((n=r.left).left&&n.left._color===d)return n=r.left=i(n),s=n.left=i(n.left),r.left=n.right,n.right=r,n.left=s,n._color=r._color,e._color=p,r._color=p,s._color=p,o(r),o(n),l>1&&((c=t[l-2]).right===r?c.right=n:c.left=n),void(t[l-1]=n);if(n.right&&n.right._color===d)return 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=p,n._color=p,e._color=p,o(r),o(n),o(s),l>1&&((c=t[l-2]).right===r?c.right=s:c.left=s),void(t[l-1]=s);if(n._color===p){if(r._color===d)return r._color=p,void(r.left=a(d,n));r.left=a(d,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=d,o(r),o(n),l>1){var c;(c=t[l-2]).right===r?c.right=n:c.left=n}t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}}}(e),m.left===r?m.left=null:m.right=null,new s(this.tree._compare,e[0])},Object.defineProperty(g,\"key\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,\"value\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,\"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}),g.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(g,\"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}}),g.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]).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])},g.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(g,\"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}})},{}],145:[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},{}],146:[function(t,e,r){function n(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(i(t[r]))}return e}function i(t){var e=0;if(t.length>2){for(var r,n,i=0;i<t.length-1;i++)r=t[i],e+=a((n=t[i+1])[0]-r[0])*(2+Math.sin(a(r[1]))+Math.sin(a(n[1])));e=e*o.RADIUS*o.RADIUS/2}return e}function a(t){return t*Math.PI/180}var o=t(\"wgs84\");e.exports.geometry=function(t){if(\"Polygon\"===t.type)return n(t.coordinates);if(\"MultiPolygon\"===t.type){for(var e=0,r=0;r<t.coordinates.length;r++)e+=n(t.coordinates[r]);return e}return null},e.exports.ring=i},{wgs84:579}],147:[function(t,e,r){function n(t,e){switch(t&&t.type||null){case\"FeatureCollection\":return t.features=t.features.map(i(n,e)),t;case\"Feature\":return t.geometry=n(t.geometry,e),t;case\"Polygon\":case\"MultiPolygon\":return function(t,e){\"Polygon\"===t.type?t.coordinates=a(t.coordinates,e):\"MultiPolygon\"===t.type&&(t.coordinates=t.coordinates.map(i(a,e)));return t}(t,e);default:return t}}function i(t,e){return function(r){return t(r,e)}}function a(t,e){e=!!e,t[0]=o(t[0],!e);for(var r=1;r<t.length;r++)t[r]=o(t[r],e);return t}function o(t,e){return function(t){return s.ring(t)>=0}(t)===e?t:t.reverse()}var s=t(\"geojson-area\");e.exports=n},{\"geojson-area\":146}],148:[function(t,e,r){\"use strict\";function n(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=function(t,e,r,a,o,s,l,c){if(r/=e,a/=e,l>=r&&c<=a)return t;if(l>a||c<r)return null;for(var u=[],f=0;f<t.length;f++){var h,d,p=t[f],m=p.geometry,g=p.type;if(h=p.min[o],d=p.max[o],h>=r&&d<=a)u.push(p);else if(!(h>a||d<r)){var v=1===g?function(t,e,r,n){for(var i=[],a=0;a<t.length;a++){var o=t[a],s=o[n];s>=e&&s<=r&&i.push(o)}return i}(m,r,a,o):function(t,e,r,i,a,o){for(var s=[],l=0;l<t.length;l++){var c,u,f,h=0,d=0,p=null,m=t[l],g=m.area,v=m.dist,y=m.outer,x=m.length,b=[];for(u=0;u<x-1;u++)c=p||m[u],p=m[u+1],h=d||c[i],d=p[i],h<e?d>r?(b.push(a(c,p,e),a(c,p,r)),o||(b=n(s,b,g,v,y))):d>=e&&b.push(a(c,p,e)):h>r?d<e?(b.push(a(c,p,r),a(c,p,e)),o||(b=n(s,b,g,v,y))):d<=r&&b.push(a(c,p,r)):(b.push(c),d<e?(b.push(a(c,p,e)),o||(b=n(s,b,g,v,y))):d>r&&(b.push(a(c,p,r)),o||(b=n(s,b,g,v,y))));c=m[x-1],(h=c[i])>=e&&h<=r&&b.push(c),f=b[b.length-1],o&&f&&(b[0][0]!==f[0]||b[0][1]!==f[1])&&b.push(b[0]),n(s,b,g,v,y)}return s}(m,r,a,o,s,3===g);v.length&&u.push(i(p.tags,g,v,p.id))}}return u.length?u:null};var i=t(\"./feature\")},{\"./feature\":150}],149:[function(t,e,r){\"use strict\";function n(t,e,r){if(null!==e.geometry){var o,l,c,u,f=e.geometry,h=f.type,d=f.coordinates,p=e.properties,m=e.id;if(\"Point\"===h)t.push(s(p,1,[a(d)],m));else if(\"MultiPoint\"===h)t.push(s(p,1,i(d),m));else if(\"LineString\"===h)t.push(s(p,2,[i(d,r)],m));else if(\"MultiLineString\"===h||\"Polygon\"===h){for(c=[],o=0;o<d.length;o++)u=i(d[o],r),\"Polygon\"===h&&(u.outer=0===o),c.push(u);t.push(s(p,\"Polygon\"===h?3:2,c,m))}else if(\"MultiPolygon\"===h){for(c=[],o=0;o<d.length;o++)for(l=0;l<d[o].length;l++)(u=i(d[o][l],r)).outer=0===l,c.push(u);t.push(s(p,3,c,m))}else{if(\"GeometryCollection\"!==h)throw new Error(\"Input data is not a valid GeoJSON object.\");for(o=0;o<f.geometries.length;o++)n(t,{geometry:f.geometries[o],properties:p},r)}}}function i(t,e){for(var r=[],n=0;n<t.length;n++)r.push(a(t[n]));return e&&(o(r,e),function(t){for(var e,r,n=0,i=0,a=0;a<t.length-1;a++)e=r||t[a],r=t[a+1],n+=e[0]*r[1]-r[0]*e[1],i+=Math.abs(r[0]-e[0])+Math.abs(r[1]-e[1]);t.area=Math.abs(n/2),t.dist=i}(r)),r}function a(t){var e=Math.sin(t[1]*Math.PI/180),r=t[0]/360+.5,n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n=n<0?0:n>1?1:n,[r,n,0]}e.exports=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var i=0;i<t.features.length;i++)n(r,t.features[i],e);else\"Feature\"===t.type?n(r,t,e):n(r,{geometry:t},e);return r};var o=t(\"./simplify\"),s=t(\"./feature\")},{\"./feature\":150,\"./simplify\":152}],150:[function(t,e,r){\"use strict\";function n(t,e,r){for(var n,i=0;i<r.length;i++)n=r[i],t[0]=Math.min(n[0],t[0]),e[0]=Math.max(n[0],e[0]),t[1]=Math.min(n[1],t[1]),e[1]=Math.max(n[1],e[1])}e.exports=function(t,e,r,i){var a={id:i||null,type:e,geometry:r,tags:t||null,min:[1/0,1/0],max:[-1/0,-1/0]};return function(t){var e=t.geometry,r=t.min,i=t.max;if(1===t.type)n(r,i,e);else for(var a=0;a<e.length;a++)n(r,i,e[a])}(a),a}},{}],151:[function(t,e,r){\"use strict\";function n(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;r&&console.time(\"preprocess data\");var n=1<<e.maxZoom,i=l(t,e.tolerance/(n*e.extent));this.tiles={},this.tileCoords=[],r&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",e.indexMaxZoom,e.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),(i=f(i,e.buffer/e.extent,a)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}function i(t,e,r){return 32*((1<<t)*r+e)+t}function a(t,e,r){return[r,(r-t[0])*(e[1]-t[1])/(e[0]-t[0])+t[1],1]}function o(t,e,r){return[(r-t[1])*(e[0]-t[0])/(e[1]-t[1])+t[0],r,1]}function s(t,e,r){var n=t.source;if(1!==n.length)return!1;var i=n[0];if(3!==i.type||i.geometry.length>1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o<a;o++){var s=c.point(i.geometry[0][o],e,t.z2,t.x,t.y);if(s[0]!==-r&&s[0]!==e+r||s[1]!==-r&&s[1]!==e+r)return!1}return!0}e.exports=function(t,e){return new n(t,e)};var l=t(\"./convert\"),c=t(\"./transform\"),u=t(\"./clip\"),f=t(\"./wrap\"),h=t(\"./tile\");n.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},n.prototype.splitTile=function(t,e,r,n,l,c,f){for(var d=[t,e,r,n],p=this.options,m=p.debug,g=null;d.length;){n=d.pop(),r=d.pop(),e=d.pop(),t=d.pop();var v=1<<e,y=i(e,r,n),x=this.tiles[y],b=e===p.maxZoom?0:p.tolerance/(v*p.extent);if(!x&&(m>1&&console.time(\"creation\"),x=this.tiles[y]=h(t,v,r,n,b,e===p.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,x.numFeatures,x.numPoints,x.numSimplified),console.timeEnd(\"creation\"));var _=\"z\"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(x.source=t,l){if(e===p.maxZoom||e===l)continue;var w=1<<l-e;if(r!==Math.floor(c/w)||n!==Math.floor(f/w))continue}else if(e===p.indexMaxZoom||x.numPoints<=p.indexMaxPoints)continue;if(p.solidChildren||!s(x,p.extent,p.buffer)){x.source=null,m>1&&console.time(\"clipping\");var M,k,A,T,S,E,L=.5*p.buffer/p.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=u(t,v,r-L,r+z,0,a,x.min[0],x.max[0]),E=u(t,v,r+C,r+D,0,a,x.min[0],x.max[0]),S&&(M=u(S,v,n-L,n+z,1,o,x.min[1],x.max[1]),k=u(S,v,n+C,n+D,1,o,x.min[1],x.max[1])),E&&(A=u(E,v,n-L,n+z,1,o,x.min[1],x.max[1]),T=u(E,v,n+C,n+D,1,o,x.min[1],x.max[1])),m>1&&console.timeEnd(\"clipping\"),t.length&&(d.push(M||[],e+1,2*r,2*n),d.push(k||[],e+1,2*r,2*n+1),d.push(A||[],e+1,2*r+1,2*n),d.push(T||[],e+1,2*r+1,2*n+1))}else l&&(g=e)}return g},n.prototype.getTile=function(t,e,r){var n=this.options,a=n.extent,o=n.debug,l=1<<t,u=i(t,e=(e%l+l)%l,r);if(this.tiles[u])return c.tile(this.tiles[u],a);o>1&&console.log(\"drilling down to z%d-%d-%d\",t,e,r);for(var f,h=t,d=e,p=r;!f&&h>0;)h--,d=Math.floor(d/2),p=Math.floor(p/2),f=this.tiles[i(h,d,p)];if(!f||!f.source)return null;if(o>1&&console.log(\"found parent tile z%d-%d-%d\",h,d,p),s(f,a,n.buffer))return c.tile(f,a);o>1&&console.time(\"drilling down\");var m=this.splitTile(f.source,h,d,p,t,e,r);if(o>1&&console.timeEnd(\"drilling down\"),null!==m){var g=1<<t-m;u=i(m,Math.floor(e/g),Math.floor(r/g))}return this.tiles[u]?c.tile(this.tiles[u],a):null}},{\"./clip\":148,\"./convert\":149,\"./tile\":153,\"./transform\":154,\"./wrap\":155}],152:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o=e*e,s=0,l=t.length-1,c=[];for(t[s][2]=1,t[l][2]=1;l;){for(n=0,r=s+1;r<l;r++)(i=function(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],c=a-n,u=o-i;if(0!==c||0!==u){var f=((s-n)*c+(l-i)*u)/(c*c+u*u);f>1?(n=a,i=o):f>0&&(n+=c*f,i+=u*f)}return c=s-n,u=l-i,c*c+u*u}(t[r],t[s],t[l]))>n&&(a=r,n=i);n>o?(t[a][2]=n,c.push(s),c.push(a),s=a):(l=c.pop(),s=c.pop())}}},{}],153:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){for(var o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},s=0;s<t.length;s++){o.numFeatures++,function(t,e,r,n){var i,a,o,s,l=e.geometry,c=e.type,u=[],f=r*r;if(1===c)for(i=0;i<l.length;i++)u.push(l[i]),t.numPoints++,t.numSimplified++;else for(i=0;i<l.length;i++)if(o=l[i],n||!(2===c&&o.dist<r||3===c&&o.area<f)){var h=[];for(a=0;a<o.length;a++)s=o[a],(n||s[2]>f)&&(h.push(s),t.numSimplified++),t.numPoints++;3===c&&function(t,e){(function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],r=t[o],n+=(r[0]-e[0])*(e[1]+r[1]);return n})(t)<0===e&&t.reverse()}(h,o.outer),u.push(h)}else t.numPoints+=o.length;if(u.length){var d={geometry:u,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}(o,t[s],i,a);var l=t[s].min,c=t[s].max;l[0]<o.min[0]&&(o.min[0]=l[0]),l[1]<o.min[1]&&(o.min[1]=l[1]),c[0]>o.max[0]&&(o.max[0]=c[0]),c[1]>o.max[1]&&(o.max[1]=c[1])}return o}},{}],154:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){return[Math.round(e*(t[0]*r-n)),Math.round(e*(t[1]*r-i))]}r.tile=function(t,e){if(t.transformed)return t;var r,i,a,o=t.z2,s=t.x,l=t.y;for(r=0;r<t.features.length;r++){var c=t.features[r],u=c.geometry;if(1===c.type)for(i=0;i<u.length;i++)u[i]=n(u[i],e,o,s,l);else for(i=0;i<u.length;i++){var f=u[i];for(a=0;a<f.length;a++)f[a]=n(f[a],e,o,s,l)}}return t.transformed=!0,t},r.point=n},{}],155:[function(t,e,r){\"use strict\";function n(t,e){for(var r=[],n=0;n<t.length;n++){var a,s=t[n],l=s.type;if(1===l)a=i(s.geometry,e);else{a=[];for(var c=0;c<s.geometry.length;c++)a.push(i(s.geometry[c],e))}r.push(o(s.tags,l,a,s.id))}return r}function i(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var n=0;n<t.length;n++)r.push([t[n][0]+e,t[n][1],t[n][2]]);return r}var a=t(\"./clip\"),o=t(\"./feature\");e.exports=function(t,e,r){var i=t,o=a(t,1,-1-e,e,0,r,-1,2),s=a(t,1,1-e,2+e,0,r,-1,2);return(o||s)&&(i=a(t,1,-e,1+e,0,r,-1,2)||[],o&&(i=n(o,1).concat(i)),s&&(i=i.concat(n(s,-1)))),i}},{\"./clip\":148,\"./feature\":150}],156:[function(t,e,r){e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"must specify type string\");if(e=e||{},\"undefined\"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement(\"canvas\");\"number\"==typeof e.width&&(r.width=e.width),\"number\"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(\"webgl\")&&a.push(\"experimental-\"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],157:[function(t,e,r){\"use strict\";function n(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=\"sans-serif\",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=c(t)}function a(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}function o(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var f=a,h=s,d=o,p=l;c&1<<u&&(f=s,h=a,d=l,p=o),f[u]=r[0][u],h[u]=r[1][u],i[u]>0?(d[u]=-1,p[u]=0):(d[u]=0,p[u]=1)}}e.exports=function(t,e){var r=new i(t);return r.update(e),r};var s=t(\"./lib/text.js\"),l=t(\"./lib/lines.js\"),c=t(\"./lib/background.js\"),u=t(\"./lib/cube.js\"),f=t(\"./lib/ticks.js\"),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=i.prototype;d.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]}),c=!1,u=!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]&&(u=!0),this.bounds[d][p]=h[d][p];if(\"ticks\"in t){r=t.ticks,c=!0,this.autoTicks=!1;for(d=0;d<3;++d)this.tickSpacing[d]=0}else n(\"tickSpacing\")&&(this.autoTicks=!0,u=!0);if(this._firstInit&&(\"ticks\"in t||\"tickSpacing\"in t||(this.autoTicks=!0),u=!0,c=!0,this._firstInit=!1),u&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),c=!0),c){for(d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?c=!1:this.ticks=r}i(\"tickEnable\"),a(\"tickFont\")&&(c=!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||c)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=s(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};var p=[new a,new a,new a],m=[0,0,0],g={model:h,view:h,projection:h};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];d.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||h,i=t.view||h,a=t.projection||h,s=this.bounds,l=u(r,i,a,s),c=l.cubeEdges,f=l.axis,d=i[12],b=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*d+a[7]*b+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=c[k],this.lastCubeProps.axis[k]=f[k];var A=p;for(k=0;k<3;++k)o(p[k],k,this.bounds,c,f);e=this.gl;var T=m;for(k=0;k<3;++k)this.backgroundEnable[k]?T[k]=f[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(k=0;k<3;++k){var S=[0,0,0];f[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(E=0;E<2;++E){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(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);var z=n(v,A[k].primalMinor),D=n(y,A[k].mirrorMinor),I=this.lineTickLength;for(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(k=0;k<3;++k){var O=A[k].primalMinor,F=n(x,A[k].primalOffset);for(E=0;E<3;++E)this.lineTickEnable[k]&&(F[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(E=0;E<3;++E)F[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],F,this.tickColor[k])}if(this.labelEnable[k]){for(E=0;E<3;++E)F[E]+=M*O[E]*this.labelPad[E]/r[5*E];F[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],F,this.labelColor[k])}}},d.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\":158,\"./lib/cube.js\":159,\"./lib/lines.js\":160,\"./lib/text.js\":162,\"./lib/ticks.js\":163}],158:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],d=-1;d<=1;d+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=d,h[l]=d;for(var p=-1;p<=1;p+=2){f[c]=p;for(var m=-1;m<=1;m+=2)f[u]=m,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=c;c=u,u=g}var v=i(t,new Float32Array(e)),y=i(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=a(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=o(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new n(t,v,x,b)};var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"./shaders\").bg,s=n.prototype;s.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)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders\":161,\"gl-buffer\":165,\"gl-vao\":259}],159:[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;e<p.length;++e)if((t=s.positive(t,p[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],a=0;for(e=1;e+1<t.length;++e){var o=t[e],l=t[e+1],c=o[0]/o[3]-n,u=o[1]/o[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;a+=Math.abs(c*h-u*f)}return a}e.exports=function(t,e,r,s){o(c,e,t),o(c,r,c);for(var p=0,y=0;y<2;++y){h[2]=s[y][2];for(var x=0;x<2;++x){h[1]=s[x][1];for(var b=0;b<2;++b)h[0]=s[b][0],n(u[p],h,c),p+=1}}var _=-1;for(y=0;y<8;++y){for(var w=u[y][3],M=0;M<3;++M)f[y][M]=u[y][M]/w;w<0&&(_<0?_=y:f[y][2]<f[_][2]&&(_=y))}if(_<0){_=0;for(var k=0;k<3;++k){for(var A=(k+2)%3,T=(k+1)%3,S=-1,E=-1,L=0;L<2;++L){var C=(D=L<<k)+(L<<A)+(1-L<<T),z=D+(1-L<<A)+(L<<T);l(f[D],f[C],f[z],d)<0||(L?S=1:E=1)}if(S<0||E<0)E>S&&(_|=1<<k);else{for(L=0;L<2;++L){C=(D=L<<k)+(L<<A)+(1-L<<T),z=D+(1-L<<A)+(L<<T);var D,I=i([u[D],u[C],u[z],u[D+(1<<A)+(1<<T)]]);L?S=I:E=I}E>S&&(_|=1<<k)}}}var P=7^_,O=-1;for(y=0;y<8;++y)y!==_&&y!==P&&(O<0?O=y:f[O][1]>f[y][1]&&(O=y));var F=-1;for(y=0;y<3;++y)(N=O^1<<y)!==_&&N!==P&&(F<0&&(F=N),(T=f[N])[0]<f[F][0]&&(F=N));var R=-1;for(y=0;y<3;++y){var N;(N=O^1<<y)!==_&&N!==P&&N!==F&&(R<0&&(R=N),(T=f[N])[0]>f[R][0]&&(R=N))}var j=m;j[0]=j[1]=j[2]=0,j[a.log2(F^O)]=O&F,j[a.log2(O^R)]=O&R;var B=7^R;B===_||B===P?(B=7^F,j[a.log2(R^B)]=B&R):j[a.log2(F^B)]=B&F;var U=g,V=_;for(k=0;k<3;++k)U[k]=V&1<<k?-1:1;return v};var a=t(\"bit-twiddle\"),o=t(\"gl-mat4/multiply\"),s=(t(\"gl-mat4/invert\"),t(\"split-polygon\")),l=t(\"robust-orientation\"),c=new Array(16),u=(new Array(16),new Array(8)),f=new Array(8),h=new Array(3),d=[0,0,0];!function(){for(var t=0;t<8;++t)u[t]=[1,1,1,1],f[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]],m=[1,1,1],g=[0,0,0],v={cubeEdges:m,axis:g}},{\"bit-twiddle\":71,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"robust-orientation\":515,\"split-polygon\":535}],160:[function(t,e,r){\"use strict\";function n(t){return t[0]=t[1]=t[2]=0,t}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}e.exports=function(t,e,r){var n=[],i=[0,0,0],c=[0,0,0],u=[0,0,0],f=[0,0,0];n.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var h=0;h<3;++h){for(var d=n.length/3|0,p=0;p<r[h].length;++p){var m=+r[h][p].x;n.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1)}var g=n.length/3|0;i[h]=d,c[h]=g-d,d=n.length/3|0;for(var v=0;v<r[h].length;++v)m=+r[h][v].x,n.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1);g=n.length/3|0,u[h]=d,f[h]=g-d}var y=o(t,new Float32Array(n)),x=s(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=l(t);return b.attributes.position.location=0,new a(t,y,x,b,c,i,f,u)};var o=t(\"gl-buffer\"),s=t(\"gl-vao\"),l=t(\"./shaders\").line,c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],d=[1,1],p=a.prototype;p.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=d,this.vao.bind()},p.drawAxisLine=function(t,e,r,a,o){var s=n(u);this.shader.uniforms.majorAxis=u,s[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=s;var l=i(h,r);l[t]+=e[0][t],this.shader.uniforms.offset=l,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=a;(c=n(f))[(t+2)%3]=1,this.shader.uniforms.screenAxis=c,this.vao.draw(this.gl.TRIANGLES,6);var c;(c=n(f))[(t+1)%3]=1,this.shader.uniforms.screenAxis=c,this.vao.draw(this.gl.TRIANGLES,6)},p.drawAxisTicks=function(t,e,r,i,a){if(this.tickCount[t]){var o=n(c);o[t]=1,this.shader.uniforms.majorAxis=o,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=i,this.shader.uniforms.lineWidth=a;var s=n(f);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},p.drawGrid=function(t,e,r,a,o,s){if(this.gridCount[t]){var l=n(u);l[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=l;var d=i(h,a);d[e]+=r[0][e],this.shader.uniforms.offset=d;var p=n(c);p[t]=1,this.shader.uniforms.majorAxis=p;var m=n(f);m[t]=1,this.shader.uniforms.screenAxis=m,this.shader.uniforms.lineWidth=s,this.shader.uniforms.color=o,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},p.drawZero=function(t,e,r,a,o,s){var l=n(u);this.shader.uniforms.majorAxis=l,l[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=l;var c=i(h,a);c[t]+=r[0][t],this.shader.uniforms.offset=c;var d=n(f);d[e]=1,this.shader.uniforms.screenAxis=d,this.shader.uniforms.lineWidth=s,this.shader.uniforms.color=o,this.vao.draw(this.gl.TRIANGLES,6)},p.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{\"./shaders\":161,\"gl-buffer\":165,\"gl-vao\":259}],161:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\");r.line=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\\nuniform float lineWidth;\\nuniform vec2 screenShape;\\n\\nvec3 project(vec3 p) {\\n vec4 pp = projection * view * model * vec4(p, 1.0);\\n return pp.xyz / max(pp.w, 0.0001);\\n}\\n\\nvoid main() {\\n vec3 major = position.x * majorAxis;\\n vec3 minor = position.y * minorAxis;\\n\\n vec3 vPosition = major + minor + offset;\\n vec3 pPosition = project(vPosition);\\n vec3 offset = project(vPosition + screenAxis * position.z);\\n\\n vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\\n\\n gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\\n}\\n\",\"precision mediump float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = color;\\n}\",null,[{name:\"position\",type:\"vec3\"}])};r.text=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, axis;\\nuniform float scale, angle, pixelScale;\\nuniform vec2 resolution;\\n\\nvoid main() { \\n //Compute plane offset\\n vec2 planeCoord = position.xy * pixelScale;\\n mat2 planeXform = scale * mat2(cos(angle), sin(angle),\\n -sin(angle), cos(angle));\\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\n\\n //Compute world offset\\n float axisDistance = position.z;\\n vec3 dataPosition = axisDistance * axis + offset;\\n vec4 worldPosition = model * vec4(dataPosition, 1);\\n \\n //Compute clip position\\n vec4 viewPosition = view * worldPosition;\\n vec4 clipPosition = projection * viewPosition;\\n clipPosition /= clipPosition.w;\\n\\n //Apply text offset in clip coordinates\\n clipPosition += vec4(viewOffset, 0, 0);\\n\\n //Done\\n gl_Position = clipPosition;\\n}\",\"precision mediump float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = color;\\n}\",null,[{name:\"position\",type:\"vec3\"}])};r.bg=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\nattribute vec3 normal;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 enable;\\nuniform vec3 bounds[2];\\n\\nvarying vec3 colorChannel;\\n\\nvoid main() {\\n if(dot(normal, enable) > 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\":243}],162:[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}e.exports=function(t,e,r,o,l,c){var u=i(t),f=a(t,[{buffer:u,size:3}]),h=s(t);h.attributes.position.location=0;var d=new n(t,h,u,f);return d.update(e,r,o,l,c),d};var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"vectorize-text\"),s=t(\"./shaders\").text,l=window||r.global||{},c=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};var u=n.prototype,f=[0,0];u.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,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.update=function(t,e,r,n,i){function a(t,e,r,n){var i=c[r];i||(i=c[r]={});var a=i[e];a||(a=i[e]=function(t,e){try{return o(t,e)}catch(t){return console.warn(\"error vectorizing text:\",t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:\"center\",textBaseline:\"middle\"}));for(var l=(n||12)/12,u=a.positions,f=a.cells,h=0,d=f.length;h<d;++h)for(var p=f[h],m=2;m>=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}this.gl;for(var s=[],l=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],d=0;d<3;++d){f[d]=s.length/3|0,a(.5*(t[0][d]+t[1][d]),e[d],r),h[d]=(s.length/3|0)-f[d],l[d]=s.length/3|0;for(var p=0;p<n[d].length;++p)n[d][p].text&&a(n[d][p].x,n[d][p].text,n[d][p].font||i,n[d][p].fontSize||12);u[d]=(s.length/3|0)-l[d]}this.buffer.update(s),this.tickOffset=l,this.tickCount=u,this.labelOffset=f,this.labelCount=h};var h=[0,0,0];u.drawTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=h;a[0]=a[1]=a[2]=0,a[t]=1,this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}};var d=[0,0,0];u.drawLabel=function(t,e,r,n,i){this.labelCount[t]&&(this.shader.uniforms.axis=d,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(\"_process\"))},{\"./shaders\":161,_process:488,\"gl-buffer\":165,\"gl-vao\":259,\"vectorize-text\":568}],163:[function(t,e,r){\"use strict\";function n(t,e){var r=t+\"\",n=r.indexOf(\".\"),i=0;n>=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,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=\"\"+l;if(o<0&&(u=\"-\"+u),i){for(var f=\"\"+c;f.length<i;)f=\"0\"+f;return u+\".\"+f}return u}r.create=function(t,e){for(var r=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],164:[function(t,e,r){\"use strict\";function n(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}function i(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=d,s=p,l=0;l<3;++l)s[l]=o[l]=r[l];s[3]=o[3]=1,s[a]+=1,u(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,u(o,o,e),o[3]<0&&(t[a]=1/0);var c=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(c*c+f*f)}return t}e.exports=function(t,e,r,n,u){var d=e.model||f,p=e.view||f,v=e.projection||f,y=t.bounds,x=(u=u||s(d,p,v,y)).axis;u.edges,l(h,p,d),l(h,v,h);for(var b=m,_=0;_<3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=a(c(h,h));c(h,h);for(var M=0;M<3;++M){var k=(M+1)%3,A=(M+2)%3,T=g;t:for(_=0;_<2;++_){var S=[];if(x[M]<0!=!!_){T[M]=y[_][M];for(var E=0;E<2;++E){T[k]=y[E^_][k];for(var L=0;L<2;++L)T[A]=y[L^E^_][A],S.push(T.slice())}for(E=0;E<w.length;++E){if(0===S.length)continue t;S=o.positive(S,w[E])}for(E=0;E<S.length;++E){A=S[E];var C=i(g,h,A,r,n);for(L=0;L<3;++L)b[L].lo=Math.min(b[L].lo,A[L]),b[L].hi=Math.max(b[L].hi,A[L]),L!==M&&(b[L].pixelsPerDataUnit=Math.min(b[L].pixelsPerDataUnit,Math.abs(C[L])))}}}}return b};var a=t(\"extract-frustum-planes\"),o=t(\"split-polygon\"),s=t(\"./lib/cube.js\"),l=t(\"gl-mat4/multiply\"),c=t(\"gl-mat4/transpose\"),u=t(\"gl-vec4/transformMat4\"),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=new Float32Array(16),d=[0,0,0,1],p=[0,0,0,1],m=[new n(1/0,-1/0,1/0),new n(1/0,-1/0,1/0),new n(1/0,-1/0,1/0)],g=[0,0,0]},{\"./lib/cube.js\":159,\"extract-frustum-planes\":139,\"gl-mat4/multiply\":188,\"gl-mat4/transpose\":196,\"gl-vec4/transformMat4\":265,\"split-polygon\":535}],165:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}function i(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)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=o.malloc(t.length,e),n=t.length,i=0;i<n;++i)r[i]=t[i];return r}var o=t(\"typedarray-pool\"),s=t(\"ndarray-ops\"),l=t(\"ndarray\"),c=[\"uint8\",\"uint8_clamped\",\"uint16\",\"uint32\",\"int8\",\"int16\",\"int32\",\"float32\"],u=n.prototype;u.bind=function(){this.gl.bindBuffer(this.type,this.handle)},u.unbind=function(){this.gl.bindBuffer(this.type,null)},u.dispose=function(){this.gl.deleteBuffer(this.handle)},u.update=function(t,e){if(\"number\"!=typeof e&&(e=-1),this.bind(),\"object\"==typeof t&&void 0!==t.shape){var r=t.dtype;if(c.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&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(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=o.malloc(t.size,r),u=l(n,t.shape);s.assign(u,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),o.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),o.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)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(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=new n(t,r,t.createBuffer(),0,i);return a.update(e),a}},{ndarray:458,\"ndarray-ops\":452,\"typedarray-pool\":554}],166:[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\"}},{}],167:[function(t,e,r){var n=t(\"./1.0/numbers\");e.exports=function(t){return n[t]}},{\"./1.0/numbers\":166}],168:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=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.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}function i(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}function a(t,e,r,n){for(var i=f[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}e.exports=function(t){var e=t.gl,r=o(e),i=s(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),a=l(e);a.attributes.position.location=0,a.attributes.color.location=1,a.attributes.offset.location=2;var c=new n(e,r,i,a);return c.update(t),c};var o=t(\"gl-buffer\"),s=t(\"gl-vao\"),l=t(\"./shaders/index\"),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype;u.isOpaque=function(){return this.opacity>=1},u.isTransparent=function(){return this.opacity<1},u.drawTransparent=u.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 f=0;f<3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);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=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();u.update=function(t){\"lineWidth\"in(t=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 c=0;c<3;++c){this.lineOffset[c]=l;t:for(var u=0;u<s;++u){for(var f=r[u],h=0;h<3;++h)if(isNaN(f[h])||!isFinite(f[h]))continue t;var d=n[u],p=e[c];if(Array.isArray(p[0])&&(p=e[u]),3===p.length&&(p=[p[0],p[1],p[2],1]),!isNaN(d[0][c])&&!isNaN(d[1][c])){if(d[0][c]<0){(m=f.slice())[c]+=d[0][c],o.push(f[0],f[1],f[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,c)}if(d[1][c]>0){var m;(m=f.slice())[c]+=d[1][c],o.push(f[0],f[1],f[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,c)}}}this.lineCount[c]=l-this.lineOffset[c]}this.buffer.update(o)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{\"./shaders/index\":170,\"gl-buffer\":165,\"gl-vao\":259}],169:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\"\");return r.push(t[n]),r.join(\"\")}},{}],170:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"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}\"]),o=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}\"]);e.exports=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"offset\",type:\"vec3\"}])}},{\"gl-shader\":243,glslify:169}],171:[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){switch(t){case f:throw new Error(\"gl-fbo: Framebuffer unsupported\");case h:throw new Error(\"gl-fbo: Framebuffer incomplete attachment\");case d:throw new Error(\"gl-fbo: Framebuffer incomplete dimensions\");case p:throw new Error(\"gl-fbo: Framebuffer incomplete missing attachment\");default:throw new Error(\"gl-fbo: Framebuffer failed for unspecified reason\")}}function o(t,e,r,n,i,a){if(!n)return null;var o=u(t,e,r,i,n);return o.magFilter=t.NEAREST,o.minFilter=t.NEAREST,o.mipSamples=1,o.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,o.handle,0),o}function s(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function l(t,e,r,l,c,u,f,h){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=h,this.color=new Array(c);for(var d=0;d<c;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=l,this._useDepth=u,this._useStencil=f;var p=this,g=[0|e,0|r];Object.defineProperties(g,{0:{get:function(){return p._shape[0]},set:function(t){return p.width=t}},1:{get:function(){return p._shape[1]},set:function(t){return p.height=t}}}),this._shapeVector=g,function(t){var e=n(t.gl),r=t.gl,l=t.handle=r.createFramebuffer(),c=t._shape[0],u=t._shape[1],f=t.color.length,h=t._ext,d=t._useStencil,p=t._useDepth,g=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,l);for(var v=0;v<f;++v)t.color[v]=o(r,c,u,g,r.RGBA,r.COLOR_ATTACHMENT0+v);0===f?(t._color_rb=s(r,c,u,r.RGBA4,r.COLOR_ATTACHMENT0),h&&h.drawBuffersWEBGL(m[0])):f>1&&h.drawBuffersWEBGL(m[f]);var y=r.getExtension(\"WEBGL_depth_texture\");y?d?t.depth=o(r,c,u,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=o(r,c,u,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=s(r,c,u,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=s(r,c,u,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=s(r,c,u,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(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),v=0;v<t.color.length;++v)t.color[v].dispose(),t.color[v]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),i(r,e),a(x)}i(r,e)}(this)}function c(t,e,r){if(t._destroyed)throw new Error(\"gl-fbo: Can't resize destroyed FBO\");if(t._shape[0]!==e||t._shape[1]!==r){var o=t.gl,s=o.getParameter(o.MAX_RENDERBUFFER_SIZE);if(e<0||e>s||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(o),c=0;c<t.color.length;++c)t.color[c].shape=t._shape;t._color_rb&&(o.bindRenderbuffer(o.RENDERBUFFER,t._color_rb),o.renderbufferStorage(o.RENDERBUFFER,o.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(o.bindRenderbuffer(o.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&o.renderbufferStorage(o.RENDERBUFFER,o.STENCIL_INDEX,t._shape[0],t._shape[1])),o.bindFramebuffer(o.FRAMEBUFFER,t.handle);var u=o.checkFramebufferStatus(o.FRAMEBUFFER);u!==o.FRAMEBUFFER_COMPLETE&&(t.dispose(),i(o,l),a(u)),i(o,l)}}var u=t(\"gl-texture2d\");e.exports=function(t,e,r,n){f||(f=t.FRAMEBUFFER_UNSUPPORTED,h=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,d=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,p=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var i=t.getExtension(\"WEBGL_draw_buffers\");if(!m&&i&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);m=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(a=n;a<r;++a)i[a]=t.NONE;m[n]=i}}(t,i),Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]),\"number\"!=typeof e)throw new Error(\"gl-fbo: Missing shape parameter\");var a=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>a||r<0||r>a)throw new Error(\"gl-fbo: Parameters are too large for FBO\");var o=1;if(\"color\"in(n=n||{})){if((o=Math.max(0|n.color,0))<0)throw new Error(\"gl-fbo: Must specify a nonnegative number of colors\");if(o>1){if(!i)throw new Error(\"gl-fbo: Multiple draw buffer extension not supported\");if(o>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\"gl-fbo: Context does not support \"+o+\" draw buffers\")}}var s=t.UNSIGNED_BYTE,c=t.getExtension(\"OES_texture_float\");if(n.float&&o>0){if(!c)throw new Error(\"gl-fbo: Context does not support floating point textures\");s=t.FLOAT}else n.preferFloat&&o>0&&c&&(s=t.FLOAT);var u=!0;\"depth\"in n&&(u=!!n.depth);var g=!1;return\"stencil\"in n&&(g=!!n.stencil),new l(t,e,r,s,o,u,g,i)};var f,h,d,p,m=null,g=l.prototype;Object.defineProperties(g,{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 c(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,c(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,c(this,this._shape[0],t),t},enumerable:!1}}),g.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])}},g.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<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{\"gl-texture2d\":255}],172:[function(t,e,r){var n=t(\"sprintf-js\").sprintf,i=t(\"gl-constants/lookup\"),a=t(\"glsl-shader-name\"),o=t(\"add-line-numbers\");e.exports=function(t,e,r){\"use strict\";var s=a(e)||\"of unknown name (see npm glsl-shader-name)\",l=\"unknown type\";void 0!==r&&(l=r===i.FRAGMENT_SHADER?\"fragment\":\"vertex\");for(var c=n(\"Error compiling %s shader %s:\\n\",l,s),u=n(\"%s%s\",c,t),f=t.split(\"\\n\"),h={},d=0;d<f.length;d++){var p=f[d];if(\"\"!==p){var m=parseInt(p.split(\":\")[2]);if(isNaN(m))throw new Error(n(\"Could not parse error: %s\",p));h[m]=p}}var g=o(e).split(\"\\n\");for(d=0;d<g.length;d++)if((h[d+3]||h[d+2]||h[d+1])&&(c+=g[d]+\"\\n\",h[d+1])){var v=h[d+1];v=v.substr(v.split(\":\",3).join(\":\").length+1).trim(),c+=n(\"^^^ %s\\n\\n\",v)}return{long:c.trim(),short:u.trim()}}},{\"add-line-numbers\":44,\"gl-constants/lookup\":167,\"glsl-shader-name\":267,\"sprintf-js\":536}],173:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}e.exports=function(t,e){var r=t.gl,i=new n(t,s(r,c.vertex,c.fragment),s(r,c.pickVertex,c.pickFragment),l(r),l(r),l(r),l(r));return i.update(e),t.addObject(i),i};var i=t(\"binary-search-bounds\"),a=t(\"iota-array\"),o=t(\"typedarray-pool\"),s=t(\"gl-shader\"),l=t(\"gl-buffer\"),c=t(\"./lib/shaders\"),u=n.prototype,f=[0,0,1,0,0,1,1,0,1,1,0,1];u.draw=function(){var t=[1,0,0,0,1,0,0,0,1];return function(){var e=this.plot,r=this.shader,n=this.bounds,i=this.numVertices;if(!(i<=0)){var a=e.gl,o=e.dataBox,s=n[2]-n[0],l=n[3]-n[1],c=o[2]-o[0],u=o[3]-o[1];t[0]=2*s/c,t[4]=2*l/u,t[6]=2*(n[0]-o[0])/c-1,t[7]=2*(n[1]-o[1])/u-1,r.bind();var f=r.uniforms;f.viewTransform=t,f.shape=this.shape;var h=r.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(a.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(a.UNSIGNED_BYTE,!0),a.drawArrays(a.TRIANGLES,0,i)}}}(),u.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var d=0;d<4;++d)e[d]=r>>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]}}}(),u.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||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]]}},u.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||a(e[0]),n=t.y||a(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=1/((h[2]=r[r.length-1])-d),g=1/((h[3]=n[n.length-1])-p),v=e[0],y=e[1];this.shape=[v,y];var x=(v-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=o.mallocUint8(4*x),_=o.mallocFloat32(2*x),w=o.mallocUint8(2*x),M=o.mallocUint32(x),k=0,A=0;A<y-1;++A)for(var T=g*(n[A]-p),S=g*(n[A+1]-p),E=0;E<v-1;++E)for(var L=m*(r[E]-d),C=m*(r[E+1]-d),z=0;z<f.length;z+=2){var D,I,P,O,F=f[z],R=f[z+1],N=s[(A+R)*v+(E+F)],j=i.le(l,N);if(j<0)D=c[0],I=c[1],P=c[2],O=c[3];else if(j===u-1)D=c[4*u-4],I=c[4*u-3],P=c[4*u-2],O=c[4*u-1];else{var B=(N-l[j])/(l[j+1]-l[j]),U=1-B,V=4*j,q=4*(j+1);D=U*c[V]+B*c[q],I=U*c[V+1]+B*c[q+1],P=U*c[V+2]+B*c[q+2],O=U*c[V+3]+B*c[q+3]}b[4*k]=255*D,b[4*k+1]=255*I,b[4*k+2]=255*P,b[4*k+3]=255*O,_[2*k]=.5*L+.5*C,_[2*k+1]=.5*T+.5*S,w[2*k]=F,w[2*k+1]=R,M[k]=A*v+E,k+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(M),o.free(_),o.free(b),o.free(w),o.free(M)},u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{\"./lib/shaders\":174,\"binary-search-bounds\":175,\"gl-buffer\":165,\"gl-shader\":243,\"iota-array\":281,\"typedarray-pool\":554}],174:[function(t,e,r){\"use strict\";e.exports={fragment:\"precision lowp float;\\n#define GLSLIFY 1\\nvarying vec4 fragColor;\\nvoid main() {\\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\n}\\n\",vertex:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\nattribute vec4 color;\\nattribute vec2 weight;\\n\\nuniform vec2 shape;\\nuniform mat3 viewTransform;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\n fragColor = color;\\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\n}\\n\",pickFragment:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragId;\\nvarying vec2 vWeight;\\n\\nuniform vec2 shape;\\nuniform vec4 pickOffset;\\n\\nvoid main() {\\n vec2 d = step(.5, vWeight);\\n vec4 id = fragId + pickOffset;\\n id.x += d.x + d.y*shape.x;\\n\\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_FragColor = id/255.;\\n}\\n\",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\"}},{}],175:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],176:[function(t,e,r){var n=t(\"gl-shader\"),i=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, nextPosition;\\nattribute float arcLength, lineWidth;\\nattribute vec4 color;\\n\\nuniform vec2 screenShape;\\nuniform float pixelRatio;\\nuniform mat4 model, view, projection;\\n\\nvarying vec4 fragColor;\\nvarying vec3 worldPosition;\\nvarying float pixelArcLength;\\n\\nvoid main() {\\n vec4 projected = projection * view * model * vec4(position, 1.0);\\n vec4 tangentClip = projection * view * model * vec4(nextPosition - position, 0.0);\\n vec2 tangent = normalize(screenShape * tangentClip.xy);\\n vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(tangent.y, -tangent.x) / screenShape;\\n\\n gl_Position = vec4(projected.xy + projected.w * offset, projected.zw);\\n\\n worldPosition = position;\\n pixelArcLength = arcLength;\\n fragColor = color;\\n}\\n\",a=[{name:\"position\",type:\"vec3\"},{name:\"nextPosition\",type:\"vec3\"},{name:\"arcLength\",type:\"float\"},{name:\"lineWidth\",type:\"float\"},{name:\"color\",type:\"vec4\"}];r.createShader=function(t){return n(t,i,\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 clipBounds[2];\\nuniform sampler2D dashTexture;\\nuniform float dashScale;\\nuniform float opacity;\\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 float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\\n if(dashWeight < 0.5) {\\n discard;\\n }\\n gl_FragColor = fragColor * opacity;\\n}\\n\",null,a)},r.createPickShader=function(t){return n(t,i,\"precision mediump float;\\n#define GLSLIFY 1\\n\\n#define FLOAT_MAX 1.70141184e38\\n#define FLOAT_MIN 1.17549435e-38\\n\\nlowp vec4 encode_float_1_0(highp float v) {\\n highp float av = abs(v);\\n\\n //Handle special cases\\n if(av < FLOAT_MIN) {\\n return vec4(0.0, 0.0, 0.0, 0.0);\\n } else if(v > 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\":243}],177:[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}e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=p(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=m(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=s(e),a=l(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}]),u=h(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var d=c(e,u);d.wrap=e.REPEAT;var g=new o(e,r,n,i,a,d);return g.update(t),g};var s=t(\"gl-buffer\"),l=t(\"gl-vao\"),c=t(\"gl-texture2d\"),u=t(\"glsl-read-float\"),f=t(\"binary-search-bounds\"),h=t(\"ndarray\"),d=t(\"./lib/shaders\"),p=d.createShader,m=d.createPickShader,g=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],v=o.prototype;v.isTransparent=function(){return this.opacity<1},v.isOpaque=function(){return this.opacity>=1},v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.drawTransparent=v.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||g,view:t.view||g,projection:t.projection||g,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)},v.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||g,view:t.view||g,projection:t.projection||g,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},v.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=[],c=[],u=[],d=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e<a.length;++e){var v=a[e-1],y=a[e];for(c.push(d),u.push(v.slice()),r=0;r<3;++r){if(isNaN(v[r])||isNaN(y[r])||!isFinite(v[r])||!isFinite(y[r])){if(!i&&l.length>0){for(var x=0;x<24;++x)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 b,_;Array.isArray(o[0])?(b=o[e-1],_=o[e]):b=_=o,3===b.length&&(b=[b[0],b[1],b[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=d;if(d+=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,b[0],b[1],b[2],b[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,b[0],b[1],b[2],b[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,b[0],b[1],b[2],b[3],y[0],y[1],y[2],v[0],v[1],v[2],d,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],d,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),c.push(d),u.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=u,this.arcLength=c,\"dashes\"in t){var k=t.dashes.slice();for(k.unshift(0),e=1;e<k.length;++e)k[e]=k[e-1]+k[e];var A=h(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)A.set(e,0,r,0);1&f.le(k,k[k.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}}},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=u(t.value[0],t.value[1],t.value[2],0),r=f.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new a(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],o=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),s=1-o,l=[0,0,0],c=0;c<3;++c)l[c]=s*n[c]+o*i[c];var h=Math.min(o<.5?r:r+1,this.points.length-1);return new a(e,l,h,this.points[h])}},{\"./lib/shaders\":176,\"binary-search-bounds\":70,\"gl-buffer\":165,\"gl-texture2d\":255,\"gl-vao\":259,\"glsl-read-float\":266,ndarray:458}],178:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],179:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,d=c*a-o*l,p=r*f+n*h+i*d;return p?(p=1/p,t[0]=f*p,t[1]=(-u*n+i*c)*p,t[2]=(s*n-i*o)*p,t[3]=h*p,t[4]=(u*r-i*l)*p,t[5]=(-s*r+i*a)*p,t[6]=d*p,t[7]=(-c*r+n*l)*p,t[8]=(o*r-n*a)*p,t):null}},{}],180:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],181:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],182:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*o-r*a)*(f*g-h*m)-(e*s-n*a)*(u*g-h*p)+(e*l-i*a)*(u*m-f*p)+(r*s-n*o)*(c*g-h*d)-(r*l-i*o)*(c*m-f*d)+(n*l-i*s)*(c*p-u*d)}},{}],183:[function(t,e,r){e.exports=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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[1]=u+v,t[2]=h-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],184:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,d=i*l,p=i*c,m=a*c,g=o*s,v=o*l,y=o*c;return t[0]=1-(d+m),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(u+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],185:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],186:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(m*M-g*w+v*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*T-o*L-c*A)*C,t[5]=(r*L-i*T+a*A)*C,t[6]=(g*b-p*M-v*x)*C,t[7]=(u*M-h*b+d*x)*C,t[8]=(o*E-s*T+c*k)*C,t[9]=(n*T-r*E-a*k)*C,t[10]=(p*w-m*b+v*y)*C,t[11]=(f*b-u*w-d*y)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(m*x-p*_-g*y)*C,t[15]=(u*_-f*x+h*y)*C,t):null}},{}],187:[function(t,e,r){var n=t(\"./identity\");e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,d,p,m=e[0],g=e[1],v=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],M=r[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-M)<1e-6?n(t):(f=m-_,h=g-w,d=v-M,p=1/Math.sqrt(f*f+h*h+d*d),f*=p,h*=p,d*=p,a=x*d-b*h,o=b*f-y*d,s=y*h-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),l=h*s-d*o,c=d*a-f*s,u=f*o-h*a,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=d,t[11]=0,t[12]=-(a*m+o*g+s*v),t[13]=-(l*m+c*g+u*v),t[14]=-(f*m+h*g+d*v),t[15]=1,t)}},{\"./identity\":185}],188:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*m,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*c+_*d+w*v,t[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*m,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*c+_*d+w*v,t[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*m,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*c+_*d+w*v,t[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*m,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*c+_*d+w*v,t[15]=x*o+b*u+_*p+w*y,t}},{}],189:[function(t,e,r){e.exports=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}},{}],190:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,M,k,A,T,S,E=n[0],L=n[1],C=n[2],z=Math.sqrt(E*E+L*L+C*C);return Math.abs(z)<1e-6?null:(z=1/z,E*=z,L*=z,C*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=E*E*o+a,b=L*E*o+C*i,_=C*E*o-L*i,w=E*L*o-C*i,M=L*L*o+a,k=C*L*o+E*i,A=E*C*o+L*i,T=L*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+m*_,t[1]=l*x+h*b+g*_,t[2]=c*x+d*b+v*_,t[3]=u*x+p*b+y*_,t[4]=s*w+f*M+m*k,t[5]=l*w+h*M+g*k,t[6]=c*w+d*M+v*k,t[7]=u*w+p*M+y*k,t[8]=s*A+f*T+m*S,t[9]=l*A+h*T+g*S,t[10]=c*A+d*T+v*S,t[11]=u*A+p*T+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},{}],191:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],192:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],193:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],194:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],195:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,d,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*m+s*g+f*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=a*m+c*g+d*v+e[14],t[15]=o*m+u*g+p*v+e[15]),t}},{}],196:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],197:[function(t,e,r){\"use strict\";e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(\"currently supports matrices up to 4x4\")}return t};var n=t(\"gl-mat2/invert\"),i=t(\"gl-mat3/invert\"),a=t(\"gl-mat4/invert\")},{\"gl-mat2/invert\":178,\"gl-mat3/invert\":179,\"gl-mat4/invert\":186}],198:[function(t,e,r){r.glMatrix=t(\"./gl-matrix/common.js\"),r.mat2=t(\"./gl-matrix/mat2.js\"),r.mat2d=t(\"./gl-matrix/mat2d.js\"),r.mat3=t(\"./gl-matrix/mat3.js\"),r.mat4=t(\"./gl-matrix/mat4.js\"),r.quat=t(\"./gl-matrix/quat.js\"),r.vec2=t(\"./gl-matrix/vec2.js\"),r.vec3=t(\"./gl-matrix/vec3.js\"),r.vec4=t(\"./gl-matrix/vec4.js\")},{\"./gl-matrix/common.js\":199,\"./gl-matrix/mat2.js\":200,\"./gl-matrix/mat2d.js\":201,\"./gl-matrix/mat3.js\":202,\"./gl-matrix/mat4.js\":203,\"./gl-matrix/quat.js\":204,\"./gl-matrix/vec2.js\":205,\"./gl-matrix/vec3.js\":206,\"./gl-matrix/vec4.js\":207}],199:[function(t,e,r){var n={};n.EPSILON=1e-6,n.ARRAY_TYPE=\"undefined\"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random,n.ENABLE_SIMD=!1,n.SIMD_AVAILABLE=n.ARRAY_TYPE===Float32Array&&\"SIMD\"in this,n.USE_SIMD=n.ENABLE_SIMD&&n.SIMD_AVAILABLE,n.setMatrixArrayType=function(t){n.ARRAY_TYPE=t};var i=Math.PI/180;n.toRadian=function(t){return t*i},n.equals=function(t,e){return Math.abs(t-e)<=n.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))},e.exports=n},{}],200:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,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.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},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.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.transpose=function(t,e){if(t===e){var r=e[1];t[1]=e[2],t[2]=r}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null},i.adjoint=function(t,e){var r=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=r,t},i.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],c=r[2],u=r[3];return t[0]=n*s+a*l,t[1]=i*s+o*l,t[2]=n*c+a*u,t[3]=i*c+o*u,t},i.mul=i.multiply,i.rotate=function(t,e,r){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]=n*-s+a*l,t[3]=i*-s+o*l,t},i.scale=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t},i.str=function(t){return\"mat2(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},i.LDU=function(t,e,r,n){return t[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-t[2]*r[1],[t,e,r]},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.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(r-s)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-c)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(o-u)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},i.multiplyScalar=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.multiplyScalarAndAdd=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},e.exports=i},{\"./common.js\":199}],201:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},i.fromValues=function(t,e,r,i,a,o){var s=new n.ARRAY_TYPE(6);return s[0]=t,s[1]=e,s[2]=r,s[3]=i,s[4]=a,s[5]=o,s},i.set=function(t,e,r,n,i,a,o){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=r*a-n*i;return l?(l=1/l,t[0]=a*l,t[1]=-n*l,t[2]=-i*l,t[3]=r*l,t[4]=(i*s-a*o)*l,t[5]=(n*o-r*s)*l,t):null},i.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1],f=r[2],h=r[3],d=r[4],p=r[5];return t[0]=n*c+a*u,t[1]=i*c+o*u,t[2]=n*f+a*h,t[3]=i*f+o*h,t[4]=n*d+a*p+s,t[5]=i*d+o*p+l,t},i.mul=i.multiply,i.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=Math.sin(r),u=Math.cos(r);return t[0]=n*u+a*c,t[1]=i*u+o*c,t[2]=n*-c+a*u,t[3]=i*-c+o*u,t[4]=s,t[5]=l,t},i.scale=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n*c,t[1]=i*c,t[2]=a*u,t[3]=o*u,t[4]=s,t[5]=l,t},i.translate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=n*c+a*u+s,t[5]=i*c+o*u+l,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t[4]=0,t[5]=0,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},i.str=function(t){return\"mat2d(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},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[4]=e[4]+r[4],t[5]=e[5]+r[5],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=e[0],u=e[1],f=e[2],h=e[3],d=e[4],p=e[5];return Math.abs(r-c)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(i-u)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-f)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(o-h)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(s-d)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(l-p)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(p))},e.exports=i},{\"./common.js\":199}],202:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},i.clone=function(t){var e=new n.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromValues=function(t,e,r,i,a,o,s,l,c){var u=new n.ARRAY_TYPE(9);return u[0]=t,u[1]=e,u[2]=r,u[3]=i,u[4]=a,u[5]=o,u[6]=s,u[7]=l,u[8]=c,u},i.set=function(t,e,r,n,i,a,o,s,l,c){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.transpose=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,d=c*a-o*l,p=r*f+n*h+i*d;return p?(p=1/p,t[0]=f*p,t[1]=(-u*n+i*c)*p,t[2]=(s*n-i*o)*p,t[3]=h*p,t[4]=(u*r-i*l)*p,t[5]=(-s*r+i*a)*p,t[6]=d*p,t[7]=(-c*r+n*l)*p,t[8]=(o*r-n*a)*p,t):null},i.adjoint=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return t[0]=o*u-s*c,t[1]=i*c-n*u,t[2]=n*s-i*o,t[3]=s*l-a*u,t[4]=r*u-i*l,t[5]=i*a-r*s,t[6]=a*c-o*l,t[7]=n*l-r*c,t[8]=r*o-n*a,t},i.determinant=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8];return e*(c*a-o*l)+r*(-c*i+o*s)+n*(l*i-a*s)},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=r[0],d=r[1],p=r[2],m=r[3],g=r[4],v=r[5],y=r[6],x=r[7],b=r[8];return t[0]=h*n+d*o+p*c,t[1]=h*i+d*s+p*u,t[2]=h*a+d*l+p*f,t[3]=m*n+g*o+v*c,t[4]=m*i+g*s+v*u,t[5]=m*a+g*l+v*f,t[6]=y*n+x*o+b*c,t[7]=y*i+x*s+b*u,t[8]=y*a+x*l+b*f,t},i.mul=i.multiply,i.translate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=r[0],d=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=h*n+d*o+c,t[7]=h*i+d*s+u,t[8]=h*a+d*l+f,t},i.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=Math.sin(r),d=Math.cos(r);return t[0]=d*n+h*o,t[1]=d*i+h*s,t[2]=d*a+h*l,t[3]=d*o-h*n,t[4]=d*s-h*i,t[5]=d*l-h*a,t[6]=c,t[7]=u,t[8]=f,t},i.scale=function(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[3]=u-v,t[6]=h+g,t[1]=u+v,t[4]=1-c-p,t[7]=d-m,t[2]=h-g,t[5]=d+m,t[8]=1-c-f,t},i.normalFromMat4=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(l*T-o*L-c*A)*C,t[2]=(o*E-s*T+c*k)*C,t[3]=(i*E-n*L-a*S)*C,t[4]=(r*L-i*T+a*A)*C,t[5]=(n*T-r*E-a*k)*C,t[6]=(m*M-g*w+v*_)*C,t[7]=(g*b-p*M-v*x)*C,t[8]=(p*w-m*b+v*y)*C,t):null},i.str=function(t){return\"mat3(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\", \"+t[6]+\", \"+t[7]+\", \"+t[8]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},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[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],h=e[0],d=e[1],p=e[2],m=e[3],g=e[4],v=e[5],y=t[6],x=e[7],b=e[8];return Math.abs(r-h)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(i-d)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(a-p)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(o-m)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-g)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-v)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(c-y)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(u-x)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(f-b)<=n.EPSILON*Math.max(1,Math.abs(f),Math.abs(b))},e.exports=i},{\"./common.js\":199}],203:[function(t,e,r){var n=t(\"./common.js\"),i={scalar:{},SIMD:{}};i.create=function(){var t=new n.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.clone=function(t){var e=new n.ARRAY_TYPE(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.fromValues=function(t,e,r,i,a,o,s,l,c,u,f,h,d,p,m,g){var v=new n.ARRAY_TYPE(16);return v[0]=t,v[1]=e,v[2]=r,v[3]=i,v[4]=a,v[5]=o,v[6]=s,v[7]=l,v[8]=c,v[9]=u,v[10]=f,v[11]=h,v[12]=d,v[13]=p,v[14]=m,v[15]=g,v},i.set=function(t,e,r,n,i,a,o,s,l,c,u,f,h,d,p,m,g){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=m,t[15]=g,t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.scalar.transpose=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},i.SIMD.transpose=function(t,e){var r,n,i,a,o,s,l,c,u,f;return r=SIMD.Float32x4.load(e,0),n=SIMD.Float32x4.load(e,4),i=SIMD.Float32x4.load(e,8),a=SIMD.Float32x4.load(e,12),o=SIMD.Float32x4.shuffle(r,n,0,1,4,5),s=SIMD.Float32x4.shuffle(i,a,0,1,4,5),l=SIMD.Float32x4.shuffle(o,s,0,2,4,6),c=SIMD.Float32x4.shuffle(o,s,1,3,5,7),SIMD.Float32x4.store(t,0,l),SIMD.Float32x4.store(t,4,c),o=SIMD.Float32x4.shuffle(r,n,2,3,6,7),s=SIMD.Float32x4.shuffle(i,a,2,3,6,7),u=SIMD.Float32x4.shuffle(o,s,0,2,4,6),f=SIMD.Float32x4.shuffle(o,s,1,3,5,7),SIMD.Float32x4.store(t,8,u),SIMD.Float32x4.store(t,12,f),t},i.transpose=n.USE_SIMD?i.SIMD.transpose:i.scalar.transpose,i.scalar.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(m*M-g*w+v*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*T-o*L-c*A)*C,t[5]=(r*L-i*T+a*A)*C,t[6]=(g*b-p*M-v*x)*C,t[7]=(u*M-h*b+d*x)*C,t[8]=(o*E-s*T+c*k)*C,t[9]=(n*T-r*E-a*k)*C,t[10]=(p*w-m*b+v*y)*C,t[11]=(f*b-u*w-d*y)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(m*x-p*_-g*y)*C,t[15]=(u*_-f*x+h*y)*C,t):null},i.SIMD.invert=function(t,e){var r,n,i,a,o,s,l,c,u,f,h=SIMD.Float32x4.load(e,0),d=SIMD.Float32x4.load(e,4),p=SIMD.Float32x4.load(e,8),m=SIMD.Float32x4.load(e,12);return o=SIMD.Float32x4.shuffle(h,d,0,1,4,5),n=SIMD.Float32x4.shuffle(p,m,0,1,4,5),r=SIMD.Float32x4.shuffle(o,n,0,2,4,6),n=SIMD.Float32x4.shuffle(n,o,1,3,5,7),o=SIMD.Float32x4.shuffle(h,d,2,3,6,7),a=SIMD.Float32x4.shuffle(p,m,2,3,6,7),i=SIMD.Float32x4.shuffle(o,a,0,2,4,6),a=SIMD.Float32x4.shuffle(a,o,1,3,5,7),o=SIMD.Float32x4.mul(i,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.mul(n,o),l=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,o),s),l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),o=SIMD.Float32x4.mul(n,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),s),u=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),u),u=SIMD.Float32x4.swizzle(u,2,3,0,1),o=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(n,2,3,0,1),a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),i=SIMD.Float32x4.swizzle(i,2,3,0,1),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),s),c=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),c),c=SIMD.Float32x4.swizzle(c,2,3,0,1),o=SIMD.Float32x4.mul(r,n),o=SIMD.Float32x4.swizzle(o,1,0,3,2),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(i,o),u),o=SIMD.Float32x4.swizzle(o,2,3,0,1),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(i,o)),o=SIMD.Float32x4.mul(r,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),c),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),l),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.mul(r,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),l),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),u),f=SIMD.Float32x4.mul(r,s),f=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(f,2,3,0,1),f),f=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(f,1,0,3,2),f),o=SIMD.Float32x4.reciprocalApproximation(f),f=SIMD.Float32x4.sub(SIMD.Float32x4.add(o,o),SIMD.Float32x4.mul(f,SIMD.Float32x4.mul(o,o))),(f=SIMD.Float32x4.swizzle(f,0,0,0,0))?(SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(f,s)),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(f,l)),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(f,c)),SIMD.Float32x4.store(t,12,SIMD.Float32x4.mul(f,u)),t):null},i.invert=n.USE_SIMD?i.SIMD.invert:i.scalar.invert,i.scalar.adjoint=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-d*g)-f*(l*v-c*g)+m*(l*d-c*h),t[1]=-(n*(h*v-d*g)-f*(i*v-a*g)+m*(i*d-a*h)),t[2]=n*(l*v-c*g)-s*(i*v-a*g)+m*(i*c-a*l),t[3]=-(n*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*v-d*g)-u*(l*v-c*g)+p*(l*d-c*h)),t[5]=r*(h*v-d*g)-u*(i*v-a*g)+p*(i*d-a*h),t[6]=-(r*(l*v-c*g)-o*(i*v-a*g)+p*(i*c-a*l)),t[7]=r*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*v-d*m)-u*(s*v-c*m)+p*(s*d-c*f),t[9]=-(r*(f*v-d*m)-u*(n*v-a*m)+p*(n*d-a*f)),t[10]=r*(s*v-c*m)-o*(n*v-a*m)+p*(n*c-a*s),t[11]=-(r*(s*d-c*f)-o*(n*d-a*f)+u*(n*c-a*s)),t[12]=-(o*(f*g-h*m)-u*(s*g-l*m)+p*(s*h-l*f)),t[13]=r*(f*g-h*m)-u*(n*g-i*m)+p*(n*h-i*f),t[14]=-(r*(s*g-l*m)-o*(n*g-i*m)+p*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+u*(n*l-i*s),t},i.SIMD.adjoint=function(t,e){var r,n,i,a,o,s,l,c,u,f=SIMD.Float32x4.load(e,0),h=SIMD.Float32x4.load(e,4),d=SIMD.Float32x4.load(e,8),p=SIMD.Float32x4.load(e,12);return o=SIMD.Float32x4.shuffle(f,h,0,1,4,5),n=SIMD.Float32x4.shuffle(d,p,0,1,4,5),r=SIMD.Float32x4.shuffle(o,n,0,2,4,6),n=SIMD.Float32x4.shuffle(n,o,1,3,5,7),o=SIMD.Float32x4.shuffle(f,h,2,3,6,7),a=SIMD.Float32x4.shuffle(d,p,2,3,6,7),i=SIMD.Float32x4.shuffle(o,a,0,2,4,6),a=SIMD.Float32x4.shuffle(a,o,1,3,5,7),o=SIMD.Float32x4.mul(i,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.mul(n,o),l=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,o),s),l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),o=SIMD.Float32x4.mul(n,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),s),u=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),u),u=SIMD.Float32x4.swizzle(u,2,3,0,1),o=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(n,2,3,0,1),a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),i=SIMD.Float32x4.swizzle(i,2,3,0,1),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),s),c=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),c),c=SIMD.Float32x4.swizzle(c,2,3,0,1),o=SIMD.Float32x4.mul(r,n),o=SIMD.Float32x4.swizzle(o,1,0,3,2),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(i,o),u),o=SIMD.Float32x4.swizzle(o,2,3,0,1),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(i,o)),o=SIMD.Float32x4.mul(r,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),c),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),l),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.mul(r,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),l),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),u),SIMD.Float32x4.store(t,0,s),SIMD.Float32x4.store(t,4,l),SIMD.Float32x4.store(t,8,c),SIMD.Float32x4.store(t,12,u),t},i.adjoint=n.USE_SIMD?i.SIMD.adjoint:i.scalar.adjoint,i.determinant=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*o-r*a)*(f*g-h*m)-(e*s-n*a)*(u*g-h*p)+(e*l-i*a)*(u*m-f*p)+(r*s-n*o)*(c*g-h*d)-(r*l-i*o)*(c*m-f*d)+(n*l-i*s)*(c*p-u*d)},i.SIMD.multiply=function(t,e,r){var n=SIMD.Float32x4.load(e,0),i=SIMD.Float32x4.load(e,4),a=SIMD.Float32x4.load(e,8),o=SIMD.Float32x4.load(e,12),s=SIMD.Float32x4.load(r,0),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,3,3,3,3),o))));SIMD.Float32x4.store(t,0,l);var c=SIMD.Float32x4.load(r,4),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,3,3,3,3),o))));SIMD.Float32x4.store(t,4,u);var f=SIMD.Float32x4.load(r,8),h=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,3,3,3,3),o))));SIMD.Float32x4.store(t,8,h);var d=SIMD.Float32x4.load(r,12),p=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,3,3,3,3),o))));return SIMD.Float32x4.store(t,12,p),t},i.scalar.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*m,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*c+_*d+w*v,t[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*m,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*c+_*d+w*v,t[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*m,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*c+_*d+w*v,t[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*m,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*c+_*d+w*v,t[15]=x*o+b*u+_*p+w*y,t},i.multiply=n.USE_SIMD?i.SIMD.multiply:i.scalar.multiply,i.mul=i.multiply,i.scalar.translate=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,d,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*m+s*g+f*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=a*m+c*g+d*v+e[14],t[15]=o*m+u*g+p*v+e[15]),t},i.SIMD.translate=function(t,e,r){var n=SIMD.Float32x4.load(e,0),i=SIMD.Float32x4.load(e,4),a=SIMD.Float32x4.load(e,8),o=SIMD.Float32x4.load(e,12),s=SIMD.Float32x4(r[0],r[1],r[2],0);e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11]),n=SIMD.Float32x4.mul(n,SIMD.Float32x4.swizzle(s,0,0,0,0)),i=SIMD.Float32x4.mul(i,SIMD.Float32x4.swizzle(s,1,1,1,1)),a=SIMD.Float32x4.mul(a,SIMD.Float32x4.swizzle(s,2,2,2,2));var l=SIMD.Float32x4.add(n,SIMD.Float32x4.add(i,SIMD.Float32x4.add(a,o)));return SIMD.Float32x4.store(t,12,l),t},i.translate=n.USE_SIMD?i.SIMD.translate:i.scalar.translate,i.scalar.scale=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.SIMD.scale=function(t,e,r){var n,i,a,o=SIMD.Float32x4(r[0],r[1],r[2],0);return n=SIMD.Float32x4.load(e,0),SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(n,SIMD.Float32x4.swizzle(o,0,0,0,0))),i=SIMD.Float32x4.load(e,4),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(i,SIMD.Float32x4.swizzle(o,1,1,1,1))),a=SIMD.Float32x4.load(e,8),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(a,SIMD.Float32x4.swizzle(o,2,2,2,2))),t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.scale=n.USE_SIMD?i.SIMD.scale:i.scalar.scale,i.rotate=function(t,e,r,i){var a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,M,k,A,T,S,E,L=i[0],C=i[1],z=i[2],D=Math.sqrt(L*L+C*C+z*z);return Math.abs(D)<n.EPSILON?null:(D=1/D,L*=D,C*=D,z*=D,a=Math.sin(r),o=Math.cos(r),s=1-o,l=e[0],c=e[1],u=e[2],f=e[3],h=e[4],d=e[5],p=e[6],m=e[7],g=e[8],v=e[9],y=e[10],x=e[11],b=L*L*s+o,_=C*L*s+z*a,w=z*L*s-C*a,M=L*C*s-z*a,k=C*C*s+o,A=z*C*s+L*a,T=L*z*s+C*a,S=C*z*s-L*a,E=z*z*s+o,t[0]=l*b+h*_+g*w,t[1]=c*b+d*_+v*w,t[2]=u*b+p*_+y*w,t[3]=f*b+m*_+x*w,t[4]=l*M+h*k+g*A,t[5]=c*M+d*k+v*A,t[6]=u*M+p*k+y*A,t[7]=f*M+m*k+x*A,t[8]=l*T+h*S+g*E,t[9]=c*T+d*S+v*E,t[10]=u*T+p*S+y*E,t[11]=f*T+m*S+x*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},i.scalar.rotateX=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},i.SIMD.rotateX=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,4),o=SIMD.Float32x4.load(e,8);return SIMD.Float32x4.store(t,4,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,8,SIMD.Float32x4.sub(SIMD.Float32x4.mul(o,i),SIMD.Float32x4.mul(a,n))),t},i.rotateX=n.USE_SIMD?i.SIMD.rotateX:i.scalar.rotateX,i.scalar.rotateY=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t},i.SIMD.rotateY=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,0),o=SIMD.Float32x4.load(e,8);return SIMD.Float32x4.store(t,0,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,8,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,n),SIMD.Float32x4.mul(o,i))),t},i.rotateY=n.USE_SIMD?i.SIMD.rotateY:i.scalar.rotateY,i.scalar.rotateZ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},i.SIMD.rotateZ=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,0),o=SIMD.Float32x4.load(e,4);return SIMD.Float32x4.store(t,0,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,4,SIMD.Float32x4.sub(SIMD.Float32x4.mul(o,i),SIMD.Float32x4.mul(a,n))),t},i.rotateZ=n.USE_SIMD?i.SIMD.rotateZ:i.scalar.rotateZ,i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromRotation=function(t,e,r){var i,a,o,s=r[0],l=r[1],c=r[2],u=Math.sqrt(s*s+l*l+c*c);return Math.abs(u)<n.EPSILON?null:(u=1/u,s*=u,l*=u,c*=u,i=Math.sin(e),a=Math.cos(e),o=1-a,t[0]=s*s*o+a,t[1]=l*s*o+c*i,t[2]=c*s*o-l*i,t[3]=0,t[4]=s*l*o-c*i,t[5]=l*l*o+a,t[6]=c*l*o+s*i,t[7]=0,t[8]=s*c*o+l*i,t[9]=l*c*o-s*i,t[10]=c*c*o+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},i.fromXRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromYRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromZRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromRotationTranslation=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,d=i*l,p=i*c,m=a*c,g=o*s,v=o*l,y=o*c;return t[0]=1-(d+m),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(u+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.getTranslation=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},i.getRotation=function(t,e){var r=e[0]+e[5]+e[10],n=0;return r>0?(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,c=a+a,u=o+o,f=i*l,h=i*c,d=i*u,p=a*c,m=a*u,g=o*u,v=s*l,y=s*c,x=s*u,b=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*b,t[1]=(h+x)*b,t[2]=(d-y)*b,t[3]=0,t[4]=(h-x)*_,t[5]=(1-(f+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(f+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],c=a+a,u=o+o,f=s+s,h=a*c,d=a*u,p=a*f,m=o*u,g=o*f,v=s*f,y=l*c,x=l*u,b=l*f,_=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+b)*_,t[2]=(p-x)*_,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(h+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+x)*M,t[9]=(g-y)*M,t[10]=(1-(h+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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[1]=u+v,t[2]=h-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-c-f,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),c=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)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,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),c=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*c*.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),c=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*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,c,u,f,h,d,p,m,g=e[0],v=e[1],y=e[2],x=a[0],b=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w)<n.EPSILON&&Math.abs(v-M)<n.EPSILON&&Math.abs(y-k)<n.EPSILON?i.identity(t):(h=g-w,d=v-M,p=y-k,m=1/Math.sqrt(h*h+d*d+p*p),h*=m,d*=m,p*=m,o=b*p-_*d,s=_*h-x*p,l=x*d-b*h,(m=Math.sqrt(o*o+s*s+l*l))?(o*=m=1/m,s*=m,l*=m):(o=0,s=0,l=0),c=d*l-p*s,u=p*o-h*l,f=h*s-d*o,(m=Math.sqrt(c*c+u*u+f*f))?(c*=m=1/m,u*=m,f*=m):(c=0,u=0,f=0),t[0]=o,t[1]=c,t[2]=h,t[3]=0,t[4]=s,t[5]=u,t[6]=d,t[7]=0,t[8]=l,t[9]=f,t[10]=p,t[11]=0,t[12]=-(o*g+s*v+l*y),t[13]=-(c*g+u*v+f*y),t[14]=-(h*g+d*v+p*y),t[15]=1,t)},i.str=function(t){return\"mat4(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\", \"+t[6]+\", \"+t[7]+\", \"+t[8]+\", \"+t[9]+\", \"+t[10]+\", \"+t[11]+\", \"+t[12]+\", \"+t[13]+\", \"+t[14]+\", \"+t[15]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},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[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],h=t[9],d=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=e[0],b=e[1],_=e[2],w=e[3],M=e[4],k=e[5],A=e[6],T=e[7],S=e[8],E=e[9],L=e[10],C=e[11],z=e[12],D=e[13],I=e[14],P=e[15];return Math.abs(r-x)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-b)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-_)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-w)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-M)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-k)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-A)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(u-T)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(f-S)<=n.EPSILON*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=n.EPSILON*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-L)<=n.EPSILON*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(p-C)<=n.EPSILON*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(m-z)<=n.EPSILON*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(g-D)<=n.EPSILON*Math.max(1,Math.abs(g),Math.abs(D))&&Math.abs(v-I)<=n.EPSILON*Math.max(1,Math.abs(v),Math.abs(I))&&Math.abs(y-P)<=n.EPSILON*Math.max(1,Math.abs(y),Math.abs(P))},e.exports=i},{\"./common.js\":199}],204:[function(t,e,r){var n=t(\"./common.js\"),i=t(\"./mat3.js\"),a=t(\"./vec3.js\"),o=t(\"./vec4.js\"),s={};s.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.rotationTo=function(){var t=a.create(),e=a.fromValues(1,0,0),r=a.fromValues(0,1,0);return function(n,i,o){var l=a.dot(i,o);return l<-.999999?(a.cross(t,e,i),a.length(t)<1e-6&&a.cross(t,r,i),a.normalize(t,t),s.setAxisAngle(n,t,Math.PI),n):l>.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],c=r[2],u=r[3];return t[0]=n*u+o*s+i*c-a*l,t[1]=i*u+o*l+a*s-n*c,t[2]=a*u+o*c+n*l-i*s,t[3]=o*u-n*s-i*l-a*c,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,c=e[0],u=e[1],f=e[2],h=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(a=c*d+u*p+f*m+h*g)<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*c+l*d,t[1]=s*u+l*p,t[2]=s*f+l*m,t[3]=s*h+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\":199,\"./mat3.js\":202,\"./vec3.js\":206,\"./vec4.js\":207}],205:[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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}(),i.str=function(t){return\"vec2(\"+t[0]+\", \"+t[1]+\")\"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},i.equals=function(t,e){var r=t[0],i=t[1],a=e[0],o=e[1];return Math.abs(r-a)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-o)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))},e.exports=i},{\"./common.js\":199}],206:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},i.fromValues=function(t,e,r){var i=new n.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=r,i},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},i.set=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,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},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},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},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},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},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},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},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},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},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*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},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)},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];return r*r+n*n+i*i},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(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,c=o*(a-1),u=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*c+i[0]*u,t[1]=e[1]*s+r[1]*l+n[1]*c+i[1]*u,t[2]=e[2]*s+r[2]*l+n[2]*c+i[2]*u,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,c=s*o,u=3*a*s,f=3*l*o,h=l*a;return t[0]=e[0]*c+r[0]*u+n[0]*f+i[0]*h,t[1]=e[1]*c+r[1]*u+n[1]*f+i[1]*h,t[2]=e[2]*c+r[2]*u+n[2]*f+i[2]*h,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],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=u*c+d*-o+f*-l-h*-s,t[1]=f*c+d*-s+h*-o-u*-l,t[2]=h*c+d*-l+u*-s-f*-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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}(),i.angle=function(t,e){var r=i.fromValues(t[0],t[1],t[2]),n=i.fromValues(e[0],e[1],e[2]);i.normalize(r,r),i.normalize(n,n);var a=i.dot(r,n);return a>1?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\":199}],207:[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],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=u*c+d*-o+f*-l-h*-s,t[1]=f*c+d*-s+h*-o-u*-l,t[2]=h*c+d*-l+u*-s-f*-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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}(),i.str=function(t){return\"vec4(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\")\"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(r-s)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-c)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(o-u)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},e.exports=i},{\"./common.js\":199}],208:[function(t,e,r){\"use strict\";function n(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function i(t,e,r,i,a){for(var o=n(i,n(r,n(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*a[0]*(1+o[0]),.5*a[1]*(1-o[1])]}var a=t(\"barycentric\"),o=t(\"polytope-closest-point/lib/closest_point_2d.js\");e.exports=function(t,e,r,n,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u<t.length;++u)c[u]=i(t[u],r,n,s,l);var f=0,h=1/0;for(u=0;u<c.length;++u){for(var d=0,p=0;p<2;++p)d+=Math.pow(c[u][p]-e[p],2);d<h&&(h=d,f=u)}var m=function(t,e){if(2===t.length){for(var r=0,n=0,i=0;i<2;++i)r+=Math.pow(e[i]-t[0][i],2),n+=Math.pow(e[i]-t[1][i],2);return r=Math.sqrt(r),n=Math.sqrt(n),r+n<1e-6?[1,0]:[n/(r+n),r/(n+r)]}if(3===t.length){var s=[0,0];return o(t[0],t[1],t[2],e,s),a(t,s)}return[]}(c,e),g=0;for(u=0;u<3;++u){if(m[u]<-.001||m[u]>1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[f,function(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}(t,m),m]}},{barycentric:53,\"polytope-closest-point/lib/closest_point_2d.js\":487}],209:[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\"}]}},{}],210:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,k,A,T,S){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=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,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=x,this.pointColors=_,this.pointUVs=w,this.pointSizes=k,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,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=M,this._view=M,this._projection=M,this._resolution=[1,1]}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"gl-vao\"),s=t(\"gl-texture2d\"),l=t(\"normals\"),c=t(\"gl-mat4/multiply\"),u=t(\"gl-mat4/invert\"),f=t(\"ndarray\"),h=t(\"colormap\"),d=t(\"simplicial-complex-contour\"),p=t(\"typedarray-pool\"),m=t(\"./lib/shaders\"),g=t(\"./lib/closest-point\"),v=m.meshShader,y=m.wireShader,x=m.pointShader,b=m.pickShader,_=m.pointPickShader,w=m.contourShader,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=n.prototype;k.isOpaque=function(){return this.opacity>=1},k.isTransparent=function(){return this.opacity<1},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(t&&this.contourEnable){for(var e=d(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var h=n[f][0],m=n[f][1],g=i[f],v=1-g,y=this.positions[h],x=this.positions[m],b=0;b<3;++b)o[s++]=g*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},k.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\"contourEnable\"in t&&(this.contourEnable=t.contourEnable),\"contourColor\"in t&&(this.contourColor=t.contourColor),\"lineWidth\"in t&&(this.lineWidth=t.lineWidth),\"lightPosition\"in t&&(this.lightPosition=t.lightPosition),\"opacity\"in t&&(this.opacity=t.opacity),\"ambient\"in t&&(this.ambientLight=t.ambient),\"diffuse\"in t&&(this.diffuseLight=t.diffuse),\"specular\"in t&&(this.specularLight=t.specular),\"roughness\"in t&&(this.roughness=t.roughness),\"fresnel\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=s(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=h({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 f(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],o=[],c=[],u=[],d=[],p=[],m=[],g=[],v=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,M=t.cellNormals,k=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!M&&(M=l.faceNormals(r,n,A)),M||w||(w=l.vertexNormals(r,n,k));var T=t.vertexColors,S=t.cellColors,E=t.meshColor||[1,1,1,1],L=t.vertexUVs,C=t.vertexIntensity,z=t.cellUVs,D=t.cellIntensity,I=1/0,P=-1/0;if(!L&&!z)if(C)if(t.vertexIntensityBounds)I=+t.vertexIntensityBounds[0],P=+t.vertexIntensityBounds[1];else for(var O=0;O<C.length;++O){var F=C[O];I=Math.min(I,F),P=Math.max(P,F)}else if(D)for(O=0;O<D.length;++O){F=D[O];I=Math.min(I,F),P=Math.max(P,F)}else for(O=0;O<n.length;++O){F=n[O][2];I=Math.min(I,F),P=Math.max(P,F)}this.intensity=C||(D?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,D):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var R=t.pointSizes,N=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(O=0;O<n.length;++O)for(var j=n[O],B=0;B<3;++B)!isNaN(j[B])&&isFinite(j[B])&&(this.bounds[0][B]=Math.min(this.bounds[0][B],j[B]),this.bounds[1][B]=Math.max(this.bounds[1][B],j[B]));var U=0,V=0,q=0;t:for(O=0;O<r.length;++O){var H=r[O];switch(H.length){case 1:for(j=n[Y=H[0]],B=0;B<3;++B)if(isNaN(j[B])||!isFinite(j[B]))continue t;v.push(j[0],j[1],j[2]);3===(W=T?T[Y]:S?S[O]:E).length?y.push(W[0],W[1],W[2],1):y.push(W[0],W[1],W[2],W[3]);X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],x.push(X[0],X[1]),R?b.push(R[Y]):b.push(N),_.push(O),q+=1;break;case 2:for(B=0;B<2;++B){j=n[Y=H[B]];for(var G=0;G<3;++G)if(isNaN(j[G])||!isFinite(j[G]))continue t}for(B=0;B<2;++B){j=n[Y=H[B]];d.push(j[0],j[1],j[2]);3===(W=T?T[Y]:S?S[O]:E).length?p.push(W[0],W[1],W[2],1):p.push(W[0],W[1],W[2],W[3]);X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],m.push(X[0],X[1]),g.push(O)}V+=1;break;case 3:for(B=0;B<3;++B)for(j=n[Y=H[B]],G=0;G<3;++G)if(isNaN(j[G])||!isFinite(j[G]))continue t;for(B=0;B<3;++B){var Y;j=n[Y=H[B]];i.push(j[0],j[1],j[2]);var W;3===(W=T?T[Y]:S?S[O]:E).length?a.push(W[0],W[1],W[2],1):a.push(W[0],W[1],W[2],W[3]);var X;X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],c.push(X[0],X[1]);var Z;Z=w?w[Y]:M[O],o.push(Z[0],Z[1],Z[2]),u.push(O)}U+=1}}this.pointCount=q,this.edgeCount=V,this.triangleCount=U,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(d),this.edgeColors.update(p),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(g)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(o),this.triangleIds.update(new Uint32Array(u))}},k.drawTransparent=k.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||M,n=t.view||M,i=t.projection||M,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]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var l=new Array(16);c(l,s.view,s.model),c(l,s.projection,l),u(l,l);for(o=0;o<3;++o)s.eyePosition[o]=l[12+o]/l[15];var f=l[15];for(o=0;o<3;++o)f+=this.lightPosition[o]*l[4*o+3];for(o=0;o<3;++o){for(var h=l[12+o],d=0;d<3;++d)h+=l[4*d+o]*this.lightPosition[d];s.lightPosition[o]=h/f}if(this.triangleCount>0){(p=this.triShader).bind(),p.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){(p=this.lineShader).bind(),p.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){(p=this.pointShader).bind(),p.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 p;(p=this.contourShader).bind(),p.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||M,n=t.view||M,i=t.projection||M,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};if((l=this.pickShader).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;(l=this.pointPickShader).bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},k.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;a<r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a<r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},k.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=function(t){var e=i(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),l=function(t){var e=i(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),c=function(t){var e=i(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}(t),u=function(t){var e=i(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}(t),h=function(t){var e=i(t,_.vertex,_.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}(t),d=function(t){var e=i(t,w.vertex,w.fragment);return e.attributes.position.location=0,e}(t),p=s(t,f(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var m=a(t),g=a(t),M=a(t),k=a(t),A=a(t),T=o(t,[{buffer:m,type:t.FLOAT,size:3},{buffer:A,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:M,type:t.FLOAT,size:2},{buffer:k,type:t.FLOAT,size:3}]),S=a(t),E=a(t),L=a(t),C=a(t),z=o(t,[{buffer:S,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:E,type:t.FLOAT,size:4},{buffer:L,type:t.FLOAT,size:2}]),D=a(t),I=a(t),P=a(t),O=a(t),F=a(t),R=o(t,[{buffer:D,type:t.FLOAT,size:3},{buffer:F,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:t.FLOAT,size:4},{buffer:P,type:t.FLOAT,size:2},{buffer:O,type:t.FLOAT,size:1}]),N=a(t),j=new n(t,p,r,l,c,u,h,d,m,A,g,M,k,T,S,C,E,L,z,D,F,I,P,O,R,N,o(t,[{buffer:N,type:t.FLOAT,size:3}]));return j.update(e),j}},{\"./lib/closest-point\":208,\"./lib/shaders\":209,colormap:105,\"gl-buffer\":165,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"gl-shader\":243,\"gl-texture2d\":255,\"gl-vao\":259,ndarray:458,normals:461,\"simplicial-complex-contour\":524,\"typedarray-pool\":554}],211:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r}e.exports=function(t){var e=t.gl;return new n(t,i(e,[0,0,0,1,1,0,1,1]),a(e,o.boxVert,o.lineFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"./shaders\"),s=n.prototype;s.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},s.drawBox=function(){var t=[0,0],e=[0,0];return function(r,n,i,a,o){var s=this.plot,l=this.shader,c=s.gl;t[0]=r,t[1]=n,e[0]=i,e[1]=a,l.uniforms.lo=t,l.uniforms.hi=e,l.uniforms.color=o,c.drawArrays(c.TRIANGLE_STRIP,0,4)}}(),s.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"gl-buffer\":165,\"gl-shader\":217}],212:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function i(t,e){return t-e}e.exports=function(t){var e=t.gl;return new n(t,a(e),o(e,l.gridVert,l.gridFrag),o(e,l.tickVert,l.gridFrag))};var a=t(\"gl-buffer\"),o=t(\"gl-shader\"),s=t(\"binary-search-bounds\"),l=t(\"./shaders\"),c=n.prototype;c.draw=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){for(var n=this.plot,i=this.vbo,a=this.shader,o=this.ticks,s=n.gl,l=n._tickBounds,c=n.dataBox,u=n.viewBox,f=n.gridLineWidth,h=n.gridLineColor,d=n.gridLineEnable,p=n.pixelRatio,m=0;m<2;++m){var g=l[m],v=l[m+2]-g,y=.5*(c[m+2]+c[m]),x=c[m+2]-c[m];e[m]=2*v/x,t[m]=2*(g-y)/x}a.bind(),i.bind(),a.attributes.dataCoord.pointer(),a.uniforms.dataShift=t,a.uniforms.dataScale=e;var b=0;for(m=0;m<2;++m){r[0]=r[1]=0,r[m]=1,a.uniforms.dataAxis=r,a.uniforms.lineWidth=f[m]/(u[m+2]-u[m])*p,a.uniforms.color=h[m];var _=6*o[m].length;d[m]&&_&&s.drawArrays(s.TRIANGLES,b,_),b+=_}}}(),c.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],a=[0,0],o=[0,0];return function(){for(var l=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=l.gl,d=l._tickBounds,p=l.dataBox,m=l.viewBox,g=l.pixelRatio,v=l.screenBox,y=v[2]-v[0],x=v[3]-v[1],b=m[2]-m[0],_=m[3]-m[1],w=0;w<2;++w){var M=d[w],k=d[w+2]-M,A=.5*(p[w+2]+p[w]),T=p[w+2]-p[w];e[w]=2*k/T,t[w]=2*(M-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var E=l.tickMarkLength,L=l.tickMarkWidth,C=l.tickMarkColor,z=6*f[0].length,D=Math.min(s.ge(f[0],(p[0]-d[0])/(d[2]-d[0]),i),f[0].length),I=Math.min(s.gt(f[0],(p[2]-d[0])/(d[2]-d[0]),i),f[0].length),P=0+6*D,O=6*Math.max(0,I-D),F=Math.min(s.ge(f[1],(p[1]-d[1])/(d[3]-d[1]),i),f[1].length),R=Math.min(s.gt(f[1],(p[3]-d[1])/(d[3]-d[1]),i),f[1].length),N=z+6*F,j=6*Math.max(0,R-F);a[0]=2*(m[0]-E[1])/y-1,a[1]=(m[3]+m[1])/x-1,o[0]=E[1]*g/y,o[1]=L[1]*g/x,j&&(S.color=C[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,h.drawArrays(h.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[1]-E[0])/x-1,o[0]=L[0]*g/y,o[1]=E[0]*g/x,O&&(S.color=C[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,h.drawArrays(h.TRIANGLES,P,O)),a[0]=2*(m[2]+E[3])/y-1,a[1]=(m[3]+m[1])/x-1,o[0]=E[3]*g/y,o[1]=L[3]*g/x,j&&(S.color=C[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,h.drawArrays(h.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[3]+E[2])/x-1,o[0]=L[2]*g/y,o[1]=E[2]*g/x,O&&(S.color=C[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,h.drawArrays(h.TRIANGLES,P,O))}}(),c.update=function(){var t=[1,1,-1,-1,1,-1],e=[1,-1,1,1,-1,-1];return function(r){for(var n=r.ticks,i=r.bounds,a=new Float32Array(18*(n[0].length+n[1].length)),o=(this.plot.zeroLineEnable,0),s=[[],[]],l=0;l<2;++l)for(var c=s[l],u=n[l],f=i[l],h=i[l+2],d=0;d<u.length;++d){var p=(u[d].x-f)/(h-f);c.push(p);for(var m=0;m<6;++m)a[o++]=p,a[o++]=t[m],a[o++]=e[m]}this.ticks=s,this.vbo.update(a)}}(),c.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{\"./shaders\":214,\"binary-search-bounds\":216,\"gl-buffer\":165,\"gl-shader\":217}],213:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r}e.exports=function(t){var e=t.gl;return new n(t,i(e,[-1,-1,-1,1,1,-1,1,1]),a(e,o.lineVert,o.lineFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"./shaders\"),s=n.prototype;s.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},s.drawLine=function(){var t=[0,0],e=[0,0];return function(r,n,i,a,o,s){var l=this.plot,c=this.shader,u=l.gl;t[0]=r,t[1]=n,e[0]=i,e[1]=a,c.uniforms.start=t,c.uniforms.end=e,c.uniforms.width=o*l.pixelRatio,c.uniforms.color=s,u.drawArrays(u.TRIANGLE_STRIP,0,4)}}(),s.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"gl-buffer\":165,\"gl-shader\":217}],214:[function(t,e,r){\"use strict\";var n=\"precision lowp float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = vec4(color.xyz * color.w, color.w);\\n}\\n\";e.exports={lineVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 start, end;\\nuniform float width;\\n\\nvec2 perp(vec2 v) {\\n return vec2(v.y, -v.x);\\n}\\n\\nvec2 screen(vec2 v) {\\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n vec2 delta = normalize(perp(start - end));\\n vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\\n gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\\n}\\n\",lineFrag:n,textVert:\"#define GLSLIFY 1\\nattribute vec3 textCoordinate;\\n\\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\\nuniform float angle;\\n\\nvoid main() {\\n float dataOffset = textCoordinate.z;\\n vec2 glyphOffset = textCoordinate.xy;\\n mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\\n vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\\n glyphMatrix * glyphOffset * textScale + screenOffset;\\n gl_Position = vec4(screenCoordinate, 0, 1);\\n}\\n\",textFrag:n,gridVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 dataCoord;\\n\\nuniform vec2 dataAxis, dataShift, dataScale;\\nuniform float lineWidth;\\n\\nvoid main() {\\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\n pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\\n gl_Position = vec4(pos, 0, 1);\\n}\\n\",gridFrag:n,boxVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 lo, hi;\\n\\nvec2 screen(vec2 v) {\\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\\n}\\n\",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\"}},{}],215:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}e.exports=function(t){var e=t.gl;return new n(t,i(e),a(e,l.textVert,l.textFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"text-cache\"),s=t(\"binary-search-bounds\"),l=t(\"./shaders\"),c=n.prototype;c.drawTicks=function(){var t=[0,0],e=[0,0],r=[0,0];return function(n){var i=this.plot,a=this.shader,o=this.tickX[n],l=this.tickOffset[n],c=i.gl,u=i.viewBox,f=i.dataBox,h=i.screenBox,d=i.pixelRatio,p=i.tickEnable,m=i.tickPad,g=i.tickColor,v=i.tickAngle,y=i.labelEnable,x=i.labelPad,b=i.labelColor,_=i.labelAngle,w=this.labelOffset[n],M=this.labelCount[n],k=s.lt(o,f[n]),A=s.le(o,f[n+2]);t[0]=t[1]=0,t[n]=1,e[n]=(u[2+n]+u[n])/(h[2+n]-h[n])-1;var T=2/h[2+(1^n)]-h[1^n];e[1^n]=T*u[1^n]-1,p[n]&&(e[1^n]-=T*d*m[n],k<A&&l[A]>l[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],c.drawArrays(c.TRIANGLES,l[k],l[A]-l[k]))),y[n]&&M&&(e[1^n]-=T*d*x[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=b[n],a.uniforms.angle=_[n],c.drawArrays(c.TRIANGLES,w,M)),e[1^n]=T*u[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],k<A&&l[A]>l[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],c.drawArrays(c.TRIANGLES,l[k],l[A]-l[k]))),y[n+2]&&M&&(e[1^n]+=T*d*x[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=b[n+2],a.uniforms.angle=_[n+2],c.drawArrays(c.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,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-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 c=0;c<2;++c){var u=a[c],f=a[c+2]-u,h=.5*(o[c+2]+o[c]),d=o[c+2]-o[c],p=l[c],m=l[c+2]-p,g=s[c],v=s[c+2]-g;e[c]=2*f/d*m/v,t[c]=2*(u-h)/d*m/v}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,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[a];for(e=0;e<h.length;++e){var d=h[e],p=d.x,m=d.text,g=d.font||\"sans-serif\";i=d.fontSize||12;for(var v=1/(c[a+2]-c[a]),y=c[a],x=m.split(\"\\n\"),b=0;b<x.length;b++)for(n=o(g,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(p-y)*v);u.push(Math.floor(s.length/3)),f.push(p)}this.tickOffset[a]=u,this.tickX[a]=f}for(a=0;a<2;++a){for(this.labelOffset[a]=Math.floor(s.length/3),n=o(t.labelFont[a],t.labels[a],{textAlign:\"center\"}).data,i=t.labelSize[a],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[a]=Math.floor(s.length/3)-this.labelOffset[a]}for(this.titleOffset=Math.floor(s.length/3),n=o(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"binary-search-bounds\":216,\"gl-buffer\":165,\"gl-shader\":217,\"text-cache\":545}],216:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],217:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}function i(t,e){return t.name<e.name?-1:1}var a=t(\"./lib/create-uniforms\"),o=t(\"./lib/create-attributes\"),s=t(\"./lib/reflect\"),l=t(\"./lib/shader-cache\"),c=t(\"./lib/runtime-reflect\"),u=t(\"./lib/GLError\"),f=n.prototype;f.bind=function(){this.program||this._relink();var t,e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},f.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},f.update=function(t,e,r,n){function f(){d.program=l.program(p,d._vref,d._fref,_,w);for(var t=0;t<r.length;++t)E[t]=p.getUniformLocation(d.program,r[t].name)}if(!e||1===arguments.length){var h=t;t=h.vertex,e=h.fragment,r=h.uniforms,n=h.attributes}var d=this,p=d.gl,m=d._vref;d._vref=l.shader(p,p.VERTEX_SHADER,t),m&&m.dispose(),d.vertShader=d._vref.shader;var g=this._fref;if(d._fref=l.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),d.fragShader=d._fref.shader,!r||!n){var v=p.createProgram();if(p.attachShader(v,d.fragShader),p.attachShader(v,d.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var y=p.getProgramInfoLog(v);throw new u(y,\"Error linking program:\"+y)}r=r||c.uniforms(p,v),n=n||c.attributes(p,v),p.deleteProgram(v)}(n=n.slice()).sort(i);var x,b=[],_=[],w=[];for(x=0;x<n.length;++x){var M=n[x];if(M.type.indexOf(\"mat\")>=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T<k;++T)A[T]=w.length,_.push(M.name+\"[\"+T+\"]\"),\"number\"==typeof M.location?w.push(M.location+T):Array.isArray(M.location)&&M.location.length===k&&\"number\"==typeof M.location[T]?w.push(0|M.location[T]):w.push(-1);b.push({name:M.name,type:M.type,locations:A})}else b.push({name:M.name,type:M.type,locations:[w.length]}),_.push(M.name),\"number\"==typeof M.location?w.push(0|M.location):w.push(-1)}var S=0;for(x=0;x<w.length;++x)if(w[x]<0){for(;w.indexOf(S)>=0;)S+=1;w[x]=S}var E=new Array(r.length);f(),d._relink=f,d.types={uniforms:s(r),attributes:s(n)},d.attributes=o(p,d,b,w),Object.defineProperty(d,\"uniforms\",a(p,d,r,E))},e.exports=function(t,e,r,i,a){var o=new n(t);return o.update(e,r,i,a),o}},{\"./lib/GLError\":218,\"./lib/create-attributes\":219,\"./lib/create-uniforms\":220,\"./lib/reflect\":221,\"./lib/runtime-reflect\":222,\"./lib/shader-cache\":223}],218:[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).name=\"GLError\",n.prototype.constructor=n,e.exports=n},{}],219:[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\"],c=[],u=0;u<a;++u)l.push(\"x\"+u),c.push(\"x\"+u);l.push(\"if(x0.length===void 0){return gl.vertexAttrib\"+a+\"f(v,\"+c.join()+\")}else{return gl.vertexAttrib\"+a+\"fv(v,x0)}\");var f=Function.apply(null,l),h=new n(t,e,r,i,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(i[r]),f(t,i[r],e),e},get:function(){return h},enumerable:!0})}function a(t,e,r,n,a,o,s){for(var l=new Array(a),c=new Array(a),u=0;u<a;++u)i(t,e,r[u],n,a,l,u),c[u]=l[u];Object.defineProperty(l,\"location\",{set:function(t){if(Array.isArray(t))for(var e=0;e<a;++e)c[e].location=t[e];else for(e=0;e<a;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(a),e=0;e<a;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,i,o,s){e=e||t.FLOAT,i=!!i,o=o||a*a,s=s||0;for(var l=0;l<a;++l){var c=n[r[l]];t.vertexAttribPointer(c,a,e,i,o,s+l*a),t.enableVertexAttribArray(c)}};var f=new Array(a),h=t[\"vertexAttrib\"+a+\"fv\"];Object.defineProperty(o,s,{set:function(e){for(var i=0;i<a;++i){var o=n[r[i]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[i]);else{for(var s=0;s<a;++s)f[s]=e[a*i+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}e.exports=function(t,e,r,n){for(var s={},l=0,c=r.length;l<c;++l){var u=r[l],f=u.name,h=u.type,d=u.locations;switch(h){case\"bool\":case\"int\":case\"float\":i(t,e,d[0],n,1,s,f);break;default:if(h.indexOf(\"vec\")>=0){if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new o(\"\",\"Invalid data type for attribute \"+f+\": \"+h);i(t,e,d[0],n,p,s,f)}else{if(!(h.indexOf(\"mat\")>=0))throw new o(\"\",\"Unknown data type for attribute \"+f+\": \"+h);var p;if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new o(\"\",\"Invalid data type for attribute \"+f+\": \"+h);a(t,e,d,n,p,s,f)}}}return s};var o=t(\"./GLError\"),s=n.prototype;s.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},s.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(s,\"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\":218}],220:[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;n<t;++n)r[n]=e;return r}var a=t(\"./reflect\"),o=t(\"./GLError\");e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case\"bool\":case\"int\":case\"sampler2D\":case\"samplerCube\":return\"gl.uniform1i(locations[\"+e+\"],obj\"+t+\")\";case\"float\":return\"gl.uniform1f(locations[\"+e+\"],obj\"+t+\")\";default:var n=r.indexOf(\"vec\");if(!(0<=n&&n<=1&&r.length===4+n)){if(0===r.indexOf(\"mat\")&&4===r.length){if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new o(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+r);return\"gl.uniformMatrix\"+i+\"fv(locations[\"+e+\"],false,obj\"+t+\")\"}throw new o(\"\",\"Unknown uniform data type for \"+name+\": \"+r)}var i;if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new o(\"\",\"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 o(\"\",\"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 u(e){for(var n=[\"return function updateProperty(obj){\"],i=c(\"\",e),a=0;a<i.length;++a){var o=i[a],u=o[0],f=o[1];s[f]&&n.push(l(u,f,r[f].type))}return n.push(\"return obj}\"),new Function(\"gl\",\"locations\",n.join(\"\\n\"))(t,s)}function f(a,l,c){if(\"object\"==typeof c){var f=h(c);Object.defineProperty(a,l,{get:n(f),set:u(c),enumerable:!0,configurable:!1})}else s[c]?Object.defineProperty(a,l,{get:function(r){return new Function(\"gl\",\"wrapper\",\"locations\",\"return function(){return gl.getUniform(wrapper.program,locations[\"+r+\"])}\")(t,e,s)}(c),set:u(c),enumerable:!0,configurable:!1}):a[l]=function(t){switch(t){case\"bool\":return!1;case\"int\":case\"sampler2D\":case\"samplerCube\":case\"float\":return 0;default:var e=t.indexOf(\"vec\");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new o(\"\",\"Invalid data type\");return\"b\"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf(\"mat\")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new o(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+t);return i(r*r,0)}throw new o(\"\",\"Unknown uniform data type for \"+name+\": \"+t)}}(r[c].type)}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)f(e,r,t[r])}else{e={};for(var n in t)f(e,n,t[n])}return e}var d=a(r,!0);return{get:n(h(d)),set:u(d),enumerable:!0,configurable:!0}}},{\"./GLError\":218,\"./reflect\":221}],221:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name.split(\".\"),a=r,o=0;o<i.length;++o){var s=i[o].split(\"[\");if(s.length>1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l<s.length;++l){var c=parseInt(s[l]);l<s.length-1||o<i.length-1?(c in a||(l<s.length-1?a[c]=[]:a[c]={}),a=a[c]):a[c]=e?n:t[n].type}}else o<i.length-1?(s[0]in a||(a[s[0]]={}),a=a[s[0]]):a[s[0]]=e?n:t[n].type}return r}},{}],222:[function(t,e,r){\"use strict\";function n(t,e){if(!a){var r=Object.keys(i);a={};for(var n=0;n<r.length;++n){var o=r[n];a[t[o]]=i[o]}}return a[e]}r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=[],a=0;a<r;++a){var o=t.getActiveUniform(e,a);if(o){var s=n(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)i.push({name:o.name.replace(\"[0]\",\"[\"+l+\"]\"),type:s});else i.push({name:o.name,type:s})}}return i},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=[],a=0;a<r;++a){var o=t.getActiveAttrib(e,a);o&&i.push({name:o.name,type:n(t,o.type)})}return i};var i={FLOAT:\"float\",FLOAT_VEC2:\"vec2\",FLOAT_VEC3:\"vec3\",FLOAT_VEC4:\"vec4\",INT:\"int\",INT_VEC2:\"ivec2\",INT_VEC3:\"ivec3\",INT_VEC4:\"ivec4\",BOOL:\"bool\",BOOL_VEC2:\"bvec2\",BOOL_VEC3:\"bvec3\",BOOL_VEC4:\"bvec4\",FLOAT_MAT2:\"mat2\",FLOAT_MAT3:\"mat3\",FLOAT_MAT4:\"mat4\",SAMPLER_2D:\"sampler2D\",SAMPLER_CUBE:\"samplerCube\"},a=null},{}],223:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function i(t){this.gl=t,this.shaders=[{},{}],this.programs={}}function a(t){var e=l.get(t);return e||(e=new i(t),l.set(t,e)),e}r.shader=function(t,e,r){return a(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return a(t).getProgram(e,r,n,i)};var o=t(\"./GLError\"),s=t(\"gl-format-compiler-error\"),l=new(\"undefined\"==typeof WeakMap?t(\"weakmap-shim\"):WeakMap),c=0;n.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var u=i.prototype;u.getShaderReference=function(t,e){var r=this.gl,i=this.shaders[t===r.FRAGMENT_SHADER|0],a=i[e];if(a&&r.isShader(a.shader))a.count+=1;else{var l=function(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(n);try{var a=s(i,r,e)}catch(t){throw console.warn(\"Failed to format compiler error: \"+t),new o(i,\"Error compiling shader:\\n\"+i)}throw new o(i,a.short,a.long)}return n}(r,t,e);a=i[e]=new n(c++,e,t,l,[],1,this)}return a},u.getProgram=function(t,e,r,n){var i=[t.id,e.id,r.join(\":\"),n.join(\":\")].join(\"@\"),a=this.programs[i];return a&&this.gl.isProgram(a)||(this.programs[i]=a=function(t,e,r,n,i){var a=t.createProgram();t.attachShader(a,e),t.attachShader(a,r);for(var s=0;s<n.length;++s)t.bindAttribLocation(a,i[s],n[s]);if(t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS)){var l=t.getProgramInfoLog(a);throw new o(l,\"Error linking program: \"+l)}return a}(this.gl,t.shader,e.shader,r,n),t.programs.push(i),e.programs.push(i)),a}},{\"./GLError\":218,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],224:[function(t,e,r){\"use strict\";function n(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}function i(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function a(t,e){return t.x-e.x}e.exports=function(t){var e=t.gl,r=new n(e,o(e,[e.drawingBufferWidth,e.drawingBufferHeight]));return r.grid=s(r),r.text=l(r),r.line=c(r),r.box=u(r),r.update(t),r};var o=t(\"gl-select-static\"),s=t(\"./lib/grid\"),l=t(\"./lib/text\"),c=t(\"./lib/line\"),u=t(\"./lib/box\"),f=n.prototype;f.setDirty=function(){this.dirty=this.pickDirty=!0},f.setOverlayDirty=function(){this.dirty=!0},f.nextDepthValue=function(){return this._depthCounter++/65536},f.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,d=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var p=0;p<2;++p)if(f[p]&&n[p]<=0&&n[p+2]>=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],h[p]):o.drawLine(e[0],m,e[2],m,d[p],h[p])}}for(p=0;p<l.length;++p)l[p].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var g=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;g[1]&&o.drawLine(r[0],r[1]-.5*v[1]*i,r[0],r[3]+.5*v[3]*i,v[1],y[1]),g[0]&&o.drawLine(r[0]-.5*v[0]*i,r[1],r[2]+.5*v[2]*i,r[1],v[0],y[0]),g[3]&&o.drawLine(r[2],r[1]-.5*v[1]*i,r[2],r[3]+.5*v[3]*i,v[3],y[3]),g[2]&&o.drawLine(r[0]-.5*v[0]*i,r[3],r[2]+.5*v[2]*i,r[3],v[2],y[2]),s.bind();for(p=0;p<2;++p)s.drawTicks(p);this.titleEnable&&s.drawTitle();var x=this.overlays;for(p=0;p<x.length;++p)x[p].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},f.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},f.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},f.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},f.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},f.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},f.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,o=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/o,10,10/o]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=i(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=i(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=i(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(\"titleEnable\"in t&&!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=i(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=i(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=i(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var s=t.ticks||[[],[]],l=this._tickBounds;l[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var c=0;c<2;++c){var u=s[c].slice(0);0!==u.length&&(u.sort(a),l[c]=Math.min(l[c],u[0].x),l[c+2]=Math.max(l[c+2],u[u.length-1].x))}this.grid.update({bounds:l,ticks:s}),this.text.update({bounds:l,ticks:s,labels:t.labels||[\"x\",\"y\"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[\"sans-serif\",\"sans-serif\"],title:t.title||\"\",titleSize:t.titleSize||18,titleFont:t.titleFont||\"sans-serif\"}),this.static=!!t.static,this.setDirty()},f.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();this.objects.length=0;for(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;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},f.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},f.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{\"./lib/box\":211,\"./lib/grid\":212,\"./lib/line\":213,\"./lib/text\":215,\"gl-select-static\":242}],225:[function(t,e,r){var n=t(\"gl-shader\");e.exports=function(t){return n(t,\"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}\",\"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}\",null,[{name:\"position\",type:\"vec2\"}])}},{\"gl-shader\":243}],226:[function(t,e,r){\"use strict\";function n(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function i(t){return\"boolean\"!=typeof t||t}e.exports=function(t){function e(){if(!x&&U.autoResize){var t=b.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*U.pixelRatio),i=0|Math.ceil(r*U.pixelRatio);if(n!==b.width||i!==b.height){b.width=n,b.height=i;var a=b.style;a.position=a.position||\"absolute\",a.left=\"0px\",a.top=\"0px\",a.width=e+\"px\",a.height=r+\"px\",O=!0}}}function r(){for(var t=z.length,e=P.length,r=0;r<e;++r)I[r]=0;t:for(r=0;r<t;++r){var n=z[r],i=n.pickSlots;if(i){for(var a=0;a<e;++a)if(I[a]+i<255){D[r]=a,n.setPickBase(I[a]+1),I[a]+=i;continue t}var o=c(_,B);D[r]=e,P.push(o),I.push(i),n.setPickBase(1),e+=1}else D[r]=-1}for(;e>0&&0===I[e-1];)I.pop(),P.pop().dispose()}function g(){if(U.contextLost)return!0;_.isContextLost()&&(U.contextLost=!0,U.mouseListener.enabled=!1,U.selection.object=null,U.oncontextloss&&U.oncontextloss())}function v(){if(!g()){e();var t=U.camera.tick();j.view=U.camera.matrix,O=O||t,F=F||t,E.pixelRatio=U.pixelRatio,C.pixelRatio=U.pixelRatio;var r=z.length,i=G[0],a=G[1];i[0]=i[1]=i[2]=1/0,a[0]=a[1]=a[2]=-1/0;for(var o=0;o<r;++o){(L=z[o]).pixelRatio=U.pixelRatio,L.axes=U.axes,O=O||!!L.dirty,F=F||!!L.dirty;var l=L.bounds;if(l)for(var c=l[0],u=l[1],h=0;h<3;++h)i[h]=Math.min(i[h],c[h]),a[h]=Math.max(a[h],u[h])}var p=U.bounds;if(U.autoBounds)for(h=0;h<3;++h){if(a[h]<i[h])i[h]=-1,a[h]=1;else{i[h]===a[h]&&(i[h]-=1,a[h]+=1);var m=.05*(a[h]-i[h]);i[h]=i[h]-m,a[h]=a[h]+m}p[0][h]=i[h],p[1][h]=a[h]}var v=!1;for(h=0;h<3;++h)v=v||Y[0][h]!==p[0][h]||Y[1][h]!==p[1][h],Y[0][h]=p[0][h],Y[1][h]=p[1][h];if(F=F||v,O=O||v){if(v){var y=[0,0,0];for(o=0;o<3;++o)y[o]=n((p[1][o]-p[0][o])/10);E.autoTicks?E.update({bounds:p,tickSpacing:y}):E.update({bounds:p})}var x=_.drawingBufferWidth,b=_.drawingBufferHeight;for(B[0]=x,B[1]=b,V[0]=0|Math.max(x/U.pixelRatio,1),V[1]=0|Math.max(b/U.pixelRatio,1),d(R,U.fovy,x/b,U.zNear,U.zFar),o=0;o<16;++o)N[o]=0;N[15]=1;var w=0;for(o=0;o<3;++o)w=Math.max(w,p[1][o]-p[0][o]);for(o=0;o<3;++o)U.autoScale?N[5*o]=U.aspect[o]/(p[1][o]-p[0][o]):N[5*o]=1/w,U.autoCenter&&(N[12+o]=.5*-N[5*o]*(p[0][o]+p[1][o]));for(o=0;o<r;++o)(L=z[o]).axesBounds=p,U.clipToBounds&&(L.clipBounds=p);M.object&&(U.snapToData?C.position=M.dataCoordinate:C.position=M.dataPosition,C.bounds=p),F&&(F=!1,function(){if(!g()){_.colorMask(!0,!0,!0,!0),_.depthMask(!0),_.disable(_.BLEND),_.enable(_.DEPTH_TEST);for(var t=z.length,e=P.length,r=0;r<e;++r){var n=P[r];n.shape=V,n.begin();for(var i=0;i<t;++i)if(D[i]===r){var a=z[i];a.drawPick&&(a.pixelRatio=1,a.drawPick(j))}n.end()}}}()),U.axesPixels=s(U.axes,j,x,b),U.onrender&&U.onrender(),_.bindFramebuffer(_.FRAMEBUFFER,null),_.viewport(0,0,x,b);var T=U.clearColor;_.clearColor(T[0],T[1],T[2],T[3]),_.clear(_.COLOR_BUFFER_BIT|_.DEPTH_BUFFER_BIT),_.depthMask(!0),_.colorMask(!0,!0,!0,!0),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL),_.disable(_.BLEND),_.disable(_.CULL_FACE);var S=!1;for(E.enable&&(S=S||E.isTransparent(),E.draw(j)),C.axes=E,M.object&&C.draw(j),_.disable(_.CULL_FACE),o=0;o<r;++o)(L=z[o]).axes=E,L.pixelRatio=U.pixelRatio,L.isOpaque&&L.isOpaque()&&L.draw(j),L.isTransparent&&L.isTransparent()&&(S=!0);if(S){for(k.shape=B,k.bind(),_.clear(_.DEPTH_BUFFER_BIT),_.colorMask(!1,!1,!1,!1),_.depthMask(!0),_.depthFunc(_.LESS),E.enable&&E.isTransparent()&&E.drawTransparent(j),o=0;o<r;++o)(L=z[o]).isOpaque&&L.isOpaque()&&L.draw(j);for(_.enable(_.BLEND),_.blendEquation(_.FUNC_ADD),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.colorMask(!0,!0,!0,!0),_.depthMask(!1),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT),E.isTransparent()&&E.drawTransparent(j),o=0;o<r;++o){var L;(L=z[o]).isTransparent&&L.isTransparent()&&L.drawTransparent(j)}_.bindFramebuffer(_.FRAMEBUFFER,null),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.disable(_.DEPTH_TEST),A.bind(),k.color[0].bind(0),A.uniforms.accumBuffer=0,f(_),_.disable(_.BLEND)}for(O=!1,o=0;o<r;++o)z[o].dirty=!1}}}function y(){x||U.contextLost||(requestAnimationFrame(y),v())}var x=!1,b=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);b||(b=document.createElement(\"canvas\"),t.container?t.container.appendChild(b):document.body.appendChild(b));var _=t.gl;if(_||(_=function(t,e){var r=null;try{(r=t.getContext(\"webgl\",e))||(r=t.getContext(\"experimental-webgl\",e))}catch(t){return null}return r}(b,t.glOptions||{premultipliedAlpha:!0,antialias:!0})),!_)throw new Error(\"webgl not supported\");var w=t.bounds||[[-10,-10,-10],[10,10,10]],M=new function(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null},k=u(_,[_.drawingBufferWidth,_.drawingBufferHeight],{preferFloat:!m}),A=p(_),T=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:\"turntable\"},S=t.axes||{},E=o(_,S);E.enable=!S.disable;var L=t.spikes||{},C=l(_,L),z=[],D=[],I=[],P=[],O=!0,F=!0,R=new Array(16),N=new Array(16),j={view:null,projection:R,model:N},B=(F=!0,[_.drawingBufferWidth,_.drawingBufferHeight]),U={gl:_,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:b,selection:M,camera:a(b,T),axes:E,axesPixels:null,spikes:C,bounds:w,objects:z,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:i(t.autoResize),autoBounds:i(t.autoBounds),autoScale:!!t.autoScale,autoCenter:i(t.autoCenter),clipToBounds:i(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:j,oncontextloss:null,mouseListener:null},V=[_.drawingBufferWidth/U.pixelRatio|0,_.drawingBufferHeight/U.pixelRatio|0];U.autoResize&&e(),window.addEventListener(\"resize\",e),U.update=function(t){x||(t=t||{},O=!0,F=!0)},U.add=function(t){x||(t.axes=E,z.push(t),D.push(-1),O=!0,F=!0,r())},U.remove=function(t){if(!x){var e=z.indexOf(t);e<0||(z.splice(e,1),D.pop(),O=!0,F=!0,r())}},U.dispose=function(){if(!x&&(x=!0,window.removeEventListener(\"resize\",e),b.removeEventListener(\"webglcontextlost\",g),U.mouseListener.enabled=!1,!U.contextLost)){E.dispose(),C.dispose();for(var t=0;t<z.length;++t)z[t].dispose();for(k.dispose(),t=0;t<P.length;++t)P[t].dispose();A.dispose(),_=null,E=null,C=null,z=[]}};var q=!1,H=0;U.mouseListener=h(b,function(t,e,r){if(!x){var n=P.length,i=z.length,a=M.object;M.distance=1/0,M.mouse[0]=e,M.mouse[1]=r,M.object=null,M.screen=null,M.dataCoordinate=M.dataPosition=null;var o=!1;if(t&&H)q=!0;else{q&&(F=!0),q=!1;for(var s=0;s<n;++s){var l=P[s].query(e,V[1]-r-1,U.pickRadius);if(l){if(l.distance>M.distance)continue;for(var c=0;c<i;++c){var u=z[c];if(D[c]===s){var f=u.pick(l);f&&(M.buttons=t,M.screen=l.coord,M.distance=l.distance,M.object=u,M.index=f.distance,M.dataPosition=f.position,M.dataCoordinate=f.dataCoordinate,M.data=f,o=!0)}}}}}a&&a!==M.object&&(a.highlight&&a.highlight(null),O=!0),M.object&&(M.object.highlight&&M.object.highlight(M.data),O=!0),(o=o||M.object!==a)&&U.onselect&&U.onselect(M),1&t&&!(1&H)&&U.onclick&&U.onclick(M),H=t}}),b.addEventListener(\"webglcontextlost\",g);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Y=[G[0].slice(),G[1].slice()];return y(),U.redraw=function(){x||(O=!0,v())},U};var a=t(\"3d-view-controls\"),o=t(\"gl-axes3d\"),s=t(\"gl-axes3d/properties\"),l=t(\"gl-spikes3d\"),c=t(\"gl-select-static\"),u=t(\"gl-fbo\"),f=t(\"a-big-triangle\"),h=t(\"mouse-change\"),d=t(\"gl-mat4/perspective\"),p=t(\"./lib/shader\"),m=t(\"is-mobile\")()},{\"./lib/shader\":225,\"3d-view-controls\":39,\"a-big-triangle\":42,\"gl-axes3d\":157,\"gl-axes3d/properties\":164,\"gl-fbo\":171,\"gl-mat4/perspective\":189,\"gl-select-static\":242,\"gl-spikes3d\":252,\"is-mobile\":285,\"mouse-change\":443}],227:[function(t,e,r){r.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}\",r.pointFragment=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color, borderColor;\\nuniform float centerFraction;\\nuniform float pointCloud;\\n\\nvoid main() {\\n float radius;\\n vec4 baseColor;\\n if(pointCloud != 0.0) { // pointCloud is truthy\\n if(centerFraction == 1.0) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = mix(borderColor, color, centerFraction);\\n }\\n } else {\\n radius = length(2.0 * gl_PointCoord.xy - 1.0);\\n if(radius > 1.0) {\\n discard;\\n }\\n baseColor = mix(borderColor, color, step(radius, centerFraction));\\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\\n }\\n}\\n\",r.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\",r.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\"},{}],228:[function(t,e,r){arguments[4][217][0].apply(r,arguments)},{\"./lib/GLError\":229,\"./lib/create-attributes\":230,\"./lib/create-uniforms\":231,\"./lib/reflect\":232,\"./lib/runtime-reflect\":233,\"./lib/shader-cache\":234,dup:217}],229:[function(t,e,r){arguments[4][218][0].apply(r,arguments)},{dup:218}],230:[function(t,e,r){arguments[4][219][0].apply(r,arguments)},{\"./GLError\":229,dup:219}],231:[function(t,e,r){arguments[4][220][0].apply(r,arguments)},{\"./GLError\":229,\"./reflect\":232,dup:220}],232:[function(t,e,r){arguments[4][221][0].apply(r,arguments)},{dup:221}],233:[function(t,e,r){arguments[4][222][0].apply(r,arguments)},{dup:222}],234:[function(t,e,r){arguments[4][223][0].apply(r,arguments)},{\"./GLError\":229,dup:223,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],235:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"typedarray-pool\"),s=t(\"./lib/shader\");e.exports=function(t,e){var r=t.gl,o=new n(t,a(r),a(r),i(r,s.pointVertex,s.pointFragment),i(r,s.pickVertex,s.pickFragment));return o.update(e),t.addObject(o),o};var l=n.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.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,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),r=0;r<n;r++)c[r]=r;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||o.free(l),a||o.free(c),this.pointCount=n,this.pickOffset=0},l.unifiedDraw=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=void 0!==r,i=n?this.pickShader:this.shader,a=this.plot.gl,o=this.plot.dataBox;if(0===this.pointCount)return r;var s=o[2]-o[0],l=o[3]-o[1],c=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,o),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(c,.33333)));t[0]=2/s,t[4]=2/l,t[6]=-2*o[0]/s-1,t[7]=-2*o[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=t,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=u<5,i.uniforms.pointSize=u,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),n&&(e[0]=255&r,e[1]=r>>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(a.UNSIGNED_BYTE),i.uniforms.pickOffset=e,this.pickOffset=r);var f=a.getParameter(a.BLEND),h=a.getParameter(a.DITHER);return f&&!this.blend&&a.disable(a.BLEND),h&&a.disable(a.DITHER),a.drawArrays(a.POINTS,0,this.pointCount),f&&!this.blend&&a.enable(a.BLEND),h&&a.enable(a.DITHER),r+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||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\":227,\"gl-buffer\":165,\"gl-shader\":228,\"typedarray-pool\":554}],236:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(a=c*d+u*p+f*m+h*g)<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*c+l*d,t[1]=s*u+l*p,t[2]=s*f+l*m,t[3]=s*h+l*g,t}},{}],237:[function(t,e,r){\"use strict\";var n=t(\"vectorize-text\");e.exports=function(t,e){var r=i[e];if(r||(r=i[e]={}),t in r)return r[t];for(var a=n(t,{textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l<a.positions.length;++l)for(var c=a.positions[l],u=0;u<2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{\"vectorize-text\":568}],238:[function(t,e,r){function n(t,e){var r=i(t,e),n=r.attributes;return n.position.location=0,n.color.location=1,n.glyph.location=2,n.id.location=3,r}var i=t(\"gl-shader\"),a=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\n\\nuniform vec4 highlightId;\\nuniform float highlightScale;\\nuniform mat4 model, view, projection;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\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 float scale = 1.0;\\n if(distance(highlightId, id) < 0.0001) {\\n scale = highlightScale;\\n }\\n\\n vec4 worldPosition = model * vec4(position, 1);\\n vec4 viewPosition = view * worldPosition;\\n viewPosition = viewPosition / viewPosition.w;\\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\\n \\n gl_Position = clipPosition;\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = position;\\n }\\n}\",o=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float highlightScale, pixelRatio;\\nuniform vec4 highlightId;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(position, clipBounds[0])) || any(greaterThan(position, clipBounds[1]))) {\\n gl_Position = vec4(0,0,0,0);\\n } else {\\n float scale = pixelRatio;\\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\\n scale *= highlightScale;\\n }\\n\\n vec4 worldPosition = model * vec4(position, 1.0);\\n vec4 viewPosition = view * worldPosition;\\n vec4 clipPosition = projection * viewPosition;\\n clipPosition /= clipPosition.w;\\n \\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = position;\\n }\\n}\",s=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform float highlightScale;\\nuniform vec4 highlightId;\\nuniform vec3 axes[2];\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float scale, pixelRatio;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\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 float lscale = pixelRatio * scale;\\n if(distance(highlightId, id) < 0.0001) {\\n lscale *= highlightScale;\\n }\\n\\n vec4 clipCenter = projection * view * model * vec4(position, 1);\\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\\n\\n gl_Position = clipPosition;\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = dataPosition;\\n }\\n}\\n\",l=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float opacity;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(dataCoordinate, fragClipBounds[0])) ||\\n any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\\n discard;\\n } else {\\n gl_FragColor = interpColor * opacity;\\n }\\n}\\n\",c=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float pickGroup;\\n\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(dataCoordinate, fragClipBounds[0])) || \\n any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\\n discard;\\n } else {\\n gl_FragColor = vec4(pickGroup, pickId.bgr);\\n }\\n}\",u=[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"glyph\",type:\"vec2\"},{name:\"id\",type:\"vec4\"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},d={vertex:s,fragment:l,attributes:u},p={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};r.createPerspective=function(t){return n(t,f)},r.createOrtho=function(t){return n(t,h)},r.createProject=function(t){return n(t,d)},r.createPickPerspective=function(t){return n(t,p)},r.createPickOrtho=function(t){return n(t,m)},r.createPickProject=function(t){return n(t,g)}},{\"gl-shader\":243}],239:[function(t,e,r){\"use strict\";function n(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function i(t,e,r,i){return n(i,i),n(i,i),n(i,i)}function a(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new function(t,e){this.index=t,this.dataCoordinate=this.position=e}(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}function o(t){return t[0]=t[1]=t[2]=0,t}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function l(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function c(t,e,r,n,a){var c,u=e.axesProject,f=e.gl,h=t.uniforms,d=r.model||v,m=r.view||v,g=r.projection||v,y=e.axesBounds,S=function(t){for(var e=T,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);c=e.axes?e.axes.lastCubeProps.axis:[1,1,1],x[0]=2/f.drawingBufferWidth,x[1]=2/f.drawingBufferHeight,t.bind(),h.view=m,h.projection=g,h.screenSize=x,h.highlightId=e.highlightId,h.highlightScale=e.highlightScale,h.clipBounds=S,h.pickGroup=e.pickId/255,h.pixelRatio=e.pixelRatio;for(var E=0;E<3;++E)if(u[E]&&e.projectOpacity[E]<1===n){h.scale=e.projectScale[E],h.opacity=e.projectOpacity[E];for(var L=k,C=0;C<16;++C)L[C]=0;for(C=0;C<4;++C)L[5*C]=1;L[5*E]=0,c[E]<0?L[12+E]=y[0][E]:L[12+E]=y[1][E],p(L,d,L),h.model=L;var z=(E+1)%3,D=(E+2)%3,I=o(b),P=o(_);I[z]=1,P[D]=1;var O=i(0,0,0,s(w,I)),F=i(0,0,0,s(M,P));if(Math.abs(O[1])>Math.abs(F[1])){var R=O;O=F,F=R,R=I,I=P,P=R;var N=z;z=D,D=N}O[0]<0&&(I[z]=-1),F[1]>0&&(P[D]=-1);var j=0,B=0;for(C=0;C<4;++C)j+=Math.pow(d[4*z+C],2),B+=Math.pow(d[4*D+C],2);I[z]/=Math.sqrt(j),P[D]/=Math.sqrt(B),h.axes[0]=I,h.axes[1]=P,h.fragClipBounds[0]=l(A,S[0],E,-1e8),h.fragClipBounds[1]=l(A,S[1],E,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 u(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||v,s.view=n.view||v,s.projection=n.projection||v,x[0]=2/o.drawingBufferWidth,x[1]=2/o.drawingBufferHeight,s.screenSize=x,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=S,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))}c(e,r,n,i),r.vao.unbind()}var f=t(\"gl-buffer\"),h=t(\"gl-vao\"),d=t(\"typedarray-pool\"),p=t(\"gl-mat4/multiply\"),m=t(\"./lib/shaders\"),g=t(\"./lib/glyphs\"),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=function(t){var e=t.gl,r=m.createPerspective(e),n=m.createOrtho(e),i=m.createProject(e),o=m.createPickPerspective(e),s=m.createPickOrtho(e),l=m.createPickProject(e),c=f(e),u=f(e),d=f(e),p=f(e),g=new a(e,r,n,i,c,u,d,p,h(e,[{buffer:c,size:3,type:e.FLOAT},{buffer:u,size:4,type:e.FLOAT},{buffer:d,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),o,s,l);return g.update(t),g};var y=a.prototype;y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.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},y.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 x=[0,0],b=[0,0,0],_=[0,0,0],w=[0,0,0,1],M=[0,0,0,1],k=v.slice(),A=[0,0,0],T=[[0,0,0],[0,0,0]],S=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];y.draw=function(t){u(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},y.drawTransparent=function(t){u(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},y.drawPick=function(t){u(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},y.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},y.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]},y.update=function(t){if(\"perspective\"in(t=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{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,c=t.color,u=t.size,f=t.angle,h=t.lineColor,p=0,m=0,v=0,y=n.length;t:for(var x=0;x<y;++x){for(var b=n[x],_=0;_<3;++_)if(isNaN(b[_])||!isFinite(b[_]))continue t;var w=(R=Array.isArray(l)?g(l[x],i):l?g(l,i):g(\"\\u25cf\",i))[0],M=R[1],k=R[2];m+=3*w.cells.length,v+=2*M.edges.length}var A=m+v,T=d.mallocFloat(3*A),S=d.mallocFloat(4*A),E=d.mallocFloat(2*A),L=d.mallocUint32(A),C=[0,a[1]],z=0,D=m,I=[0,0,0,1],P=[0,0,0,1],O=Array.isArray(c)&&Array.isArray(c[0]),F=Array.isArray(h)&&Array.isArray(h[0]);t:for(x=0;x<y;++x){for(b=n[x],_=0;_<3;++_){if(isNaN(b[_])||!isFinite(b[_])){p+=1;continue t}s[_]=Math.max(s[_],b[_]),o[_]=Math.min(o[_],b[_])}var R;w=(R=Array.isArray(l)?g(l[x],i):l?g(l,i):g(\"\\u25cf\",i))[0],M=R[1],k=R[2];if(Array.isArray(c)){if(3===(N=O?c[x]:c).length){for(_=0;_<3;++_)I[_]=N[_];I[3]=1}else if(4===N.length)for(_=0;_<4;++_)I[_]=N[_]}else I[0]=I[1]=I[2]=0,I[3]=1;if(Array.isArray(h)){var N;if(3===(N=F?h[x]:h).length){for(_=0;_<3;++_)P[_]=N[_];P[_]=1}else if(4===N.length)for(_=0;_<4;++_)P[_]=N[_]}else P[0]=P[1]=P[2]=0,P[3]=1;var j=.5;Array.isArray(u)?j=+u[x]:u?j=+u:this.useOrtho&&(j=12);var B=0;Array.isArray(f)?B=+f[x]:f&&(B=+f);var U=Math.cos(B),V=Math.sin(B);for(b=n[x],_=0;_<3;++_)s[_]=Math.max(s[_],b[_]),o[_]=Math.min(o[_],b[_]);a[0]<0?C[0]=a[0]*(1+k[1][0]):a[0]>0&&(C[0]=-a[0]*(1+k[0][0]));var q=w.cells,H=w.positions;for(_=0;_<q.length;++_)for(var G=q[_],Y=0;Y<3;++Y){for(var W=0;W<3;++W)T[3*z+W]=b[W];for(W=0;W<4;++W)S[4*z+W]=I[W];L[z]=p;var X=H[G[Y]];E[2*z]=j*(U*X[0]-V*X[1]+C[0]),E[2*z+1]=j*(V*X[0]+U*X[1]+C[1]),z+=1}for(q=M.edges,H=M.positions,_=0;_<q.length;++_)for(G=q[_],Y=0;Y<2;++Y){for(W=0;W<3;++W)T[3*D+W]=b[W];for(W=0;W<4;++W)S[4*D+W]=P[W];L[D]=p;X=H[G[Y]];E[2*D]=j*(U*X[0]-V*X[1]+C[0]),E[2*D+1]=j*(V*X[0]+U*X[1]+C[1]),D+=1}p+=1}this.vertexCount=m,this.lineVertexCount=v,this.pointBuffer.update(T),this.colorBuffer.update(S),this.glyphBuffer.update(E),this.idBuffer.update(new Uint32Array(L)),d.free(T),d.free(S),d.free(E),d.free(L),this.bounds=[o,s],this.points=n,this.pointCount=n.length}},y.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{\"./lib/glyphs\":237,\"./lib/shaders\":238,\"gl-buffer\":165,\"gl-mat4/multiply\":188,\"gl-vao\":259,\"typedarray-pool\":554}],240:[function(t,e,r){\"use strict\";r.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\",r.boxFragment=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\n\\nvoid main() {\\n gl_FragColor = color;\\n}\\n\"},{}],241:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"./lib/shaders\");e.exports=function(t,e){var r=t.gl,s=new n(t,a(r,[0,0,0,1,1,0,1,1]),i(r,o.boxVertex,o.boxFragment));return s.update(e),t.addOverlay(s),s};var s=n.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],d=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],p=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),d=Math.min(d,c[2]),p=Math.min(p,c[3]),!(d<f||p<h)){o.bind();var m=s[2]-s[0],g=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,m,h,i),o.drawBox(0,h,f,p,i),o.drawBox(0,p,m,g,i),o.drawBox(d,h,m,p,i)),this.innerFill&&o.drawBox(f,h,d,p,n),r>0){var v=r*u;o.drawBox(f-v,h-v,d+v,h+v,a),o.drawBox(f-v,p-v,d+v,p+v,a),o.drawBox(f-v,h-v,f+v,p+v,a),o.drawBox(d-v,h-v,d+v,p+v,a)}}}},s.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()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{\"./lib/shaders\":240,\"gl-buffer\":165,\"gl-shader\":243}],242:[function(t,e,r){\"use strict\";function n(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)}}e.exports=function(t,e){return new n(t,i(t,e),a.mallocUint8(e[0]*e[1]*4))};var i=t(\"gl-fbo\"),a=t(\"typedarray-pool\"),o=t(\"ndarray\"),s=t(\"bit-twiddle\").nextPow2,l=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_f<this_closestD2&&(this_closestD2=_inline_46_f,this_closestX=_inline_46_arg6_[0],this_closestY=_inline_46_arg6_[1])}}\",args:[{name:\"_inline_46_arg0_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg1_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg2_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg3_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg4_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg5_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg6_\",lvalue:!1,rvalue:!0,count:4}],thisVars:[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],localVars:[\"_inline_46_a\",\"_inline_46_f\",\"_inline_46_l\"]},post:{body:\"{return[this_closestX,this_closestY,this_closestD2]}\",args:[],thisVars:[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],localVars:[]},debug:!1,funcName:\"cwise\",blockSize:64}),c=n.prototype;Object.defineProperty(c,\"shape\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(s(r*e*4)),i=0;i<r*e*4;++i)n[i]=255}return t}}}),c.begin=function(){var t=this.gl;this.shape;t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},c.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},c.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,\"number\"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),a=0|Math.min(Math.max(t+r,0),n[0]),s=0|Math.min(Math.max(e-r,0),n[1]),c=0|Math.min(Math.max(e+r,0),n[1]);if(a<=i||c<=s)return null;var u=[a-i,c-s],f=o(this.buffer,[u[0],u[1],4],[4,4*n[0],1],4*(i+n[0]*s)),h=l(f.hi(u[0],u[1],1),r,r),d=h[0],p=h[1];if(d<0||Math.pow(this.radius,2)<h[2])return null;return new function(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}(d+i|0,p+s|0,f.get(d,p,0),[f.get(d,p,1),f.get(d,p,2),f.get(d,p,3)],Math.sqrt(h[2]))},c.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{\"bit-twiddle\":71,\"cwise/lib/wrapper\":119,\"gl-fbo\":171,ndarray:458,\"typedarray-pool\":554}],243:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}function i(t,e){return t.name<e.name?-1:1}var a=t(\"./lib/create-uniforms\"),o=t(\"./lib/create-attributes\"),s=t(\"./lib/reflect\"),l=t(\"./lib/shader-cache\"),c=t(\"./lib/runtime-reflect\"),u=t(\"./lib/GLError\"),f=n.prototype;f.bind=function(){this.program||this._relink(),this.gl.useProgram(this.program)},f.dispose=function(){this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},f.update=function(t,e,r,n){function f(){d.program=l.program(p,d._vref,d._fref,b,_);for(var t=0;t<r.length;++t)E[t]=p.getUniformLocation(d.program,r[t].name)}if(!e||1===arguments.length){var h=t;t=h.vertex,e=h.fragment,r=h.uniforms,n=h.attributes}var d=this,p=d.gl,m=d._vref;d._vref=l.shader(p,p.VERTEX_SHADER,t),m&&m.dispose(),d.vertShader=d._vref.shader;var g=this._fref;if(d._fref=l.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),d.fragShader=d._fref.shader,!r||!n){var v=p.createProgram();if(p.attachShader(v,d.fragShader),p.attachShader(v,d.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var y=p.getProgramInfoLog(v);throw new u(y,\"Error linking program:\"+y)}r=r||c.uniforms(p,v),n=n||c.attributes(p,v),p.deleteProgram(v)}(n=n.slice()).sort(i);for(var x=[],b=[],_=[],w=0;w<n.length;++w){var M=n[w];if(M.type.indexOf(\"mat\")>=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T<k;++T)A[T]=_.length,b.push(M.name+\"[\"+T+\"]\"),\"number\"==typeof M.location?_.push(M.location+T):Array.isArray(M.location)&&M.location.length===k&&\"number\"==typeof M.location[T]?_.push(0|M.location[T]):_.push(-1);x.push({name:M.name,type:M.type,locations:A})}else x.push({name:M.name,type:M.type,locations:[_.length]}),b.push(M.name),\"number\"==typeof M.location?_.push(0|M.location):_.push(-1)}var S=0;for(w=0;w<_.length;++w)if(_[w]<0){for(;_.indexOf(S)>=0;)S+=1;_[w]=S}var E=new Array(r.length);f(),d._relink=f,d.types={uniforms:s(r),attributes:s(n)},d.attributes=o(p,d,x,_),Object.defineProperty(d,\"uniforms\",a(p,d,r,E))},e.exports=function(t,e,r,i,a){var o=new n(t);return o.update(e,r,i,a),o}},{\"./lib/GLError\":244,\"./lib/create-attributes\":245,\"./lib/create-uniforms\":246,\"./lib/reflect\":247,\"./lib/runtime-reflect\":248,\"./lib/shader-cache\":249}],244:[function(t,e,r){arguments[4][218][0].apply(r,arguments)},{dup:218}],245:[function(t,e,r){arguments[4][219][0].apply(r,arguments)},{\"./GLError\":244,dup:219}],246:[function(t,e,r){arguments[4][220][0].apply(r,arguments)},{\"./GLError\":244,\"./reflect\":247,dup:220}],247:[function(t,e,r){arguments[4][221][0].apply(r,arguments)},{dup:221}],248:[function(t,e,r){arguments[4][222][0].apply(r,arguments)},{dup:222}],249:[function(t,e,r){arguments[4][223][0].apply(r,arguments)},{\"./GLError\":244,dup:223,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],250:[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]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.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()},i.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]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&&a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&&a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],251:[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\":243}],252:[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}var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"./shaders/index\");e.exports=function(t,e){function r(t,e,r,n,i,a){var o=[t,e,r,0,0,0,1];o[n+3]=1,o[n]=i,s.push.apply(s,o),o[6]=-1,s.push.apply(s,o),o[n]=a,s.push.apply(s,o),s.push.apply(s,o),o[6]=1,s.push.apply(s,o),o[n]=i,s.push.apply(s,o)}var s=[];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=i(t,s),c=a(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}]),u=o(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new n(t,l,c,u);return f.update(e),f};var s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l=n.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||s,o=t.view||s,l=t.projection||s;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=c,d=u,p=0;p<3;++p)i&&i[p]<0?(h[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(h[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=l,n.uniforms.coordinates=[this.position,h,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(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()},l.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))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders/index\":251,\"gl-buffer\":165,\"gl-vao\":259}],253:[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 = max(beckmannSpecular_1_1(L, V, N, roughness), 0.);\\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\":243}],254:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u,f,h,d){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=s,this._contourShader=l,this._contourPickShader=c,this._contourBuffer=u,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new function(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=h,this._dynamicVAO=d,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=[y(p.mallocFloat(1024),[0,0]),y(p.mallocFloat(1024),[0,0]),y(p.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 i(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||O,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=F.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],b(l,t.model,l);var c=F.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return F.showSurface=o,F.showContour=s,F}function a(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=R;n.model=t.model||C,n.view=t.view||C,n.projection=t.projection||C,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=_(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var o=n.clipBounds[a],s=0;s<3;++s)o[s]=Math.min(Math.max(this.clipBounds[a][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=j,n.vertexColor=this.vertexColor;var l=N;for(b(l,n.view,n.model),b(l,n.projection,l),_(l,l),a=0;a<3;++a)n.eyePosition[a]=l[12+a]/l[15];var c=l[15];for(a=0;a<3;++a)c+=this.lightPosition[a]*l[4*a+3];for(a=0;a<3;++a){var u=l[12+a];for(s=0;s<3;++s)u+=l[4*s+a]*this.lightPosition[s];n.lightPosition[a]=u/c}var f=i(n,this);if(f.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),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=f.projections[a],this._shader.uniforms.clipBounds=f.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(f.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var d=this._contourVAO;for(d.bind(),a=0;a<3;++a)for(h.uniforms.permutation=D[a],r.lineWidth(this.contourWidth[a]),s=0;s<this.contourLevels[a].length;++s)this._contourCounts[a][s]&&(s===this.highlightLevel[a]?(h.uniforms.contourColor=this.highlightColor[a],h.uniforms.contourTint=this.highlightTint[a]):0!==s&&s-1!==this.highlightLevel[a]||(h.uniforms.contourColor=this.contourColor[a],h.uniforms.contourTint=this.contourTint[a]),h.uniforms.height=this.contourLevels[a][s],d.draw(r.LINES,this._contourCounts[a][s],this._contourOffsets[a][s]));for(a=0;a<3;++a)for(h.uniforms.model=f.projections[a],h.uniforms.clipBounds=f.clipBounds[a],s=0;s<3;++s)if(this.contourProject[a][s]){h.uniforms.permutation=D[s],r.lineWidth(this.contourWidth[s]);for(var p=0;p<this.contourLevels[s].length;++p)p===this.highlightLevel[s]?(h.uniforms.contourColor=this.highlightColor[s],h.uniforms.contourTint=this.highlightTint[s]):0!==p&&p-1!==this.highlightLevel[s]||(h.uniforms.contourColor=this.contourColor[s],h.uniforms.contourTint=this.contourTint[s]),h.uniforms.height=this.contourLevels[s][p],d.draw(r.LINES,this._contourCounts[s][p],this._contourOffsets[s][p])}for((d=this._dynamicVAO).bind(),a=0;a<3;++a)if(0!==this._dynamicCounts[a])for(h.uniforms.model=n.model,h.uniforms.clipBounds=n.clipBounds,h.uniforms.permutation=D[a],r.lineWidth(this.dynamicWidth[a]),h.uniforms.contourColor=this.dynamicColor[a],h.uniforms.contourTint=this.dynamicTint[a],h.uniforms.height=this.dynamicLevel[a],d.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]),s=0;s<3;++s)this.contourProject[s][a]&&(h.uniforms.model=f.projections[s],h.uniforms.clipBounds=f.clipBounds[s],d.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]));d.unbind()}}function o(t,e){var r=e.shape.slice(),n=t.shape.slice();g.assign(t.lo(1,1).hi(r[0],r[1]),e),g.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),g.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),g.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),g.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function s(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function l(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function c(t){if(Array.isArray(t)){if(Array.isArray(t))return[l(t[0]),l(t[1]),l(t[2])];var e=l(t);return[e.slice(),e.slice(),e.slice()]}}e.exports=function(t){var e=t.gl,r=A(e),i=S(e),a=T(e),o=E(e),s=f(e),l=h(e,[{buffer:s,size:4,stride:L,offset:0},{buffer:s,size:3,stride:L,offset:16},{buffer:s,size:3,stride:L,offset:28}]),c=f(e),u=h(e,[{buffer:c,size:4,stride:20,offset:0},{buffer:c,size:1,stride:20,offset:16}]),p=f(e),m=h(e,[{buffer:p,size:2,type:e.FLOAT}]),g=d(e,1,I,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new n(e,[0,0],[[0,0,0],[0,0,0]],r,i,s,l,g,a,o,c,u,p,m),y={levels:[[],[],[]]};for(var x in t)y[x]=t[x];return y.colormap=y.colormap||\"jet\",v.update(y),v};var u=t(\"bit-twiddle\"),f=t(\"gl-buffer\"),h=t(\"gl-vao\"),d=t(\"gl-texture2d\"),p=t(\"typedarray-pool\"),m=t(\"colormap\"),g=t(\"ndarray-ops\"),v=t(\"ndarray-pack\"),y=t(\"ndarray\"),x=t(\"surface-nets\"),b=t(\"gl-mat4/multiply\"),_=t(\"gl-mat4/invert\"),w=t(\"binary-search-bounds\"),M=t(\"ndarray-gradient\"),k=t(\"./lib/shaders\"),A=k.createShader,T=k.createContourShader,S=k.createPickShader,E=k.createPickContourShader,L=40,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[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]];!function(){for(var t=0;t<3;++t){var e=D[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var I=256,P=n.prototype;P.isTransparent=function(){return this.opacity<1},P.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t};var O=[0,0,0],F={showSurface:!1,showContour:!1,projections:[C.slice(),C.slice(),C.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},R={model:C,view:C,projection:C,inverseModel:C.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},N=C.slice(),j=[1,0,0,0,1,0,0,0,1];P.draw=function(t){return a.call(this,t,!1)},P.drawTransparent=function(t){return a.call(this,t,!0)};var B={model:C,view:C,projection:C,inverseModel:C,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]};P.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||C,r.view=t.view||C,r.projection=t.projection||C,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=j;for(var n=0;n<2;++n)for(var a=r.clipBounds[n],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[n][o],-1e8),1e8);var s=i(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 c=this._contourVAO;for(c.bind(),o=0;o<3;++o)for(e.lineWidth(this.contourWidth[o]),l.uniforms.permutation=D[o],n=0;n<this.contourLevels[o].length;++n)this._contourCounts[o][n]&&(l.uniforms.height=this.contourLevels[o][n],c.draw(e.LINES,this._contourCounts[o][n],this._contourOffsets[o][n]));for(n=0;n<3;++n)for(l.uniforms.model=s.projections[n],l.uniforms.clipBounds=s.clipBounds[n],o=0;o<3;++o)if(this.contourProject[n][o]){l.uniforms.permutation=D[o],e.lineWidth(this.contourWidth[o]);for(var u=0;u<this.contourLevels[o].length;++u)this._contourCounts[o][u]&&(l.uniforms.height=this.contourLevels[o][u],c.draw(e.LINES,this._contourCounts[o][u],this._contourOffsets[o][u]))}c.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>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 c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var d=i+u,p=s+h,m=f*(h?l:1-l),g=0;g<3;++g)c[g]+=this._field[g].get(d,p)*m;for(var v=this._pickResult.level,y=0;y<3;++y)if(v[y]=w.le(this.contourLevels[y],c[y]),v[y]<0)this.contourLevels[y].length>0&&(v[y]=0);else if(v[y]<this.contourLevels[y].length-1){var x=this.contourLevels[y][v[y]],b=this.contourLevels[y][v[y]+1];Math.abs(x-c[y])>Math.abs(b-c[y])&&(v[y]+=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],g=0;g<3;++g)r.dataCoordinate[g]=this._field[g].get(r.index[0],r.index[1]);return r},P.update=function(t){t=t||{},this.dirty=!0,\"contourWidth\"in t&&(this.contourWidth=s(t.contourWidth,Number)),\"showContour\"in t&&(this.showContour=s(t.showContour,Boolean)),\"showSurface\"in t&&(this.showSurface=!!t.showSurface),\"contourTint\"in t&&(this.contourTint=s(t.contourTint,Boolean)),\"contourColor\"in t&&(this.contourColor=c(t.contourColor)),\"contourProject\"in t&&(this.contourProject=s(t.contourProject,function(t){return s(t,Boolean)})),\"surfaceProject\"in t&&(this.surfaceProject=t.surfaceProject),\"dynamicColor\"in t&&(this.dynamicColor=c(t.dynamicColor)),\"dynamicTint\"in t&&(this.dynamicTint=s(t.dynamicTint,Number)),\"dynamicWidth\"in t&&(this.dynamicWidth=s(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&&(p.freeFloat(this._field[2].data),this._field[2].data=p.mallocFloat(u.nextPow2(n))),this._field[2]=y(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),o(this._field[2],e),this.shape=e.shape.slice();for(var i=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(p.freeFloat(this._field[a].data),this._field[a].data=p.mallocFloat(this._field[2].size)),this._field[a]=y(this._field[a].data,[i[0]+2,i[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error(\"gl-surface: invalid coordinates for x/y\");for(a=0;a<2;++a){var f=l[a];for(w=0;w<2;++w)if(f.shape[w]!==i[w])throw new Error(\"gl-surface: coords have incorrect shape\");o(this._field[a],f)}}else if(t.ticks){var h=t.ticks;if(!Array.isArray(h)||2!==h.length)throw new Error(\"gl-surface: invalid ticks\");for(a=0;a<2;++a){var d=h[a];if((Array.isArray(d)||d.length)&&(d=y(d)),d.shape[0]!==i[a])throw new Error(\"gl-surface: invalid tick length\");var b=y(d.data,i);b.stride[a]=d.stride[0],b.stride[1^a]=0,o(this._field[a],b)}}else{for(a=0;a<2;++a){var _=[0,0];_[a]=1,this._field[a]=y(this._field[a].data,[i[0]+2,i[1]+2],_,0)}this._field[0].set(0,0,0);for(var w=0;w<i[0];++w)this._field[0].set(w+1,0,w);for(this._field[0].set(i[0]+1,0,i[0]-1),this._field[1].set(0,0,0),w=0;w<i[1];++w)this._field[1].set(0,w+1,w);this._field[1].set(0,i[1]+1,i[1]-1)}var k=this._field,A=y(p.mallocFloat(3*k[2].size*2),[3,i[0]+2,i[1]+2,2]);for(a=0;a<3;++a)M(A.pick(a),k[a],\"mirror\");var T=y(p.mallocFloat(3*k[2].size),[i[0]+2,i[1]+2,3]);for(a=0;a<i[0]+2;++a)for(w=0;w<i[1]+2;++w){var S=A.get(0,a,w,0),E=A.get(0,a,w,1),L=A.get(1,a,w,0),C=A.get(1,a,w,1),D=A.get(2,a,w,0),P=A.get(2,a,w,1),O=L*P-C*D,F=D*E-P*S,R=S*C-E*L,N=Math.sqrt(O*O+F*F+R*R);N<1e-8?(N=Math.max(Math.abs(O),Math.abs(F),Math.abs(R)))<1e-8?(R=1,F=O=0,N=1):N=1/N:N=1/Math.sqrt(N),T.set(a,w,0,O*N),T.set(a,w,1,F*N),T.set(a,w,2,R*N)}p.free(A.data);var j=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],U=1/0,V=-1/0,q=(i[0]-1)*(i[1]-1)*6,H=p.mallocFloat(u.nextPow2(10*q)),G=0,Y=0;for(a=0;a<i[0]-1;++a)t:for(w=0;w<i[1]-1;++w){for(var W=0;W<2;++W)for(var X=0;X<2;++X)for(var Z=0;Z<3;++Z){var J=this._field[Z].get(1+a+W,1+w+X);if(isNaN(J)||!isFinite(J))continue t}for(Z=0;Z<6;++Z){var K=a+z[Z][0],Q=w+z[Z][1],$=this._field[0].get(K+1,Q+1),tt=this._field[1].get(K+1,Q+1),et=J=this._field[2].get(K+1,Q+1);O=T.get(K+1,Q+1,0),F=T.get(K+1,Q+1,1),R=T.get(K+1,Q+1,2),t.intensity&&(et=t.intensity.get(K,Q)),H[G++]=K,H[G++]=Q,H[G++]=$,H[G++]=tt,H[G++]=J,H[G++]=0,H[G++]=et,H[G++]=O,H[G++]=F,H[G++]=R,j[0]=Math.min(j[0],$),j[1]=Math.min(j[1],tt),j[2]=Math.min(j[2],J),U=Math.min(U,et),B[0]=Math.max(B[0],$),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],J),V=Math.max(V,et),Y+=1}}for(t.intensityBounds&&(U=+t.intensityBounds[0],V=+t.intensityBounds[1]),a=6;a<G;a+=10)H[a]=(H[a]-U)/(V-U);this._vertexCount=Y,this._coordinateBuffer.update(H.subarray(0,G)),p.freeFloat(H),p.free(T.data),this.bounds=[j,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===U&&this.intensityBounds[1]===V||(r=!0),this.intensityBounds=[U,V]}if(\"levels\"in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],a=0;a<3;++a)rt[a]=rt[a].slice(),rt.sort(function(t,e){return t-e});t:for(a=0;a<3;++a){if(rt[a].length!==this.contourLevels[a].length){r=!0;break}for(w=0;w<rt[a].length;++w)if(rt[a][w]!==this.contourLevels[a][w]){r=!0;break t}}this.contourLevels=rt}if(r){k=this._field,i=this.shape;for(var nt=[],it=0;it<3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(a=0;a<rt.length;++a){var lt=x(this._field[it],rt[a]);at.push(nt.length/5|0),Y=0;t:for(w=0;w<lt.cells.length;++w){var ct=lt.cells[w];for(Z=0;Z<2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),dt=ft-ht,pt=ut[1],mt=0|Math.floor(pt),gt=pt-mt,vt=!1;e:for(var yt=0;yt<3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(W=0;W<2;++W){var bt=W?dt:1-dt;for(K=0|Math.min(Math.max(ht+W,0),i[0]),X=0;X<2;++X){var _t=X?gt:1-gt;if(Q=0|Math.min(Math.max(mt+X,0),i[1]),J=yt<2?this._field[xt].get(K,Q):(this.intensity.get(K,Q)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(J)||isNaN(J)){vt=!0;break e}var wt=bt*_t;st[yt]+=wt*J}}}if(vt){if(Z>0){for(var Mt=0;Mt<5;++Mt)nt.pop();Y-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),Y+=1}}ot.push(Y)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var kt=p.mallocFloat(nt.length);for(a=0;a<nt.length;++a)kt[a]=nt[a];this._contourBuffer.update(kt),p.freeFloat(kt)}t.colormap&&this._colorMap.setPixels(function(t){var e=v([m({colormap:t,nshades:I,format:\"rgba\"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return g.divseq(e,255),e}(t.colormap))},P.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)p.freeFloat(this._field[t].data)},P.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=p.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var s=(o+1)%3,l=(o+2)%3,c=this._field[o],u=this._field[s],f=this._field[l],h=(this.intensity,x(c,r[o])),d=h.cells,m=h.positions;for(this._dynamicOffsets[o]=n,e=0;e<d.length;++e)for(var g=d[e],v=0;v<2;++v){var y=m[g[v]],b=+y[0],_=0|b,w=0|Math.min(_+1,i[0]),M=b-_,k=1-M,A=+y[1],T=0|A,S=0|Math.min(T+1,i[1]),E=A-T,L=1-E,C=k*L,z=k*E,D=M*L,I=M*E,P=C*u.get(_,T)+z*u.get(_,S)+D*u.get(w,T)+I*u.get(w,S),O=C*f.get(_,T)+z*f.get(_,S)+D*f.get(w,T)+I*f.get(w,S);if(isNaN(P)||isNaN(O)){v&&(n-=1);break}a[2*n+0]=P,a[2*n+1]=O,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),p.freeFloat(a)}}},{\"./lib/shaders\":253,\"binary-search-bounds\":70,\"bit-twiddle\":71,colormap:105,\"gl-buffer\":165,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"gl-texture2d\":255,\"gl-vao\":259,ndarray:458,\"ndarray-gradient\":449,\"ndarray-ops\":452,\"ndarray-pack\":453,\"surface-nets\":540,\"typedarray-pool\":554}],255:[function(t,e,r){\"use strict\";function n(t){return\"undefined\"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||\"undefined\"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||\"undefined\"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||\"undefined\"!=typeof ImageData&&t instanceof ImageData}function i(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||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 a(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 o(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 s(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 l(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)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 l=s(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new a(t,l,e,r,n,i)}var c=t(\"ndarray\"),u=t(\"ndarray-ops\"),f=t(\"typedarray-pool\");e.exports=function(t){if(arguments.length<=1)throw new Error(\"gl-texture2d: Missing arguments for texture2d constructor\");if(h||function(t){h=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],d=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],p=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t),\"number\"==typeof arguments[1])return l(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return l(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=n(e)?e:e.raw;if(r)return function(t,e,r,n,i,o){var l=s(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,o,e),new a(t,l,r,n,i,o)}(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 function(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 l=o(n,e.stride.slice()),h=0;\"float32\"===r?h=t.FLOAT:\"float64\"===r?(h=t.FLOAT,l=!1,r=\"float32\"):\"uint8\"===r?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,l=!1,r=\"uint8\");var d=0;if(2===n.length)d=t.LUMINANCE,n=[n[0],n[1],1],e=c(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])d=t.ALPHA;else if(2===n[2])d=t.LUMINANCE_ALPHA;else if(3===n[2])d=t.RGB;else{if(4!==n[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");d=t.RGBA}}h!==t.FLOAT||t.getExtension(\"OES_texture_float\")||(h=t.UNSIGNED_BYTE,l=!1);var p,g,v=e.size;if(l)p=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[n[2],n[2]*n[0],1];g=f.malloc(v,r);var x=c(g,n,y,0);\"float32\"!==r&&\"float64\"!==r||h!==t.UNSIGNED_BYTE?u.assign(x,e):m(x,e),p=g.subarray(0,v)}var b=s(t);return t.texImage2D(t.TEXTURE_2D,0,d,n[0],n[1],0,d,h,p),l||f.free(g),new a(t,b,n[0],n[1],d,h)}(t,e)}throw new Error(\"gl-texture2d: Invalid arguments for texture2d constructor\")};var h=null,d=null,p=null,m=function(t,e){u.muls(t,e,255)},g=a.prototype;Object.defineProperties(g,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&h.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),d.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&&h.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),d.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(),p.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(),p.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(p.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 i(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,i(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,i(this,this._shape[0],t),t}}}),g.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},g.dispose=function(){this.gl.deleteTexture(this.handle)},g.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)},g.setPixels=function(t,e,r,i){var a=this.gl;this.bind(),Array.isArray(e)?(i=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),i=i||0;var s=n(t)?t:t.raw;if(s){this._mipLevels.indexOf(i)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,s),this._mipLevels.push(i)):a.texSubImage2D(a.TEXTURE_2D,i,e,r,this.format,this.type,s)}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]>>>i||r+t.shape[0]>this._shape[0]>>>i||e<0||r<0)throw new Error(\"gl-texture2d: Texture dimensions are out of bounds\");!function(t,e,r,n,i,a,s,l){var h=l.dtype,d=l.shape.slice();if(d.length<2||d.length>3)throw new Error(\"gl-texture2d: Invalid ndarray, must be 2d or 3d\");var p=0,g=0,v=o(d,l.stride.slice());if(\"float32\"===h?p=t.FLOAT:\"float64\"===h?(p=t.FLOAT,v=!1,h=\"float32\"):\"uint8\"===h?p=t.UNSIGNED_BYTE:(p=t.UNSIGNED_BYTE,v=!1,h=\"uint8\"),2===d.length)g=t.LUMINANCE,d=[d[0],d[1],1],l=c(l.data,d,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==d.length)throw new Error(\"gl-texture2d: Invalid shape for texture\");if(1===d[2])g=t.ALPHA;else if(2===d[2])g=t.LUMINANCE_ALPHA;else if(3===d[2])g=t.RGB;else{if(4!==d[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");g=t.RGBA}d[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(g=i),g!==i)throw new Error(\"gl-texture2d: Incompatible texture format for setPixels\");var y=l.size,x=s.indexOf(n)<0;if(x&&s.push(n),p===a&&v)0===l.offset&&l.data.length===y?x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,l.data):x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,l.data.subarray(l.offset,l.offset+y)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,l.data.subarray(l.offset,l.offset+y));else{var b;b=a===t.FLOAT?f.mallocFloat32(y):f.mallocUint8(y);var _=c(b,d,[d[2],d[2]*d[0],1]);p===t.FLOAT&&a===t.UNSIGNED_BYTE?m(_,l):u.assign(_,l),x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,b.subarray(0,y)),a===t.FLOAT?f.freeFloat32(b):f.freeUint8(b)}}(a,e,r,i,this.format,this.type,this._mipLevels,t)}}},{ndarray:458,\"ndarray-ops\":452,\"typedarray-pool\":554}],256:[function(t,e,r){\"use strict\";e.exports=function(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;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(\"number\"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(\"gl-vao: Invalid vertex attribute\");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},{}],257:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}var i=t(\"./do-bind.js\");n.prototype.bind=function(){i(this.gl,this._elements,this._attributes)},n.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},n.prototype.dispose=function(){},n.prototype.unbind=function(){},n.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new n(t)}},{\"./do-bind.js\":256}],258:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function i(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}var a=t(\"./do-bind.js\");n.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},i.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},i.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},i.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},i.prototype.update=function(t,e,r){if(this.bind(),a(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var i=0;i<t.length;++i){var o=t[i];\"number\"==typeof o?this._attribs.push(new n(i,1,o)):Array.isArray(o)&&this._attribs.push(new n(i,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new i(t,e,e.createVertexArrayOES())}},{\"./do-bind.js\":256}],259:[function(t,e,r){\"use strict\";var n=t(\"./lib/vao-native.js\"),i=t(\"./lib/vao-emulated.js\");e.exports=function(t,e,r,a){var o,s=t.createVertexArray?new function(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}(t):t.getExtension(\"OES_vertex_array_object\");return(o=s?n(t,s):i(t)).update(e,r,a),o}},{\"./lib/vao-emulated.js\":257,\"./lib/vao-native.js\":258}],260:[function(t,e,r){e.exports=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}},{}],261:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],262:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],263:[function(t,e,r){e.exports=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}},{}],264:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},{}],265:[function(t,e,r){e.exports=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}},{}],266:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],267:[function(t,e,r){var n=t(\"glsl-tokenizer\"),i=t(\"atob-lite\");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if(\"preprocessor\"===a.type){var o=a.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{\"atob-lite\":52,\"glsl-tokenizer\":274}],268:[function(t,e,r){e.exports=function(t){function e(t){t.length&&D.push({type:w[C],data:t,position:O,line:I,column:P})}function r(t){E=0,S=(N+=t).length;for(var r;A=N[E],E<S;){switch(r=E,C){case u:E=\"/\"===A&&\"*\"===T?(z.push(A),e(z.join(\"\")),C=l,E+1):(z.push(A),T=A,E+1);break;case f:case h:E=M();break;case d:E=function(){if(\".\"===T&&/\\d/.test(A))return C=m,E;if(\"/\"===T&&\"*\"===A)return C=u,E;if(\"/\"===T&&\"/\"===A)return C=f,E;if(\".\"===A&&z.length){for(;k(z););return C=m,E}if(\";\"===A||\")\"===A||\"(\"===A){if(z.length)for(;k(z););return e(A),C=l,E+1}var t=2===z.length&&\"=\"!==A;if(/[\\w_\\d\\s]/.test(A)||t){for(;k(z););return C=l,E}return z.push(A),T=A,E+1}();break;case p:E=\".\"===A?(z.push(A),C=m,T=A,E+1):/[eE]/.test(A)?(z.push(A),C=m,T=A,E+1):\"x\"===A&&1===z.length&&\"0\"===z[0]?(C=_,z.push(A),T=A,E+1):/[^\\d]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case _:E=/[^a-fA-F0-9]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case m:\"f\"===A&&(z.push(A),T=A,E+=1),E=/[eE]/.test(A)?(z.push(A),T=A,E+1):\"-\"===A&&/[eE]/.test(T)?(z.push(A),T=A,E+1):/[^\\d]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case c:E=function(){if(/[^\\d\\w_]/.test(A)){var t=z.join(\"\");return C=B.indexOf(t)>-1?y:j.indexOf(t)>-1?v:g,e(z.join(\"\")),C=l,E}return z.push(A),T=A,E+1}();break;case x:E=/[^\\s]/g.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case l:z=z.length?[]:z,E=\"/\"===T&&\"*\"===A?(O=L+E-1,C=u,T=A,E+1):\"/\"===T&&\"/\"===A?(O=L+E-1,C=f,T=A,E+1):\"#\"===A?(C=h,O=L+E,E):/\\s/.test(A)?(C=x,O=L+E,E):(F=/\\d/.test(A),R=/[^\\w_]/.test(A),O=L+E,C=F?p:R?d:c,E)}if(r!==E)switch(N[r]){case\"\\n\":P=0,++I;break;default:++P}}return L+=E,N=N.slice(E),D}function M(){return\"\\r\"!==A&&\"\\n\"!==A||\"\\\\\"===T?(z.push(A),T=A,E+1):(e(z.join(\"\")),C=l,E)}function k(t){for(var r,n,a=0;;){if(r=i.indexOf(t.slice(0,t.length+a).join(\"\")),n=i[r],-1===r){if(a--+t.length>0)continue;n=t.slice(0,1).join(\"\")}return e(n),O+=n.length,(z=z.slice(n.length)).length}}var A,T,S,E=0,L=0,C=l,z=[],D=[],I=1,P=0,O=0,F=!1,R=!1,N=\"\",j=a,B=n;return\"300 es\"===(t=t||{}).version&&(j=s,B=o),function(t){return D=[],null!==t?r(t.replace?t.replace(/\\r\\n/g,\"\\n\"):t):(z.length&&e(z.join(\"\")),C=b,e(\"(eof)\"),D)}};var n=t(\"./lib/literals\"),i=t(\"./lib/operators\"),a=t(\"./lib/builtins\"),o=t(\"./lib/literals-300es\"),s=t(\"./lib/builtins-300es\"),l=999,c=9999,u=0,f=1,h=2,d=3,p=4,m=5,g=6,v=7,y=8,x=9,b=10,_=11,w=[\"block-comment\",\"line-comment\",\"preprocessor\",\"operator\",\"integer\",\"float\",\"ident\",\"builtin\",\"keyword\",\"whitespace\",\"eof\",\"integer\"]},{\"./lib/builtins\":270,\"./lib/builtins-300es\":269,\"./lib/literals\":272,\"./lib/literals-300es\":271,\"./lib/operators\":273}],269:[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\":270}],270:[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\"]},{}],271:[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\":272}],272:[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\"]},{}],273:[function(t,e,r){e.exports=[\"<<=\",\">>=\",\"++\",\"--\",\"<<\",\">>\",\"<=\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"+=\",\"-=\",\"*=\",\"/=\",\"%=\",\"&=\",\"^^\",\"^=\",\"|=\",\"(\",\")\",\"[\",\"]\",\".\",\"!\",\"~\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\">\",\"&\",\"^\",\"|\",\"?\",\":\",\"=\",\",\",\";\",\"{\",\"}\"]},{}],274:[function(t,e,r){var n=t(\"./index\");e.exports=function(t,e){var r=n(e),i=[];return i=i.concat(r(t)),i=i.concat(r(null))}},{\"./index\":268}],275:[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<this.d*this.d;o++){var s=a[i+o],l=a[i+o+1];n.push(s===l?null:a.subarray(s,l))}var c=a[i+n.length],u=a[i+n.length+1];this.keys=a.subarray(c,u),this.bboxes=a.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var f=0;f<this.d*this.d;f++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}e.exports=n;var i=3;n.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},n.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},n.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},n.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t<=i&&e<=i&&a<=r&&a<=n)return Array.prototype.slice.call(this.keys);var o=[],s={};return this._forEachCell(t,e,r,n,this._queryCell,o,s),o},n.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u<s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t<=c[h+2]&&e<=c[h+3]&&r>=c[h+0]&&n>=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var d=this.d*h+f;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<this.cells.length;n++)r+=this.cells[n].length;var a=new Int32Array(e+r+this.keys.length+this.bboxes.length);a[0]=this.extent,a[1]=this.n,a[2]=this.padding;for(var o=e,s=0;s<t.length;s++){var l=t[s];a[i+s]=o,a.set(l,o),o+=l.length}return a[i+t.length]=o,a.set(this.keys,o),o+=this.keys.length,a[i+t.length+1]=o,a.set(this.bboxes,o),o+=this.bboxes.length,a.buffer}},{}],276:[function(t,e,r){(function(r){\"use strict\";var n,i=t(\"is-browser\");n=\"function\"==typeof r.matchMedia?!r.matchMedia(\"(hover: none)\").matches:i,e.exports=n}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"is-browser\":282}],277:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=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=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+d]=255&o,d+=p,o/=256,c-=8);t[r+d-p]|=128*m}},{}],278:[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 l(t.vertices,e.vertices)}function o(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=c[t];i||(i=c[t]=function(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=s[t+1];return i||(i=s),n(i)}(t)),this.orient=i}e.exports=function(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),l=s.apply(void 0,a);if(0===l)throw new Error(\"Input not in general position\");for(var c=new Array(i+1),u=0;u<=i;++u)c[u]=u;l<0&&(c[0]=1,c[1]=0);var f=new n(c,new Array(i+1),!1),h=f.adjacent,d=new Array(i+2);for(u=0;u<=i;++u){for(var p=c.slice(),m=0;m<=i;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);h[u]=v,d[u]=v}for(d[i+1]=f,u=0;u<=i;++u){p=h[u].vertices;var y=h[u].adjacent;for(m=0;m<=i;++m){var x=p[m];if(x<0)y[m]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[m]=h[b])}}var _=new o(i,a,d),w=!!e;for(u=i+1;u<r;++u)_.insert(t[u],w);return _.boundary()};var s=t(\"robust-orientation\"),l=t(\"simplicial-complex\").compareCells;n.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var c=[],u=o.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var d=this.orient();if(d>0)return c;c.lastVisited=-n,0===d&&o.push(c)}}}return null},u.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,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var d=this.orient();if(a[u]=h,d<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var d=(e=f.pop()).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 x=0,b=0;b<=o;++b)y[b]<0?(x=b,l[b]=t):l[b]=s[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=d.slice(),M=p.slice(),k=new n(w,M,!0);u.push(k);var A=_.indexOf(e);if(!(A<0)){_[A]=k,M[m]=v,w[g]=-1,M[g]=e,p[g]=k,k.flip();for(b=0;b<=o;++b){var T=w[b];if(!(T<0||T===r)){for(var S=new Array(o-1),E=0,L=0;L<=o;++L){var C=w[L];C<0||L===b||(S[E++]=C)}h.push(new i(S,k,b))}}}}}}h.sort(a);for(g=0;g+1<h.length;g+=2){var z=h[g],D=h[g+1],I=z.index,P=D.index;I<0||P<0||(z.cell.adjacent[z.index]=D.cell,D.cell.adjacent[D.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u<=t;++u)s[u]>=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{\"robust-orientation\":515,\"simplicial-complex\":526}],279:[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?v:(r.splice(n,1),a(t,r),y)}function l(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function c(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function u(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function f(t,e){return t-e}function h(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function d(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function p(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(f);var i=e[e.length>>1],a=[],o=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<i?a.push(l):i<l[0]?o.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(h),u.sort(d),new n(i,p(a),p(o),c,u)}function m(t){this.root=t}var g=t(\"binary-search-bounds\"),v=0,y=1;e.exports=function(t){return new m(t&&0!==t.length?p(t):null)};var x=n.prototype;x.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},x.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(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=g.ge(this.leftPoints,t,h),n=g.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]<this.mid){if(!this.left)return v;if(4*(this.right?this.right.count:0)>3*(e-1))return s(this,t);return 2===(o=this.left.remove(t))?(this.left=null,this.count-=1,y):(o===y&&(this.count-=1),o)}if(t[0]>this.mid){if(!this.right)return v;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);return 2===(o=this.right.remove(t))?(this.right=null,this.count-=1,y):(o===y&&(this.count-=1),o)}if(1===this.count)return this.leftPoints[0]===t?2:v;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,n=this.left;n.right;)r=n,n=n.right;if(r===this)n.right=this.right;else{var a=this.left,o=this.right;r.count-=n.count,r.right=n.left,n.left=a,n.right=o}i(this,n),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 y}for(a=g.ge(this.leftPoints,t,h);a<this.leftPoints.length&&this.leftPoints[a][0]===t[0];++a)if(this.leftPoints[a]===t){this.count-=1,this.leftPoints.splice(a,1);for(o=g.ge(this.rightPoints,t,d);o<this.rightPoints.length&&this.rightPoints[o][1]===t[1];++o)if(this.rightPoints[o]===t)return this.rightPoints.splice(o,1),y}return v},x.queryPoint=function(t,e){if(t<this.mid){if(this.left){if(r=this.left.queryPoint(t,e))return r}return l(this.leftPoints,t,e)}if(t>this.mid){if(this.right){var r;if(r=this.right.queryPoint(t,e))return r}return c(this.rightPoints,t,e)}return u(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(t<this.mid&&this.left){if(n=this.left.queryInterval(t,e,r))return n}if(e>this.mid&&this.right){var n;if(n=this.right.queryInterval(t,e,r))return n}return e<this.mid?l(this.leftPoints,e,r):t>this.mid?c(this.rightPoints,t,r):u(this.leftPoints,r)};var b=m.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==v}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,\"count\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,\"intervals\",{get:function(){return this.root?this.root.intervals([]):[]}})},{\"binary-search-bounds\":70}],280:[function(t,e,r){\"use strict\";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r<t.length;++r)e[t[r]]=r;return e}},{}],281:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},{}],282:[function(t,e,r){e.exports=!0},{}],283:[function(t,e,r){function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return\"function\"==typeof t.readFloatLE&&\"function\"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],284:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],285:[function(t,e,r){e.exports=function(t){return t||\"undefined\"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]),\"string\"==typeof t&&(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(t.substr(0,4)))}},{}],286:[function(t,e,r){\"use strict\";var n=Object.prototype.toString;e.exports=function(t){var e;return\"[object Object]\"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],287:[function(t,e,r){\"use strict\";e.exports=function(t){return\"string\"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\dz]$/i.test(t)&&t.length>4))}},{}],288:[function(t,e,r){\"use strict\";function n(t,e,r,n,a){e=e||function(t){return t[0]},r=r||function(t){return t[1]},a=a||Array,this.nodeSize=n||64,this.points=t,this.ids=new a(t.length),this.coords=new a(2*t.length);for(var o=0;o<t.length;o++)this.ids[o]=o,this.coords[2*o]=e(t[o]),this.coords[2*o+1]=r(t[o]);i(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}var i=t(\"./sort\"),a=t(\"./range\"),o=t(\"./within\");e.exports=function(t,e,r,i,a){return new n(t,e,r,i,a)},n.prototype={range:function(t,e,r,n){return a(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return o(this.ids,this.coords,t,e,r,this.nodeSize)}}},{\"./range\":289,\"./sort\":290,\"./within\":291}],289:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),d=c.pop();if(h-d<=o)for(var p=d;p<=h;p++)s=e[2*p],l=e[2*p+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[p]);else{var m=Math.floor((d+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[m]);var g=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(d),c.push(m-1),c.push(g)),(0===f?i>=s:a>=l)&&(c.push(m+1),c.push(h),c.push(g))}}return u}},{}],290:[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,c=r-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-c*f/l+h)),Math.min(o,Math.floor(r+(l-c)*f/l+h)),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);p<m;){for(a(t,e,p,m),p++,m--;e[2*p+s]<d;)p++;for(;e[2*m+s]>d;)m--}e[2*n+s]===d?a(t,e,n,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},{}],291:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=function(t,e,r,i,a,o){for(var s=[0,t.length-1,0],l=[],c=a*a;s.length;){var u=s.pop(),f=s.pop(),h=s.pop();if(f-h<=o)for(var d=h;d<=f;d++)n(e[2*d],e[2*d+1],r,i)<=c&&l.push(t[d]);else{var p=Math.floor((h+f)/2),m=e[2*p],g=e[2*p+1];n(m,g,r,i)<=c&&l.push(t[p]);var v=(u+1)%2;(0===u?r-a<=m:i-a<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===u?r+a>=m:i+a>=g)&&(s.push(p+1),s.push(f),s.push(v))}}return l}},{}],292:[function(t,e,r){\"use strict\";function n(t,e){if(!(this instanceof n))return new n(t,e);this.nodeSize=e||64,this.coords=t.slice();var r=Math.floor(t.length/2);this.ids=Array(r);for(var i=0;i<r;i++)this.ids[i]=i;a(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}function a(t,e,r,n,i,s){if(!(i-n<=r)){var l=Math.floor((n+i)/2);o(t,e,l,n,i,s%2),a(t,e,r,n,l-1,s+1),a(t,e,r,l+1,i,s+1)}}function o(t,e,r,n,i,a){for(;i>n;){if(i-n>600){var l=i-n+1,c=r-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1);o(t,e,r,Math.max(n,Math.floor(r-c*f/l+h)),Math.min(i,Math.floor(r+(l-c)*f/l+h)),a)}var d=e[2*r+a],p=n,m=i;for(s(t,e,n,r),e[2*i+a]>d&&s(t,e,n,i);p<m;){for(s(t,e,p,m),p++,m--;e[2*p+a]<d;)p++;for(;e[2*m+a]>d;)m--}e[2*n+a]===d?s(t,e,n,m):s(t,e,++m,i),m<=r&&(n=m+1),r<=m&&(i=m-1)}}function s(t,e,r,n){l(t,r,n),l(e,2*r,2*n),l(e,2*r+1,2*n+1)}function l(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n,n.prototype.range=function(t,e,r,n){for(var i,a,o=this.ids,s=this.coords,l=this.nodeSize,c=[0,o.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),d=c.pop();if(h-d<=l)for(var p=d;p<=h;p++)i=s[2*p],a=s[2*p+1],i>=t&&i<=r&&a>=e&&a<=n&&u.push(o[p]);else{var m=Math.floor((d+h)/2);i=s[2*m],a=s[2*m+1],i>=t&&i<=r&&a>=e&&a<=n&&u.push(o[m]);var g=(f+1)%2;(0===f?t<=i:e<=a)&&(c.push(d),c.push(m-1),c.push(g)),(0===f?r>=i:n>=a)&&(c.push(m+1),c.push(h),c.push(g))}}return u},n.prototype.within=function(t,e,r){for(var n=this.ids,a=this.coords,o=this.nodeSize,s=[0,n.length-1,0],l=[],c=r*r;s.length;){var u=s.pop(),f=s.pop(),h=s.pop();if(f-h<=o)for(var d=h;d<=f;d++)i(a[2*d],a[2*d+1],t,e)<=c&&l.push(n[d]);else{var p=Math.floor((h+f)/2),m=a[2*p],g=a[2*p+1];i(m,g,t,e)<=c&&l.push(n[p]);var v=(u+1)%2;(0===u?t-r<=m:e-r<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===u?t+r>=m:e+r>=g)&&(s.push(p+1),s.push(f),s.push(v))}}return l}},{}],293:[function(t,e,r){\"use strict\";function n(t,e){var r;if(u(t)){var l,c=t.stops&&\"object\"==typeof t.stops[0][0],f=c||void 0!==t.property,h=c||!f,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(c){for(var p={},m=[],g=0;g<t.stops.length;g++){var v=t.stops[g];void 0===p[v[0].zoom]&&(p[v[0].zoom]={zoom:v[0].zoom,type:t.type,property:t.property,stops:[]}),p[v[0].zoom].stops.push([v[0].value,v[1]])}for(var y in p)m.push([p[y].zoom,n(p[y])]);(r=function(e,r){return o({stops:m,base:t.base},e)(e,r)}).isFeatureConstant=!1,r.isZoomConstant=!1}else h?((r=function(e){return l(t,e)}).isFeatureConstant=!0,r.isZoomConstant=!1):((r=function(e,r){return l(t,r[t.property])}).isFeatureConstant=!1,r.isZoomConstant=!0)}else(r=function(){return t}).isFeatureConstant=!0,r.isZoomConstant=!0;return r}function i(t,e){for(var r=0;r<t.stops.length;r++)if(e===t.stops[r][0])return t.stops[r][1];return t.stops[0][1]}function a(t,e){for(var r=0;r<t.stops.length&&!(e<t.stops[r][0]);r++);return t.stops[Math.max(r-1,0)][1]}function o(t,e){for(var r=void 0!==t.base?t.base:1,n=0;!(n>=t.stops.length||e<=t.stops[n][0]);)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?function(t,e,r,n,i,a){for(var o=[],s=0;s<i.length;s++)o[s]=c(t,e,r,n,i[s],a[s]);return o}(t,e,r,n,i,a):c(t,e,r,n,i,a)}function c(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 u(t){return\"object\"==typeof t&&(t.stops||\"identity\"===t.type)}e.exports.isFunctionDefinition=u,e.exports.interpolated=function(t){return n(t,\"exponential\")},e.exports[\"piecewise-constant\"]=function(t){return n(t,\"interval\")}},{}],294:[function(t,e,r){t(\"path\");e.exports={debug:{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;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\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;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{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 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * 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;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},circle:{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 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n float t = smoothstep(1.0 - max(blur, v_antialiasblur), 1.0, length(v_extrude));\\n gl_FragColor = color * (1.0 - t) * 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 bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\nuniform float u_devicepixelratio;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * radius * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / u_devicepixelratio / radius;\\n}\\n\"},line:{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;\\nuniform float u_blur;\\n\\nvarying vec2 v_linewidth;\\nvarying vec2 v_normal;\\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 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\\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;\\nuniform mediump float u_blur;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_linewidth;\\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\\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 // 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:468}],295:[function(t,e,r){\"use strict\";var n=t(\"util\").format;e.exports=function(t,e){this.message=(t?t+\": \":\"\")+n.apply(n,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}},{util:563}],296:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}},{}],297:[function(t,e,r){\"use strict\";e.exports=function(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}},{}],298:[function(t,e,r){\"use strict\";e.exports=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}},{}],299:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"../util/extend\");e.exports=function(e){var r=t(\"./validate_function\"),o=t(\"./validate_object\"),s={\"*\":function(){return[]},array:t(\"./validate_array\"),boolean:t(\"./validate_boolean\"),number:t(\"./validate_number\"),color:t(\"./validate_color\"),constants:t(\"./validate_constants\"),enum:t(\"./validate_enum\"),filter:t(\"./validate_filter\"),function:t(\"./validate_function\"),layer:t(\"./validate_layer\"),object:t(\"./validate_object\"),source:t(\"./validate_source\"),string:t(\"./validate_string\")},l=e.value,c=e.valueSpec,u=e.key,f=e.styleSpec,h=e.style;if(\"string\"===i(l)&&\"@\"===l[0]){if(f.$version>7)return[new n(u,l,\"constants have been deprecated as of v8\")];if(!(l in h.constants))return[new n(u,l,'constant \"%s\" not found',l)];e=a({},e,{value:h.constants[l]})}return c.function&&\"object\"===i(l)?r(e):c.type&&s[c.type]?s[c.type](e):o(a({},e,{valueSpec:c.type?f[c.type]:c}))}},{\"../error/validation_error\":295,\"../util/extend\":296,\"../util/get_type\":297,\"./validate_array\":300,\"./validate_boolean\":301,\"./validate_color\":302,\"./validate_constants\":303,\"./validate_enum\":304,\"./validate_filter\":305,\"./validate_function\":306,\"./validate_layer\":308,\"./validate_number\":310,\"./validate_object\":311,\"./validate_source\":313,\"./validate_string\":314}],300:[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,c=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.length<r[\"min-length\"])return[new a(l,e,\"array length at least %d expected, length %d found\",r[\"min-length\"],e.length)];var u={type:r.value};s.$version<7&&(u.function=r.function),\"object\"===n(r.value)&&(u=r.value);for(var f=[],h=0;h<e.length;h++)f=f.concat(c({array:e,arrayIndex:h,value:e[h],valueSpec:u,style:o,styleSpec:s,key:l+\"[\"+h+\"]\"}));return f}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299}],301:[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\"boolean\"!==a?[new i(r,e,\"boolean expected, %s found\",a)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297}],302:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"csscolorparser\").parseCSSColor;e.exports=function(t){var e=t.key,r=t.value,o=i(r);return\"string\"!==o?[new n(e,r,\"color expected, %s found\",o)]:null===a(r)?[new n(e,r,'color expected, \"%s\" found',r)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297,csscolorparser:114}],303:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\");e.exports=function(t){var e=t.key,r=t.value;if(t.styleSpec.$version>7)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\":295,\"../util/get_type\":297}],304:[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\":295,\"../util/unbundle_jsonlint\":298}],305:[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,c=e.styleSpec,u=[];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(u=u.concat(i({key:l+\"[0]\",value:s[0],valueSpec:c.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case\"<\":case\"<=\":case\">\":case\">=\":s.length>=2&&\"$type\"==s[1]&&u.push(new n(l,s,'\"$type\" cannot be use with operator \"%s\"',s[0]));case\"==\":case\"!=\":3!=s.length&&u.push(new n(l,s,'filter array for operator \"%s\" must have 3 elements',s[0]));case\"in\":case\"!in\":s.length>=2&&(\"string\"!==(r=a(s[1]))?u.push(new n(l+\"[1]\",s[1],\"string expected, %s found\",r)):\"@\"===s[1][0]&&u.push(new n(l+\"[1]\",s[1],\"filter key cannot be a constant\")));for(var f=2;f<s.length;f++)r=a(s[f]),\"$type\"==s[1]?u=u.concat(i({key:l+\"[\"+f+\"]\",value:s[f],valueSpec:c.geometry_type,style:e.style,styleSpec:e.styleSpec})):\"string\"===r&&\"@\"===s[f][0]?u.push(new n(l+\"[\"+f+\"]\",s[f],\"filter value cannot be a constant\")):\"string\"!==r&&\"number\"!==r&&\"boolean\"!==r&&u.push(new n(l+\"[\"+f+\"]\",s[f],\"string, number, or boolean expected, %s found\",r));break;case\"any\":case\"all\":case\"none\":for(f=1;f<s.length;f++)u=u.concat(t({key:l+\"[\"+f+\"]\",value:s[f],style:e.style,styleSpec:e.styleSpec}));break;case\"has\":case\"!has\":r=a(s[1]),2!==s.length?u.push(new n(l,s,'filter array for \"%s\" operator must have 2 elements',s[0])):\"string\"!==r?u.push(new n(l+\"[1]\",s[1],\"string expected, %s found\",r)):\"@\"===s[1][0]&&u.push(new n(l+\"[1]\",s[1],\"filter key cannot be a constant\"))}return u}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"../util/unbundle_jsonlint\":298,\"./validate_enum\":304}],306:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"./validate\"),o=t(\"./validate_object\"),s=t(\"./validate_array\"),l=t(\"./validate_number\");e.exports=function(t){function e(t){var e=[],s=t.value,f=t.key;if(\"array\"!==i(s))return[new n(f,s,\"array expected, %s found\",i(s))];if(2!==s.length)return[new n(f,s,\"array length %d expected, length %d found\",2,s.length)];var d=i(s[0]);if(c||(c=d),d!==c)return[new n(f,s,\"%s stop key type must match previous stop key type %s\",d,c)];if(\"object\"===d){if(void 0===s[0].zoom)return[new n(f,s,\"object stop key must have zoom\")];if(void 0===s[0].value)return[new n(f,s,\"object stop key must have value\")];e=e.concat(o({key:f+\"[0]\",value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:l,value:r}}))}else e=e.concat((h?l:r)({key:f+\"[0]\",value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec}));return e=e.concat(a({key:f+\"[1]\",value:s[1],valueSpec:u,style:t.style,styleSpec:t.styleSpec})),\"number\"===i(s[0])&&(\"piecewise-constant\"===u.function&&s[0]%1!=0&&e.push(new n(f+\"[0]\",s[0],\"zoom level for piecewise-constant functions must be an integer\")),0!==t.arrayIndex&&s[0]<t.array[t.arrayIndex-1][0]&&e.push(new n(f+\"[0]\",s[0],\"array stops must appear in ascending order\"))),e}function r(t){var e=[],r=i(t.value);return\"number\"!==r&&\"string\"!==r&&\"array\"!==r&&e.push(new n(t.key,t.value,\"property value must be a number, string or array\")),e}var c,u=t.valueSpec,f=void 0!==t.value.property||\"object\"===c,h=void 0===t.value.property||\"object\"===c,d=o({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){var r=[],a=t.value;return r=r.concat(s({key:t.key,value:a,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),\"array\"===i(a)&&0===a.length&&r.push(new n(t.key,a,\"array must have at least one stop\")),r}}});return t.styleSpec.$version>=8&&(f&&!t.valueSpec[\"property-function\"]?d.push(new n(t.key,t.value,\"property functions not supported\")):h&&!t.valueSpec[\"zoom-function\"]&&d.push(new n(t.key,t.value,\"zoom functions not supported\"))),d}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299,\"./validate_array\":300,\"./validate_number\":310,\"./validate_object\":311}],307:[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\":295,\"./validate_string\":314}],308:[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\"),c=t(\"../util/extend\");e.exports=function(t){var e=[],r=t.value,u=t.key,f=t.style,h=t.styleSpec;r.type||r.ref||e.push(new n(u,r,'either \"type\" or \"ref\" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;m<t.arrayIndex;m++){var g=f.layers[m];i(g.id)===i(r.id)&&e.push(new n(u,r.id,'duplicate layer id \"%s\", previously used at line %d',r.id,g.id.__line__))}if(\"ref\"in r){[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(function(t){t in r&&e.push(new n(u,r[t],'\"%s\" is prohibited for ref layers',t))});var v;f.layers.forEach(function(t){t.id==p&&(v=t)}),v?v.ref?e.push(new n(u,r.ref,\"ref cannot reference another ref layer\")):d=i(v.type):e.push(new n(u,r.ref,'ref layer \"%s\" not found',p))}else if(\"background\"!==d)if(r.source){var y=f.sources&&f.sources[r.source];y?\"vector\"==y.type&&\"raster\"==d?e.push(new n(u,r.source,'layer \"%s\" requires a raster source',r.id)):\"raster\"==y.type&&\"raster\"!=d?e.push(new n(u,r.source,'layer \"%s\" requires a vector source',r.id)):\"vector\"!=y.type||r[\"source-layer\"]||e.push(new n(u,r,'layer \"%s\" must specify a \"source-layer\"',r.id)):e.push(new n(u,r.source,'source \"%s\" not found',r.source))}else e.push(new n(u,r,'missing required property \"source\"'));return e=e.concat(a({key:u,value:r,valueSpec:h.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{filter:o,layout:function(t){return a({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return l(c({layerType:d},t))}}})},paint:function(t){return a({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return s(c({layerType:d},t))}}})}}}))}},{\"../error/validation_error\":295,\"../util/extend\":296,\"../util/unbundle_jsonlint\":298,\"./validate_filter\":305,\"./validate_layout_property\":309,\"./validate_object\":311,\"./validate_paint_property\":312}],309:[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[\"layout_\"+t.layerType];if(t.valueSpec||l[s]){var c=[];return\"symbol\"===t.layerType&&(\"icon-image\"===s&&r&&!r.sprite?c.push(new i(e,o,'use of \"icon-image\" requires a style \"sprite\" property')):\"text-field\"===s&&r&&!r.glyphs&&c.push(new i(e,o,'use of \"text-field\" requires a style \"glyphs\" property'))),c.concat(n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}))}return[new i(e,o,'unknown property \"%s\"',s)]}},{\"../error/validation_error\":295,\"./validate\":299}],310:[function(t,e,r){\"use strict\";var n=t(\"../util/get_type\"),i=t(\"../error/validation_error\");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=n(r);return\"number\"!==o?[new i(e,r,\"number expected, %s found\",o)]:\"minimum\"in a&&r<a.minimum?[new i(e,r,\"%s is less than the minimum value %s\",r,a.minimum)]:\"maximum\"in a&&r>a.maximum?[new i(e,r,\"%s is greater than the maximum value %s\",r,a.maximum)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297}],311:[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,c=t.styleSpec,u=[],f=i(r);if(\"object\"!==f)return[new n(e,r,\"object expected, %s found\",f)];for(var h in r){var d=h.split(\".\")[0],p=o&&(o[d]||o[\"*\"]),m=s[d]||s[\"*\"];p||m?u=u.concat((m||a)({key:(e?e+\".\":e)+h,value:r[h],valueSpec:p,style:l,styleSpec:c,object:r,objectKey:h})):\"\"!==e&&1!==e.split(\".\").length&&u.push(new n(e,r[h],'unknown property \"%s\"',h))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&u.push(new n(e,r,'missing required property \"%s\"',d));return u}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299}],312:[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],c=s.match(/^(.*)-transition$/);return c&&l[c[1]]&&l[c[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\":295,\"./validate\":299}],313:[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 c=[];if(c=c.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),\"url\"in e)for(var u in e)[\"type\",\"url\",\"tileSize\"].indexOf(u)<0&&c.push(new n(r+\".\"+u,e[u],'a source with a \"url\" property may not include a \"%s\" property',u));return c;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\":295,\"../util/unbundle_jsonlint\":298,\"./validate_enum\":304,\"./validate_object\":311}],314:[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\":295,\"../util/get_type\":297}],315:[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:c}})),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\"),c=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\":316,\"./validate/validate\":299,\"./validate/validate_constants\":303,\"./validate/validate_filter\":305,\"./validate/validate_glyphs_url\":307,\"./validate/validate_layer\":308,\"./validate/validate_layout_property\":309,\"./validate/validate_paint_property\":312,\"./validate/validate_source\":313}],316:[function(t,e,r){e.exports=t(\"./v8.min.json\")},{\"./v8.min.json\":317}],317:[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\"}}}},{}],318:[function(t,e,r){\"use strict\";function n(t){return!!(\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&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.prototype&&Function.prototype.bind&&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&&\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON&&\"Worker\"in window&&\"Uint8ClampedArray\"in window&&function(t){void 0===i[t]&&(i[t]=function(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)}(t));return i[t]}(t&&t.failIfMajorPerformanceCaveat))}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var i={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],319:[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\":433}],320:[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=function(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},a=0;a<t.childLayers.length;a++){var o=t.childLayers[a];n[o.id]={attributes:[],uniforms:[],defines:[],vertexPragmas:{define:{},initialize:{}},fragmentPragmas:{define:{},initialize:{}}}}var s=t.programInterfaces[r];if(s.paintAttributes)for(var c=\"{precision}\",f=\"{type}\",h=0;h<s.paintAttributes.length;h++){var d=s.paintAttributes[h];d.multiplier=d.multiplier||1;for(var p=0;p<t.childLayers.length;p++){var m=t.childLayers[p],g=n[m.id],v=d.name;u(\"a_\"===d.name.slice(0,2));var y,x=d.name.slice(2);if(g.fragmentPragmas.initialize[x]=\"\",m.isPaintValueFeatureConstant(d.paintProperty))g.uniforms.push(d),g.fragmentPragmas.define[x]=g.vertexPragmas.define[x]=[\"uniform\",c,f,v].join(\" \")+\";\",g.fragmentPragmas.initialize[x]=g.vertexPragmas.initialize[x]=[c,f,x,\"=\",v].join(\" \")+\";\\n\";else if(m.isPaintValueZoomConstant(d.paintProperty)){g.attributes.push(l.extend({},d,{name:v})),y=[\"varying\",c,f,x].join(\" \")+\";\\n\";var b=[g.fragmentPragmas.define[x],\"attribute\",c,f,v].join(\" \")+\";\\n\";g.fragmentPragmas.define[x]=y,g.vertexPragmas.define[x]=y+b,g.vertexPragmas.initialize[x]=[x,\"=\",v,\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\"}else{for(var _=\"u_\"+v.slice(2)+\"_t\",w=m.getPaintValueStopZoomLevels(d.paintProperty),M=0;M<w.length&&w[M]<t.zoom;)M++;for(var k=Math.max(0,Math.min(w.length-4,M-2)),A=[],T=0;T<4;T++)A.push(w[Math.min(k+T,w.length-1)]);y=[\"varying\",c,f,x].join(\" \")+\";\\n\",g.vertexPragmas.define[x]=y+[\"uniform\",\"lowp\",\"float\",_].join(\" \")+\";\\n\",g.fragmentPragmas.define[x]=y,g.uniforms.push(l.extend({},d,{name:_,getValue:function(t,e){return function(r,n){var i=r.getPaintInterpolationT(t.paintProperty,n.zoom);return[Math.max(0,Math.min(4,i-e))]}}(d,k),components:1}));var S=d.components;if(1===S)g.attributes.push(l.extend({},d,{getValue:i(d,A),isFunction:!0,components:4*S})),g.vertexPragmas.define[x]+=[\"attribute\",c,\"vec4\",v].join(\" \")+\";\\n\",g.vertexPragmas.initialize[x]=[x,\"=\",\"evaluate_zoom_function_1(\"+v+\", \"+_+\")\",\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\";else{for(var E=[],L=0;L<4;L++)E.push(v+L),g.attributes.push(l.extend({},d,{getValue:i(d,[A[L]]),isFunction:!0,name:v+L})),g.vertexPragmas.define[x]+=[\"attribute\",c,f,v+L].join(\" \")+\";\\n\";g.vertexPragmas.initialize[x]=[x,\" = \",\"evaluate_zoom_function_4(\"+E.join(\", \")+\", \"+_+\")\",\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\"}}}}}return e}(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=l.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new s(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t,e){return function(r,n,i){if(1===e.length)return t.getValue(r,l.extend({},n,{zoom:e[0]}),i);for(var a=[],o=0;o<e.length;o++){var s=e[o];a.push(t.getValue(r,l.extend({},n,{zoom:s}),i)[0])}return a}}var a=t(\"feature-filter\"),o=t(\"./array_group\"),s=t(\"./buffer_group\"),l=t(\"../util/util\"),c=t(\"../util/struct_array\"),u=t(\"assert\");e.exports=n,n.create=function(e){return new({fill:t(\"./bucket/fill_bucket\"),line:t(\"./bucket/line_bucket\"),circle:t(\"./bucket/circle_bucket\"),symbol:t(\"./bucket/symbol_bucket\")}[e.layer.type])(e)},n.EXTENT=8192,n.prototype.populateArrays=function(){this.createArrays(),this.recalculateStyleLayers();for(var t=0;t<this.features.length;t++)this.addFeature(this.features[t]);this.trimArrays()},n.prototype.prepareArrayGroup=function(t,e){var r=this.arrayGroups[t],n=r.length&&r[r.length-1];return n&&n.hasCapacityFor(e)||((n=new o({layoutVertexArrayType:this.programInterfaces[t].layoutVertexArrayType,elementArrayType:this.programInterfaces[t].elementArrayType,elementArrayType2:this.programInterfaces[t].elementArrayType2,paintVertexArrayTypes:this.paintVertexArrayTypes[t]})).index=r.length,r.push(n)),n},n.prototype.createArrays=function(){this.arrayGroups={},this.paintVertexArrayTypes={};for(var t in this.programInterfaces){this.arrayGroups[t]=[];var e=this.paintVertexArrayTypes[t]={},r=this.paintAttributes[t];for(var i in r)e[i]=new n.VertexArrayType(r[i].attributes)}},n.prototype.destroy=function(t){for(var e in this.bufferGroups)for(var r=this.bufferGroups[e],n=0;n<r.length;n++)r[n].destroy(t)},n.prototype.trimArrays=function(){for(var t in this.arrayGroups)for(var e=this.arrayGroups[t],r=0;r<e.length;r++)e[r].trim()},n.prototype.isEmpty=function(){for(var t in this.arrayGroups)for(var e=this.arrayGroups[t],r=0;r<e.length;r++)if(!e[r].isEmpty())return!1;return!0},n.prototype.getTransferables=function(t){for(var e in this.arrayGroups)for(var r=this.arrayGroups[e],n=0;n<r.length;n++)r[n].getTransferables(t)},n.prototype.setUniforms=function(t,e,r,n,i){for(var a=this.paintAttributes[e][n.id].uniforms,o=0;o<a.length;o++){var s=a[o],l=r[s.name];t[\"uniform\"+s.components+\"fv\"](l,s.getValue(n,i))}},n.prototype.serialize=function(){return{layerId:this.layer.id,zoom:this.zoom,arrays:l.mapObject(this.arrayGroups,function(t){return t.map(function(t){return t.serialize()})}),paintVertexArrayTypes:l.mapObject(this.paintVertexArrayTypes,function(t){return l.mapObject(t,function(t){return t.serialize()})}),childLayerIds:this.childLayers.map(function(t){return t.id})}},n.prototype.createFilter=function(){this.filter||(this.filter=a(this.layer.filter))};var f={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};n.prototype.recalculateStyleLayers=function(){for(var t=0;t<this.childLayers.length;t++)this.childLayers[t].recalculate(this.zoom,f)},n.prototype.populatePaintArrays=function(t,e,r,n,i){for(var a=0;a<this.childLayers.length;a++)for(var o=this.childLayers[a],s=this.arrayGroups[t],l=n.index;l<s.length;l++){var c=s[l],u=c.layoutVertexArray.length,f=c.paintVertexArrays[o.id];f.resize(u);for(var h=this.paintAttributes[t][o.id].attributes,d=0;d<h.length;d++)for(var p=h[d],m=p.getValue(o,e,r),g=p.multiplier||1,v=p.components||1,y=l===n.index?i:0;y<u;y++)for(var x=f.get(y),b=0;b<v;b++){x[v>1?p.name+b:p.name]=m[b]*g}}},n.VertexArrayType=function(t){return new c({members:t,alignment:4})},n.ElementArrayType=function(t){return new c({members:[{type:\"Uint16\",name:\"vertices\",components:t||3}]})}},{\"../util/struct_array\":431,\"../util/util\":433,\"./array_group\":319,\"./bucket/circle_bucket\":321,\"./bucket/fill_bucket\":322,\"./bucket/line_bucket\":323,\"./bucket/symbol_bucket\":324,\"./buffer_group\":326,assert:51,\"feature-filter\":141}],321:[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,{})).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<r.length;a++)for(var l=0;l<r[a].length;l++){var c=r[a][l].x,u=r[a][l].y;if(!(c<0||c>=s||u<0||u>=s)){var f=this.prepareArrayGroup(\"circle\",4),h=f.layoutVertexArray,d=this.addCircleVertex(h,c,u,-1,-1);this.addCircleVertex(h,c,u,1,-1),this.addCircleVertex(h,c,u,1,1),this.addCircleVertex(h,c,u,-1,1),f.elementArray.emplaceBack(d,d+1,d+2),f.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays(\"circle\",e,t.properties,n,i)}},{\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328}],322:[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,{})).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;a<r.length;a++)this.addPolygon(r[a]);this.populatePaintArrays(\"fill\",{zoom:this.zoom},t.properties,n,i)},n.prototype.addPolygon=function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].length;for(var n=this.prepareArrayGroup(\"fill\",e),i=[],a=[],o=n.layoutVertexArray.length,l=0;l<t.length;l++){var c=t[l];l>0&&a.push(i.length/2);for(var u=0;u<c.length;u++){var f=c[u],h=n.layoutVertexArray.emplaceBack(f.x,f.y);u>=1&&n.elementArray2.emplaceBack(h-1,h),i.push(f.x),i.push(f.y)}}for(var d=s(i,a),p=0;p<d.length;p++)n.elementArray.emplaceBack(d[p]+o)}},{\"../../util/classify_rings\":421,\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328,earcut:135}],323:[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,l=Math.cos(Math.PI/180*37.5),c=Math.pow(2,14)/.5;e.exports=n,(n.prototype=a.inherit(i,{})).addLineVertex=function(t,e,r,n,i,a,o){return t.emplaceBack(e.x<<1|n,e.y<<1|i,Math.round(63*r.x)+128,Math.round(63*r.y)+128,1+(0===a?0:a<0?-1:1)|(.5*o&63)<<2,.5*o>>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;r<e.length;r++)this.addLine(e[r],this.layer.layout[\"line-join\"],this.layer.layout[\"line-cap\"],this.layer.layout[\"line-miter-limit\"],this.layer.layout[\"line-round-limit\"])},n.prototype.addLine=function(t,e,r,n,i){for(var a=t.length;a>2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){\"bevel\"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,c=t[0],u=t[a-1],f=c.equals(u);if(this.prepareArrayGroup(\"line\",10*a),2!==a||!f){this.distance=0;var h,d,p,m,g,v,y,x=r,b=f?\"butt\":r,_=!0;this.e1=this.e2=this.e3=-1,f&&(h=t[a-2],g=c.sub(h)._unit()._perp());for(var w=0;w<a;w++)if(!(p=f&&w===a-1?t[1]:t[w+1])||!t[w].equals(p)){g&&(m=g),h&&(d=h),h=t[w],g=p?p.sub(h)._unit()._perp():m;var M=(m=m||g).add(g)._unit(),k=M.x*g.x+M.y*g.y,A=1/k,T=k<l&&d&&p;if(T&&w>0){var S=h.dist(d);if(S>2*o){var E=h.sub(h.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?x:b;if(L&&\"round\"===C&&(A<i?C=\"miter\":A<=2&&(C=\"fakeround\")),\"miter\"===C&&A>n&&(C=\"bevel\"),\"bevel\"===C&&(A>2&&(C=\"flipbevel\"),A<n&&(C=\"miter\")),d&&(this.distance+=h.dist(d)),\"miter\"===C)M._mult(A),this.addCurrentVertex(h,this.distance,M,0,0,!1);else if(\"flipbevel\"===C){if(A>100)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(h,this.distance,M,0,0,!1),this.addCurrentVertex(h,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(h,this.distance,m,v,y,!1),\"fakeround\"===C){for(var O,F=Math.floor(8*(.5-(k-.5))),R=0;R<F;R++)O=g.mult((R+1)/(F+1))._add(m)._unit(),this.addPieSliceVertex(h,this.distance,O,I);this.addPieSliceVertex(h,this.distance,M,I);for(var N=F-1;N>=0;N--)O=m.mult((N+1)/(F+1))._add(g)._unit(),this.addPieSliceVertex(h,this.distance,O,I)}p&&this.addCurrentVertex(h,this.distance,g,-v,-y,!1)}else\"butt\"===C?(_||this.addCurrentVertex(h,this.distance,m,0,0,!1),p&&this.addCurrentVertex(h,this.distance,g,0,0,!1)):\"square\"===C?(_||(this.addCurrentVertex(h,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(h,this.distance,g,-1,-1,!1)):\"round\"===C&&(_||(this.addCurrentVertex(h,this.distance,m,0,0,!1),this.addCurrentVertex(h,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(h,this.distance,g,-1,-1,!0),this.addCurrentVertex(h,this.distance,g,0,0,!1)));if(T&&w<a-1){var j=h.dist(p);if(j>2*o){var B=h.add(p.sub(h)._mult(o/j)._round());this.distance+=B.dist(h),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),h=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],u=l.layoutVertexArray,f=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(u,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&f.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(u,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&f.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>c/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\":433,\"../bucket\":320,\"../load_geometry\":328}],324:[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,c,u){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(c||0),u,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\"),c=t(\"../../util/token\"),u=t(\"../../symbol/quads\"),f=t(\"../../symbol/shaping\"),h=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=f.shapeText,x=f.shapeIcon,b=u.getGlyphQuads,_=u.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,(n.prototype=m.inherit(o,{})).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,u=.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\":u=1;break;case\"top\":case\"top-right\":case\"top-left\":u=0}for(var f=\"right\"===a[\"text-justify\"]?1:\"left\"===a[\"text-justify\"]?0:.5,h=24*a[\"text-line-height\"],p=\"line\"!==a[\"symbol-placement\"]?24*a[\"text-max-width\"]:0,v=24*a[\"text-letter-spacing\"],b=[24*a[\"text-offset\"][0],24*a[\"text-offset\"][1]],_=this.fontstack=a[\"text-font\"].join(\",\"),M=[],k=0;k<o.length;k++)M.push(g(o[k]));if(\"line\"===a[\"symbol-placement\"]){var A=d(o,s,M);M=A.geometries,o=A.features,s=A.textFeatures}for(var T,S,E=0;E<o.length;E++)if(M[E]){if(T=s[E]?y(s[E],e[_],p,h,l,u,f,v,b):null,a[\"icon-image\"]){var L=r[c(o[E].properties,a[\"icon-image\"])];S=x(L,a),L&&(void 0===this.sdfIcons?this.sdfIcons=L.sdf:this.sdfIcons!==L.sdf&&m.warnOnce(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),1!==L.pixelRatio?this.iconsNeedLinear=!0:0===a[\"icon-rotate\"]&&this.layer.isLayoutValueFeatureConstant(\"icon-rotate\")||(this.iconsNeedLinear=!0))}else S=null;(T||S)&&this.addFeature(M[E],T,S,o[E])}this.symbolInstancesEndIndex=this.symbolInstancesArray.length,this.placeFeatures(t,this.showCollisionBoxes),this.trimArrays()},n.prototype.addFeature=function(t,e,r,n){var i=this.layer.layout,a=this.adjustedTextSize/24,o=void 0!==this.adjustedTextMaxSize?this.adjustedTextMaxSize:this.adjustedTextSize,c=this.tilePixelRatio*a,u=this.tilePixelRatio*o/24,f=this.tilePixelRatio*this.adjustedIconSize,h=this.tilePixelRatio*i[\"symbol-spacing\"],d=i[\"symbol-avoid-edges\"],m=i[\"text-padding\"]*this.tilePixelRatio,g=i[\"icon-padding\"]*this.tilePixelRatio,v=i[\"text-max-angle\"]/180*Math.PI,y=\"map\"===i[\"text-rotation-alignment\"]&&\"line\"===i[\"symbol-placement\"],x=\"map\"===i[\"icon-rotation-alignment\"]&&\"line\"===i[\"symbol-placement\"],b=i[\"text-allow-overlap\"]||i[\"icon-allow-overlap\"]||i[\"text-ignore-placement\"]||i[\"icon-ignore-placement\"],_=\"line\"===i[\"symbol-placement\"],M=h/2;_&&(t=p(t,0,0,w,w));for(var k=0;k<t.length;k++)for(var A,T=t[k],S=0,E=(A=_?l(T,h,v,e,r,24,u,this.overscaling,w):[new s(T[0].x,T[0].y,0)]).length;S<E;S++){var L=A[S];if(!(e&&_&&this.anchorIsTooClose(e.text,M,L))){var C=!(L.x<0||L.x>w||L.y<0||L.y>w);if(!d||C){var z=C||b;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,c,m,y,f,g,x,{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])<e)return!0}else n[t]=[];return n[t].push(r),!1},n.prototype.placeFeatures=function(t,e){this.recalculateStyleLayers(),this.createArrays();var r=this.layer.layout,n=t.maxScale,i=\"map\"===r[\"text-rotation-alignment\"]&&\"line\"===r[\"symbol-placement\"],a=\"map\"===r[\"icon-rotation-alignment\"]&&\"line\"===r[\"symbol-placement\"];if(r[\"text-allow-overlap\"]||r[\"icon-allow-overlap\"]||r[\"text-ignore-placement\"]||r[\"icon-ignore-placement\"]){var o=this.symbolInstancesArray.toArray(this.symbolInstancesStartIndex,this.symbolInstancesEndIndex),s=t.angle,l=Math.sin(s),c=Math.cos(s);this.sortedSymbolInstances=o.sort(function(t,e){return(l*t.anchorPointX+c*t.anchorPointY|0)-(l*e.anchorPointX+c*e.anchorPointY|0)||e.index-t.index})}for(var u=this.symbolInstancesStartIndex;u<this.symbolInstancesEndIndex;u++){var f=this.sortedSymbolInstances?this.sortedSymbolInstances[u-this.symbolInstancesStartIndex]:this.symbolInstancesArray.get(u),h={boxStartIndex:f.textBoxStartIndex,boxEndIndex:f.textBoxEndIndex},d={boxStartIndex:f.iconBoxStartIndex,boxEndIndex:f.iconBoxEndIndex},p=!(f.textBoxStartIndex===f.textBoxEndIndex),m=!(f.iconBoxStartIndex===f.iconBoxEndIndex),g=r[\"text-optional\"]||!p,v=r[\"icon-optional\"]||!m,y=p?t.placeCollisionFeature(h,r[\"text-allow-overlap\"],r[\"symbol-avoid-edges\"]):t.minScale,x=m?t.placeCollisionFeature(d,r[\"icon-allow-overlap\"],r[\"symbol-avoid-edges\"]):t.minScale;g||v?!v&&y?y=Math.max(x,y):!g&&x&&(x=Math.max(x,y)):x=y=Math.max(x,y),p&&(t.insertCollisionFeature(h,y,r[\"text-ignore-placement\"]),y<=n&&this.addSymbols(\"glyph\",f.glyphQuadStartIndex,f.glyphQuadEndIndex,y,r[\"text-keep-upright\"],i,t.angle)),m&&(t.insertCollisionFeature(d,x,r[\"icon-ignore-placement\"]),x<=n&&this.addSymbols(\"icon\",f.iconQuadStartIndex,f.iconQuadEndIndex,x,r[\"icon-keep-upright\"],a,t.angle))}e&&this.addToDebugBuffers(t)},n.prototype.addSymbols=function(t,e,r,n,a,o,s){for(var l=this.prepareArrayGroup(t,4*(r-e)),c=l.elementArray,u=l.layoutVertexArray,f=this.zoom,h=Math.max(Math.log(n)/Math.LN2+f,0),d=e;d<r;d++){var p=this.symbolQuadsArray.get(d).SymbolQuad,m=(p.anchorAngle+s+Math.PI)%(2*Math.PI);if(!(a&&o&&(m<=Math.PI/2||m>3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,x=p.br,b=p.tex,_=p.anchorPoint,w=Math.max(f+Math.log(p.minScale)/Math.LN2,h),M=Math.min(f+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===h&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(u,_.x,_.y,g.x,g.y,b.x,b.y,w,M,h,k);i(u,_.x,_.y,v.x,v.y,b.x+b.w,b.y,w,M,h,k),i(u,_.x,_.y,y.x,y.y,b.x,b.y+b.h,w,M,h,k),i(u,_.x,_.y,x.x,x.y,b.x+b.w,b.y+b.h,w,M,h,k),c.emplaceBack(A,A+1,A+2),c.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;r<this.features.length;r++){var n=c(this.features[r].properties,e);n&&(t[n]=!0)}},n.prototype.updateFont=function(t){this.recalculateStyleLayers();var e=this.layer.layout[\"text-font\"],r=t[e]=t[e]||{};this.textFeatures=h(this.features,this.layer.layout,r)},n.prototype.addToDebugBuffers=function(t){for(var e=this.prepareArrayGroup(\"collisionBox\",0).layoutVertexArray,r=-t.angle,n=t.yStretch,i=this.symbolInstancesStartIndex;i<this.symbolInstancesEndIndex;i++){var o=this.symbolInstancesArray.get(i);o.textCollisionFeature={boxStartIndex:o.textBoxStartIndex,boxEndIndex:o.textBoxEndIndex},o.iconCollisionFeature={boxStartIndex:o.iconBoxStartIndex,boxEndIndex:o.iconBoxEndIndex};for(var s=0;s<2;s++){var l=o[0===s?\"textCollisionFeature\":\"iconCollisionFeature\"];if(l)for(var c=l.boxStartIndex;c<l.boxEndIndex;c++){var u=this.collisionBoxArray.get(c),f=u.anchorPoint,h=new a(u.x1,u.y1*n)._rotate(r),d=new a(u.x2,u.y1*n)._rotate(r),p=new a(u.x1,u.y2*n)._rotate(r),m=new a(u.x2,u.y2*n)._rotate(r),g=Math.max(0,Math.min(25,this.zoom+Math.log(u.maxScale)/Math.LN2)),v=Math.max(0,Math.min(25,this.zoom+Math.log(u.placementScale)/Math.LN2));this.addCollisionBoxVertex(e,f,h,g,v),this.addCollisionBoxVertex(e,f,d,g,v),this.addCollisionBoxVertex(e,f,d,g,v),this.addCollisionBoxVertex(e,f,m,g,v),this.addCollisionBoxVertex(e,f,m,g,v),this.addCollisionBoxVertex(e,f,p,g,v),this.addCollisionBoxVertex(e,f,p,g,v),this.addCollisionBoxVertex(e,f,h,g,v)}}}},n.prototype.addSymbolInstance=function(t,e,r,i,a,o,s,l,c,u,f,h,d,p,g,y,x,w,M){var k,A,T,S,E,L,C,z;if(r&&(C=o?b(t,r,h,e,a,p):[],E=new v(l,e,t,c,u,f,r,h,d,p,!1)),k=this.symbolQuadsArray.length,C&&C.length)for(var D=0;D<C.length;D++)this.addSymbolQuad(C[D]);A=this.symbolQuadsArray.length;var I=E?E.boxStartIndex:this.collisionBoxArray.length,P=E?E.boxEndIndex:this.collisionBoxArray.length;i&&(z=o?_(t,i,g,e,a,x,r,w,M):[],L=new v(l,e,t,c,u,f,i,g,y,x,!0)),T=this.symbolQuadsArray.length,z&&1===z.length&&this.addSymbolQuad(z[0]),S=this.symbolQuadsArray.length;var O=L?L.boxStartIndex:this.collisionBoxArray.length,F=L?L.boxEndIndex:this.collisionBoxArray.length;return S>n.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,F,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\":382,\"../../symbol/clip_line\":384,\"../../symbol/collision_feature\":386,\"../../symbol/get_anchors\":388,\"../../symbol/mergelines\":391,\"../../symbol/quads\":392,\"../../symbol/resolve_text\":393,\"../../symbol/shaping\":394,\"../../util/token\":432,\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328,\"point-geometry\":477}],325:[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;r<this.attributes.length;r++){var n=this.attributes[r],a=e[n.name];void 0!==a&&t.vertexAttribPointer(a,n.components,t[i[n.type]],!1,this.arrayType.bytesPerElement,n.offset)}},n.prototype.destroy=function(t){this.buffer&&t.deleteBuffer(this.buffer)},n.BufferType={VERTEX:\"ARRAY_BUFFER\",ELEMENT:\"ELEMENT_ARRAY_BUFFER\"}},{}],326:[function(t,e,r){\"use strict\";function n(t,e){this.layoutVertexBuffer=new a(t.layoutVertexArray,e.layoutVertexArrayType,a.BufferType.VERTEX),t.elementArray&&(this.elementBuffer=new a(t.elementArray,e.elementArrayType,a.BufferType.ELEMENT));var r,n=this.vaos={};t.elementArray2&&(this.elementBuffer2=new a(t.elementArray2,e.elementArrayType2,a.BufferType.ELEMENT),r=this.secondVaos={}),this.paintVertexBuffers=i.mapObject(t.paintVertexArrays,function(i,s){return n[s]=new o,t.elementArray2&&(r[s]=new o),new a(i,e.paintVertexArrayTypes[s],a.BufferType.VERTEX)})}var i=t(\"../util/util\"),a=t(\"./buffer\"),o=t(\"../render/vertex_array_object\");e.exports=n,n.prototype.destroy=function(t){this.layoutVertexBuffer.destroy(t),this.elementBuffer&&this.elementBuffer.destroy(t),this.elementBuffer2&&this.elementBuffer2.destroy(t);for(var e in this.paintVertexBuffers)this.paintVertexBuffers[e].destroy(t);for(var r in this.vaos)this.vaos[r].destroy(t);for(var n in this.secondVaos)this.secondVaos[n].destroy(t)}},{\"../render/vertex_array_object\":348,\"../util/util\":433,\"./buffer\":325}],327:[function(t,e,r){\"use strict\";function n(t,e,r){if(t.grid){var n=t,i=e;t=n.coord,e=n.overscaling,this.grid=new d(n.grid),this.featureIndexArray=new M(n.featureIndexArray),this.rawTileData=i,this.bucketLayerIDs=n.bucketLayerIDs}else this.grid=new d(u,16,0),this.featureIndexArray=new M;this.coord=t,this.overscaling=e,this.x=t.x,this.y=t.y,this.z=t.z-Math.log(e)/Math.LN2,this.setCollisionTile(r)}function i(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function a(t,e){return e-t}function o(t){return t[\"line-gap-width\"]>0?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=l.convert(e),\"viewport\"===r&&e._rotate(-n);for(var a=[],o=0;o<t.length;o++){for(var s=t[o],c=[],u=0;u<s.length;u++)c.push(s[u].sub(e._mult(i)));a.push(c)}return a}var l=t(\"point-geometry\"),c=t(\"./load_geometry\"),u=t(\"./bucket\").EXTENT,f=t(\"feature-filter\"),h=t(\"../util/struct_array\"),d=t(\"grid-index\"),p=t(\"../util/dictionary_coder\"),m=t(\"vector-tile\"),g=t(\"pbf\"),v=t(\"../util/vectortile_to_geojson\"),y=t(\"../util/util\").arraysIntersect,x=t(\"../util/intersection_tests\"),b=x.multiPolygonIntersectsBufferedMultiPoint,_=x.multiPolygonIntersectsMultiPolygon,w=x.multiPolygonIntersectsBufferedMultiLine,M=new h({members:[{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]});e.exports=n,n.prototype.insert=function(t,e,r,n){var i=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(e,r,n);for(var a=c(t),o=0;o<a.length;o++){for(var s=a[o],l=[1/0,1/0,-1/0,-1/0],u=0;u<s.length;u++){var f=s[u];l[0]=Math.min(l[0],f.x),l[1]=Math.min(l[1],f.y),l[2]=Math.max(l[2],f.x),l[3]=Math.max(l[3],f.y)}this.grid.insert(i,l[0],l[1],l[2],l[3])}},n.prototype.setCollisionTile=function(t){this.collisionTile=t},n.prototype.serialize=function(){var t={coord:this.coord,overscaling:this.overscaling,grid:this.grid.toArrayBuffer(),featureIndexArray:this.featureIndexArray.serialize(),bucketLayerIDs:this.bucketLayerIDs};return{data:t,transferables:[t.grid,t.featureIndexArray.arrayBuffer]}},n.prototype.query=function(t,e){this.vtLayers||(this.vtLayers=new m.VectorTile(new g(new Uint8Array(this.rawTileData))).layers,this.sourceLayerCoder=new p(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"]));var r={},n=t.params||{},s=u/t.tileSize/t.scale,c=f(n.filter),h=0;for(var d in e){var v=e[d],y=v.paint,x=0;\"line\"===v.type?x=o(y)/2+Math.abs(y[\"line-offset\"])+i(y[\"line-translate\"]):\"fill\"===v.type?x=i(y[\"fill-translate\"]):\"circle\"===v.type&&(x=y[\"circle-radius\"]+i(y[\"circle-translate\"])),h=Math.max(h,x*s)}for(var b=t.queryGeometry.map(function(t){return t.map(function(t){return new l(t.x,t.y)})}),_=1/0,w=1/0,M=-1/0,k=-1/0,A=0;A<b.length;A++)for(var T=b[A],S=0;S<T.length;S++){var E=T[S];_=Math.min(_,E.x),w=Math.min(w,E.y),M=Math.max(M,E.x),k=Math.max(k,E.y)}var L=this.grid.query(_-h,w-h,M+h,k+h);L.sort(a),this.filterMatching(r,L,this.featureIndexArray,b,c,n.layers,e,t.bearing,s);var C=this.collisionTile.queryRenderedSymbols(_,w,M,k,t.scale);return C.sort(),this.filterMatching(r,C,this.collisionTile.collisionBoxArray,b,c,n.layers,e,t.bearing,s),r},n.prototype.filterMatching=function(t,e,r,n,i,a,u,f,h){for(var d,p=0;p<e.length;p++){var m=e[p];if(m!==d){d=m;var g=r.get(m),x=this.bucketLayerIDs[g.bucketIndex];if(!a||y(a,x)){var M=this.sourceLayerCoder.decode(g.sourceLayerIndex),k=this.vtLayers[M].feature(g.featureIndex);if(i(k))for(var A=null,T=0;T<x.length;T++){var S=x[T];if(!(a&&a.indexOf(S)<0)){var E=u[S];if(E){var L;if(\"symbol\"!==E.type){A||(A=c(k));var C=E.paint;if(\"line\"===E.type){L=s(n,C[\"line-translate\"],C[\"line-translate-anchor\"],f,h);var z=o(C)/2*h;if(C[\"line-offset\"]&&(A=function(t,e){for(var r=[],n=new l(0,0),i=0;i<t.length;i++){for(var a=t[i],o=[],s=0;s<a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),d=s===a.length-1?n:f.sub(u)._unit()._perp(),p=h._add(d)._unit(),m=p.x*d.x+p.y*d.y;p._mult(1/m),o.push(p._mult(e)._add(u))}r.push(o)}return r}(A,C[\"line-offset\"]*h)),!w(L,A,z))continue}else if(\"fill\"===E.type){if(L=s(n,C[\"fill-translate\"],C[\"fill-translate-anchor\"],f,h),!_(L,A))continue}else if(\"circle\"===E.type){L=s(n,C[\"circle-translate\"],C[\"circle-translate-anchor\"],f,h);var D=C[\"circle-radius\"]*h;if(!b(L,A,D))continue}}var I=new v(k,this.z,this.x,this.y);I.layer=E.serialize({includeRefProperties:!0});var P=t[S];void 0===P&&(P=t[S]=[]),P.push(I)}}}}}}}},{\"../util/dictionary_coder\":423,\"../util/intersection_tests\":428,\"../util/struct_array\":431,\"../util/util\":433,\"../util/vectortile_to_geojson\":434,\"./bucket\":320,\"./load_geometry\":328,\"feature-filter\":141,\"grid-index\":275,pbf:470,\"point-geometry\":477,\"vector-tile\":564}],328:[function(t,e,r){\"use strict\";function n(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}var i=t(\"../util/util\"),a=t(\"./bucket\").EXTENT,o=t(\"assert\"),s={15:n(15),16:n(16)};e.exports=function(t,e){var r=s[e||16];o(r);for(var n=a/t.extent,l=t.loadGeometry(),c=0;c<l.length;c++)for(var u=l[c],f=0;f<u.length;f++){var h=u[f];h.x=Math.round(h.x*n),h.y=Math.round(h.y*n),(h.x<r.min||h.x>r.max||h.y<r.min||h.y>r.max)&&i.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return l}},{\"../util/util\":433,\"./bucket\":320,assert:51}],329:[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}}},{}],330:[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\":433}],331:[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\":330}],332:[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\"),c=t(\"../source/tile_coord\"),u=t(\"../data/bucket\").EXTENT,f=t(\"gl-matrix\"),h=f.vec4,d=f.mat4,p=f.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(e<t.minzoom)return[];e>t.maxzoom&&(e=t.maxzoom);var n=this.locationCoordinate(this.center)._zoomTo(e),i=new a(n.column-.5,n.row-.5);return c.cover(e,[this.pointCoordinate(new a(0,0))._zoomTo(e),this.pointCoordinate(new a(this.width,0))._zoomTo(e),this.pointCoordinate(new a(this.width,this.height))._zoomTo(e),this.pointCoordinate(new a(0,this.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return i.dist(t)-i.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];h.transformMat4(e,e,this.pixelMatrixInverse),h.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,c=e[1]/n,u=r[1]/i,f=e[2]/n,d=r[2]/i,p=f===d?0:(0-f)/(d-f),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(c,u,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 h.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 c&&(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/u,n/u,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,c=this.size,u=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=(e=this.latY(this.latRange[0]))-t<c.y?c.y/(e-t):0),this.lngRange&&(r=this.lngX(this.lngRange[0]),o=(n=this.lngX(this.lngRange[1]))-r<c.x?c.x/(n-r):0);var f=Math.max(o||0,i||0);if(f)return this.center=this.unproject(new a(o?(n+r)/2:this.x,i?(e+t)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var h=this.y,d=c.y/2;h-d<t&&(l=t+d),h+d>e&&(l=e-d)}if(this.lngRange){var p=this.x,m=c.x/2;p-m<r&&(s=r+m),p+m>n&&(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=u,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\":320,\"../source/tile_coord\":360,\"../util/interpolate\":427,\"../util/util\":433,\"./coordinate\":329,\"./lng_lat\":330,\"gl-matrix\":198,\"point-geometry\":477}],333:[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,c,u,f,h,d=[];for(a=0,o=t.length;a<o;a++)if(c=n[t[a]]){for(h=null,s=0,l=c[1].length;s<l;s+=2)-1===c[1][s]&&-1===c[1][s+1]?h=null:(u=e+c[1][s]*i,f=r-c[1][s+1]*i,h&&d.push(h.x,h.y,u,f),h={x:u,y:f});e+=c[0]*i}return d}},{}],334:[function(t,e,r){\"use strict\";var n=e.exports={};n.version=t(\"../package.json\").version,n.Map=t(\"./ui/map\"),n.Control=t(\"./ui/control/control\"),n.Navigation=t(\"./ui/control/navigation\"),n.Geolocate=t(\"./ui/control/geolocate\"),n.Attribution=t(\"./ui/control/attribution\"),n.Popup=t(\"./ui/popup\"),n.Marker=t(\"./ui/marker\"),n.Style=t(\"./style/style\"),n.LngLat=t(\"./geo/lng_lat\"),n.LngLatBounds=t(\"./geo/lng_lat_bounds\"),n.Point=t(\"point-geometry\"),n.Evented=t(\"./util/evented\"),n.util=t(\"./util/util\"),n.supported=t(\"./util/browser\").supported;var i=t(\"./util/ajax\");n.util.getJSON=i.getJSON,n.util.getArrayBuffer=i.getArrayBuffer;var a=t(\"./util/config\");n.config=a,Object.defineProperty(n,\"accessToken\",{get:function(){return a.ACCESS_TOKEN},set:function(t){a.ACCESS_TOKEN=t}})},{\"../package.json\":435,\"./geo/lng_lat\":330,\"./geo/lng_lat_bounds\":331,\"./style/style\":369,\"./ui/control/attribution\":400,\"./ui/control/control\":401,\"./ui/control/geolocate\":402,\"./ui/control/navigation\":403,\"./ui/map\":412,\"./ui/marker\":413,\"./ui/popup\":414,\"./util/ajax\":416,\"./util/browser\":417,\"./util/config\":422,\"./util/evented\":425,\"./util/util\":433,\"point-geometry\":477}],335:[function(t,e,r){\"use strict\";var n=t(\"assert\");e.exports=function(t){for(var e={define:{},initialize:{}},r=0;r<t.length;r++){var i=t[r];n(\"u_\"===i.name.slice(0,2));var a=\"{precision} \"+(1===i.components?\"float\":\"vec\"+i.components);e.define[i.name.slice(2)]=\"uniform \"+a+\" \"+i.name+\";\\n\",e.initialize[i.name.slice(2)]=a+\" \"+i.name.slice(2)+\" = \"+i.name+\";\\n\"}return e}},{assert:51}],336:[function(t,e,r){\"use strict\";var n=t(\"../source/pixels_to_tile_units\"),i=t(\"./create_uniform_pragmas\"),a=512;e.exports=function(t,e,r){var o,s=t.gl,l=t.transform,c=r.paint[\"background-color\"],u=r.paint[\"background-pattern\"],f=r.paint[\"background-opacity\"],h=u?t.spriteAtlas.getPosition(u.from,!0):null,d=u?t.spriteAtlas.getPosition(u.to,!0):null;if(t.setDepthSublayer(0),h&&d){if(t.isOpaquePass)return;o=t.useProgram(\"pattern\"),s.uniform1i(o.u_image,0),s.uniform2fv(o.u_pattern_tl_a,h.tl),s.uniform2fv(o.u_pattern_br_a,h.br),s.uniform2fv(o.u_pattern_tl_b,d.tl),s.uniform2fv(o.u_pattern_br_b,d.br),s.uniform1f(o.u_opacity,f),s.uniform1f(o.u_mix,u.t),s.uniform2fv(o.u_pattern_size_a,h.size),s.uniform2fv(o.u_pattern_size_b,d.size),s.uniform1f(o.u_scale_a,u.fromScale),s.uniform1f(o.u_scale_b,u.toScale),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),t.tileExtentPatternVAO.bind(s,o,t.tileExtentBuffer)}else{if(t.isOpaquePass!==(1===c[3]))return;var p=i([{name:\"u_color\",components:4},{name:\"u_opacity\",components:1}]);o=t.useProgram(\"fill\",[],p,p),s.uniform4fv(o.u_color,c),s.uniform1f(o.u_opacity,f),t.tileExtentVAO.bind(s,o,t.tileExtentBuffer)}s.disable(s.STENCIL_TEST);for(var m=l.coveringTiles({tileSize:a}),g=0;g<m.length;g++){var v=m[g];if(h&&d){var y={coord:v,tileSize:a};s.uniform1f(o.u_tile_units_to_pixels,1/n(y,1,t.transform.tileZoom));var x=y.tileSize*Math.pow(2,t.transform.tileZoom-y.coord.z),b=x*(y.coord.x+v.w*Math.pow(2,y.coord.z)),_=x*y.coord.y;s.uniform2f(o.u_pixel_coord_upper,b>>16,_>>16),s.uniform2f(o.u_pixel_coord_lower,65535&b,65535&_)}s.uniformMatrix4fv(o.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)}},{\"../source/pixels_to_tile_units\":354,\"./create_uniform_pragmas\":335}],337:[function(t,e,r){\"use strict\";var n=t(\"../util/browser\");e.exports=function(t,e,r,i){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o<i.length;o++){var s=i[o],l=e.getTile(s),c=l.getBucket(r);if(c){var u=c.bufferGroups.circle;if(u){var f=c.paintAttributes.circle[r.id],h=t.useProgram(\"circle\",f.defines,f.vertexPragmas,f.fragmentPragmas);\"map\"===r.paint[\"circle-pitch-scale\"]?(a.uniform1i(h.u_scale_with_map,!0),a.uniform2f(h.u_extrude_scale,t.transform.pixelsToGLUnits[0]*t.transform.altitude,t.transform.pixelsToGLUnits[1]*t.transform.altitude)):(a.uniform1i(h.u_scale_with_map,!1),a.uniform2fv(h.u_extrude_scale,t.transform.pixelsToGLUnits)),a.uniform1f(h.u_devicepixelratio,n.devicePixelRatio),a.uniformMatrix4fv(h.u_matrix,!1,t.translatePosMatrix(s.posMatrix,l,r.paint[\"circle-translate\"],r.paint[\"circle-translate-anchor\"])),c.setUniforms(a,\"circle\",h,r,{zoom:t.transform.zoom});for(var d=0;d<u.length;d++){var p=u[d];p.vaos[r.id].bind(a,h,p.layoutVertexBuffer,p.elementBuffer,p.paintVertexBuffers[r.id]),a.drawElements(a.TRIANGLES,3*p.elementBuffer.length,a.UNSIGNED_SHORT,0)}}}}}}},{\"../util/browser\":417}],338:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=t.gl;i.enable(i.STENCIL_TEST);for(var a=t.useProgram(\"collisionbox\"),o=0;o<n.length;o++){var s=n[o],l=e.getTile(s),c=l.getBucket(r);if(c){var u=c.bufferGroups.collisionBox;if(u&&u.length){var f=u[0];0!==f.layoutVertexBuffer.length&&(i.uniformMatrix4fv(a.u_matrix,!1,s.posMatrix),t.enableTileClippingMask(s),t.lineWidth(1),i.uniform1f(a.u_scale,Math.pow(2,t.transform.zoom-l.coord.z)),i.uniform1f(a.u_zoom,10*t.transform.zoom),i.uniform1f(a.u_maxzoom,10*(l.coord.z+1)),f.vaos[r.id].bind(i,a,f.layoutVertexBuffer),i.drawArrays(i.LINES,0,f.layoutVertexBuffer.length))}}}}},{}],339:[function(t,e,r){\"use strict\";var n=t(\"../lib/debugtext\"),i=t(\"../util/browser\"),a=t(\"gl-matrix\").mat4,o=t(\"../data/bucket\").EXTENT,s=t(\"../data/buffer\"),l=t(\"./vertex_array_object\");e.exports=function(t,e,r){if(!t.isOpaquePass&&t.options.debug)for(var c=0;c<r.length;c++)!function(t,e,r){var c=t.gl;c.disable(c.STENCIL_TEST),t.lineWidth(1*i.devicePixelRatio);var u=r.posMatrix,f=t.useProgram(\"debug\");c.uniformMatrix4fv(f.u_matrix,!1,u),c.uniform4f(f.u_color,1,0,0,1),t.debugVAO.bind(c,f,t.debugBuffer),c.drawArrays(c.LINE_STRIP,0,t.debugBuffer.length);for(var h=n(r.toString(),50,200,5),d=new t.PosArray,p=0;p<h.length;p+=2)d.emplaceBack(h[p],h[p+1]);var m=new s(d.serialize(),t.PosArray.serialize(),s.BufferType.VERTEX);(new l).bind(c,f,m),c.uniform4f(f.u_color,1,1,1,1);for(var g=e.getTile(r).tileSize,v=o/(Math.pow(2,t.transform.zoom-r.z)*g),y=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<y.length;x++){var b=y[x];c.uniformMatrix4fv(f.u_matrix,!1,a.translate([],u,[v*b[0],v*b[1],0])),c.drawArrays(c.LINES,0,m.length)}c.uniform4f(f.u_color,0,0,0,1),c.uniformMatrix4fv(f.u_matrix,!1,u),c.drawArrays(c.LINES,0,m.length)}(t,e,r[c])}},{\"../data/bucket\":320,\"../data/buffer\":325,\"../lib/debugtext\":333,\"../util/browser\":417,\"./vertex_array_object\":348,\"gl-matrix\":198}],340:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o){var s=a.gl,l=a.spriteAtlas.getPosition(t.from,!0),c=a.spriteAtlas.getPosition(t.to,!0);if(l&&c){s.uniform1i(o.u_image,0),s.uniform2fv(o.u_pattern_tl_a,l.tl),s.uniform2fv(o.u_pattern_br_a,l.br),s.uniform2fv(o.u_pattern_tl_b,c.tl),s.uniform2fv(o.u_pattern_br_b,c.br),s.uniform1f(o.u_opacity,e),s.uniform1f(o.u_mix,t.t),s.uniform1f(o.u_tile_units_to_pixels,1/i(r,1,a.transform.tileZoom)),s.uniform2fv(o.u_pattern_size_a,l.size),s.uniform2fv(o.u_pattern_size_b,c.size),s.uniform1f(o.u_scale_a,t.fromScale),s.uniform1f(o.u_scale_b,t.toScale);var u=r.tileSize*Math.pow(2,a.transform.tileZoom-r.coord.z),f=u*(r.coord.x+n.w*Math.pow(2,r.coord.z)),h=u*r.coord.y;s.uniform2f(o.u_pixel_coord_upper,f>>16,h>>16),s.uniform2f(o.u_pixel_coord_lower,65535&f,65535&h),s.activeTexture(s.TEXTURE0),a.spriteAtlas.bind(s,!0)}}var i=t(\"../source/pixels_to_tile_units\");e.exports=function(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var o;if(o=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"],t.isOpaquePass===o){t.setDepthSublayer(1);for(var s=0;s<i.length;s++)!function(t,e,r,i){var a=e.getTile(i),o=a.getBucket(r);if(o){var s=o.bufferGroups.fill;if(s){var l,c=t.gl,u=r.paint[\"fill-pattern\"];if(u)l=t.useProgram(\"pattern\"),n(u,r.paint[\"fill-opacity\"],a,i,t,l),c.activeTexture(c.TEXTURE0),t.spriteAtlas.bind(c,!0);else{var f=o.paintAttributes.fill[r.id];l=t.useProgram(\"fill\",f.defines,f.vertexPragmas,f.fragmentPragmas),o.setUniforms(c,\"fill\",l,r,{zoom:t.transform.zoom})}c.uniformMatrix4fv(l.u_matrix,!1,t.translatePosMatrix(i.posMatrix,a,r.paint[\"fill-translate\"],r.paint[\"fill-translate-anchor\"])),t.enableTileClippingMask(i);for(var h=0;h<s.length;h++){var d=s[h];d.vaos[r.id].bind(c,l,d.layoutVertexBuffer,d.elementBuffer,d.paintVertexBuffers[r.id]),c.drawElements(c.TRIANGLES,d.elementBuffer.length,c.UNSIGNED_SHORT,0)}}}}(t,e,r,i[s])}if(!t.isOpaquePass&&r.paint[\"fill-antialias\"]){t.lineWidth(2),t.depthMask(!1);var l=r.getPaintProperty(\"fill-outline-color\");!l&&r.paint[\"fill-pattern\"]||!l?t.setDepthSublayer(0):t.setDepthSublayer(2);for(var c=0;c<i.length;c++)!function(t,e,r,i){var a=e.getTile(i),o=a.getBucket(r);if(o){var s,l=t.gl,c=o.bufferGroups.fill,u=r.paint[\"fill-pattern\"],f=r.paint[\"fill-opacity\"],h=r.getPaintProperty(\"fill-outline-color\");if(u&&!h)s=t.useProgram(\"outlinepattern\"),l.uniform2f(s.u_world,l.drawingBufferWidth,l.drawingBufferHeight);else{var d=o.paintAttributes.fill[r.id];s=t.useProgram(\"outline\",d.defines,d.vertexPragmas,d.fragmentPragmas),l.uniform2f(s.u_world,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform1f(s.u_opacity,f),o.setUniforms(l,\"fill\",s,r,{zoom:t.transform.zoom})}l.uniformMatrix4fv(s.u_matrix,!1,t.translatePosMatrix(i.posMatrix,a,r.paint[\"fill-translate\"],r.paint[\"fill-translate-anchor\"])),u&&n(u,f,a,i,t,s),t.enableTileClippingMask(i);for(var p=0;p<c.length;p++){var m=c[p];m.secondVaos[r.id].bind(l,s,m.layoutVertexBuffer,m.elementBuffer2,m.paintVertexBuffers[r.id]),l.drawElements(l.LINES,2*m.elementBuffer2.length,l.UNSIGNED_SHORT,0)}}}(t,e,r,i[c])}}},{\"../source/pixels_to_tile_units\":354}],341:[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,c=r.paint[\"line-blur\"]+l,u=r.paint[\"line-color\"],f=t.transform,h=i.create();i.scale(h,h,[1,Math.cos(f._pitch)]),i.rotate(h,h,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(f.height*f.height/4*(1+f.altitude*f.altitude)),x=(y+f.height/2*Math.tan(f._pitch))/y-1,b=r.paint[\"line-dasharray\"],_=r.paint[\"line-pattern\"];if(b)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,c),s.uniform4fv(d.u_color,u),s.uniform1f(d.u_opacity,r.paint[\"line-opacity\"]),p=t.lineAtlas.getDash(b.from,\"round\"===r.layout[\"line-cap\"]),m=t.lineAtlas.getDash(b.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,b.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint[\"line-offset\"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,h);else if(_){if(g=t.spriteAtlas.getPosition(_.from,!0),v=t.spriteAtlas.getPosition(_.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,c),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,_.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,h)}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,c),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint[\"line-offset\"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,h),s.uniform4fv(d.u_color,u),s.uniform1f(d.u_opacity,r.paint[\"line-opacity\"]);for(var w=0;w<o.length;w++){var M=o[w],k=e.getTile(M),A=k.getBucket(r);if(A){var T=A.bufferGroups.line;if(T){t.enableTileClippingMask(M);var S=t.translatePosMatrix(M.posMatrix,k,r.paint[\"line-translate\"],r.paint[\"line-translate-anchor\"]);s.uniformMatrix4fv(d.u_matrix,!1,S);var E=1/a(k,1,t.transform.zoom);if(b){var L=p.width*b.fromScale,C=m.width*b.toScale,z=[1/a(k,L,t.transform.tileZoom),-p.height/2],D=[1/a(k,C,t.transform.tileZoom),-m.height/2],I=t.lineAtlas.width/(256*Math.min(L,C)*n.devicePixelRatio)/2;s.uniform1f(d.u_ratio,E),s.uniform2fv(d.u_patternscale_a,z),s.uniform2fv(d.u_patternscale_b,D),s.uniform1f(d.u_sdfgamma,I)}else _?(s.uniform1f(d.u_ratio,E),s.uniform2fv(d.u_pattern_size_a,[a(k,g.size[0]*_.fromScale,t.transform.tileZoom),v.size[1]]),s.uniform2fv(d.u_pattern_size_b,[a(k,v.size[0]*_.toScale,t.transform.tileZoom),v.size[1]])):s.uniform1f(d.u_ratio,E);for(var P=0;P<T.length;P++){var O=T[P];O.vaos[r.id].bind(s,d,O.layoutVertexBuffer,O.elementBuffer),s.drawElements(s.TRIANGLES,3*O.elementBuffer.length,s.UNSIGNED_SHORT,0)}}}}}}}},{\"../source/pixels_to_tile_units\":354,\"../util/browser\":417,\"gl-matrix\":198}],342:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;a.enable(a.DEPTH_TEST),t.depthMask(!0),a.depthFunc(a.LESS);for(var o=n.length&&n[0].z,s=0;s<n.length;s++){var l=n[s];t.setDepthSublayer(l.z-o),function(t,e,r,n){var a=t.gl;a.disable(a.STENCIL_TEST);var o=e.getTile(n),s=t.transform.calculatePosMatrix(n,e.maxzoom),l=t.useProgram(\"raster\");a.uniformMatrix4fv(l.u_matrix,!1,s),a.uniform1f(l.u_brightness_low,r.paint[\"raster-brightness-min\"]),a.uniform1f(l.u_brightness_high,r.paint[\"raster-brightness-max\"]),a.uniform1f(l.u_saturation_factor,function(t){return t>0?1-1/(1.001-t):-t}(r.paint[\"raster-saturation\"])),a.uniform1f(l.u_contrast_factor,function(t){return t>0?1/(1-t):1+t}(r.paint[\"raster-contrast\"])),a.uniform3fv(l.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint[\"raster-hue-rotate\"]));var c,u,f=o.source&&o.source.findLoadedParent(n,0,{}),h=function(t,e,r,n){var a=[1,0],o=r.paint[\"raster-fade-duration\"];if(t.source&&o>0){var s=(new Date).getTime(),l=(s-t.timeAdded)/o,c=e?(s-e.timeAdded)/o:-1,u=n.coveringZoomLevel(t.source),f=!!e&&Math.abs(e.coord.z-u)>Math.abs(t.coord.z-u);!e||f?(a[0]=i.clamp(l,0,1),a[1]=1-a[0]):(a[0]=i.clamp(1-c,0,1),a[1]=1-a[0])}var h=r.paint[\"raster-opacity\"];return a[0]*=h,a[1]*=h,a}(o,f,r,t.transform);a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.texture),a.activeTexture(a.TEXTURE1),f?(a.bindTexture(a.TEXTURE_2D,f.texture),c=Math.pow(2,f.coord.z-o.coord.z),u=[o.coord.x*c%1,o.coord.y*c%1]):(a.bindTexture(a.TEXTURE_2D,o.texture),h[1]=0);a.uniform2fv(l.u_tl_parent,u||[0,0]),a.uniform1f(l.u_scale_parent,c||1),a.uniform1f(l.u_buffer_scale,1),a.uniform1f(l.u_opacity0,h[0]),a.uniform1f(l.u_opacity1,h[1]),a.uniform1i(l.u_image0,0),a.uniform1i(l.u_image1,1);var d=o.boundsBuffer||t.rasterBoundsBuffer;(o.boundsVAO||t.rasterBoundsVAO).bind(a,l,d),a.drawArrays(a.TRIANGLE_STRIP,0,d.length)}(t,e,r,l)}a.depthFunc(a.LEQUAL)}}var i=t(\"../util/util\"),a=t(\"../util/struct_array\");e.exports=n,n.RasterBoundsArray=new a({members:[{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]})},{\"../util/struct_array\":431,\"../util/util\":433}],343:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,s,l,c,u,f,h,d,p,m,g){for(var v=0;v<n.length;v++){var y=e.getTile(n[v]),x=y.getBucket(r);if(x){var b=x.bufferGroups,_=a?b.glyph:b.icon;_.length&&(t.enableTileClippingMask(n[v]),function(t,e,r,n,a,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w){var M,k,A,T=t.gl,S=t.transform,E=\"map\"===m,L=\"map\"===g,C=l?24:1,z=v/C;L?(k=o(n,1,t.transform.zoom)*z,A=1/Math.cos(S._pitch),M=[k,k]):(k=t.transform.altitude*z,A=1,M=[S.pixelsToGLUnits[0]*k,S.pixelsToGLUnits[1]*k]);if(!l&&!t.style.sprite.loaded())return;var D=t.useProgram(c?\"sdf\":\"icon\");if(T.uniformMatrix4fv(D.u_matrix,!1,t.translatePosMatrix(r,n,d,p)),T.uniform1i(D.u_rotate_with_map,E),T.uniform1i(D.u_pitch_with_map,L),T.uniform2fv(D.u_extrude_scale,M),T.activeTexture(T.TEXTURE0),T.uniform1i(D.u_texture,0),l){var I=h&&t.glyphSource.getGlyphAtlas(h);if(!I)return;I.updateTexture(T),T.uniform2f(D.u_texsize,I.width/4,I.height/4)}else{var P=t.options.rotating||t.options.zooming,O=1!==z||i.devicePixelRatio!==t.spriteAtlas.pixelRatio||u,F=L||t.transform.pitch;t.spriteAtlas.bind(T,c||P||O||F),T.uniform2f(D.u_texsize,t.spriteAtlas.width/4,t.spriteAtlas.height/4)}var R=Math.log(v/f)/Math.LN2||0;T.uniform1f(D.u_zoom,10*(t.transform.zoom-R)),T.activeTexture(T.TEXTURE1),t.frameHistory.bind(T),T.uniform1i(D.u_fadetexture,1);var N;if(c){var j=.105*C/v/i.devicePixelRatio;if(y){T.uniform1f(D.u_gamma,(1.19*b/z/8+j)*A),T.uniform4fv(D.u_color,x),T.uniform1f(D.u_opacity,_),T.uniform1f(D.u_buffer,(6-y/z)/8);for(var B=0;B<s.length;B++)(N=s[B]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}T.uniform1f(D.u_gamma,j*A),T.uniform4fv(D.u_color,w),T.uniform1f(D.u_opacity,_),T.uniform1f(D.u_buffer,.75),T.uniform1f(D.u_pitch,S.pitch/360*2*Math.PI),T.uniform1f(D.u_bearing,S.bearing/360*2*Math.PI),T.uniform1f(D.u_aspect_ratio,S.width/S.height);for(var U=0;U<s.length;U++)(N=s[U]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}else{T.uniform1f(D.u_opacity,_);for(var V=0;V<s.length;V++)(N=s[V]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}}(t,r,n[v].posMatrix,y,0,_,a,a||x.sdfIcons,!a&&x.iconsNeedLinear,a?x.adjustedTextSize:x.adjustedIconSize,x.fontstack,s,l,c,u,f,h,d,p,m,g))}}}var i=t(\"../util/browser\"),a=t(\"./draw_collision_debug\"),o=t(\"../source/pixels_to_tile_units\");e.exports=function(t,e,r,i){if(!t.isOpaquePass){var o=!(r.layout[\"text-allow-overlap\"]||r.layout[\"icon-allow-overlap\"]||r.layout[\"text-ignore-placement\"]||r.layout[\"icon-ignore-placement\"]),s=t.gl;o?s.disable(s.STENCIL_TEST):s.enable(s.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),s.disable(s.DEPTH_TEST),n(t,e,r,i,!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\"]),n(t,e,r,i,!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\"]),s.enable(s.DEPTH_TEST),e.map.showCollisionBoxes&&a(t,e,r,i)}}},{\"../source/pixels_to_tile_units\":354,\"../util/browser\":417,\"./draw_collision_debug\":338}],344:[function(t,e,r){\"use strict\";function n(){this.changeTimes=new Float64Array(256),this.changeOpacities=new Uint8Array(256),this.opacities=new Uint8ClampedArray(256),this.array=new Uint8Array(this.opacities.buffer),this.fadeDuration=300,this.previousZoom=0,this.firstFrame=!0}e.exports=n,n.prototype.record=function(t){var e=Date.now();this.firstFrame&&(e=0,this.firstFrame=!1);var r;if((t=Math.floor(10*t))<this.previousZoom)for(r=t+1;r<=this.previousZoom;r++)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];else for(r=t;r>this.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=(e-this.changeTimes[r])/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+n:this.changeOpacities[r]-n}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))}},{}],345:[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;o<t.length;o++)a+=t[o];for(var s=this.width/a,l=s/2,c=t.length%2==1,u=-r;u<=r;u++)for(var f=this.nextRow+r+u,h=this.width*f,d=c?-t[t.length-1]:0,p=t[0],m=1,g=0;g<this.width;g++){for(;p<g/s;)d=p,p+=t[m],c&&m===t.length-1&&(p+=t[0]),m++;var v,y=Math.abs(g-d*s),x=Math.abs(g-p*s),b=Math.min(y,x),_=m%2==1;if(e){var w=r?u/r*(l+1):0;if(_){var M=l-Math.abs(w);v=Math.sqrt(b*b+M*M)}else v=l-Math.sqrt(b*b+w*w)}else v=(_?1:-1)*b;this.data[3+4*(h+g)]=Math.max(0,Math.min(255,v+128))}var k={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:a};return this.nextRow+=n,this.dirty=!0,k},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),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,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))}},{\"../util/util\":433}],346:[function(t,e,r){\"use strict\";function n(t,e){this.gl=t,this.transform=e,this.reusableTextures={},this.preFbos={},this.frameHistory=new o,this.setup(),this.numSublayers=s.maxUnderzooming+s.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE)}var i=t(\"../util/browser\"),a=t(\"gl-matrix\").mat4,o=t(\"./frame_history\"),s=t(\"../source/source_cache\"),l=t(\"../data/bucket\").EXTENT,c=t(\"../source/pixels_to_tile_units\"),u=t(\"../util/util\"),f=t(\"../util/struct_array\"),h=t(\"../data/buffer\"),d=t(\"./vertex_array_object\"),p=t(\"./draw_raster\").RasterBoundsArray,m=t(\"./create_uniform_pragmas\");e.exports=n,u.extend(n.prototype,t(\"./painter/use_program\")),n.prototype.resize=function(t,e){var r=this.gl;this.width=t*i.devicePixelRatio,this.height=e*i.devicePixelRatio,r.viewport(0,0,this.width,this.height)},n.prototype.setup=function(){var t=this.gl;t.verbose=!0,t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.enable(t.STENCIL_TEST),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),this._depthMask=!1,t.depthMask(!1);var e=this.PosArray=new f({members:[{name:\"a_pos\",type:\"Int16\",components:2}]}),r=new e;r.emplaceBack(0,0),r.emplaceBack(l,0),r.emplaceBack(0,l),r.emplaceBack(l,l),this.tileExtentBuffer=new h(r.serialize(),e.serialize(),h.BufferType.VERTEX),this.tileExtentVAO=new d,this.tileExtentPatternVAO=new d;var n=new e;n.emplaceBack(0,0),n.emplaceBack(l,0),n.emplaceBack(l,l),n.emplaceBack(0,l),n.emplaceBack(0,0),this.debugBuffer=new h(n.serialize(),e.serialize(),h.BufferType.VERTEX),this.debugVAO=new d;var i=new p;i.emplaceBack(0,0,0,0),i.emplaceBack(l,0,32767,0),i.emplaceBack(0,l,0,32767),i.emplaceBack(l,l,32767,32767),this.rasterBoundsBuffer=new h(i.serialize(),p.serialize(),h.BufferType.VERTEX),this.rasterBoundsVAO=new d},n.prototype.clearColor=function(){var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},n.prototype.clearStencil=function(){var t=this.gl;t.clearStencil(0),t.stencilMask(255),t.clear(t.STENCIL_BUFFER_BIT)},n.prototype.clearDepth=function(){var t=this.gl;t.clearDepth(1),this.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT)},n.prototype._renderTileClippingMasks=function(t){var e=this.gl;e.colorMask(!1,!1,!1,!1),this.depthMask(!1),e.disable(e.DEPTH_TEST),e.enable(e.STENCIL_TEST),e.stencilMask(248),e.stencilOp(e.KEEP,e.KEEP,e.REPLACE);var r=1;this._tileClippingMaskIDs={};for(var n=0;n<t.length;n++){var i=t[n],a=this._tileClippingMaskIDs[i.id]=r++<<3;e.stencilFunc(e.ALWAYS,a,248);var o=m([{name:\"u_color\",components:4},{name:\"u_opacity\",components:1}]),s=this.useProgram(\"fill\",[],o,o);e.uniformMatrix4fv(s.u_matrix,!1,i.posMatrix),this.tileExtentVAO.bind(e,s,this.tileExtentBuffer),e.drawArrays(e.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}e.stencilMask(0),e.colorMask(!0,!0,!0,!0),this.depthMask(!0),e.enable(e.DEPTH_TEST)},n.prototype.enableTileClippingMask=function(t){var e=this.gl;e.stencilFunc(e.EQUAL,this._tileClippingMaskIDs[t.id],248)},n.prototype.prepareBuffers=function(){},n.prototype.bindDefaultFramebuffer=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)};var g={symbol:t(\"./draw_symbol\"),circle:t(\"./draw_circle\"),line:t(\"./draw_line\"),fill:t(\"./draw_fill\"),raster:t(\"./draw_raster\"),background:t(\"./draw_background\"),debug:t(\"./draw_debug\")};n.prototype.render=function(t,e){this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.spriteAtlas=t.spriteAtlas,this.spriteAtlas.setSprite(t.sprite),this.glyphSource=t.glyphSource,this.frameHistory.record(this.transform.zoom),this.prepareBuffers(),this.clearColor(),this.clearDepth(),this.showOverdrawInspector(e.showOverdrawInspector),this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass({isOpaquePass:!0}),this.renderPass({isOpaquePass:!1})},n.prototype.renderPass=function(t){var e=this.style._groups,r=t.isOpaquePass;this.currentLayer=r?this.style._order.length:-1;for(var n=0;n<e.length;n++){var i,a=e[r?e.length-1-n:n],o=this.style.sources[a.source],s=[];if(o){for(s=o.getVisibleCoordinates(),i=0;i<s.length;i++)s[i].posMatrix=this.transform.calculatePosMatrix(s[i],o.maxzoom);this.clearStencil(),o.prepare&&o.prepare(),o.isTileClipped&&this._renderTileClippingMasks(s)}for(r?(this._showOverdrawInspector||this.gl.disable(this.gl.BLEND),this.isOpaquePass=!0):(this.gl.enable(this.gl.BLEND),this.isOpaquePass=!1,s.reverse()),i=0;i<a.length;i++){var l=a[r?a.length-1-i:i];this.currentLayer+=r?-1:1,this.renderLayer(this,o,l,s)}o&&g.debug(this,o,s)}},n.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},n.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(\"background\"===r.type||n.length)&&(this.id=r.id,g[r.type](t,e,r,n))},n.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},n.prototype.translatePosMatrix=function(t,e,r,n){if(!r[0]&&!r[1])return t;if(\"viewport\"===n){var i=Math.sin(-this.transform.angle),o=Math.cos(-this.transform.angle);r=[r[0]*o-r[1]*i,r[0]*i+r[1]*o]}var s=[c(e,r[0],this.transform.zoom),c(e,r[1],this.transform.zoom),0],l=new Float32Array(16);return a.translate(l,t,s),l},n.prototype.saveTexture=function(t){var e=this.reusableTextures[t.size];e?e.push(t):this.reusableTextures[t.size]=[t]},n.prototype.getTexture=function(t){var e=this.reusableTextures[t];return e&&e.length>0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(u.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\":320,\"../data/buffer\":325,\"../source/pixels_to_tile_units\":354,\"../source/source_cache\":358,\"../util/browser\":417,\"../util/struct_array\":431,\"../util/util\":433,\"./create_uniform_pragmas\":335,\"./draw_background\":336,\"./draw_circle\":337,\"./draw_debug\":339,\"./draw_fill\":340,\"./draw_line\":341,\"./draw_raster\":342,\"./draw_symbol\":343,\"./frame_history\":344,\"./painter/use_program\":347,\"./vertex_array_object\":348,\"gl-matrix\":198}],347:[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 c=this.gl,u=c.createProgram(),f=o[t],h=\"#define MAPBOX_GL_JS;\\n\",d=0;d<e.length;d++)h+=\"#define \"+e[d]+\";\\n\";var p=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(p,n(h+f.fragmentSource,l)),c.compileShader(p),i(c.getShaderParameter(p,c.COMPILE_STATUS),c.getShaderInfoLog(p)),c.attachShader(u,p);var m=c.createShader(c.VERTEX_SHADER);c.shaderSource(m,n(h+s+f.vertexSource,r)),c.compileShader(m),i(c.getShaderParameter(m,c.COMPILE_STATUS),c.getShaderInfoLog(m)),c.attachShader(u,m),c.linkProgram(u),i(c.getProgramParameter(u,c.LINK_STATUS),c.getProgramInfoLog(u));for(var g={},v=c.getProgramParameter(u,c.ACTIVE_ATTRIBUTES),y=0;y<v;y++){var x=c.getActiveAttrib(u,y);g[x.name]=c.getAttribLocation(u,x.name)}for(var b={},_=c.getProgramParameter(u,c.ACTIVE_UNIFORMS),w=0;w<_;w++){var M=c.getActiveUniform(u,w);b[M.name]=c.getUniformLocation(u,M.name)}return a.extend({program:u,definition:f,attributes:g,numAttributes:v},g,b)},e.exports._createProgramCached=function(t,e,r,n){this.cache=this.cache||{};var i=JSON.stringify({name:t,defines:e,vertexPragmas:r,fragmentPragmas:n});return this.cache[i]||(this.cache[i]=this._createProgram(t,e,r,n)),this.cache[i]},e.exports.useProgram=function(t,e,r,n){var i=this.gl;e=e||[],this._showOverdrawInspector&&(e=e.concat(\"OVERDRAW_INSPECTOR\"));var a=this._createProgramCached(t,e,r,n);return this.currentProgram!==a&&(i.useProgram(a.program),this.currentProgram=a),a}},{\"../../util/util\":433,assert:51,\"mapbox-gl-shaders\":294}],348:[function(t,e,r){\"use strict\";function n(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.vao=null}var i=t(\"assert\");e.exports=n,n.prototype.bind=function(t,e,r,n,i){void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension(\"OES_vertex_array_object\"));var a=!this.vao||this.boundProgram!==e||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==i||this.boundElementBuffer!==n;!t.extVertexArrayObject||a?this.freshBind(t,e,r,n,i):t.extVertexArrayObject.bindVertexArrayOES(this.vao)},n.prototype.freshBind=function(t,e,r,n,a){var o,s=e.numAttributes;if(t.extVertexArrayObject)this.vao&&this.destroy(t),this.vao=t.extVertexArrayObject.createVertexArrayOES(),t.extVertexArrayObject.bindVertexArrayOES(this.vao),o=0,this.boundProgram=e,this.boundVertexBuffer=r,this.boundVertexBuffer2=a,this.boundElementBuffer=n;else{o=t.currentNumAttributes||0;for(var l=s;l<o;l++)i(0!==l),t.disableVertexAttribArray(l)}for(var c=o;c<s;c++)t.enableVertexAttribArray(c);r.bind(t),r.setVertexAttribPointers(t,e),a&&(a.bind(t),a.setVertexAttribPointers(t,e)),n&&n.bind(t),t.currentNumAttributes=s},n.prototype.unbind=function(t){var e=t.extVertexArrayObject;e&&e.bindVertexArrayOES(null)},n.prototype.destroy=function(t){var e=t.extVertexArrayObject;e&&this.vao&&(e.deleteVertexArrayOES(this.vao),this.vao=null)}},{assert:51}],349:[function(t,e,r){\"use strict\";function n(t,e,r){e=e||{},this.id=t,this.dispatcher=r,this._data=e.data,void 0!==e.maxzoom&&(this.maxzoom=e.maxzoom),e.type&&(this.type=e.type);var n=s/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:e.cluster||!1,geojsonVtOptions:{buffer:(void 0!==e.buffer?e.buffer:128)*n,tolerance:(void 0!==e.tolerance?e.tolerance:.375)*n,extent:s,maxZoom:this.maxzoom},superclusterOptions:{maxZoom:Math.min(e.clusterMaxZoom,this.maxzoom-1)||this.maxzoom-1,extent:s,radius:(e.clusterRadius||50)*n,log:!1}},e.workerOptions),this._updateWorkerData(function(t){t?this.fire(\"error\",{error:t}):this.fire(\"load\")}.bind(this))}var i=t(\"../util/evented\"),a=t(\"../util/util\"),o=t(\"resolve-url\"),s=t(\"../data/bucket\").EXTENT;e.exports=n,n.prototype=a.inherit(i,{type:\"geojson\",minzoom:0,maxzoom:18,tileSize:512,isTileClipped:!0,reparseOverscaled:!0,onAdd:function(t){this.map=t},setData:function(t){return this._data=t,this._updateWorkerData(function(t){if(t)return this.fire(\"error\",{error:t});this.fire(\"change\")}.bind(this)),this},_updateWorkerData:function(t){var e=a.extend({},this.workerOptions),r=this._data;\"string\"==typeof r?e.url=\"undefined\"!=typeof window?o(window.location.href,r):r:e.data=JSON.stringify(r),this.workerID=this.dispatcher.send(this.type+\".loadData\",e,function(e){this._loaded=!0,t(e)}.bind(this))},loadTile:function(t,e){var r=t.coord.z>this.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\":320,\"../util/evented\":425,\"../util/util\":433,\"resolve-url\":508}],350:[function(t,e,r){\"use strict\";function n(t,e,r){r&&(this.loadGeoJSON=r),f.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\"),c=t(\"supercluster\"),u=t(\"geojson-vt\"),f=t(\"./vector_tile_worker_source\");e.exports=n,n.prototype=i.inherit(f,{_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,c(e.superclusterOptions).load(t.features)):r(null,u(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{\"../util/ajax\":416,\"../util/util\":433,\"./geojson_wrapper\":351,\"./vector_tile_worker_source\":362,\"geojson-rewind\":147,\"geojson-vt\":151,supercluster:538,\"vt-pbf\":570}],351:[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;e<t.geometry.length;e++)this.rawGeometry.push([t.geometry[e]])}else this.rawGeometry=t.geometry;this.properties=t.tags,this.extent=s}var a=t(\"point-geometry\"),o=t(\"vector-tile\").VectorTileFeature,s=t(\"../data/bucket\").EXTENT;e.exports=n,n.prototype.feature=function(t){return new i(this.features[t])},i.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new a(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},i.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},i.prototype.toGeoJSON=o.prototype.toGeoJSON},{\"../data/bucket\":320,\"point-geometry\":477,\"vector-tile\":564}],352:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r,this.url=e.url,this.coordinates=e.coordinates,c.getImage(e.url,function(t,r){if(t)return this.fire(\"error\",{error:t});this.image=r,this.image.addEventListener(\"load\",function(){this.map._rerender()}.bind(this)),this._loaded=!0,this.fire(\"load\"),this.map&&this.setCoordinates(e.coordinates)}.bind(this))}var i=t(\"../util/util\"),a=t(\"./tile_coord\"),o=t(\"../geo/lng_lat\"),s=t(\"point-geometry\"),l=t(\"../util/evented\"),c=t(\"../util/ajax\"),u=t(\"../data/bucket\").EXTENT,f=t(\"../render/draw_raster\").RasterBoundsArray,h=t(\"../data/buffer\"),d=t(\"../render/vertex_array_object\");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,onAdd:function(t){this.map=t,this.image&&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)*u),Math.round((e.row-n.row)*u))}),this.fire(\"change\"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new f;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 h(e.serialize(),f.serialize(),h.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state=\"loaded\"},prepare:function(){if(this._loaded&&this.image&&this.image.complete&&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.image)):(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.image))}},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:\"image\",urls:this.url,coordinates:this.coordinates}}})},{\"../data/bucket\":320,\"../data/buffer\":325,\"../geo/lng_lat\":330,\"../render/draw_raster\":342,\"../render/vertex_array_object\":348,\"../util/ajax\":416,\"../util/evented\":425,\"../util/util\":433,\"./tile_coord\":360,\"point-geometry\":477}],353:[function(t,e,r){\"use strict\";var n=t(\"../util/util\"),i=t(\"../util/ajax\"),a=t(\"../util/browser\"),o=t(\"../util/mapbox\").normalizeSourceURL;e.exports=function(t,e){var r=function(t,r){if(t)return e(t);var i=n.pick(r,[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\"]);r.vector_layers&&(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),e(null,i)};t.url?i.getJSON(o(t.url),r):a.frame(r.bind(null,null,t))}},{\"../util/ajax\":416,\"../util/browser\":417,\"../util/mapbox\":430,\"../util/util\":433}],354:[function(t,e,r){\"use strict\";var n=t(\"../data/bucket\");e.exports=function(t,e,r){return e*(n.EXTENT/(t.tileSize*Math.pow(2,r-t.coord.z)))}},{\"../data/bucket\":320}],355:[function(t,e,r){\"use strict\";function n(t,e){var r=t.coord,n=e.coord;return r.z-n.z||r.y-n.y||r.w-n.w||r.x-n.x}var i=t(\"./tile_coord\");r.rendered=function(t,e,r,i,a,o){var s=t.tilesIn(r);s.sort(n);for(var l=[],c=0;c<s.length;c++){var u=s[c];u.tile.featureIndex&&l.push(u.tile.featureIndex.query({queryGeometry:u.queryGeometry,scale:u.scale,tileSize:u.tile.tileSize,bearing:o,params:i},e))}return function(t){for(var e=t[0]||{},r=1;r<t.length;r++){var n=t[r];for(var i in n){var a=n[i],o=e[i];if(void 0===o)o=e[i]=a;else for(var s=0;s<a.length;s++)o.push(a[s])}}return e}(l)},r.source=function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],a={},o=0;o<r.length;o++){var s=r[o],l=new i(Math.min(s.sourceMaxZoom,s.coord.z),s.coord.x,s.coord.y,0).id;a[l]||(a[l]=!0,s.querySourceFeatures(n,e))}return n}},{\"./tile_coord\":360}],356:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r,i.extend(this,i.pick(e,[\"url\",\"scheme\",\"tileSize\"])),s(e,function(t,e){if(t)return this.fire(\"error\",t);i.extend(this,e),this.fire(\"load\")}.bind(this))}var i=t(\"../util/util\"),a=t(\"../util/ajax\"),o=t(\"../util/evented\"),s=t(\"./load_tilejson\"),l=t(\"../util/mapbox\").normalizeTileURL;e.exports=n,n.prototype=i.inherit(o,{minzoom:0,maxzoom:22,roundZoom:!0,scheme:\"xyz\",tileSize:512,_loaded:!1,onAdd:function(t){this.map=t},serialize:function(){return{type:\"raster\",url:this.url,tileSize:this.tileSize}},loadTile:function(t,e){var r=l(t.coord.url(this.tiles,null,this.scheme),this.url,this.tileSize);t.request=a.getImage(r,function(r,n){if(delete t.request,!t.aborted){if(r)return e(r);var i=this.map.painter.gl;t.texture=this.map.painter.getTexture(n.width),t.texture?(i.bindTexture(i.TEXTURE_2D,t.texture),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,n)):(t.texture=i.createTexture(),i.bindTexture(i.TEXTURE_2D,t.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.texture.size=n.width),i.generateMipmap(i.TEXTURE_2D),this.map.animationLoop.set(this.map.style.rasterFadeDuration),t.state=\"loaded\",e(null)}}.bind(this))},abortTile:function(t){t.request&&(t.request.abort(),delete t.request)},unloadTile:function(t){t.texture&&this.map.painter.saveTexture(t.texture)}})},{\"../util/ajax\":416,\"../util/evented\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./load_tilejson\":353}],357:[function(t,e,r){\"use strict\";var n=t(\"../util/util\"),i={vector:t(\"../source/vector_tile_source\"),raster:t(\"../source/raster_tile_source\"),geojson:t(\"../source/geojson_source\"),video:t(\"../source/video_source\"),image:t(\"../source/image_source\")};r.create=function(t,e,r){if((e=new i[e.type](t,e,r)).id!==t)throw new Error(\"Expected Source id to be \"+t+\" instead of \"+e.id);return n.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],e),e},r.getType=function(t){return i[t]},r.setType=function(t,e){i[t]=e}},{\"../source/geojson_source\":349,\"../source/image_source\":352,\"../source/raster_tile_source\":356,\"../source/vector_tile_source\":361,\"../source/video_source\":363,\"../util/util\":433}],358:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r;var n=this._source=o.create(t,e,r).on(\"load\",function(){this.map&&this._source.onAdd&&this._source.onAdd(this.map),this._sourceLoaded=!0,this.tileSize=n.tileSize,this.minzoom=n.minzoom,this.maxzoom=n.maxzoom,this.roundZoom=n.roundZoom,this.reparseOverscaled=n.reparseOverscaled,this.isTileClipped=n.isTileClipped,this.attribution=n.attribution,this.vectorLayerIds=n.vectorLayerIds,this.fire(\"load\")}.bind(this)).on(\"error\",function(t){this._sourceErrored=!0,this.fire(\"error\",t)}.bind(this)).on(\"change\",function(){this.reload(),this.transform&&this.update(this.transform,this.map&&this.map.style.rasterFadeDuration),this.fire(\"change\")}.bind(this));this._tiles={},this._cache=new u(0,this.unloadTile.bind(this)),this._isIdRenderable=this._isIdRenderable.bind(this)}function i(t,e,r){var n=r.zoomTo(Math.min(t.z,e));return{x:(n.column-(t.x+t.w*Math.pow(2,t.z)))*d,y:(n.row-t.y)*d}}function a(t,e){return t%32-e%32}var o=t(\"./source\"),s=t(\"./tile\"),l=t(\"../util/evented\"),c=t(\"./tile_coord\"),u=t(\"../util/lru_cache\"),f=t(\"../geo/coordinate\"),h=t(\"../util/util\"),d=t(\"../data/bucket\").EXTENT;e.exports=n,n.maxOverzooming=10,n.maxUnderzooming=3,n.prototype=h.inherit(l,{onAdd:function(t){this.map=t,this._source&&this._source.onAdd&&this._source.onAdd(t)},loaded:function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(\"loaded\"!==e.state&&\"errored\"!==e.state)return!1}return!0},getSource:function(){return this._source},loadTile:function(t,e){return this._source.loadTile(t,e)},unloadTile:function(t){if(this._source.unloadTile)return this._source.unloadTile(t)},abortTile:function(t){if(this._source.abortTile)return this._source.abortTile(t)},serialize:function(){return this._source.serialize()},prepare:function(){if(this._sourceLoaded&&this._source.prepare)return this._source.prepare()},getIds:function(){return Object.keys(this._tiles).map(Number).sort(a)},getRenderableIds:function(){return this.getIds().filter(this._isIdRenderable)},_isIdRenderable:function(t){return this._tiles[t].isRenderable()&&!this._coveredTiles[t]},reload:function(){this._cache.reset();for(var t in this._tiles){var e=this._tiles[t];\"loading\"!==e.state&&(e.state=\"reloading\"),this.loadTile(this._tiles[t],this._tileLoaded.bind(this,this._tiles[t]))}},_tileLoaded:function(t,e){if(e)return t.state=\"errored\",this.fire(\"tile.error\",{tile:t,error:e}),void this._source.fire(\"tile.error\",{tile:t,error:e});t.source=this,t.timeAdded=(new Date).getTime(),this.fire(\"tile.load\",{tile:t}),this._source.fire(\"tile.load\",{tile:t})},getTile:function(t){return this.getTileByID(t.id)},getTileByID:function(t){return this._tiles[t]},getZoom:function(t){return t.zoom+t.scaleZoom(t.tileSize/this.tileSize)},findLoadedChildren:function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.isRenderable()||a.coord.z<=t.z||a.coord.z>e)){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.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)*(Math.ceil(t.height/t.tileSize)+1);this._cache.setMaxSize(Math.floor(5*e))},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),u={},f=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;r<d.length;r++)i=d[r],a=this.addTile(i),u[i.id]=!0,a.isRenderable()||this.findLoadedChildren(i,l,u)||this.findLoadedParent(i,s,u);for(var p={},m=Object.keys(u),g=0;g<m.length;g++){var v=m[g];i=c.fromID(v),(a=this._tiles[v])&&a.timeAdded>f-(e||0)&&(this.findLoadedChildren(i,l,u)&&(u[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)u[y]||(this._coveredTiles[y]=!0);for(y in p)u[y]=!0;var x=h.keysDifference(this._tiles,u);for(r=0;r<x.length;r++)this.removeTile(+x[r]);this.transform=t}},addTile:function(t){var e=this._tiles[t.id];if(e)return e;var r=t.wrapped();if((e=this._tiles[r.id])||(e=this._cache.get(r.id))&&this._redoPlacement&&this._redoPlacement(e),!e){var n=t.z,i=n>this.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,u=0;u<t.length;u++){var h=t[u];n=Math.min(n,h.column),a=Math.min(a,h.row),o=Math.max(o,h.column),s=Math.max(s,h.row)}for(var p=0;p<r.length;p++){var m=this._tiles[r[p]],g=c.fromID(r[p]),v=[i(g,m.sourceMaxZoom,new f(n,a,l)),i(g,m.sourceMaxZoom,new f(o,s,l))];if(v[0].x<d&&v[0].y<d&&v[1].x>=0&&v[1].y>=0){for(var y=[],x=0;x<t.length;x++)y.push(i(g,m.sourceMaxZoom,t[x]));var b=e[m.coord.id];void 0===b&&(b=e[m.coord.id]={tile:m,coord:g,queryGeometry:[],scale:Math.pow(2,this.transform.zoom-m.coord.z)}),b.queryGeometry.push(y)}}var _=[];for(var w in e)_.push(e[w]);return _},redoPlacement:function(){for(var t=this.getIds(),e=0;e<t.length;e++){this.getTileByID(t[e]).redoPlacement(this)}},getVisibleCoordinates:function(){return this.getRenderableIds().map(c.fromID)}})},{\"../data/bucket\":320,\"../geo/coordinate\":329,\"../util/evented\":425,\"../util/lru_cache\":429,\"../util/util\":433,\"./source\":357,\"./tile\":359,\"./tile_coord\":360}],359:[function(t,e,r){\"use strict\";function n(t,e,r){this.coord=t,this.uid=a.uniqueId(),this.uses=0,this.tileSize=e,this.sourceMaxZoom=r,this.buckets={},this.state=\"loading\"}function i(t,e){if(e){for(var r={},n=0;n<t.length;n++){var i=e.getLayer(t[n].layerId);if(i){var s=o.create(a.extend({layer:i,childLayers:t[n].childLayerIds.map(e.getLayer.bind(e)).filter(function(t){return t})},t[n]));r[s.id]=s}}return r}}var a=t(\"../util/util\"),o=t(\"../data/bucket\"),s=t(\"../data/feature_index\"),l=t(\"vector-tile\"),c=t(\"pbf\"),u=t(\"../util/vectortile_to_geojson\"),f=t(\"feature-filter\"),h=t(\"../symbol/collision_tile\"),d=t(\"../symbol/collision_box\"),p=t(\"../symbol/symbol_instances\"),m=t(\"../symbol/symbol_quads\");e.exports=n,n.prototype={loadVectorData:function(t,e){this.state=\"loaded\",t&&(this.collisionBoxArray=new d(t.collisionBoxArray),this.collisionTile=new h(t.collisionTile,this.collisionBoxArray),this.symbolInstancesArray=new p(t.symbolInstancesArray),this.symbolQuadsArray=new m(t.symbolQuadsArray),this.featureIndex=new s(t.featureIndex,t.rawTileData,this.collisionTile),this.rawTileData=t.rawTileData,this.buckets=i(t.buckets,e))},reloadSymbolData:function(t,e,r){if(\"unloaded\"!==this.state){this.collisionTile=new h(t.collisionTile,this.collisionBoxArray),this.featureIndex.setCollisionTile(this.collisionTile);for(var n in this.buckets){var o=this.buckets[n];\"symbol\"===o.type&&(o.destroy(e.gl),delete this.buckets[n])}a.extend(this.buckets,i(t.buckets,r))}},unloadVectorData:function(t){for(var e in this.buckets){this.buckets[e].destroy(t.gl)}this.collisionBoxArray=null,this.symbolQuadsArray=null,this.symbolInstancesArray=null,this.collisionTile=null,this.featureIndex=null,this.rawTileData=null,this.buckets=null,this.state=\"unloaded\"},redoPlacement:function(t){\"loaded\"===this.state&&\"reloading\"!==this.state?(this.state=\"reloading\",t.dispatcher.send(\"redo placement\",{uid:this.uid,source:t.id,angle:t.map.transform.angle,pitch:t.map.transform.pitch,showCollisionBoxes:t.map.showCollisionBoxes},function(e,r){this.reloadSymbolData(r,t.map.painter,t.map.style),t.fire(\"tile.load\",{tile:this}),this.state=\"loaded\",this.redoWhenDone&&(this.redoPlacement(t),this.redoWhenDone=!1)}.bind(this),this.workerID)):this.redoWhenDone=!0},getBucket:function(t){return this.buckets&&this.buckets[t.ref||t.id]},querySourceFeatures:function(t,e){if(this.rawTileData){this.vtLayers||(this.vtLayers=new l.VectorTile(new c(new Uint8Array(this.rawTileData))).layers);var r=this.vtLayers._geojsonTileLayer||this.vtLayers[e.sourceLayer];if(r)for(var n=f(e.filter),i={z:this.coord.z,x:this.coord.x,y:this.coord.y},a=0;a<r.length;a++){var o=r.feature(a);if(n(o)){var s=new u(o,this.coord.z,this.coord.x,this.coord.y);s.tile=i,t.push(s)}}}},isRenderable:function(){return\"loaded\"===this.state||\"reloading\"===this.state}}},{\"../data/bucket\":320,\"../data/feature_index\":327,\"../symbol/collision_box\":385,\"../symbol/collision_tile\":387,\"../symbol/symbol_instances\":396,\"../symbol/symbol_quads\":397,\"../util/util\":433,\"../util/vectortile_to_geojson\":434,\"feature-filter\":141,pbf:470,\"vector-tile\":564}],360:[function(t,e,r){\"use strict\";function n(t,e,r,n){s(!isNaN(t)&&t>=0&&t%1==0),s(!isNaN(e)&&e>=0&&e%1==0),s(!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<<this.z;this.id=32*(i*i*n+i*this.y+this.x)+this.z,this.posMatrix=null}function i(t,e){if(t.row>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 a(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.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx>0,f=e.dx<0,h=a;h<o;h++){var d=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,p=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(p),Math.ceil(d),h)}}function o(t,e,r,n,o,s){var l,c=i(t,e),u=i(e,r),f=i(r,t);c.dy>u.dy&&(l=c,c=u,u=l),c.dy>f.dy&&(l=c,c=f,f=l),u.dy>f.dy&&(l=u,u=f,f=l),c.dy&&a(f,c,n,o,s),u.dy&&a(f,u,n,o,s)}var s=t(\"assert\"),l=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<<e,i=(t-e)/32,a=i%r,o=(i-a)/r%r,s=Math.floor(i/(r*r));return s%2!=0&&(s=-1*s-1),s/=2,new n(e,a,o,s)},n.prototype.url=function(t,e,r){var n=l.getTileBBox(this.x,this.y,this.z),i=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(\"{prefix}\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\"{z}\",Math.min(this.z,e||this.z)).replace(\"{x}\",this.x).replace(\"{y}\",\"tms\"===r?Math.pow(2,this.z)-this.y-1:this.y).replace(\"{quadkey}\",i).replace(\"{bbox-epsg-3857}\",n)},n.prototype.parent=function(t){return 0===this.z?null:this.z>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 o,l;if(i>=0&&i<=a)for(o=t;o<e;o++)l=new n(r,(o%a+a)%a,i,Math.floor(o/a)),s[l.id]=l}var a=1<<t,s={};return o(e[0],e[1],e[2],0,a,i),o(e[2],e[3],e[0],0,a,i),Object.keys(s).map(function(t){return s[t]})}},{\"../geo/coordinate\":329,assert:51,\"whoots-js\":580}],361:[function(t,e,r){\"use strict\";function n(t,e,r){if(this.id=t,this.dispatcher=r,a.extend(this,a.pick(e,[\"url\",\"scheme\",\"tileSize\"])),this._options=a.extend({type:\"vector\"},e),512!==this.tileSize)throw new Error(\"vector tile sources must have a tileSize of 512\");o(e,function(t,e){t?this.fire(\"error\",t):(a.extend(this,e),this.fire(\"load\"))}.bind(this))}var i=t(\"../util/evented\"),a=t(\"../util/util\"),o=t(\"./load_tilejson\"),s=t(\"../util/mapbox\").normalizeTileURL;e.exports=n,n.prototype=a.inherit(i,{minzoom:0,maxzoom:22,scheme:\"xyz\",tileSize:512,reparseOverscaled:!0,isTileClipped:!0,onAdd:function(t){this.map=t},serialize:function(){return a.extend({},this._options)},loadTile:function(t,e){function r(r,n){if(!t.aborted){if(r)return e(r);t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null),t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)}}var n=t.coord.z>this.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\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./load_tilejson\":353}],362:[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){var r=t.source,n=t.uid;this.loading[r]||(this.loading[r]={});var i=this.loading[r][n]=new s(t);i.abort=this.loadVectorData(t,function(t,a){return delete this.loading[r][n],t?e(t):a?(i.data=a.tile,i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,a.rawTileData,e),this.loaded[r]=this.loaded[r]||{},void(this.loaded[r][n]=i)):e(null,null)}.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){var r=i.getArrayBuffer(t.url,function(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}.bind(this));return function(){r.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].redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);a.result&&e(null,a.result,a.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{\"../util/ajax\":416,\"./worker_tile\":365,pbf:470,\"vector-tile\":564}],363:[function(t,e,r){\"use strict\";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,c.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\"),c=t(\"../util/ajax\"),u=t(\"../data/bucket\").EXTENT,f=t(\"../render/draw_raster\").RasterBoundsArray,h=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)*u),Math.round((e.row-n.row)*u))}),this.fire(\"change\"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new f;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 h(e.serialize(),f.serialize(),h.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\":320,\"../data/buffer\":325,\"../geo/lng_lat\":330,\"../render/draw_raster\":342,\"../render/vertex_array_object\":348,\"../util/ajax\":416,\"../util/evented\":425,\"../util/util\":433,\"./tile_coord\":360,\"point-geometry\":477}],364:[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 c(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\"),c=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<t.length;a++){var s=t[a];\"fill\"!==s.type&&\"line\"!==s.type&&\"circle\"!==s.type&&\"symbol\"!==s.type||(s.ref?n.push(a):e(s))}for(var l=0;l<n.length;l++)e(t[n[l]]);this.layerFamilies=i(this.layers)},\"update layers\":function(t){function e(t){var e=a.layers[t.ref];a.layers[t.id]?a.layers[t.id].set(t,e):a.layers[t.id]=o.create(t,e),a.layers[t.id].updatePaintTransitions({},{transition:!1})}var r,n,a=this;for(r in t)(n=t[r]).ref&&e(n);for(r in t)(n=t[r]).ref||e(n);this.layerFamilies=i(this.layers)},\"load tile\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].loadTile(t,e)},\"reload tile\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].reloadTile(t,e)},\"abort tile\":function(t){var e=t.type||\"vector\";this.workerSources[e].abortTile(t)},\"remove tile\":function(t){var e=t.type||\"vector\";this.workerSources[e].removeTile(t)},\"redo placement\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].redoPlacement(t,e)},\"load worker source\":function(t,e){try{this.self.importScripts(t.url),e()}catch(t){e(t)}}})},{\"../style/style_layer\":372,\"../util/actor\":415,\"../util/util\":433,\"./geojson_worker_source\":350,\"./vector_tile_worker_source\":362}],365:[function(t,e,r){\"use strict\";function n(t){this.coord=t.coord,this.uid=t.uid,this.zoom=t.zoom,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=t.overscaling,this.angle=t.angle,this.pitch=t.pitch,this.showCollisionBoxes=t.showCollisionBoxes}function i(t){return!t.isEmpty()}function a(t){return t.serialize()}function o(t){var e=[];for(var r in t)t[r].getTransferables(e);return e}function s(t){return t.id}var l=t(\"../data/feature_index\"),c=t(\"../symbol/collision_tile\"),u=t(\"../data/bucket\"),f=t(\"../symbol/collision_box\"),h=t(\"../util/dictionary_coder\"),d=t(\"../util/util\"),p=t(\"../symbol/symbol_instances\"),m=t(\"../symbol/symbol_quads\");e.exports=n,n.prototype.parse=function(t,e,r,n,g){function v(t,e){for(var r=0;r<t.length;r++){var n=t.feature(r);n.index=r;for(var i in e)e[i].filter(n)&&e[i].features.push(n)}}function y(t){if(t)return g(t);if(2==++j){for(var e=P.length-1;e>=0;e--)x(E,P[e]);b()}}function x(t,e){if(e.populateArrays(A,N,R),\"symbol\"!==e.type)for(var r=0;r<e.features.length;r++){var n=e.features[r];T.insert(n,n.index,e.sourceLayerIndex,e.index)}e.features=null}function b(){E.status=\"done\",E.redoPlacementAfterDone&&(E.redoPlacement(E.angle,E.pitch,null),E.redoPlacementAfterDone=!1);var t=T.serialize(),e=A.serialize(),r=E.collisionBoxArray.serialize(),s=E.symbolInstancesArray.serialize(),l=E.symbolQuadsArray.serialize(),c=[n].concat(t.transferables).concat(e.transferables),u=I.filter(i);g(null,{buckets:u.map(a),featureIndex:t.data,collisionTile:e.data,collisionBoxArray:r,symbolInstancesArray:s,symbolQuadsArray:l,rawTileData:n},o(u).concat(c))}this.status=\"parsing\",this.data=t,this.collisionBoxArray=new f,this.symbolInstancesArray=new p,this.symbolQuadsArray=new m;var _,w,M,k,A=new c(this.angle,this.pitch,this.collisionBoxArray),T=new l(this.coord,this.overscaling,A,t.layers),S=new h(t.layers?Object.keys(t.layers).sort():[\"_geojsonTileLayer\"]),E=this,L={},C={},z=0;for(var D in e)(w=e[D][0]).source===this.source&&(w.ref||w.minzoom&&this.zoom<w.minzoom||w.maxzoom&&this.zoom>=w.maxzoom||w.layout&&\"none\"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||((k=u.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\")})).createFilter(),L[w.id]=k,t.layers&&(C[M=w.sourceLayer]=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 F in L)0!==(k=L[F]).features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),\"symbol\"===k.type?P.push(k):O.push(k));var R={},N={},j=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(R),P[_].updateFont(N);for(var B in N)N[B]=Object.keys(N[B]).map(Number);R=Object.keys(R),r.send(\"get glyphs\",{uid:this.uid,stacks:N},function(t,e){N=e,y(t)}),R.length?r.send(\"get icons\",{icons:R},function(t,e){R=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)x(0,O[_]);if(0===P.length)return b()},n.prototype.redoPlacement=function(t,e,r){if(\"done\"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new c(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var u=n.serialize(),f=s.filter(i);return{result:{buckets:f.map(a),collisionTile:u.data},transferables:o(f).concat(u.transferables)}}},{\"../data/bucket\":320,\"../data/feature_index\":327,\"../symbol/collision_box\":385,\"../symbol/collision_tile\":387,\"../symbol/symbol_instances\":396,\"../symbol/symbol_quads\":397,\"../util/dictionary_coder\":423,\"../util/util\":433}],366:[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})}},{}],367:[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){t?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)this.fire(\"error\",{error:t});else{for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i<r.length;i+=4){var a=r[i+3]/255;n[i+0]=r[i+0]*a,n[i+1]=r[i+1]*a,n[i+2]=r[i+2]*a,n[i+3]=r[i+3]}this.img=e,this.data&&this.fire(\"load\")}}.bind(this))}function i(){}var a=t(\"../util/evented\"),o=t(\"../util/ajax\"),s=t(\"../util/browser\"),l=t(\"../util/mapbox\").normalizeSpriteURL;e.exports=n,(n.prototype=Object.create(a)).toJSON=function(){return this.base},n.prototype.loaded=function(){return!(!this.data||!this.img)},n.prototype.resize=function(){if(s.devicePixelRatio>1!==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\":416,\"../util/browser\":417,\"../util/evented\":425,\"../util/mapbox\":430}],368:[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\":433,\"./style_function\":371,csscolorparser:114}],369:[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 c(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},u.bindAll([\"_forwardSourceEvent\",\"_forwardTileEvent\",\"_forwardLayerEvent\",\"_redoPlacement\"],this),this._resetUpdates();var n=function(t,e){if(t)this.fire(\"error\",{error:t});else 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?f.getJSON(h(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\"),c=t(\"../render/line_atlas\"),u=t(\"../util/util\"),f=t(\"../util/ajax\"),h=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\"),x=t(\"../source/source_cache\"),b=t(\"./style_spec\"),_=t(\"./style_function\");e.exports=n,n.prototype=u.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;r<this.stylesheet.layers.length;r++)(e=this.stylesheet.layers[r]).ref||(t=a.create(e),this._layers[t.id]=t,t.on(\"error\",this._forwardLayerEvent));for(var n=0;n<this.stylesheet.layers.length;n++)if((e=this.stylesheet.layers[n]).ref){var i=this.getLayer(e.ref);t=a.create(e,i),this._layers[t.id]=t,t.on(\"error\",this._forwardLayerEvent)}this._groupLayers(),this._updateWorkerLayers()},_groupLayers:function(){var t;this._groups=[];for(var e=0;e<this._order.length;++e){var r=this._layers[this._order[e]];t&&r.source===t.source||((t=[]).source=r.source,this._groups.push(t)),t.push(r)}},_updateWorkerLayers:function(t){this.dispatcher.broadcast(t?\"update layers\":\"set layers\",this._serializeLayers(t))},_serializeLayers:function(t){t=t||this._order;for(var e=[],r={includeRefProperties:!0},n=0;n<t.length;n++)e.push(this._layers[t[n]].serialize(r));return e},_applyClasses:function(t,e){if(this._loaded){t=t||[],e=e||{transition:!0};var r=this.stylesheet.transition||{},n=this._updates.allPaintProps?this._layers:this._updates.paintProps;for(var i in n){var a=this._layers[i],o=this._updates.paintProps[i];if(this._updates.allPaintProps||o.all)a.updatePaintTransitions(t,e,r,this.animationLoop);else for(var s in o)this._layers[i].updatePaintTransition(s,t,e,r,this.animationLoop)}}},_recalculate:function(t){for(var e in this.sources)this.sources[e].used=!1;this._updateZoomHistory(t),this.rasterFadeDuration=300;for(var r in this._layers){var n=this._layers[r];n.recalculate(t,this.zoomHistory),!n.isHidden(t)&&n.source&&(this.sources[n.source].used=!0)}Math.floor(this.z)!==Math.floor(t)&&this.animationLoop.set(300),this.z=t,this.fire(\"zoom\")},_updateZoomHistory:function(t){var e=this.zoomHistory;void 0===e.lastIntegerZoom&&(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=0,e.lastZoom=t),Math.floor(e.lastZoom)<Math.floor(t)?(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=Date.now()):Math.floor(e.lastZoom)>Math.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<i.length;n++)this._reloadSource(i[n]);for(n=0;n<this._updates.events.length;n++){var a=this._updates.events[n];this.fire(a[0],a[1])}return this._applyClasses(t,e),this._updates.changed&&this.fire(\"change\"),this._resetUpdates(),this},_resetUpdates:function(){this._updates={events:[],layers:{},sources:{},paintProps:{}}},addSource:function(t,e){if(this._checkLoaded(),void 0!==this.sources[t])throw new Error(\"There is already a source with this ID\");if(!e.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(e)+\".\");return[\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(e.type)>=0&&this._handleErrors(g.source,\"sources.\"+t,e)?this:(e=new x(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:u.deepEqual(r.filter,e)?this:(r.filter=u.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 u.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(u.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);i.setPaintProperty(e,r,n);return!(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 u.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:u.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;i<t.length;i++){var a=t[i][n];if(a)for(var o=0;o<a.length;o++)e.push(a[o])}return e},queryRenderedFeatures:function(t,e,r,n){e&&e.filter&&this._handleErrors(g.filter,\"queryRenderedFeatures.filter\",e.filter,!0);var i={};if(e&&e.layers)for(var a=0;a<e.layers.length;a++){var o=e.layers[a];i[this._layers[o].source]=!0}var s=[];for(var l in this.sources)if(!e.layers||i[l]){var c=this.sources[l],u=y.rendered(c,this._layers,t,e,r,n);s.push(u)}return this._flattenRenderedFeatures(s)},querySourceFeatures:function(t,e){e&&e.filter&&this._handleErrors(g.filter,\"querySourceFeatures.filter\",e.filter,!0);var r=this.sources[t];return r?y.source(r,e):[]},addSourceType:function(t,e,r){return v.getType(t)?r(new Error('A source type called \"'+t+'\" already exists.')):(v.setType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\"load worker source\",{name:t,url:e.workerSourceURL},r):r(null,null))},_handleErrors:function(t,e,r,n,i){var a=n?g.throwErrors:g.emitErrors,o=t.call(g,u.extend({key:e,style:this.serialize(),value:r,styleSpec:b},i));return a.call(g,this,o)},_remove:function(){this.dispatcher.remove()},_reloadSource:function(t){this.sources[t].reload()},_updateSources:function(t){for(var e in this.sources)this.sources[e].update(t)},_redoPlacement:function(){for(var t in this.sources)this.sources[t].redoPlacement&&this.sources[t].redoPlacement()},_forwardSourceEvent:function(t){this.fire(\"source.\"+t.type,u.extend({source:t.target.getSource()},t))},_forwardTileEvent:function(t){this.fire(t.type,u.extend({source:t.target},t))},_forwardLayerEvent:function(t){this.fire(\"layer.\"+t.type,u.extend({layer:{id:t.target.id}},t))},\"get sprite json\":function(t,e){var r=this.sprite;r.loaded()?e(null,{sprite:r.data,retina:r.retina}):r.on(\"load\",function(){e(null,{sprite:r.data,retina:r.retina})})},\"get icons\":function(t,e){var r=this.sprite,n=this.spriteAtlas;r.loaded()?(n.setSprite(r),n.addIcons(t.icons,e)):r.on(\"load\",function(){n.setSprite(r),n.addIcons(t.icons,e)})},\"get glyphs\":function(t,e){function r(t,r,n){t&&console.error(t),a[n]=r,0===--i&&e(null,a)}var n=t.stacks,i=Object.keys(n).length,a={};for(var o in n)this.glyphSource.getSimpleGlyphs(o,n[o],t.uid,r)}})},{\"../render/line_atlas\":345,\"../source/query_features\":355,\"../source/source\":357,\"../source/source_cache\":358,\"../symbol/glyph_source\":390,\"../symbol/sprite_atlas\":395,\"../util/ajax\":416,\"../util/browser\":417,\"../util/dispatcher\":424,\"../util/evented\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./animation_loop\":366,\"./image_sprite\":367,\"./style_function\":371,\"./style_layer\":372,\"./style_spec\":379,\"./validate_style\":381}],370:[function(t,e,r){\"use strict\";var n=t(\"./style_function\"),i=t(\"./parse_color\"),a=t(\"../util/util\");e.exports=function(t,e){this.value=a.clone(e),this.isFunction=n.isFunctionDefinition(e),this.json=JSON.stringify(this.value);var r=\"color\"===t.type&&this.value?i(this.value):e;if(this.calculate=n[t.function||\"piecewise-constant\"](r),this.isFeatureConstant=this.calculate.isFeatureConstant,this.isZoomConstant=this.calculate.isZoomConstant,\"piecewise-constant\"===t.function&&t.transition&&(this.calculate=function(t){return function(e,r){var n,i,a,o=e.zoom,s=e.zoomHistory,l=e.duration,c=o%1,u=Math.min((Date.now()-s.lastIntegerZoomTime)/l,1),f=1;return o>s.lastIntegerZoom?(n=c+(1-c)*u,f*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-u)*c,a=t({zoom:o},r),i=t({zoom:o+1},r),f/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:f,to:a,toScale:1,t:n}}}(this.calculate)),!this.isFeatureConstant&&!this.isZoomConstant){this.stopZoomLevels=[];for(var o=[],s=this.value.stops,l=0;l<this.value.stops.length;l++){var c=s[l][0].zoom;this.stopZoomLevels.indexOf(c)<0&&(this.stopZoomLevels.push(c),o.push([c,o.length]))}this.calculateInterpolationT=n.interpolated({stops:o,base:e.base})}}},{\"../util/util\":433,\"./parse_color\":368,\"./style_function\":371}],371:[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\":293}],372:[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\"),c=t(\"./validate_style\"),u=t(\"./parse_color\"),f=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(f,{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(c.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(c.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(c.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?u(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.minzoom)||(!!(this.maxzoom&&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<t.length;o++)a.extend(i,this._paintDeclarations[t[o]]);var s;for(s in i)this._applyPaintDeclaration(s,i[s],e,r,n);for(s in this._paintTransitions)s in i||this._applyPaintDeclaration(s,null,e,r,n)},updatePaintTransition:function(t,e,r,n,i){for(var a=this._paintDeclarations[\"\"][t],o=0;o<e.length;o++){var s=this._paintDeclarations[e[o]];s&&s[t]&&(a=s[t])}this._applyPaintDeclaration(t,a,r,n,i)},recalculate:function(t,e){for(var r in this._paintTransitions)this.paint[r]=this.getPaintValue(r,{zoom:t,zoomHistory:e});for(var n in this._layoutFunctions)this.layout[n]=this.getLayoutValue(n,{zoom:t,zoomHistory:e})},serialize:function(t){var e={id:this.id,ref:this.ref,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom};for(var r in this._paintDeclarations){e[\"\"===r?\"paint\":\"paint.\"+r]=a.mapObject(this._paintDeclarations[r],i)}return(!this.ref||t&&t.includeRefProperties)&&a.extend(e,{type:this.type,source:this.source,\"source-layer\":this.sourceLayer,filter:this.filter,layout:a.mapObject(this._layoutDeclarations,i)}),a.filterObject(e,function(t,e){return void 0!==t&&!(\"layout\"===e&&!Object.keys(t).length)})},_applyPaintDeclaration:function(t,e,r,n,i){var l=r.transition?this._paintTransitions[t]:void 0,c=this._paintSpecifications[t];if(null!==e&&void 0!==e||(e=new s(c,c.default)),!l||l.declaration.json!==e.json){var u=a.extend({duration:300,delay:0},n,this.getPaintProperty(t+\"-transition\")),f=this._paintTransitions[t]=new o(c,e,l,u);f.instant()||(f.loopID=i.set(f.endTime-Date.now())),l&&i.cancel(l.loopID)}},_updateLayoutValue:function(t){var e=this._layoutDeclarations[t];e&&e.isFunction?this._layoutFunctions[t]=!0:(delete this._layoutFunctions[t],this.layout[t]=this.getLayoutValue(t))},_handleErrors:function(t,e,r,n){return c.emitErrors(this,t.call(c,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:l,style:{glyphs:!0,sprite:!0}}))}})},{\"../util/evented\":425,\"../util/util\":433,\"./parse_color\":368,\"./style_declaration\":370,\"./style_layer/background_style_layer\":373,\"./style_layer/circle_style_layer\":374,\"./style_layer/fill_style_layer\":375,\"./style_layer/line_style_layer\":376,\"./style_layer/raster_style_layer\":377,\"./style_layer/symbol_style_layer\":378,\"./style_spec\":379,\"./style_transition\":380,\"./validate_style\":381}],373:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],374:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],375:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");n.prototype=i.inherit(a,{getPaintValue:function(t,e,r){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintValue.call(this,\"fill-color\",e,r):a.prototype.getPaintValue.call(this,t,e,r)},getPaintValueStopZoomLevels:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintValueStopZoomLevels.call(this,\"fill-color\"):a.prototype.getPaintValueStopZoomLevels.call(this,arguments)},getPaintInterpolationT:function(t,e){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintInterpolationT.call(this,\"fill-color\",e):a.prototype.getPaintInterpolationT.call(this,t,e)},isPaintValueFeatureConstant:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.isPaintValueFeatureConstant.call(this,\"fill-color\"):a.prototype.isPaintValueFeatureConstant.call(this,t)},isPaintValueZoomConstant:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.isPaintValueZoomConstant.call(this,\"fill-color\"):a.prototype.isPaintValueZoomConstant.call(this,t)}}),e.exports=n},{\"../../util/util\":433,\"../style_layer\":372}],376:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{getPaintValue:function(t,e,r){var n=a.prototype.getPaintValue.apply(this,arguments);if(n&&\"line-dasharray\"===t){var i=Math.floor(e.zoom);this._flooredZoom!==i&&(this._flooredZoom=i,this._flooredLineWidth=this.getPaintValue(\"line-width\",e,r)),n.fromScale*=this._flooredLineWidth,n.toScale*=this._flooredLineWidth}return n}})},{\"../../util/util\":433,\"../style_layer\":372}],377:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],378:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{isHidden:function(){if(a.prototype.isHidden.apply(this,arguments))return!0;var t=0===this.paint[\"text-opacity\"]||!this.layout[\"text-field\"],e=0===this.paint[\"icon-opacity\"]||!this.layout[\"icon-image\"];return!(!t||!e)},getLayoutValue:function(t,e,r){return(\"text-rotation-alignment\"!==t||\"line\"!==this.getLayoutValue(\"symbol-placement\",e,r)||this.getLayoutProperty(\"text-rotation-alignment\"))&&(\"icon-rotation-alignment\"!==t||\"line\"!==this.getLayoutValue(\"symbol-placement\",e,r)||this.getLayoutProperty(\"icon-rotation-alignment\"))?\"text-pitch-alignment\"!==t||this.getLayoutProperty(\"text-pitch-alignment\")?a.prototype.getLayoutValue.apply(this,arguments):this.getLayoutValue(\"text-rotation-alignment\"):\"map\"}})},{\"../../util/util\":433,\"../style_layer\":372}],379:[function(t,e,r){\"use strict\";e.exports=t(\"mapbox-gl-style-spec/reference/latest.min\")},{\"mapbox-gl-style-spec/reference/latest.min\":316}],380:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.declaration=e,this.startTime=this.endTime=(new Date).getTime(),\"piecewise-constant\"===t.function&&t.transition?this.interp=i:this.interp=o[t.type],this.oldTransition=r,this.duration=n.duration||0,this.delay=n.delay||0,this.instant()||(this.endTime=this.startTime+this.duration+this.delay,this.ease=a.easeCubicInOut),r&&r.endTime<=this.startTime&&delete r.oldTransition}function i(t,e,r){return void 0===(t&&t.to)||void 0===(e&&e.to)?void 0:{from:t.to,fromScale:t.toScale,to:e.to,toScale:e.toScale,t:r}}var a=t(\"../util/util\"),o=t(\"../util/interpolate\");e.exports=n,n.prototype.instant=function(){return!this.oldTransition||!this.interp||0===this.duration&&0===this.delay},n.prototype.calculate=function(t,e){var r=this.declaration.calculate(a.extend({},t,{duration:this.duration}),e);if(this.instant())return r;var n=t.time||Date.now();if(n<this.endTime){var i=this.oldTransition.calculate(a.extend({},t,{time:this.startTime}),e),o=this.ease((n-this.startTime-this.delay)/this.duration);r=this.interp(i,r,o)}return r}},{\"../util/interpolate\":427,\"../util/util\":433}],381:[function(t,e,r){\"use strict\";e.exports=t(\"mapbox-gl-style-spec/lib/validate_style.min\"),e.exports.emitErrors=function(t,e){if(e&&e.length){for(var r=0;r<e.length;r++)t.fire(\"error\",{error:new Error(e[r].message)});return!0}return!1},e.exports.throwErrors=function(t,e){if(e)for(var r=0;r<e.length;r++)throw new Error(e[r].message)}},{\"mapbox-gl-style-spec/lib/validate_style.min\":315}],382:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.x=t,this.y=e,this.angle=r,void 0!==n&&(this.segment=n)}var i=t(\"point-geometry\");e.exports=n,(n.prototype=Object.create(i.prototype)).clone=function(){return new n(this.x,this.y,this.angle,this.segment)}},{\"point-geometry\":477}],383:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-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=[],c=0;s<r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var d=u.angleTo(f)-f.angleTo(h);for(d=Math.abs((d+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:d}),c+=d;s-l[0].distance>n;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}},{}],384:[function(t,e,r){\"use strict\";var n=t(\"point-geometry\");e.exports=function(t,e,r,i,a){for(var o=[],s=0;s<t.length;s++)for(var l,c=t[s],u=0;u<c.length-1;u++){var f=c[u],h=c[u+1];f.x<e&&h.x<e||(f.x<e?f=new n(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round():h.x<e&&(h=new n(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round()),f.y<r&&h.y<r||(f.y<r?f=new n(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round():h.y<r&&(h=new n(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new n(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new n(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new n(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new n(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),l&&f.equals(l[l.length-1])||(l=[f],o.push(l)),l.push(h)))))}return o}},{\"point-geometry\":477}],385:[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\":431,\"../util/util\":433,\"point-geometry\":477}],386:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,c){var m=h-f,g=p-d;if(m>0)if(m=Math.max(10*s,m),u){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,f,p,h,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 c=a/2,u=Math.floor(i/c),f=-a/2,h=this.boxes,d=r,p=n+1,m=f;do{if(--p<0)return h;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v<u;v++){for(var y=-i/2+v*c;m+g<y;){if(m+=g,++p+1>=e.length)return h;g=e[p].dist(e[p+1])}var x=y-m,b=e[p],_=e[p+1].sub(b)._unit()._mult(x)._add(b)._round(),w=i/2/Math.max(Math.abs(y-f)-c/2,0);t.emplaceBack(_.x,_.y,-a/2,-a/2,a/2,a/2,w,o,s,l,0,0,0,0,0)}return h}},{}],387:[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<t.boxEndIndex;l++){var c=n.get(l),u=c.anchorPoint._matMult(o),f=u.x,h=u.y,d=f+c.x1,p=h+c.y1*s,m=f+c.x2,g=h+c.y2*s;if(c.bbox0=d,c.bbox1=p,c.bbox2=m,c.bbox3=g,!e)for(var v=this.grid.query(d,p,m,g),y=0;y<v.length;y++){var x=n.get(v[y]),b=x.anchorPoint._matMult(o);if((a=this.getPlacementScale(a,u,c,b,x))>=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(c.x1,c.y1).matMult(w),k=new i(c.x2,c.y1).matMult(w),A=new i(c.x1,c.y2).matMult(w),T=new i(c.x2,c.y2).matMult(w);(_=this.tempCollisionBox).anchorPointX=c.anchorPoint.x,_.anchorPointY=c.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=c.maxScale}else _=c;for(var S=0;S<this.edges.length;S++){var E=this.edges[S];if((a=this.getPlacementScale(a,c.anchorPoint,_,E.anchorPoint,E))>=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,c=this.rotationMatrix,u=new i(t,e)._matMult(c),f=this.tempCollisionBox;f.anchorX=u.x,f.anchorY=u.y,f.x1=0,f.y1=0,f.x2=r-t,f.y2=n-e,f.maxScale=a,a=f.maxScale;for(var h=[u.x+f.x1/a,u.y+f.y1/a*this.yStretch,u.x+f.x2/a,u.y+f.y2/a*this.yStretch],d=this.grid.query(h[0],h[1],h[2],h[3]),p=this.ignoredGrid.query(h[0],h[1],h[2],h[3]),m=0;m<p.length;m++)d.push(p[m]);for(var g=0;g<d.length;g++){var v=l.get(d[g]),y=v.sourceLayerIndex,x=v.featureIndex;if(void 0===o[y]&&(o[y]={}),!o[y][x]){var b=v.anchorPoint.matMult(c);this.getPlacementScale(this.minScale,u,f,b,v)>=a&&(o[y][x]=!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,c=(i.y1-r.y2)*this.yStretch/o,u=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(c)||isNaN(u))&&(c=u=1);var f=Math.min(Math.max(s,l),Math.max(c,u)),h=i.maxScale,d=r.maxScale;return f>h&&(f=h),f>d&&(f=d),f>t&&f>=i.placementScale&&(t=f),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a<t.boxEndIndex;a++){var o=i.get(a);o.placementScale=e,e<this.maxScale&&n.insert(a,o.bbox0,o.bbox1,o.bbox2,o.bbox3)}}},{\"../data/bucket\":320,\"grid-index\":275,\"point-geometry\":477}],388:[function(t,e,r){\"use strict\";function n(t,e,r,s,l,c,u,f,h){for(var d=c/2,p=0,m=0;m<t.length-1;m++)p+=t[m].dist(t[m+1]);for(var g=0,v=e-r,y=[],x=0;x<t.length-1;x++){for(var b=t[x],_=t[x+1],w=b.dist(_),M=_.angleTo(b);v+r<g+w;){var k=((v+=r)-g)/w,A=i(b.x,_.x,k),T=i(b.y,_.y,k);if(A>=0&&A<h&&T>=0&&T<h&&v-d>=0&&v+d<=p){var S=new a(A,T,M,x)._round();s&&!o(t,S,c,s,l)||y.push(S)}}g+=w}return f||y.length||u||(y=n(t,g/2,r,s,l,c,u,!0,h)),y}var i=t(\"../util/interpolate\"),a=t(\"../symbol/anchor\"),o=t(\"./check_max_angle\");e.exports=function(t,e,r,i,a,o,s,l,c){var u=i?.6*o*s:0,f=Math.max(i?i.right-i.left:0,a?a.right-a.left:0),h=0===t[0].x||t[0].x===c||0===t[0].y||t[0].y===c;return e-f*s<e/4&&(e=f*s+e/4),n(t,h?e/2*l%e:(f/2+2*o)*s*l%e,e,u,r,f*s,h,!1,c)}},{\"../symbol/anchor\":382,\"../util/interpolate\":427,\"./check_max_angle\":383}],389:[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)e=(t=i.split(\"#\"))[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)e=(t=i.split(\"#\"))[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,c=s+2;l+=4-l%4,c+=4-c%4;var u=this.bin.packOne(l,c);if(u||(this.resize(),u=this.bin.packOne(l,c)),!u)return a.warnOnce(\"glyph bitmap overflow\"),null;this.index[i]=u,this.ids[i]=[t];for(var f=this.data,h=r.bitmap,d=0;d<s;d++)for(var p=this.width*(u.y+d+1)+u.x+1,m=o*d,g=0;g<o;g++)f[p+g]=h[m+g];return this.dirty=!0,u},n.prototype.resize=function(){var t=this.width,e=this.height;if(!(t>=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;n<e;n++){var i=new Uint8Array(this.data.buffer,e*n,t);new Uint8Array(r,e*n*4,t).set(i)}this.data=new Uint8Array(r)}},n.prototype.bind=function(t){this.gl=t,this.texture?t.bindTexture(t.TEXTURE_2D,this.texture):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),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.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,null))},n.prototype.updateTexture=function(t){this.bind(t),this.dirty&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data),this.dirty=!1)}},{\"../util/util\":433,\"shelf-pack\":521}],390:[function(t,e,r){\"use strict\";function n(t){this.url=t&&a(t),this.atlases={},this.stacks={},this.loading={}}function i(t,e,r){this.advance=t.advance,this.left=t.left-r-1,this.top=t.top+r+1,this.rect=e}var a=t(\"../util/mapbox\").normalizeGlyphsURL,o=t(\"../util/ajax\").getArrayBuffer,s=t(\"../util/glyphs\"),l=t(\"../symbol/glyph_atlas\"),c=t(\"pbf\");e.exports=n,n.prototype.getSimpleGlyphs=function(t,e,r,n){void 0===this.stacks[t]&&(this.stacks[t]={}),void 0===this.atlases[t]&&(this.atlases[t]=new l);for(var a,o={},s=this.stacks[t],c=this.atlases[t],u={},f=0,h=0;h<e.length;h++){var d=e[h];if(a=Math.floor(d/256),s[a]){var p=s[a].glyphs[d],m=c.addGlyph(r,t,p,3);p&&(o[d]=new i(p,m,3))}else void 0===u[a]&&(u[a]=[],f++),u[a].push(d)}f||n(void 0,o,t);var g=function(e,a,s){if(!e)for(var l=this.stacks[t][a]=s.stacks[0],h=0;h<u[a].length;h++){var d=u[a][h],p=l.glyphs[d],m=c.addGlyph(r,t,p,3);p&&(o[d]=new i(p,m,3))}--f||n(void 0,o,t)}.bind(this);for(var v in u)this.loadRange(t,v,g)},n.prototype.loadRange=function(t,e,r){if(256*e>65535)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=function(t,e,r,n){return n=n||\"abc\",r.replace(\"{s}\",n[t.length%n.length]).replace(\"{fontstack}\",t).replace(\"{range}\",e)}(t,256*e+\"-\"+(256*e+255),this.url);o(i,function(t,r){for(var i=!t&&new s(new c(new Uint8Array(r))),a=0;a<n[e].length;a++)n[e][a](t,e,i);delete n[e]})}},n.prototype.getGlyphAtlas=function(t){return this.atlases[t]}},{\"../symbol/glyph_atlas\":389,\"../util/ajax\":416,\"../util/glyphs\":426,\"../util/mapbox\":430,pbf:470}],391:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){function n(n){u.push(t[n]),f.push(r[n]),h.push(e[n]),d++}function i(t,e,r){var n=c[t];return delete c[t],c[e]=n,f[n][0].pop(),f[n][0]=f[n][0].concat(r[0]),n}function a(t,e,r){var n=l[e];return delete l[e],l[t]=n,f[n][0].shift(),f[n][0]=r[0].concat(f[n][0]),n}function o(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\":\"+n.x+\":\"+n.y}var s,l={},c={},u=[],f=[],h=[],d=0;for(s=0;s<t.length;s++){var p=r[s],m=e[s];if(m){var g=o(m,p),v=o(m,p,!0);if(g in c&&v in l&&c[g]!==l[v]){var y=a(g,v,p),x=i(g,v,f[y]);delete l[g],delete c[v],c[o(m,f[x],!0)]=x,f[y]=null}else g in c?i(g,v,p):v in l?a(g,v,p):(n(s),l[g]=d-1,c[v]=d-1)}else n(s)}return{features:u,textFeatures:h,geometries:f}}},{}],392:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c){this.anchorPoint=t,this.tl=e,this.tr=r,this.bl=n,this.br=i,this.tex=a,this.anchorAngle=o,this.glyphAngle=s,this.minScale=l,this.maxScale=c}function i(t,e,r,n,i,s){var l=!s;r<0&&(s=!s),s&&i++;var c=new a(e.x,e.y),u=n[i],f=1/0;r=Math.abs(r);for(var h=o;;){var d=c.dist(u),p=r/d,m=Math.atan2(u.y-c.y,u.x-c.x);if(s||(m+=Math.PI),t.push({anchorPoint:c,offset:l?Math.PI:0,minScale:p,maxScale:f,angle:(m+2*Math.PI)%(2*Math.PI)}),p<=h)break;for(c=u;c.equals(u);)if(i+=s?1:-1,!(u=n[i]))return p;var g=u.sub(c)._unit();c=c.sub(g._mult(d)),f=p}return h}var a=t(\"point-geometry\");e.exports={getIconQuads:function(t,e,r,i,s,l,c,u,f){var h,d,p,m,g=e.image.rect,v=s.layout,y=e.left-1,x=y+g.w/e.image.pixelRatio,b=e.top-1,_=b+g.h/e.image.pixelRatio;if(\"none\"!==v[\"icon-text-fit\"]&&c){var w=x-y,M=_-b,k=v[\"text-size\"]/24,A=c.left*k,T=c.right*k,S=c.top*k,E=T-A,L=c.bottom*k-S,C=v[\"icon-text-fit-padding\"][0],z=v[\"icon-text-fit-padding\"][1],D=v[\"icon-text-fit-padding\"][2],I=v[\"icon-text-fit-padding\"][3],P=\"width\"===v[\"icon-text-fit\"]?.5*(L-M):0,O=\"height\"===v[\"icon-text-fit\"]?.5*(E-w):0,F=\"width\"===v[\"icon-text-fit\"]||\"both\"===v[\"icon-text-fit\"]?E:w,R=\"height\"===v[\"icon-text-fit\"]||\"both\"===v[\"icon-text-fit\"]?L:M;h=new a(A+O-I,S+P-C),d=new a(A+O+z+F,S+P-C),p=new a(A+O+z+F,S+P+D+R),m=new a(A+O-I,S+P+D+R)}else h=new a(y,b),d=new a(x,b),p=new a(x,_),m=new a(y,_);var N=s.getLayoutValue(\"icon-rotate\",u,f)*Math.PI/180;if(l){var j=i[t.segment];if(t.y===j.y&&t.x===j.x&&t.segment+1<i.length){var B=i[t.segment+1];N+=Math.atan2(t.y-B.y,t.x-B.x)+Math.PI}else N+=Math.atan2(t.y-j.y,t.x-j.x)}if(N){var U=Math.sin(N),V=Math.cos(N),q=[V,-U,U,V];h=h.matMult(q),d=d.matMult(q),m=m.matMult(q),p=p.matMult(q)}return[new n(new a(t.x,t.y),h,d,m,p,e.image.rect,0,0,o,1/0)]},getGlyphQuads:function(t,e,r,s,l,c){for(var u=l.layout[\"text-rotate\"]*Math.PI/180,f=l.layout[\"text-keep-upright\"],h=e.positionedGlyphs,d=[],p=0;p<h.length;p++){var m=h[p],g=m.glyph,v=g.rect;if(v){var y,x=(m.x+g.advance/2)*r,b=o;c?(b=i(y=[],t,x,s,t.segment,!0),f&&(b=Math.min(b,i(y,t,x,s,t.segment,!1)))):y=[{anchorPoint:new a(t.x,t.y),offset:0,angle:0,maxScale:1/0,minScale:o}];for(var _=m.x+g.left,w=m.y-g.top,M=_+v.w,k=w+v.h,A=new a(_,w),T=new a(M,w),S=new a(_,k),E=new a(M,k),L=0;L<y.length;L++){var C=y[L],z=A,D=T,I=S,P=E;if(u){var O=Math.sin(u),F=Math.cos(u),R=[F,-O,O,F];z=z.matMult(R),D=D.matMult(R),I=I.matMult(R),P=P.matMult(R)}var N=Math.max(C.minScale,b),j=(t.angle+C.offset+2*Math.PI)%(2*Math.PI),B=(C.angle+C.offset+2*Math.PI)%(2*Math.PI);d.push(new n(C.anchorPoint,z,D,I,P,v,j,B,N,C.maxScale))}}}return d},SymbolQuad:n};var o=.5},{\"point-geometry\":477}],393:[function(t,e,r){\"use strict\";var n=t(\"../util/token\");e.exports=function(t,e,r){for(var i=[],a=0,o=t.length;a<o;a++){var s=n(t[a].properties,e[\"text-field\"]);if(s){s=s.toString();var l=e[\"text-transform\"];\"uppercase\"===l?s=s.toLocaleUpperCase():\"lowercase\"===l&&(s=s.toLocaleLowerCase());for(var c=0;c<s.length;c++)r[s.charCodeAt(c)]=!0;i[a]=s}else i[a]=null}return i}},{\"../util/token\":432}],394:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.codePoint=t,this.x=e,this.y=r,this.glyph=n}function i(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}e.exports={shapeText:function(t,e,r,s,l,c,u,f,h){for(var d=[],p=new function(t,e,r,n,i,a){this.positionedGlyphs=t,this.text=e,this.top=r,this.bottom=n,this.left=i,this.right=a}(d,t,h[1],h[1],h[0],h[0]),m=0,g=0;g<t.length;g++){var v=t.charCodeAt(g),y=e[v];y&&(d.push(new n(v,m,-17,y)),m+=y.advance+f)}return!!d.length&&(function(t,e,r,n,s,l,c,u){var f=null,h=0,d=0,p=0,m=0,g=t.positionedGlyphs;if(n)for(var v=0;v<g.length;v++){var y=g[v];if(y.x-=h,y.y+=r*p,y.x>n&&null!==f){var x=g[f+1].x;m=Math.max(x,m);for(var b=f+1;b<=v;b++)g[b].y+=r,g[b].x-=x;if(c){var _=f;a[g[f].codePoint]&&_--,i(g,e,d,_,c)}d=f+1,f=null,h+=x,p++}o[y.codePoint]&&(f=v)}var w=g[g.length-1],M=w.x+e[w.codePoint].advance;m=Math.max(m,M);var k=(p+1)*r;i(g,e,d,g.length-1,c),function(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],c=(-n*(o+1)+.5)*a+s[1],u=0;u<t.length;u++)t[u].x+=l,t[u].y+=c}(g,c,s,l,m,r,p,u),t.top+=-l*k,t.bottom=t.top+k,t.left+=-s*m,t.right=t.left+m}(p,e,s,r,l,c,u,h),p)},shapeIcon:function(t,e){if(!t||!t.rect)return null;var r=e[\"icon-offset\"][0],n=e[\"icon-offset\"][1],i=r-t.width/2,a=i+t.width,o=n-t.height/2;return new function(t,e,r,n,i){this.image=t,this.top=e,this.bottom=r,this.left=n,this.right=i}(t,o,o+t.height,i,a)}};var a={32:!0,8203:!0},o={32:!0,38:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0}},{}],395:[function(t,e,r){\"use strict\";function n(t,e){this.width=t,this.height=e,this.bin=new i(t,e),this.images={},this.data=!1,this.texture=0,this.filter=0,this.pixelRatio=1,this.dirty=!0}var i=t(\"shelf-pack\"),a=t(\"../util/browser\"),o=t(\"../util/util\");e.exports=n,n.prototype.allocateImage=function(t,e){var r=(t/=this.pixelRatio)+2+(4-(t+2)%4),n=(e/=this.pixelRatio)+2+(4-(e+2)%4),i=this.bin.packOne(r,n);return i||(o.warnOnce(\"SpriteAtlas out of space.\"),null)},n.prototype.getImage=function(t,e){if(this.images[t])return this.images[t];if(!this.sprite)return null;var r=this.sprite.getSpritePosition(t);if(!r.width||!r.height)return null;var n=this.allocateImage(r.width,r.height);if(!n)return null;var i=new function(t,e,r,n,i){this.rect=t,this.width=e,this.height=r,this.sdf=n,this.pixelRatio=i}(n,r.width/r.pixelRatio,r.height/r.pixelRatio,r.sdf,r.pixelRatio/this.pixelRatio);return this.images[t]=i,this.copy(n,r,e),i},n.prototype.getPosition=function(t,e){var r=this.getImage(t,e),n=r&&r.rect;if(!n)return null;var i=r.width*r.pixelRatio,a=r.height*r.pixelRatio;return{size:[r.width,r.height],tl:[(n.x+1)/this.width,(n.y+1)/this.height],br:[(n.x+1+i)/this.width,(n.y+1+a)/this.height]}},n.prototype.allocate=function(){if(!this.data){var t=Math.floor(this.width*this.pixelRatio),e=Math.floor(this.height*this.pixelRatio);this.data=new Uint32Array(t*e);for(var r=0;r<this.data.length;r++)this.data[r]=0}},n.prototype.copy=function(t,e,r){if(this.sprite.img.data){var n=new Uint32Array(this.sprite.img.data.buffer);this.allocate();var i=this.data;!function(t,e,r,n,i,a,o,s,l,c,u){var f,h,d=n*e+r,p=s*a+o;if(u)for(p-=a,h=-1;h<=c;h++,d=((h+c)%c+n)*e+r,p+=a)for(f=-1;f<=l;f++)i[p+f]=t[d+(f+l)%l];else for(h=0;h<c;h++,d+=e,p+=a)for(f=0;f<l;f++)i[p+f]=t[d+f]}(n,this.sprite.img.width,e.x,e.y,i,this.width*this.pixelRatio,(t.x+1)*this.pixelRatio,(t.y+1)*this.pixelRatio,e.width,e.height,r),this.dirty=!0}},n.prototype.setSprite=function(t){t&&(this.pixelRatio=a.devicePixelRatio>1?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;r<t.length;r++)this.getImage(t[r]);e(null,this.images)},n.prototype.bind=function(t,e){var r=!1;this.texture?t.bindTexture(t.TEXTURE_2D,this.texture):(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),r=!0);var n=e?t.LINEAR:t.NEAREST;n!==this.filter&&(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n),this.filter=n),this.dirty&&(this.allocate(),r?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width*this.pixelRatio,this.height*this.pixelRatio,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)):t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width*this.pixelRatio,this.height*this.pixelRatio,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)),this.dirty=!1)}},{\"../util/browser\":417,\"../util/util\":433,\"shelf-pack\":521}],396:[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:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"glyphQuadStartIndex\"},{type:\"Uint16\",name:\"glyphQuadEndIndex\"},{type:\"Uint16\",name:\"iconQuadStartIndex\"},{type:\"Uint16\",name:\"iconQuadEndIndex\"},{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int8\",name:\"index\"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{\"../util/struct_array\":431,\"../util/util\":433,\"point-geometry\":477}],397:[function(t,e,r){\"use strict\";var n=t(\"../util/struct_array\"),i=t(\"../util/util\"),a=t(\"point-geometry\"),o=t(\"./quads\").SymbolQuad,s=e.exports=new n({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Float32\",name:\"tlX\"},{type:\"Float32\",name:\"tlY\"},{type:\"Float32\",name:\"trX\"},{type:\"Float32\",name:\"trY\"},{type:\"Float32\",name:\"blX\"},{type:\"Float32\",name:\"blY\"},{type:\"Float32\",name:\"brX\"},{type:\"Float32\",name:\"brY\"},{type:\"Int16\",name:\"texH\"},{type:\"Int16\",name:\"texW\"},{type:\"Int16\",name:\"texX\"},{type:\"Int16\",name:\"texY\"},{type:\"Float32\",name:\"anchorAngle\"},{type:\"Float32\",name:\"glyphAngle\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Float32\",name:\"minScale\"}]});i.extendAll(s.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)},get SymbolQuad(){return new o(this.anchorPoint,new a(this.tlX,this.tlY),new a(this.trX,this.trY),new a(this.blX,this.blY),new a(this.brX,this.brY),{x:this.texX,y:this.texY,h:this.texH,w:this.texW,height:this.texH,width:this.texW},this.anchorAngle,this.glyphAngle,this.minScale,this.maxScale)}})},{\"../util/struct_array\":431,\"../util/util\":433,\"./quads\":392,\"point-geometry\":477}],398:[function(t,e,r){\"use strict\";var n=t(\"../util/dom\"),i=t(\"point-geometry\"),a={scrollZoom:t(\"./handler/scroll_zoom\"),boxZoom:t(\"./handler/box_zoom\"),dragRotate:t(\"./handler/drag_rotate\"),dragPan:t(\"./handler/drag_pan\"),keyboard:t(\"./handler/keyboard\"),doubleClickZoom:t(\"./handler/dblclick_zoom\"),touchZoomRotate:t(\"./handler/touch_zoom_rotate\")};e.exports=function(t,e){function r(){f=null}function o(e,r){var i=n.mousePos(l,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function s(e,r){var a=n.touchPos(l,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 l=t.getCanvasContainer(),c=null,u=null,f=null;for(var h in a)t[h]=new a[h](t,e),e.interactive&&e[h]&&t[h].enable();l.addEventListener(\"mouseout\",function(t){o(\"mouseout\",t)},!1),l.addEventListener(\"mousedown\",function(e){t.stop(),u=n.mousePos(l,e),o(\"mousedown\",e)},!1),l.addEventListener(\"mouseup\",function(e){var r=t.dragRotate&&t.dragRotate.isActive();c&&!r&&o(\"contextmenu\",c),c=null,o(\"mouseup\",e)},!1),l.addEventListener(\"mousemove\",function(e){if(!(t.dragPan&&t.dragPan.isActive()||t.dragRotate&&t.dragRotate.isActive())){for(var r=e.toElement||e.target;r&&r!==l;)r=r.parentNode;r===l&&o(\"mousemove\",e)}},!1),l.addEventListener(\"touchstart\",function(e){t.stop(),s(\"touchstart\",e),!e.touches||e.touches.length>1||(f?(clearTimeout(f),f=null,o(\"dblclick\",e)):f=setTimeout(r,300))},!1),l.addEventListener(\"touchend\",function(t){s(\"touchend\",t)},!1),l.addEventListener(\"touchmove\",function(t){s(\"touchmove\",t)},!1),l.addEventListener(\"touchcancel\",function(t){s(\"touchcancel\",t)},!1),l.addEventListener(\"click\",function(t){n.mousePos(l,t).equals(u)&&o(\"click\",t)},!1),l.addEventListener(\"dblclick\",function(t){o(\"dblclick\",t),t.preventDefault()},!1),l.addEventListener(\"contextmenu\",function(t){c=t,t.preventDefault()},!1)}},{\"../util/dom\":419,\"./handler/box_zoom\":404,\"./handler/dblclick_zoom\":405,\"./handler/drag_pan\":406,\"./handler/drag_rotate\":407,\"./handler/keyboard\":408,\"./handler/scroll_zoom\":409,\"./handler/touch_zoom_rotate\":410,\"point-geometry\":477}],399:[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\"),c=e.exports=function(){};n.extend(c.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())<this._bearingSnap?this.resetNorth(t,e):this},getPitch:function(){return this.transform.pitch},setPitch:function(t,e){return this.jumpTo({pitch:t},e),this},fitBounds:function(t,e,r){e=n.extend({padding:0,offset:[0,0],maxZoom:1/0},e),t=s.convert(t);var i=l.convert(e.offset),a=this.transform,o=a.project(t.getNorthWest()),c=a.project(t.getSouthEast()),u=c.sub(o),f=(a.width-2*e.padding-2*Math.abs(i.x))/u.x,h=(a.height-2*e.padding-2*Math.abs(i.y))/u.y;return e.center=a.unproject(o.add(c).div(2)),e.zoom=Math.min(a.scaleZoom(a.scale*Math.min(f,h)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,r):this.flyTo(e,r)},jumpTo:function(t,e){this.stop();var r=this.transform,n=!1,i=!1,a=!1;return\"zoom\"in t&&r.zoom!==+t.zoom&&(n=!0,r.zoom=+t.zoom),\"center\"in t&&(r.center=o.convert(t.center)),\"bearing\"in t&&r.bearing!==+t.bearing&&(i=!0,r.bearing=+t.bearing),\"pitch\"in t&&r.pitch!==+t.pitch&&(a=!0,r.pitch=+t.pitch),this.fire(\"movestart\",e).fire(\"move\",e),n&&this.fire(\"zoomstart\",e).fire(\"zoom\",e).fire(\"zoomend\",e),i&&this.fire(\"rotate\",e),a&&this.fire(\"pitch\",e),this.fire(\"moveend\",e)},easeTo:function(t,e){this.stop(),t=n.extend({offset:[0,0],duration:500,easing:n.ease},t);var r,a,s=this.transform,c=l.convert(t.offset),u=this.getZoom(),f=this.getBearing(),h=this.getPitch(),d=\"zoom\"in t?+t.zoom:u,p=\"bearing\"in t?this._normalizeBearing(t.bearing,f):f,m=\"pitch\"in t?+t.pitch:h;\"center\"in t?(r=o.convert(t.center),a=s.centerPoint.add(c)):\"around\"in t?(r=o.convert(t.around),a=s.locationPoint(r)):(a=s.centerPoint.add(c),r=s.pointLocation(a));var g=s.locationPoint(r);return!1===t.animate&&(t.duration=0),this.zooming=d!==u,this.rotating=f!==p,this.pitching=m!==h,t.noMoveStart||this.fire(\"movestart\",e),this.zooming&&this.fire(\"zoomstart\",e),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(s.zoom=i(u,d,t)),this.rotating&&(s.bearing=i(f,p,t)),this.pitching&&(s.pitch=i(h,m,t)),s.setLocationAtPoint(r,g.add(a.sub(g)._mult(t))),this.fire(\"move\",e),this.zooming&&this.fire(\"zoom\",e),this.rotating&&this.fire(\"rotate\",e),this.pitching&&this.fire(\"pitch\",e)},function(){t.delayEndEvents?this._onEaseEnd=setTimeout(this._easeToEnd.bind(this,e),t.delayEndEvents):this._easeToEnd(e)}.bind(this),t),this},_easeToEnd:function(t){var e=this.zooming;this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},flyTo:function(t,e){function r(t){var e=(k*k-M*M+(t?-1:1)*E*E*A*A)/(2*(t?k:M)*E*A);return Math.log(Math.sqrt(e*e+1)-e)}function a(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}this.stop(),t=n.extend({offset:[0,0],speed:1.2,curve:1.42,easing:n.ease},t);var c=this.transform,u=l.convert(t.offset),f=this.getZoom(),h=this.getBearing(),d=this.getPitch(),p=\"center\"in t?o.convert(t.center):this.getCenter(),m=\"zoom\"in t?+t.zoom:f,g=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,v=\"pitch\"in t?+t.pitch:d;Math.abs(c.center.lng)+Math.abs(p.lng)>180&&(c.center.lng>0&&p.lng<0?p.lng+=360:c.center.lng<0&&p.lng>0&&(p.lng-=360));var y=c.zoomScale(m-f),x=c.point,b=\"center\"in t?c.project(p).sub(u.div(y)):x,_=c.worldSize,w=t.curve,M=Math.max(c.width,c.height),k=M/y,A=b.sub(x).mag();if(\"minZoom\"in t){var T=n.clamp(Math.min(t.minZoom,f,m),c.minZoom,c.maxZoom),S=M/c.zoomScale(T-f);w=Math.sqrt(S/A*2)}var E=w*w,L=r(0),C=function(t){return s(L)/s(L+w*t)},z=function(t){return M*((s(L)*function(t){return a(t)/s(t)}(L+w*t)-a(L))/E)/A},D=(r(1)-L)/w;if(Math.abs(A)<1e-6){if(Math.abs(M-k)<1e-6)return this.easeTo(t);var I=k<M?-1:1;D=Math.abs(Math.log(k/M))/w,z=function(){return 0},C=function(t){return Math.exp(I*w*t)}}if(\"duration\"in t)t.duration=+t.duration;else{var P=\"screenSpeed\"in t?+t.screenSpeed/w:+t.speed;t.duration=1e3*D/P}return this.zooming=!0,h!==g&&(this.rotating=!0),d!==v&&(this.pitching=!0),this.fire(\"movestart\",e),this.fire(\"zoomstart\",e),this._ease(function(t){var r=t*D,n=z(r);c.zoom=f+c.scaleZoom(1/C(r)),c.center=c.unproject(x.add(b.sub(x).mult(n)),_),this.rotating&&(c.bearing=i(h,g,t)),this.pitching&&(c.pitch=i(d,v,t)),this.fire(\"move\",e),this.fire(\"zoom\",e),this.rotating&&this.fire(\"rotate\",e),this.pitching&&this.fire(\"pitch\",e)},function(){this.zooming=!1,this.rotating=!1,this.pitching=!1,this.fire(\"zoomend\",e),this.fire(\"moveend\",e)},t),this},isEasing:function(){return!!this._abortFn},stop:function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},_ease:function(t,e,r){this._finishFn=e,this._abortFn=a.timed(function(e){t.call(this,r.easing(e)),1===e&&this._finishEase()},!1===r.animate?0:r.duration,this)},_finishEase:function(){delete this._abortFn;var t=this._finishFn;delete this._finishFn,t.call(this)},_normalizeBearing:function(t,e){t=n.wrap(t,-180,180);var r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t},_updateEasing:function(t,e,r){var i;if(this.ease){var a=this.ease,o=(Date.now()-a.start)/a.duration,s=a.easing(o+.01)-a.easing(o),l=.27/Math.sqrt(s*s+1e-4)*.01,c=Math.sqrt(.0729-l*l);i=n.bezier(l,c,.25,1)}else i=r?n.bezier.apply(n,r):n.ease;return this.ease={start:(new Date).getTime(),to:Math.pow(2,e),duration:t,easing:i},i}})},{\"../geo/lng_lat\":330,\"../geo/lng_lat_bounds\":331,\"../util/browser\":417,\"../util/interpolate\":427,\"../util/util\":433,\"point-geometry\":477}],400:[function(t,e,r){\"use strict\";function n(t){o.setOptions(this,t)}var i=t(\"./control\"),a=t(\"../../util/dom\"),o=t(\"../../util/util\");e.exports=n,n.createAttributionString=function(t){var e=[];for(var r in t){var n=t[r];n.attribution&&e.indexOf(n.attribution)<0&&e.push(n.attribution)}return e.sort(function(t,e){return t.length-e.length}),(e=e.filter(function(t,r){for(var n=r+1;n<e.length;n++)if(e[n].indexOf(t)>=0)return!1;return!0})).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\":419,\"../../util/util\":433,\"./control\":401}],401:[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\":425,\"../../util/util\":433}],402:[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\":417,\"../../util/dom\":419,\"../../util/util\":433,\"./control\":401}],403:[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\":419,\"../../util/util\":433,\"./control\":401}],404:[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\":331,\"../../util/dom\":419,\"../../util/util\":433}],405:[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)}}},{}],406:[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)e();else{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]))e();else{var l=a.mult(.3/s),c=l.mag();c>1400&&(c=1400,l._unit()._mult(c));var u=c/750,f=l.mult(-u/2);this._map.panBy(f,{duration:1e3*u,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\":419,\"../../util/util\":433}],407:[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,c=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,c[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)<this._bearingSnap?e.resetNorth({noMoveStart:!0},{originalEvent:t}):this._fireEvent(\"moveend\",t)}.bind(this);if(n.length<2)i();else{var a=n[0],o=n[n.length-1],l=n[n.length-2],c=e._normalizeBearing(r,l[1]),u=o[1]-a[1],f=u<0?-1:1,h=(o[0]-a[0])/1e3;if(0!==u&&0!==h){var d=Math.abs(u*(.25/h));d>180&&(d=180);var p=d/180;c+=f*d*(p/2),Math.abs(e._normalizeBearing(c,0))<this._bearingSnap&&(c=e._normalizeBearing(0,c)),e.rotateTo(c,{duration:1e3*p,easing:s,noMoveStart:!0},{originalEvent:t})}else i()}}},_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.dragPan&&e.dragPan.isActive())return!0;if(t.touches)return t.touches.length>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\":419,\"../../util/util\":433,\"point-geometry\":477}],408:[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))}}}}},{}],409:[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\"),c=-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,c&&(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\":417,\"../../util/dom\":419,\"../../util/util\":433}],410:[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 c={duration:0,around:l.unproject(n)};\"rotate\"===this._gestureIntent&&(c.bearing=this._startBearing+s),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(c.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(c,{originalEvent:t})}else{var u=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent=\"rotate\":u&&(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)r.snapToNorth({},{originalEvent:t});else{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,c=(n[0]-i[0])/1e3,u=n[2];if(0!==c&&a!==s){var f=.15*l/c;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var h=1e3*Math.abs(f/(12*.15)),d=a+f*h/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:h,easing:o,around:r.unproject(u)},{originalEvent:t})}else r.snapToNorth({},{originalEvent:t})}},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{\"../../util/dom\":419,\"../../util/util\":433}],411:[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\":433}],412:[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\"),c=t(\"../util/dom\"),u=t(\"../style/style\"),f=t(\"../style/animation_loop\"),h=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\"),x=t(\"point-geometry\"),b=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)).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 f,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 b(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<t.length;n++)\"\"!==t[n]&&(r[t[n]]=!0);return this._classes=Object.keys(r),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0)},hasClass:function(t){return this._classes.indexOf(t)>=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 x(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new x(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new x(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()<t&&this.setZoom(t),this;throw new Error(\"minZoom must be between 0 and the current maxZoom, inclusive\")},setMaxZoom:function(t){if((t=null===t||void 0===t?20:t)>=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(x.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 x||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=[x.convert([0,0]),x.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof x||\"number\"==typeof t[0]){e=[x.convert(t)]}else{var r=[x.convert(t[0]),x.convert(t[1])];e=[r[0],new x(r[1].x,r[0].y),r[1],new x(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 u?t:new u(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=c.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=new i(this,e);var r=this._controlContainer=c.create(\"div\",\"mapboxgl-control-container\",t),n=this._controlCorners={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){n[t]=c.create(\"div\",\"mapboxgl-ctrl-\"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});t?this.painter=new h(t,this.transform):this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},_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\":330,\"../geo/lng_lat_bounds\":331,\"../geo/transform\":332,\"../render/painter\":346,\"../style/animation_loop\":366,\"../style/style\":369,\"../util/browser\":417,\"../util/canvas\":418,\"../util/dom\":419,\"../util/evented\":425,\"../util/util\":433,\"./bind_handlers\":398,\"./camera\":399,\"./control/attribution\":400,\"./hash\":411,\"point-geometry\":477}],413:[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\":330,\"../util/dom\":419,\"point-geometry\":477}],414:[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;e=n.firstChild;)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.y<n?[\"top\"]:t.y>this._map.transform.height-n?[\"bottom\"]:[],t.x<r/2?e.push(\"left\"):t.x>this._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\":330,\"../util/dom\":419,\"../util/evented\":425,\"../util/util\":433}],415:[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:\"<response>\",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(\"<response>\"===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)}},{}],416:[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<t.length;i++){var a=document.createElement(\"source\");n(t[i])||(r.crossOrigin=\"Anonymous\"),a.src=t[i],r.appendChild(a)}return r.getData=function(){return r},r}},{}],417:[function(t,e,r){\"use strict\";r.window=window,e.exports.now=window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now.bind(Date);var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;r.frame=function(t){return n(t)};var i=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;r.cancelFrame=function(t){i(t)},r.timed=function(t,n,i){function a(l){o||((l=e.exports.now())>=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\":318}],418:[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\":433,\"mapbox-gl-supported\":318}],419:[function(t,e,r){\"use strict\";function n(t){for(var e=0;e<t.length;e++)if(t[e]in s)return t[e]}function i(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener(\"click\",i,!0)}var a=t(\"point-geometry\");r.create=function(t,e,r){var n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n};var o,s=document.documentElement.style,l=n([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]);r.disableDrag=function(){l&&(o=s[l],s[l]=\"none\")},r.enableDrag=function(){l&&(s[l]=o)};var c=n([\"transform\",\"WebkitTransform\"]);r.setTransform=function(t,e){t.style[c]=e},r.suppressClick=function(){window.addEventListener(\"click\",i,!0),window.setTimeout(function(){window.removeEventListener(\"click\",i,!0)},0)},r.mousePos=function(t,e){var r=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new a(e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop)},r.touchPos=function(t,e){for(var r=t.getBoundingClientRect(),n=[],i=0;i<e.touches.length;i++)n.push(new a(e.touches[i].clientX-r.left-t.clientLeft,e.touches[i].clientY-r.top-t.clientTop));return n}},{\"point-geometry\":477}],420:[function(t,e,r){\"use strict\";var n=t(\"webworkify\");e.exports=function(){return new n(t(\"../../source/worker\"))}},{\"../../source/worker\":364,webworkify:578}],421:[function(t,e,r){\"use strict\";function n(t,e){return e.area-t.area}var i=t(\"quickselect\");e.exports=function(t,e){var r=t.length;if(r<=1)return[t];for(var a,o,s=[],l=0;l<r;l++){var c=function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}(t[l]);0!==c&&(t[l].area=Math.abs(c),void 0===o&&(o=c<0),o===c<0?(a&&s.push(a),a=[t[l]]):a.push(t[l]))}if(a&&s.push(a),e>1)for(var u=0;u<s.length;u++)s[u].length<=e||(i(s[u],e,1,s[u].length-1,n),s[u]=s[u].slice(0,e));return s}},{quickselect:494}],422:[function(t,e,r){\"use strict\";e.exports={API_URL:\"https://api.mapbox.com\",REQUIRE_ACCESS_TOKEN:!0}},{}],423:[function(t,e,r){\"use strict\";function n(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}}var i=t(\"assert\");e.exports=n,n.prototype.encode=function(t){return i(t in this._stringToNumber),this._stringToNumber[t]},n.prototype.decode=function(t){return i(t<this._numberToString.length),this._numberToString[t]}},{assert:51}],424:[function(t,e,r){\"use strict\";function n(t,e){this.actors=[],this.currentActor=0;for(var r=0;r<t;r++){var n=new o,i=new a(n,e);i.name=\"Worker \"+r,this.actors.push(i)}}var i=t(\"./util\"),a=t(\"./actor\"),o=t(\"./web_worker\");e.exports=n,n.prototype={broadcast:function(t,e,r){r=r||function(){},i.asyncAll(this.actors,function(r,n){r.send(t,e,n)},r)},send:function(t,e,r,n,i){return(\"number\"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r,i),n},remove:function(){for(var t=0;t<this.actors.length;t++)this.actors[t].target.terminate();this.actors=[]}}},{\"./actor\":415,\"./util\":433,\"./web_worker\":420}],425:[function(t,e,r){\"use strict\";var n=t(\"./util\"),i={on:function(t,e){return this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e),this},off:function(t,e){if(!t)return delete this._events,this;if(!this.listens(t))return this;if(e){var r=this._events[t].indexOf(e);r>=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<r.length;i++)r[i].call(this,e);return this},listens:function(t){return!(!this._events||!this._events[t])}};e.exports=i},{\"./util\":433}],426:[function(t,e,r){\"use strict\";function n(t,e,r){if(1===t){var n=r.readMessage(i,{glyphs:{}});e.push(n)}}function i(t,e,r){if(1===t)e.name=r.readString();else if(2===t)e.range=r.readString();else if(3===t){var n=r.readMessage(a,{});e.glyphs[n.id]=n}}function a(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}e.exports=function(t,e){this.stacks=t.readFields(n,[],e)}},{}],427:[function(t,e,r){\"use strict\";function n(t,e,r){return t*(1-r)+e*r}e.exports=n,n.number=n,n.vec2=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r)]},n.color=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r),n(t[2],e[2],r),n(t[3],e[3],r)]},n.array=function(t,e,r){return t.map(function(t,i){return n(t,e[i],r)})}},{}],428:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0;r<t.length-1;r++)for(var n=t[r],a=t[r+1],o=0;o<e.length-1;o++){if(function(t,e,r,n){return i(t,r,n)!==i(e,r,n)&&i(t,e,r)!==i(t,e,n)}(n,a,e[o],e[o+1]))return!0}return!1}function i(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function a(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++){if(function(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}(t,e[i-1],e[i])<n)return!0}return!1}function o(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.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 s(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.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:function(t,e,r){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<e.length;o++)for(var l=e[o],c=0;c<l.length;c++){var u=l[c];if(s(i,u))return!0;if(a(u,i,r))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return o(e,t[0][0]);for(var r=0;r<e.length;r++)for(var i=e[r],a=0;a<i.length;a++)if(o(t,i[a]))return!0;for(var s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++)if(o(e,l[c]))return!0;for(var u=0;u<e.length;u++)if(n(l,e[u]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,r){for(var i=0;i<e.length;i++)for(var o=e[i],l=0;l<t.length;l++){var c=t[l];if(c.length>=3)for(var u=0;u<o.length;u++)if(s(c,o[u]))return!0;if(function(t,e,r){if(t.length>1){if(n(t,e))return!0;for(var i=0;i<e.length;i++)if(a(e[i],t,r))return!0}for(var o=0;o<t.length;o++)if(a(t[o],e,r))return!0;return!1}(c,o,r))return!0}return!1}}},{}],429:[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}},{}],430:[function(t,e,r){\"use strict\";function n(t,e,r){if(!(r=r||a.ACCESS_TOKEN)&&a.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:\\/\\//,a.API_URL+e),t+=-1!==t.indexOf(\"?\")?\"&access_token=\":\"?access_token=\",a.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:\"\"}var a=t(\"./config\"),o=t(\"./browser\"),s=t(\"url\"),l=t(\"./util\");e.exports.normalizeStyleURL=function(t,e){var r=s.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:\"!==s.parse(t).protocol?t:n(t+\".json\",\"/v4/\",e)+\"&secure\"},e.exports.normalizeGlyphsURL=function(t,e){var r=s.parse(t);if(\"mapbox:\"!==r.protocol)return t;return 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=s.parse(t);return\"mapbox:\"!==o.protocol?(o.pathname+=e+r,s.format(o)):n(\"mapbox:/\"+o.pathname+\"/sprite\"+e+r+i(o.query),\"/styles/v1/\",a)},e.exports.normalizeTileURL=function(t,e,r){var n=s.parse(t,!0);if(!e)return t;if(\"mapbox:\"!==s.parse(e).protocol)return t;var i=o.supportsWebp?\".webp\":\"$1\",c=o.devicePixelRatio>=2||512===r?\"@2x\":\"\";return s.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\\.(?:png|jpg)\\d*)/,c+i),query:function(t){return t.access_token&&\"tk.\"===t.access_token.slice(0,3)?l.extend({},t,{access_token:a.ACCESS_TOKEN}):t}(n.query)})}},{\"./browser\":417,\"./config\":422,\"./util\":433,url:559}],431:[function(t,e,r){\"use strict\";function n(){return{members:this.prototype.StructType.prototype.members,alignment:this.prototype.StructType.prototype.alignment,bytesPerElement:this.prototype.bytesPerElement}}function i(t,e){return Math.ceil(t/e)*e}function a(t){return f[t].BYTES_PER_ELEMENT}function o(t){return t.toLowerCase()}function s(t,e){var r=\"this._pos\"+a(t.type).toFixed(0)+\" + \"+(t.offset/a(t.type)+e).toFixed(0);return\"this._structArray.\"+o(t.type)+\"[\"+r+\"]\"}function l(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}function c(t){void 0!==t?(this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.capacity=this.arrayBuffer.byteLength/this.bytesPerElement,this._refreshViews()):(this.capacity=-1,this.resize(0))}var u=t(\"assert\");e.exports=function(t){function e(){l.apply(this,arguments)}function r(){c.apply(this,arguments),this.members=e.prototype.members}var d=JSON.stringify(t);if(h[d])return h[d];void 0===t.alignment&&(t.alignment=1);var p=0,m=0,g=[\"Uint8\"];return(e.prototype=Object.create(l.prototype)).members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},u(r.name.length),u(r.type in f),g.indexOf(r.type)<0&&g.push(r.type);var n=a(r.type);m=Math.max(m,n),r.offset=p=i(p,Math.max(t.alignment,n));for(var o=0;o<r.components;o++)Object.defineProperty(e.prototype,r.name+(1===r.components?\"\":o),{get:function(t,e){return new Function([],\"return \"+s(t,e)+\";\")}(r,o),set:function(t,e){return new Function([\"x\"],s(t,e)+\" = x;\")}(r,o)});return p+=n*r.components,r}),e.prototype.alignment=t.alignment,e.prototype.size=i(p,Math.max(m,t.alignment)),r.serialize=n,r.prototype=Object.create(c.prototype),r.prototype.StructType=e,r.prototype.bytesPerElement=e.prototype.size,r.prototype.emplaceBack=function(t,e){for(var r=[],n=[],i=\"var i = this.length;\\nthis.resize(this.length + 1);\\n\",s=0;s<t.length;s++){var l=t[s],c=a(l.type);r.indexOf(c)<0&&(r.push(c),i+=\"var o\"+c.toFixed(0)+\" = i * \"+(e/c).toFixed(0)+\";\\n\");for(var u=0;u<l.components;u++){var f=\"v\"+n.length,h=\"o\"+c.toFixed(0)+\" + \"+(l.offset/c+u).toFixed(0);i+=\"this.\"+o(l.type)+\"[\"+h+\"] = \"+f+\";\\n\",n.push(f)}}return i+=\"return i;\",new Function(n,i)}(e.prototype.members,e.prototype.size),r.prototype._usedTypes=g,h[d]=r,r};var f={Int8:Int8Array,Uint8:Uint8Array,Uint8Clamped:Uint8ClampedArray,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array,Float64:Float64Array},h={};c.prototype.DEFAULT_CAPACITY=128,c.prototype.RESIZE_MULTIPLIER=5,c.prototype.serialize=function(){return this.trim(),{length:this.length,arrayBuffer:this.arrayBuffer}},c.prototype.get=function(t){return new this.StructType(this,t)},c.prototype.trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},c.prototype.resize=function(t){if(this.length=t,t>this.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)}},c.prototype._refreshViews=function(){for(var t=0;t<this._usedTypes.length;t++){var e=this._usedTypes[t];this[o(e)]=new f[e](this.arrayBuffer)}},c.prototype.toArray=function(t,e){for(var r=[],n=t;n<e;n++){var i=this.get(n);r.push(i)}return r}},{assert:51}],432:[function(t,e,r){\"use strict\";e.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,r){return r in t?t[r]:\"\"})}},{}],433:[function(t,e,r){\"use strict\";var n=t(\"unitbezier\"),i=t(\"../geo/coordinate\");r.easeCubicInOut=function(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)},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<arguments.length;t++){var e=arguments[t];if(null!==e&&void 0!==e)return e}},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)})})},r.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},r.extend=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t},r.extendAll=function(t,e){for(var r in e)Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t},r.inherit=function(t,e){var n=\"function\"==typeof t?t.prototype:t,i=Object.create(n);return r.extendAll(i,e),i},r.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r};var a=1;r.uniqueId=function(){return a++},r.debounce=function(t,e){var r,n;return function(){n=arguments,clearTimeout(r),r=setTimeout(function(){t.apply(null,n)},e)}},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.bindHandlers=function(t){for(var e in t)\"function\"==typeof t[e]&&0===e.indexOf(\"_on\")&&(t[e]=t[e].bind(t))},r.setOptions=function(t,e){t.hasOwnProperty(\"options\")||(t.options=t.options?Object.create(t.options):{});for(var r in e)t.options[r]=e[r];return t.options},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,a=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),r=Math.min(r,t[o].row),n=Math.max(n,t[o].column),a=Math.max(a,t[o].row);var s=n-e,l=a-r,c=Math.max(s,l);return new i((e+n)/2,(r+a)/2,0).zoomTo(Math.floor(-Math.log(c)/Math.LN2))},r.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},r.startsWith=function(t,e){return 0===t.indexOf(e)},r.mapObject=function(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n},r.filterObject=function(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n},r.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(\"object\"==typeof e&&null!==e&&null!==r){if(\"object\"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):\"object\"==typeof t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||(\"undefined\"!=typeof console&&console.warn(t),o[t]=!0)}},{\"../geo/coordinate\":329,unitbezier:557}],434:[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}}},{}],435:[function(t,e,r){e.exports={_args:[[\"mapbox-gl@0.22.1\",\"/Users/alex/plotly/plotly.js\"]],_from:\"mapbox-gl@0.22.1\",_id:\"mapbox-gl@0.22.1\",_inBundle:!1,_integrity:\"sha1-kqllVH1MLyTCLLxIfu2khpTLYno=\",_location:\"/mapbox-gl\",_phantomChildren:{},_requested:{type:\"version\",registry:!0,raw:\"mapbox-gl@0.22.1\",name:\"mapbox-gl\",escapedName:\"mapbox-gl\",rawSpec:\"0.22.1\",saveSpec:null,fetchSpec:\"0.22.1\"},_requiredBy:[\"/\"],_resolved:\"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz\",_spec:\"0.22.1\",_where:\"/Users/alex/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\"},engines:{node:\">=4.0.0\"},homepage:\"https://github.com/mapbox/mapbox-gl-js#readme\",license:\"BSD-3-Clause\",main:\"js/mapbox-gl.js\",name:\"mapbox-gl\",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\"}},{}],436:[function(t,e,r){\"use strict\";function n(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=0,i===e&&(n[i]+=.5),i===r&&(n[i]+=.5);return n}function i(t,e){if(0===e||e===(1<<t+1)-1)return[];for(var r=[],i=[],o=0;o<=t;++o)if(e&1<<o){r.push(n(t,o-1,o-1)),i.push(null);for(var s=0;s<=t;++s)~e&1<<s&&(r.push(n(t,o-1,s-1)),i.push([o,s]))}var l=a(r),c=[];t:for(o=0;o<l.length;++o){var u=l[o],f=[];for(s=0;s<u.length;++s){if(!i[u[s]])continue t;f.push(i[u[s]].slice())}c.push(f)}return c}e.exports=function(t){for(var e=1<<t+1,r=new Array(e),n=0;n<e;++n)r[n]=i(t,n);return r};var a=t(\"convex-hull\")},{\"convex-hull\":109}],437:[function(t,e,r){function n(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}var i=t(\"./normalize\"),a=t(\"gl-mat4/create\"),o=t(\"gl-mat4/clone\"),s=t(\"gl-mat4/determinant\"),l=t(\"gl-mat4/invert\"),c=t(\"gl-mat4/transpose\"),u={length:t(\"gl-vec3/length\"),normalize:t(\"gl-vec3/normalize\"),dot:t(\"gl-vec3/dot\"),cross:t(\"gl-vec3/cross\")},f=a(),h=a(),d=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],m=[0,0,0];e.exports=function(t,e,r,a,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),a||(a=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!i(f,t))return!1;if(o(h,f),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(s(h)<1e-8))return!1;var y=f[3],x=f[7],b=f[11],_=f[12],w=f[13],M=f[14],k=f[15];if(0!==y||0!==x||0!==b){d[0]=y,d[1]=x,d[2]=b,d[3]=k;if(!l(h,h))return!1;c(h,h),function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];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}(g,d,h)}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=_,e[1]=w,e[2]=M,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,f),r[0]=u.length(p[0]),u.normalize(p[0],p[0]),a[0]=u.dot(p[0],p[1]),n(p[1],p[1],p[0],1,-a[0]),r[1]=u.length(p[1]),u.normalize(p[1],p[1]),a[0]/=r[1],a[1]=u.dot(p[0],p[2]),n(p[2],p[2],p[0],1,-a[1]),a[2]=u.dot(p[1],p[2]),n(p[2],p[2],p[1],1,-a[2]),r[2]=u.length(p[2]),u.normalize(p[2],p[2]),a[1]/=r[2],a[2]/=r[2],u.cross(m,p[1],p[2]),u.dot(p[0],m)<0)for(var A=0;A<3;A++)r[A]*=-1,p[A][0]*=-1,p[A][1]*=-1,p[A][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(v[0]=-v[0]),p[0][2]>p[2][0]&&(v[1]=-v[1]),p[1][0]>p[0][1]&&(v[2]=-v[2]),!0}},{\"./normalize\":438,\"gl-mat4/clone\":180,\"gl-mat4/create\":181,\"gl-mat4/determinant\":182,\"gl-mat4/invert\":186,\"gl-mat4/transpose\":196,\"gl-vec3/cross\":260,\"gl-vec3/dot\":261,\"gl-vec3/length\":262,\"gl-vec3/normalize\":264}],438:[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}},{}],439:[function(t,e,r){function n(){return{translate:i(),scale:i(1),skew:i(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function i(t){return[t||0,t||0,t||0]}var a=t(\"gl-vec3/lerp\"),o=t(\"mat4-recompose\"),s=t(\"mat4-decompose\"),l=t(\"gl-mat4/determinant\"),c=t(\"quat-slerp\"),u=n(),f=n(),h=n();e.exports=function(t,e,r,n){if(0===l(e)||0===l(r))return!1;var i=s(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),d=s(r,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!(!i||!d||(a(h.translate,u.translate,f.translate,n),a(h.skew,u.skew,f.skew,n),a(h.scale,u.scale,f.scale,n),a(h.perspective,u.perspective,f.perspective,n),c(h.quaternion,u.quaternion,f.quaternion,n),o(t,h.translate,h.scale,h.skew,h.perspective,h.quaternion),0))}},{\"gl-mat4/determinant\":182,\"gl-vec3/lerp\":263,\"mat4-decompose\":437,\"mat4-recompose\":440,\"quat-slerp\":490}],440:[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\":181,\"gl-mat4/fromRotationTranslation\":184,\"gl-mat4/identity\":185,\"gl-mat4/multiply\":188,\"gl-mat4/scale\":194,\"gl-mat4/translate\":195}],441:[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]}var i=t(\"binary-search-bounds\"),a=t(\"mat4-interpolate\"),o=t(\"gl-mat4/invert\"),s=t(\"gl-mat4/rotateX\"),l=t(\"gl-mat4/rotateY\"),c=t(\"gl-mat4/rotateZ\"),u=t(\"gl-mat4/lookAt\"),f=t(\"gl-mat4/translate\"),h=(t(\"gl-mat4/scale\"),t(\"gl-vec3/normalize\")),d=[0,0,0];e.exports=function(t){return new n((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=n.prototype;p.recalcMatrix=function(t){var e=this._time,r=i.le(e,t),n=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)n[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),d=!0;for(c=0;c<16;++c)f[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],d=d&&f[c]===p[c];if(u<1e-6||d)for(c=0;c<16;++c)n[c]=f[c];else a(n,f,p,(t-e[r])/u)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],h(m,m);var g=this.computedInverse;o(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-n[2+4*c]*b}},p.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},p.flush=function(t){var e=i.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},p.lastT=function(){return this._time[this._time.length-1]},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||d,n=n||this.computedUp,this.setMatrix(t,u(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},p.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&l(i,i,e),r&&s(i,i,r),n&&c(i,i,n),this.setMatrix(t,o(this.computedMatrix,i))};var m=[0,0,0];p.pan=function(t,e,r,n){m[0]=-(e||0),m[1]=-(r||0),m[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;f(i,i,m),this.setMatrix(t,o(i,i))},p.translate=function(t,e,r,n){m[0]=e||0,m[1]=r||0,m[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;f(i,i,m),this.setMatrix(t,i)},p.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},p.setDistance=function(t,e){this.computedRadius[0]=e},p.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},p.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{\"binary-search-bounds\":70,\"gl-mat4/invert\":186,\"gl-mat4/lookAt\":187,\"gl-mat4/rotateX\":191,\"gl-mat4/rotateY\":192,\"gl-mat4/rotateZ\":193,\"gl-mat4/scale\":194,\"gl-mat4/translate\":195,\"gl-vec3/normalize\":264,\"mat4-interpolate\":439}],442:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}var a=new Array(e);for(i=0;i<e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});var o=[a[0],a[1]],s=[a[0],a[1]];for(i=2;i<e;++i){for(var l=a[i],c=t[l],u=o.length;u>1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i<h;++i)r[f++]=o[i];for(var d=s.length-2;d>0;--d)r[f++]=s[d];return r};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":515}],443:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(t){var e=!1;return\"altKey\"in t&&(e=e||t.altKey!==m.alt,m.alt=!!t.altKey),\"shiftKey\"in t&&(e=e||t.shiftKey!==m.shift,m.shift=!!t.shiftKey),\"ctrlKey\"in t&&(e=e||t.ctrlKey!==m.control,m.control=!!t.ctrlKey),\"metaKey\"in t&&(e=e||t.metaKey!==m.meta,m.meta=!!t.metaKey),e}function i(t,i){var a=n.x(i),o=n.y(i);\"buttons\"in i&&(t=0|i.buttons),(t!==h||a!==d||o!==p||r(i))&&(h=0|t,d=a||0,p=o||0,e&&e(h,d,p,m))}function a(t){i(0,t)}function o(){(h||d||p||m.shift||m.alt||m.meta||m.control)&&(d=p=0,h=0,m.shift=m.alt=m.control=m.meta=!1,e&&e(0,0,0,m))}function s(t){r(t)&&e&&e(h,d,p,m)}function l(t){0===n.buttons(t)?i(0,t):i(h,t)}function c(t){i(h|n.buttons(t),t)}function u(t){i(h&~n.buttons(t),t)}function f(){g||(g=!0,t.addEventListener(\"mousemove\",l),t.addEventListener(\"mousedown\",c),t.addEventListener(\"mouseup\",u),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)))}e||(e=t,t=window);var h=0,d=0,p=0,m={shift:!1,alt:!1,control:!1,meta:!1},g=!1;f();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return g},set:function(e){e?f():g&&(g=!1,t.removeEventListener(\"mousemove\",l),t.removeEventListener(\"mousedown\",c),t.removeEventListener(\"mouseup\",u),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)))},enumerable:!0},buttons:{get:function(){return h},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":445}],444:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=function(t){return t===window||t===document||t===document.body?n:t.getBoundingClientRect()}(e);return r[0]=i-o.left,r[1]=a-o.top,r}},{}],445:[function(t,e,r){\"use strict\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\"object\"==typeof t){if(\"buttons\"in t)return t.buttons;if(\"which\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\"button\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\"object\"==typeof t){if(\"offsetX\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\"object\"==typeof t){if(\"offsetY\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],446:[function(t,e,r){\"use strict\";var n=t(\"to-px\");e.exports=function(t,e,r){\"function\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\"ex\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=1;switch(t.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(n*=s,a*=s,o*=s,n||a||o)return e(n,a,o,t)};return t.addEventListener(\"wheel\",a),a}},{\"to-px\":548}],447:[function(t,e,r){\"use strict\";function n(t){return\"a\"+t}function i(t){return\"d\"+t}function a(t,e){return\"c\"+t+\"_\"+e}function o(t){return\"s\"+t}function s(t,e){return\"t\"+t+\"_\"+e}function l(t){return\"o\"+t}function c(t){return\"x\"+t}function u(t){return\"p\"+t}function f(t,e){return\"d\"+t+\"_\"+e}function h(t){return\"i\"+t}function d(t,e){return\"u\"+t+\"_\"+e}function p(t){return\"b\"+t}function m(t){return\"y\"+t}function g(t){return\"e\"+t}function v(t){return\"v\"+t}function y(t,e,r){for(var n=0,i=0;i<t;++i)e&1<<i&&(n|=1<<r[i]);return n}function x(t,e,r,x,S,E){function L(t,e){F.push(\"for(\",h(S[t]),\"=\",e,\";\",h(S[t]),\"<\",o(S[t]),\";\",\"++\",h(S[t]),\"){\")}function C(t){for(var e=0;e<I;++e)F.push(u(e),\"+=\",d(e,S[t]),\";\");F.push(\"}\")}function z(){for(var t=1;t<1<<P;++t)F.push(T,\"=\",g(t),\";\",g(t),\"=\",m(t),\";\",m(t),\"=\",T,\";\")}function D(t,e){if(t<0)!function(t){for(var e=0;e<I;++e)E[e]?F.push(a(e,0),\"=\",i(e),\".get(\",u(e),\");\"):F.push(a(e,0),\"=\",i(e),\"[\",u(e),\"];\");var r=[];for(e=0;e<I;++e)r.push(a(e,0));for(e=0;e<x;++e)r.push(c(e));F.push(p(0),\"=\",w,\"[\",A,\"]=phase(\",r.join(),\");\");for(var n=1;n<1<<P;++n)F.push(p(n),\"=\",w,\"[\",A,\"+\",g(n),\"];\");var o=[];for(n=1;n<1<<P;++n)o.push(\"(\"+p(0)+\"!==\"+p(n)+\")\");F.push(\"if(\",o.join(\"||\"),\"){\");var s=[];for(e=0;e<P;++e)s.push(h(e));for(e=0;e<I;++e)for(s.push(a(e,0)),n=1;n<1<<P;++n)E[e]?F.push(a(e,n),\"=\",i(e),\".get(\",u(e),\"+\",f(e,n),\");\"):F.push(a(e,n),\"=\",i(e),\"[\",u(e),\"+\",f(e,n),\"];\"),s.push(a(e,n));for(e=0;e<1<<P;++e)s.push(p(e));for(e=0;e<x;++e)s.push(c(e));F.push(\"vertex(\",s.join(),\");\",v(0),\"=\",_,\"[\",A,\"]=\",M,\"++;\");var l=(1<<P)-1,d=p(l);for(n=0;n<P;++n)if(0==(t&~(1<<n))){for(var m=l^1<<n,y=p(m),b=[],k=m;k>0;k=k-1&m)b.push(_+\"[\"+A+\"+\"+g(k)+\"]\");for(b.push(v(0)),k=0;k<I;++k)1&n?b.push(a(k,l),a(k,m)):b.push(a(k,m),a(k,l));for(1&n?b.push(d,y):b.push(y,d),k=0;k<x;++k)b.push(c(k));F.push(\"if(\",d,\"!==\",y,\"){\",\"face(\",b.join(),\")}\")}F.push(\"}\",A,\"+=1;\")}(e);else{!function(t){for(var e=t-1;e>=0;--e)L(e,0);var r=[];for(e=0;e<I;++e)E[e]?r.push(i(e)+\".get(\"+u(e)+\")\"):r.push(i(e)+\"[\"+u(e)+\"]\");for(e=0;e<x;++e)r.push(c(e));for(F.push(w,\"[\",A,\"++]=phase(\",r.join(),\");\"),e=0;e<t;++e)C(e);for(var n=0;n<I;++n)F.push(u(n),\"+=\",d(n,S[t]),\";\")}(t),F.push(\"if(\",o(S[t]),\">0){\",h(S[t]),\"=1;\"),D(t-1,e|1<<S[t]);for(var r=0;r<I;++r)F.push(u(r),\"+=\",d(r,S[t]),\";\");t===P-1&&(F.push(A,\"=0;\"),z()),L(t,2),D(t-1,e),t===P-1&&(F.push(\"if(\",h(S[P-1]),\"&1){\",A,\"=0;}\"),z()),C(t),F.push(\"}\")}}var I=E.length,P=S.length;if(P<2)throw new Error(\"ndarray-extract-contour: Dimension must be at least 2\");for(var O=\"extractContour\"+S.join(\"_\"),F=[],R=[],N=[],j=0;j<I;++j)N.push(n(j));for(j=0;j<x;++j)N.push(c(j));for(j=0;j<P;++j)R.push(o(j)+\"=\"+n(0)+\".shape[\"+j+\"]|0\");for(j=0;j<I;++j){R.push(i(j)+\"=\"+n(j)+\".data\",l(j)+\"=\"+n(j)+\".offset|0\");for(var B=0;B<P;++B)R.push(s(j,B)+\"=\"+n(j)+\".stride[\"+B+\"]|0\")}for(j=0;j<I;++j){R.push(u(j)+\"=\"+l(j)),R.push(a(j,0));for(B=1;B<1<<P;++B){for(var U=[],V=0;V<P;++V)B&1<<V&&U.push(\"-\"+s(j,V));R.push(f(j,B)+\"=(\"+U.join(\"\")+\")|0\"),R.push(a(j,B)+\"=0\")}}for(j=0;j<I;++j)for(B=0;B<P;++B){var q=[s(j,S[B])];B>0&&q.push(s(j,S[B-1])+\"*\"+o(S[B-1])),R.push(d(j,S[B])+\"=(\"+q.join(\"-\")+\")|0\")}for(j=0;j<P;++j)R.push(h(j)+\"=0\");R.push(M+\"=0\");var H=[\"2\"];for(j=P-2;j>=0;--j)H.push(o(S[j]));R.push(k+\"=(\"+H.join(\"*\")+\")|0\",w+\"=mallocUint32(\"+k+\")\",_+\"=mallocUint32(\"+k+\")\",A+\"=0\"),R.push(p(0)+\"=0\");for(B=1;B<1<<P;++B){var G=[],Y=[];for(V=0;V<P;++V)B&1<<V&&(0===Y.length?G.push(\"1\"):G.unshift(Y.join(\"*\"))),Y.push(o(S[V]));var W=\"\";G[0].indexOf(o(S[P-2]))<0&&(W=\"-\");var X=y(P,B,S);R.push(g(X)+\"=(-\"+G.join(\"-\")+\")|0\",m(X)+\"=(\"+W+G.join(\"-\")+\")|0\",p(X)+\"=0\")}R.push(v(0)+\"=0\",T+\"=0\"),D(P-1,0),F.push(\"freeUint32(\",_,\");freeUint32(\",w,\");\");var Z=[\"'use strict';\",\"function \",O,\"(\",N.join(),\"){\",\"var \",R.join(),\";\",F.join(\"\"),\"}\",\"return \",O].join(\"\");return new Function(\"vertex\",\"face\",\"phase\",\"mallocUint32\",\"freeUint32\",Z)(t,e,r,b.mallocUint32,b.freeUint32)}var b=t(\"typedarray-pool\");e.exports=function(t){function e(t){throw new Error(\"ndarray-extract-contour: \"+t)}\"object\"!=typeof t&&e(\"Must specify arguments\");var r=t.order;Array.isArray(r)||e(\"Must specify order\");var n=t.arrayArguments||1;n<1&&e(\"Must have at least one array argument\");var i=t.scalarArguments||0;i<0&&e(\"Scalar arg count must be > 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<n;++s)a.indexOf(s)>=0?o[s]=!0:o[s]=!1;return x(t.vertex,t.cell,t.phase,i,r,o)};var _=\"V\",w=\"P\",M=\"N\",k=\"Q\",A=\"X\",T=\"T\"},{\"typedarray-pool\":554}],448:[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\":119}],449:[function(t,e,r){\"use strict\";function n(t){if(t in o)return o[t];for(var e=[],r=0;r<t;++r)e.push(\"out\",r,\"s=0.5*(inp\",r,\"l-inp\",r,\"r);\");var n=[\"array\"],s=[\"junk\"];for(r=0;r<t;++r){n.push(\"array\"),s.push(\"out\"+r+\"s\");var c=i(t);c[r]=-1,n.push({array:0,offset:c.slice()}),c[r]=1,n.push({array:0,offset:c.slice()}),s.push(\"inp\"+r+\"l\",\"inp\"+r+\"r\")}return o[t]=a({args:n,pre:l,post:l,body:{body:e.join(\"\"),args:s.map(function(t){return{name:t,lvalue:0===t.indexOf(\"out\"),rvalue:0===t.indexOf(\"inp\"),count:\"junk\"!==t|0}}),thisVars:[],localVars:[]},funcName:\"fdTemplate\"+t})}e.exports=function(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?i(e.dimension,r):i(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 a=0;a<e.dimension;++a)if(t.shape[a]!==e.shape[a])throw new Error(\"ndarray-gradient: shape mismatch\");return 0===e.size?t:e.dimension<=0?(t.set(0),t):function(t){function e(e){for(var r=i-e.length,n=[],o=[],s=[],l=0;l<i;++l)e.indexOf(l+1)>=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 c=\".lo(\"+n.join()+\").hi(\"+o.join()+\")\";if(0===n.length&&(c=\"\"),r>0){for(a.push(\"if(1\"),l=0;l<i;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||a.push(\"&&s[\",l,\"]>2\");for(a.push(\"){grad\",r,\"(src.pick(\",s.join(),\")\",c),l=0;l<i;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||a.push(\",dst.pick(\",s.join(),\",\",l,\")\",c);a.push(\");\")}for(l=0;l<e.length;++l){var u=Math.abs(e[l])-1,f=\"dst.pick(\"+s.join()+\",\"+u+\")\"+c;switch(t[u]){case\"clamp\":var h=s.slice(),d=s.slice();e[l]<0?h[u]=\"s[\"+u+\"]-2\":d[u]=\"1\",0===r?a.push(\"if(s[\",u,\"]>1){dst.set(\",s.join(),\",\",u,\",0.5*(src.get(\",h.join(),\")-src.get(\",d.join(),\")))}else{dst.set(\",s.join(),\",\",u,\",0)};\"):a.push(\"if(s[\",u,\"]>1){diff(\",f,\",src.pick(\",h.join(),\")\",c,\",src.pick(\",d.join(),\")\",c,\");}else{zero(\",f,\");};\");break;case\"mirror\":0===r?a.push(\"dst.set(\",s.join(),\",\",u,\",0);\"):a.push(\"zero(\",f,\");\");break;case\"wrap\":var p=s.slice(),m=s.slice();e[l]<0?(p[u]=\"s[\"+u+\"]-2\",m[u]=\"0\"):(p[u]=\"s[\"+u+\"]-1\",m[u]=\"1\"),0===r?a.push(\"if(s[\",u,\"]>2){dst.set(\",s.join(),\",\",u,\",0.5*(src.get(\",p.join(),\")-src.get(\",m.join(),\")))}else{dst.set(\",s.join(),\",\",u,\",0)};\"):a.push(\"if(s[\",u,\"]>2){diff(\",f,\",src.pick(\",p.join(),\")\",c,\",src.pick(\",m.join(),\")\",c,\");}else{zero(\",f,\");};\");break;default:throw new Error(\"ndarray-gradient: Invalid boundary condition\")}}r>0&&a.push(\"};\")}var r=t.join();if(v=s[r])return v;for(var i=t.length,a=[\"function gradient(dst,src){var s=src.shape.slice();\"],l=0;l<1<<i;++l){for(var f=[],h=0;h<i;++h)l&1<<h&&f.push(h+1);for(var d=0;d<1<<f.length;++d){var p=f.slice();for(h=0;h<f.length;++h)d&1<<h&&(p[h]=-p[h]);e(p)}}a.push(\"return dst;};return gradient\");var m=[\"diff\",\"zero\"],g=[c,u];for(l=1;l<=i;++l)m.push(\"grad\"+l),g.push(n(l));m.push(a.join(\"\"));var v=Function.apply(void 0,m).apply(void 0,g);return o[r]=v,v}(r)(t,e)};var i=t(\"dup\"),a=t(\"cwise-compiler\"),o={},s={},l={body:\"\",args:[],thisVars:[],localVars:[]},c=a({args:[\"array\",\"array\",\"array\"],pre:l,post:l,body:{args:[{name:\"out\",lvalue:!0,rvalue:!1,count:1},{name:\"left\",lvalue:!1,rvalue:!0,count:1},{name:\"right\",lvalue:!1,rvalue:!0,count:1}],body:\"out=0.5*(left-right)\",thisVars:[],localVars:[]},funcName:\"cdiff\"}),u=a({args:[\"array\"],pre:l,post:l,body:{args:[{name:\"out\",lvalue:!0,rvalue:!1,count:1}],body:\"out=0\",thisVars:[],localVars:[]},funcName:\"zero\"})},{\"cwise-compiler\":116,dup:134}],450:[function(t,e,r){\"use strict\";var n=t(\"ndarray-warp\"),i=t(\"gl-matrix-invert\");e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r<a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n<a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n<a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r<a;++r)t[r]*=s;return t}),t}},{\"gl-matrix-invert\":197,\"ndarray-warp\":457}],451:[function(t,e,r){\"use strict\";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,c=0<=s&&s<t.shape[1],u=0<=s+1&&s+1<t.shape[1],f=a&&c?t.get(n,s):0,h=a&&u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),c=r-l,u=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),d=n-h,p=0<=h&&h<t.shape[2],m=0<=h+1&&h+1<t.shape[2],g=o&&u&&p?t.get(i,l,h):0,v=o&&f&&p?t.get(i,l+1,h):0,y=s&&u&&p?t.get(i+1,l,h):0,x=s&&f&&p?t.get(i+1,l+1,h):0,b=o&&u&&m?t.get(i,l,h+1):0,_=o&&f&&m?t.get(i,l+1,h+1):0;return(1-d)*((1-c)*((1-a)*g+a*y)+c*((1-a)*v+a*x))+d*((1-c)*((1-a)*b+a*(s&&u&&m?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&&f&&m?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,c,u,f=0;t:for(e=0;e<1<<n;++e){for(c=1,u=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],452:[function(t,e,r){\"use strict\";function n(t){if(!t)return o;for(var e=0;e<t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function i(t){for(var e=[],r=0;r<t.args.length;++r)e.push(\"a\"+r);return new Function(\"P\",[\"return function \",t.funcName,\"_ndarrayops(\",e.join(\",\"),\") {P(\",e.join(\",\"),\");return a0}\"].join(\"\"))(function(t){return a({args:t.args,pre:n(t.pre),body:n(t.body),post:n(t.proc),funcName:t.funcName})}(t))}var a=t(\"cwise-compiler\"),o={body:\"\",args:[],thisVars:[],localVars:[]},s={add:\"+\",sub:\"-\",mul:\"*\",div:\"/\",mod:\"%\",band:\"&\",bor:\"|\",bxor:\"^\",lshift:\"<<\",rshift:\">>\",rrshift:\">>>\"};!function(){for(var t in s){var e=s[t];r[t]=i({args:[\"array\",\"array\",\"array\"],body:{args:[\"a\",\"b\",\"c\"],body:\"a=b\"+e+\"c\"},funcName:t}),r[t+\"eq\"]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a\"+e+\"=b\"},rvalue:!0,funcName:t+\"eq\"}),r[t+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],body:{args:[\"a\",\"b\",\"s\"],body:\"a=b\"+e+\"s\"},funcName:t+\"s\"}),r[t+\"seq\"]=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"s\"],body:\"a\"+e+\"=s\"},rvalue:!0,funcName:t+\"seq\"})}}();var l={not:\"!\",bnot:\"~\",neg:\"-\",recip:\"1.0/\"};!function(){for(var t in l){var e=l[t];r[t]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=\"+e+\"b\"},funcName:t}),r[t+\"eq\"]=i({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]=i({args:[\"array\",\"array\",\"array\"],body:{args:[\"a\",\"b\",\"c\"],body:\"a=b\"+e+\"c\"},funcName:t}),r[t+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],body:{args:[\"a\",\"b\",\"s\"],body:\"a=b\"+e+\"s\"},funcName:t+\"s\"}),r[t+\"eq\"]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=a\"+e+\"b\"},rvalue:!0,count:2,funcName:t+\"eq\"}),r[t+\"seq\"]=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"s\"],body:\"a=a\"+e+\"s\"},rvalue:!0,count:2,funcName:t+\"seq\"})}}();var u=[\"abs\",\"acos\",\"asin\",\"atan\",\"ceil\",\"cos\",\"exp\",\"floor\",\"log\",\"round\",\"sin\",\"sqrt\",\"tan\"];!function(){for(var t=0;t<u.length;++t){var e=u[t];r[e]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b)\",thisVars:[\"this_f\"]},funcName:e}),r[e+\"eq\"]=i({args:[\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\"],body:\"a=this_f(a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"eq\"})}}();var f=[\"max\",\"min\",\"atan2\",\"pow\"];!function(){for(var t=0;t<f.length;++t){var e=f[t];r[e]=i({args:[\"array\",\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(b,c)\",thisVars:[\"this_f\"]},funcName:e}),r[e+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(b,c)\",thisVars:[\"this_f\"]},funcName:e+\"s\"}),r[e+\"eq\"]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(a,b)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"eq\"}),r[e+\"seq\"]=i({args:[\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(a,b)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"seq\"})}}();var h=[\"atan2\",\"pow\"];!function(){for(var t=0;t<h.length;++t){var e=h[t];r[e+\"op\"]=i({args:[\"array\",\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(c,b)\",thisVars:[\"this_f\"]},funcName:e+\"op\"}),r[e+\"ops\"]=i({args:[\"array\",\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(c,b)\",thisVars:[\"this_f\"]},funcName:e+\"ops\"}),r[e+\"opeq\"]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b,a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"opeq\"}),r[e+\"opseq\"]=i({args:[\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b,a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"opseq\"})}}(),r.any=a({args:[\"array\"],pre:o,body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"if(a){return true}\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\"return false\"},funcName:\"any\"}),r.all=a({args:[\"array\"],pre:o,body:{args:[{name:\"x\",lvalue:!1,rvalue:!0,count:1}],body:\"if(!x){return false}\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\"return true\"},funcName:\"all\"}),r.sum=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"this_s+=a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"sum\"}),r.prod=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=1\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"this_s*=a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"prod\"}),r.norm2squared=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:2}],body:\"this_s+=a*a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"norm2squared\"}),r.norm2=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:2}],body:\"this_s+=a*a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return Math.sqrt(this_s)\"},funcName:\"norm2\"}),r.norminf=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:4}],body:\"if(-a>this_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=a({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=a({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=a({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.argmin=a({args:[\"index\",\"array\",\"shape\"],pre:{body:\"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}\",args:[{name:\"_inline_0_arg0_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg1_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg2_\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\"this_i\",\"this_v\"],localVars:[]},body:{body:\"{if(_inline_1_arg1_<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.argmax=a({args:[\"index\",\"array\",\"shape\"],pre:{body:\"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}\",args:[{name:\"_inline_0_arg0_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg1_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg2_\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\"this_i\",\"this_v\"],localVars:[]},body:{body:\"{if(_inline_1_arg1_>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=i({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=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=b\"},funcName:\"assign\"}),r.assigns=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"b\"],body:\"a=b\"},funcName:\"assigns\"}),r.equals=a({args:[\"array\",\"array\"],pre:o,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\":116}],453:[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\":454,ndarray:458}],454:[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\":116}],455:[function(t,e,r){\"use strict\";function n(t){switch(t){case\"uint8\":return[a.mallocUint8,a.freeUint8];case\"uint16\":return[a.mallocUint16,a.freeUint16];case\"uint32\":return[a.mallocUint32,a.freeUint32];case\"int8\":return[a.mallocInt8,a.freeInt8];case\"int16\":return[a.mallocInt16,a.freeInt16];case\"int32\":return[a.mallocInt32,a.freeInt32];case\"float32\":return[a.mallocFloat,a.freeFloat];case\"float64\":return[a.mallocDouble,a.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r<t;++r)e.push(\"s\"+r);for(r=0;r<t;++r)e.push(\"n\"+r);for(r=1;r<t;++r)e.push(\"d\"+r);for(r=1;r<t;++r)e.push(\"e\"+r);for(r=1;r<t;++r)e.push(\"f\"+r);return e}var a=t(\"typedarray-pool\"),o=32;e.exports=function(t,e){var r=[\"'use strict'\"],a=[\"ndarraySortWrapper\",t.join(\"d\"),e].join(\"\");r.push([\"function \",a,\"(\",[\"array\"].join(\",\"),\"){\"].join(\"\"));for(var s=[\"data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride\"],l=0;l<t.length;++l)s.push([\"s\",l,\"=stride[\",l,\"]|0,n\",l,\"=shape[\",l,\"]|0\"].join(\"\"));var c=new Array(t.length),u=[];for(l=0;l<t.length;++l)0!==(p=t[l])&&(0===u.length?c[p]=\"1\":c[p]=u.join(\"*\"),u.push(\"n\"+p));var f=-1,h=-1;for(l=0;l<t.length;++l){var d=t[l];0!==d&&(f>0?s.push([\"d\",d,\"=s\",d,\"-d\",f,\"*n\",f].join(\"\")):s.push([\"d\",d,\"=s\",d].join(\"\")),f=d);var p;0!=(p=t.length-1-l)&&(h>0?s.push([\"e\",p,\"=s\",p,\"-e\",h,\"*n\",h,\",f\",p,\"=\",c[p],\"-f\",h,\"*n\",h].join(\"\")):s.push([\"e\",p,\"=s\",p,\",f\",p,\"=\",c[p]].join(\"\")),h=p)}r.push(\"var \"+s.join(\",\"));var m=[\"0\",\"n0-1\",\"data\",\"offset\"].concat(i(t.length));r.push([\"if(n0<=\",o,\"){\",\"insertionSort(\",m.join(\",\"),\")}else{\",\"quickSort(\",m.join(\",\"),\")}\"].join(\"\")),r.push(\"}return \"+a);var g=new Function(\"insertionSort\",\"quickSort\",r.join(\"\\n\")),v=function(t,e){function r(t){return\"generic\"===e?[\"data.get(\",t,\")\"].join(\"\"):[\"data[\",t,\"]\"].join(\"\")}function a(t,r){return\"generic\"===e?[\"data.set(\",t,\",\",r,\")\"].join(\"\"):[\"data[\",t,\"]=\",r].join(\"\")}var o=[\"'use strict'\"],s=[\"ndarrayInsertionSort\",t.join(\"d\"),e].join(\"\"),l=[\"left\",\"right\",\"data\",\"offset\"].concat(i(t.length)),c=n(e),u=[\"i,j,cptr,ptr=left*s0+offset\"];if(t.length>1){for(var f=[],h=1;h<t.length;++h)u.push(\"i\"+h),f.push(\"n\"+h);c?u.push(\"scratch=malloc(\"+f.join(\"*\")+\")\"):u.push(\"scratch=new Array(\"+f.join(\"*\")+\")\"),u.push(\"dptr\",\"sptr\",\"a\",\"b\")}else u.push(\"scratch\");if(o.push([\"function \",s,\"(\",l.join(\",\"),\"){var \",u.join(\",\")].join(\"\"),\"for(i=left+1;i<=right;++i){\",\"j=i;ptr+=s0\",\"cptr=ptr\"),t.length>1){for(o.push(\"dptr=0;sptr=ptr\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(\"scratch[dptr++]=\",r(\"sptr\")),h=0;h<t.length;++h)0!==(d=t[h])&&o.push(\"sptr+=d\"+d,\"}\");for(o.push(\"__g:while(j--\\x3eleft){\",\"dptr=0\",\"sptr=cptr-s0\"),h=1;h<t.length;++h)1===h&&o.push(\"__l:\"),o.push([\"for(i\",h,\"=0;i\",h,\"<n\",h,\";++i\",h,\"){\"].join(\"\"));for(o.push([\"a=\",r(\"sptr\"),\"\\nb=scratch[dptr]\\nif(a<b){break __g}\\nif(a>b){break __l}\"].join(\"\")),h=t.length-1;h>=1;--h)o.push(\"sptr+=e\"+h,\"dptr+=f\"+h,\"}\");for(o.push(\"dptr=cptr;sptr=cptr-s0\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(a(\"dptr\",r(\"sptr\"))),h=0;h<t.length;++h)0!==(d=t[h])&&o.push([\"dptr+=d\",d,\";sptr+=d\",d].join(\"\"),\"}\");for(o.push(\"cptr-=s0\\n}\"),o.push(\"dptr=cptr;sptr=0\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(a(\"dptr\",\"scratch[sptr++]\")),h=0;h<t.length;++h){var d;0!==(d=t[h])&&o.push(\"dptr+=d\"+d,\"}\")}}else o.push(\"scratch=\"+r(\"ptr\"),\"while((j--\\x3eleft)&&(\"+r(\"cptr-s0\")+\">scratch)){\",a(\"cptr\",r(\"cptr-s0\")),\"cptr-=s0\",\"}\",a(\"cptr\",\"scratch\"));return o.push(\"}\"),t.length>1&&c&&o.push(\"free(scratch)\"),o.push(\"} return \"+s),c?new Function(\"malloc\",\"free\",o.join(\"\\n\"))(c[0],c[1]):new Function(o.join(\"\\n\"))()}(t,e);return g(v,function(t,e,r){function a(t){return[\"(offset+\",t,\"*s0)\"].join(\"\")}function s(t){return\"generic\"===e?[\"data.get(\",t,\")\"].join(\"\"):[\"data[\",t,\"]\"].join(\"\")}function l(t,r){return\"generic\"===e?[\"data.set(\",t,\",\",r,\")\"].join(\"\"):[\"data[\",t,\"]=\",r].join(\"\")}function c(e,r,n){if(1===e.length)_.push(\"ptr0=\"+a(e[0]));else for(var i=0;i<e.length;++i)_.push([\"b_ptr\",i,\"=s0*\",e[i]].join(\"\"));for(r&&_.push(\"pivot_ptr=0\"),_.push(\"ptr_shift=offset\"),i=t.length-1;i>=0;--i)0!==(o=t[i])&&_.push([\"for(i\",o,\"=0;i\",o,\"<n\",o,\";++i\",o,\"){\"].join(\"\"));if(e.length>1)for(i=0;i<e.length;++i)_.push([\"ptr\",i,\"=b_ptr\",i,\"+ptr_shift\"].join(\"\"));for(_.push(n),r&&_.push(\"++pivot_ptr\"),i=0;i<t.length;++i){var o;0!==(o=t[i])&&(e.length>1?_.push(\"ptr_shift+=d\"+o):_.push(\"ptr0+=d\"+o),_.push(\"}\"))}}function u(e,r,n,i){if(1===r.length)_.push(\"ptr0=\"+a(r[0]));else{for(var o=0;o<r.length;++o)_.push([\"b_ptr\",o,\"=s0*\",r[o]].join(\"\"));_.push(\"ptr_shift=offset\")}for(n&&_.push(\"pivot_ptr=0\"),e&&_.push(e+\":\"),o=1;o<t.length;++o)_.push([\"for(i\",o,\"=0;i\",o,\"<n\",o,\";++i\",o,\"){\"].join(\"\"));if(r.length>1)for(o=0;o<r.length;++o)_.push([\"ptr\",o,\"=b_ptr\",o,\"+ptr_shift\"].join(\"\"));for(_.push(i),o=t.length-1;o>=1;--o)n&&_.push(\"pivot_ptr+=f\"+o),r.length>1?_.push(\"ptr_shift+=e\"+o):_.push(\"ptr0+=e\"+o),_.push(\"}\")}function f(){t.length>1&&k&&_.push(\"free(pivot1)\",\"free(pivot2)\")}function h(e,r){var n=\"el\"+e,i=\"el\"+r;if(t.length>1){var o=\"__l\"+ ++A;u(o,[n,i],!1,[\"comp=\",s(\"ptr0\"),\"-\",s(\"ptr1\"),\"\\n\",\"if(comp>0){tmp0=\",n,\";\",n,\"=\",i,\";\",i,\"=tmp0;break \",o,\"}\\n\",\"if(comp<0){break \",o,\"}\"].join(\"\"))}else _.push([\"if(\",s(a(n)),\">\",s(a(i)),\"){tmp0=\",n,\";\",n,\"=\",i,\";\",i,\"=tmp0}\"].join(\"\"))}function d(e,r){t.length>1?c([e,r],!1,l(\"ptr0\",s(\"ptr1\"))):_.push(l(a(e),s(a(r))))}function p(e,r,n){if(t.length>1){var i=\"__l\"+ ++A;u(i,[r],!0,[e,\"=\",s(\"ptr0\"),\"-pivot\",n,\"[pivot_ptr]\\n\",\"if(\",e,\"!==0){break \",i,\"}\"].join(\"\"))}else _.push([e,\"=\",s(a(r)),\"-pivot\",n].join(\"\"))}function m(e,r){t.length>1?c([e,r],!1,[\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",\"tmp\")].join(\"\")):_.push([\"ptr0=\",a(e),\"\\n\",\"ptr1=\",a(r),\"\\n\",\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",\"tmp\")].join(\"\"))}function g(e,r,n){t.length>1?(c([e,r,n],!1,[\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",s(\"ptr2\")),\"\\n\",l(\"ptr2\",\"tmp\")].join(\"\")),_.push(\"++\"+r,\"--\"+n)):_.push([\"ptr0=\",a(e),\"\\n\",\"ptr1=\",a(r),\"\\n\",\"ptr2=\",a(n),\"\\n\",\"++\",r,\"\\n\",\"--\",n,\"\\n\",\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",s(\"ptr2\")),\"\\n\",l(\"ptr2\",\"tmp\")].join(\"\"))}function v(t,e){m(t,e),_.push(\"--\"+e)}function y(e,r,n){t.length>1?c([e,r],!0,[l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",[\"pivot\",n,\"[pivot_ptr]\"].join(\"\"))].join(\"\")):_.push(l(a(e),s(a(r))),l(a(r),\"pivot\"+n))}function x(e,r){_.push([\"if((\",r,\"-\",e,\")<=\",o,\"){\\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 b(e,r,n){t.length>1?(_.push([\"__l\",++A,\":while(true){\"].join(\"\")),c([e],!0,[\"if(\",s(\"ptr0\"),\"!==pivot\",r,\"[pivot_ptr]){break __l\",A,\"}\"].join(\"\")),_.push(n,\"}\")):_.push([\"while(\",s(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;E<t.length;++E)S.push(\"n\"+E),T.push(\"i\"+E);for(E=0;E<8;++E)T.push(\"b_ptr\"+E);T.push(\"ptr3\",\"ptr4\",\"ptr5\",\"ptr6\",\"ptr7\",\"pivot_ptr\",\"ptr_shift\",\"elementSize=\"+S.join(\"*\")),k?T.push(\"pivot1=malloc(elementSize)\",\"pivot2=malloc(elementSize)\"):T.push(\"pivot1=new Array(elementSize),pivot2=new Array(elementSize)\")}else T.push(\"pivot1\",\"pivot2\");return _.push(\"var \"+T.join(\",\")),h(1,2),h(4,5),h(1,3),h(2,3),h(1,4),h(3,4),h(2,5),h(2,3),h(4,5),t.length>1?c([\"el1\",\"el2\",\"el3\",\"el4\",\"el5\",\"index1\",\"index3\",\"index5\"],!0,[\"pivot1[pivot_ptr]=\",s(\"ptr1\"),\"\\n\",\"pivot2[pivot_ptr]=\",s(\"ptr3\"),\"\\n\",\"pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\\n\",\"x=\",s(\"ptr0\"),\"\\n\",\"y=\",s(\"ptr2\"),\"\\n\",\"z=\",s(\"ptr4\"),\"\\n\",l(\"ptr5\",\"x\"),\"\\n\",l(\"ptr6\",\"y\"),\"\\n\",l(\"ptr7\",\"z\")].join(\"\")):_.push([\"pivot1=\",s(a(\"el2\")),\"\\n\",\"pivot2=\",s(a(\"el4\")),\"\\n\",\"pivots_are_equal=pivot1===pivot2\\n\",\"x=\",s(a(\"el1\")),\"\\n\",\"y=\",s(a(\"el3\")),\"\\n\",\"z=\",s(a(\"el5\")),\"\\n\",l(a(\"index1\"),\"x\"),\"\\n\",l(a(\"index3\"),\"y\"),\"\\n\",l(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(--great<k){break}\"),_.push(\"continue\"),_.push(\"}else{\"),p(\"comp\",\"great\",1),_.push(\"if(comp<0){\"),g(\"k\",\"less\",\"great\"),_.push(\"}else{\"),v(\"k\",\"great\"),_.push(\"}\"),_.push(\"break\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),y(\"left\",\"(less-1)\",1),y(\"right\",\"(great+1)\",2),x(\"left\",\"(less-2)\"),x(\"(great+2)\",\"right\"),_.push(\"if(pivots_are_equal){\"),f(),_.push(\"return\"),_.push(\"}\"),_.push(\"if(less<index1&&great>index5){\"),b(\"less\",1,\"++less\"),b(\"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(--great<k){break}\"),_.push(\"continue\"),_.push(\"}else{\"),p(\"comp\",\"great\",1),_.push(\"if(comp<0){\"),g(\"k\",\"less\",\"great\"),_.push(\"}else{\"),v(\"k\",\"great\"),_.push(\"}\"),_.push(\"break\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),f(),x(\"less\",\"great\"),_.push(\"}return \"+w),t.length>1&&k?new Function(\"insertionSort\",\"malloc\",\"free\",_.join(\"\\n\"))(r,k[0],k[1]):new Function(\"insertionSort\",_.join(\"\\n\"))(r)}(t,e,v))}},{\"typedarray-pool\":554}],456:[function(t,e,r){\"use strict\";var n=t(\"./lib/compile_sort.js\"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(\":\"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{\"./lib/compile_sort.js\":455}],457:[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\":119,\"ndarray-linear-interpolate\":451}],458:[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;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(n);var i=new Array(r.length);for(t=0;t<i.length;++t)i[t]=r[t][1];return i}function a(t,e){var r=[\"View\",e,\"d\",t].join(\"\");e<0&&(r=\"View_Nil\"+t);var n=\"generic\"===t;if(-1===e){var a=\"function \"+r+\"(a){this.data=a;};var proto=\"+r+\".prototype;proto.dtype='\"+t+\"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new \"+r+\"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_\"+r+\"(a){return new \"+r+\"(a);}\";return new Function(a)()}if(0===e){a=\"function \"+r+\"(a,d) {this.data = a;this.offset = d};var proto=\"+r+\".prototype;proto.dtype='\"+t+\"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function \"+r+\"_copy() {return new \"+r+\"(this.data,this.offset)};proto.pick=function \"+r+\"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function \"+r+\"_get(){return \"+(n?\"this.data.get(this.offset)\":\"this.data[this.offset]\")+\"};proto.set=function \"+r+\"_set(v){return \"+(n?\"this.data.set(this.offset,v)\":\"this.data[this.offset]=v\")+\"};return function construct_\"+r+\"(a,b,c,d){return new \"+r+\"(a,d)}\";return new Function(\"TrivialArray\",a)(c[t][0])}a=[\"'use strict'\"];var s=o(e),l=s.map(function(t){return\"i\"+t}),u=\"this.offset+\"+s.map(function(t){return\"this.stride[\"+t+\"]*i\"+t}).join(\"+\"),f=s.map(function(t){return\"b\"+t}).join(\",\"),h=s.map(function(t){return\"c\"+t}).join(\",\");a.push(\"function \"+r+\"(a,\"+f+\",\"+h+\",d){this.data=a\",\"this.shape=[\"+f+\"]\",\"this.stride=[\"+h+\"]\",\"this.offset=d|0}\",\"var proto=\"+r+\".prototype\",\"proto.dtype='\"+t+\"'\",\"proto.dimension=\"+e),a.push(\"Object.defineProperty(proto,'size',{get:function \"+r+\"_size(){return \"+s.map(function(t){return\"this.shape[\"+t+\"]\"}).join(\"*\"),\"}})\"),1===e?a.push(\"proto.order=[0]\"):(a.push(\"Object.defineProperty(proto,'order',{get:\"),e<4?(a.push(\"function \"+r+\"_order(){\"),2===e?a.push(\"return (Math.abs(this.stride[0])>Math.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(\"+l.join(\",\")+\",v){\"),n?a.push(\"return this.data.set(\"+u+\",v)}\"):a.push(\"return this.data[\"+u+\"]=v}\"),a.push(\"proto.get=function \"+r+\"_get(\"+l.join(\",\")+\"){\"),n?a.push(\"return this.data.get(\"+u+\")}\"):a.push(\"return this.data[\"+u+\"]}\"),a.push(\"proto.index=function \"+r+\"_index(\",l.join(),\"){return \"+u+\"}\"),a.push(\"proto.hi=function \"+r+\"_hi(\"+l.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 d=s.map(function(t){return\"a\"+t+\"=this.shape[\"+t+\"]\"}),p=s.map(function(t){return\"c\"+t+\"=this.stride[\"+t+\"]\"});a.push(\"proto.lo=function \"+r+\"_lo(\"+l.join(\",\")+\"){var b=this.offset,d=0,\"+d.join(\",\")+\",\"+p.join(\",\"));for(var m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'&&i\"+m+\">=0){d=i\"+m+\"|0;b+=c\"+m+\"*d;a\"+m+\"-=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(\"+l.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(m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'){d=i\"+m+\"|0;if(d<0){c+=b\"+m+\"*(a\"+m+\"-1);a\"+m+\"=ceil(-a\"+m+\"/d)}else{a\"+m+\"=ceil(a\"+m+\"/d)}b\"+m+\"*=d}\");a.push(\"return new \"+r+\"(this.data,\"+s.map(function(t){return\"a\"+t}).join(\",\")+\",\"+s.map(function(t){return\"b\"+t}).join(\",\")+\",c)}\");var g=new Array(e),v=new Array(e);for(m=0;m<e;++m)g[m]=\"a[i\"+m+\"]\",v[m]=\"b[i\"+m+\"]\";a.push(\"proto.transpose=function \"+r+\"_transpose(\"+l+\"){\"+l.map(function(t,e){return t+\"=(\"+t+\"===undefined?\"+e+\":\"+t+\"|0)\"}).join(\";\"),\"var a=this.shape,b=this.stride;return new \"+r+\"(this.data,\"+g.join(\",\")+\",\"+v.join(\",\")+\",this.offset)}\"),a.push(\"proto.pick=function \"+r+\"_pick(\"+l+\"){var a=[],b=[],c=this.offset\");for(m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'&&i\"+m+\">=0){c=(c+this.stride[\"+m+\"]*i\"+m+\")|0}else{a.push(this.shape[\"+m+\"]);b.push(this.stride[\"+m+\"])}\");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)}\");return new Function(\"CTOR_LIST\",\"ORDER\",a.join(\"\\n\"))(c[t],i)}var o=t(\"iota-array\"),s=t(\"is-buffer\"),l=\"undefined\"!=typeof Float64Array,c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);\"number\"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var i=e.length;if(void 0===r){r=new Array(i);for(var o=i-1,u=1;o>=0;--o)r[o]=u,u*=e[o]}if(void 0===n)for(n=0,o=0;o<i;++o)r[o]<0&&(n-=(e[o]-1)*r[o]);for(var f=function(t){if(s(t))return\"buffer\";if(l)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\"}(t),h=c[f];h.length<=i+1;)h.push(a(f,h.length-1));return(0,h[i+1])(t,e,r,n)}},{\"iota-array\":281,\"is-buffer\":283}],459:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=Math.pow(2,-1074),a=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);return e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},{\"double-bits\":131}],460:[function(t,e,r){function n(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function i(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function a(t,e,r,n,i,s,u,f,h,d){if(d)M=d[0],k=d[1],_=d[2],w=d[3];else{var p=o(t,e,-i);t=p.x,e=p.y;var m=(t-(f=(p=o(f,h,-i)).x))/2,g=(e-(h=p.y))/2,v=m*m/(r*r)+g*g/(n*n);v>1&&(r*=v=Math.sqrt(v),n*=v);var y=r*r,x=n*n,b=(s==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var _=b*r*g/n+(t+f)/2,w=b*-n*m/r+(e+h)/2,M=Math.asin(((e-w)/n).toFixed(9)),k=Math.asin(((h-w)/n).toFixed(9));M=t<_?l-M:M,k=f<_?l-k:k,M<0&&(M=2*l+M),k<0&&(k=2*l+k),u&&M>k&&(M-=2*l),!u&&k>M&&(k-=2*l)}if(Math.abs(k-M)>c){var A=k,T=f,S=h;k=M+c*(u&&k>M?1:-1);var E=a(f=_+r*Math.cos(k),h=w+n*Math.sin(k),r,n,i,0,u,T,S,[k,A,_,w])}var L=Math.tan((k-M)/4),C=4/3*r*L,z=4/3*n*L,D=[2*t-(t+C*Math.sin(M)),2*e-(e-z*Math.cos(M)),f+C*Math.sin(k),h-z*Math.cos(k),f,h];if(d)return D;E&&(D=D.concat(E));for(var I=0;I<D.length;){var P=o(D[I],D[I+1],i);D[I++]=P.x,D[I++]=P.y}return D}function o(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function s(t){return t*(l/180)}var l=Math.PI,c=s(120);e.exports=function(t){for(var e,r=[],o=0,l=0,c=0,u=0,f=null,h=null,d=0,p=0,m=0,g=t.length;m<g;m++){var v=t[m],y=v[0];switch(y){case\"M\":c=v[1],u=v[2];break;case\"A\":(v=a(d,p,v[1],v[2],s(v[3]),v[4],v[5],v[6],v[7])).unshift(\"C\"),v.length>7&&(r.push(v.splice(0,7)),v.unshift(\"C\"));break;case\"S\":var x=d,b=p;\"C\"!=e&&\"S\"!=e||(x+=x-o,b+=b-l),v=[\"C\",x,b,v[1],v[2],v[3],v[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(f=2*d-f,h=2*p-h):(f=d,h=p),v=i(d,p,f,h,v[1],v[2]);break;case\"Q\":f=v[1],h=v[2],v=i(d,p,v[1],v[2],v[3],v[4]);break;case\"L\":v=n(d,p,v[1],v[2]);break;case\"H\":v=n(d,p,v[1],p);break;case\"V\":v=n(d,p,d,v[1]);break;case\"Z\":v=n(d,p,c,u)}e=y,d=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],l=v[v.length-3]):(o=d,l=p),r.push(v)}return r}},{}],461:[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;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f<s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],d=e[c],p=e[u],m=new Array(3),g=0,v=new Array(3),y=0,x=0;x<3;++x)m[x]=h[x]-d[x],g+=m[x]*m[x],v[x]=p[x]-d[x],y+=v[x]*v[x];if(g*y>a){var b=i[c],_=1/Math.sqrt(g*y);for(x=0;x<3;++x){var w=(x+1)%3,M=(x+2)%3;b[x]+=_*(v[w]*m[M]-v[M]*m[w])}}}for(o=0;o<n;++o){b=i[o];var k=0;for(x=0;x<3;++x)k+=b[x]*b[x];if(k>a)for(_=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=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;o<n;++o){for(var s=t[o],l=new Array(3),c=0;c<3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),d=0;for(c=0;c<3;++c){var p=(c+1)%3,m=(c+2)%3;h[c]=u[p]*f[m]-u[m]*f[p],d+=h[c]*h[c]}d=d>a?1/Math.sqrt(d):0;for(c=0;c<3;++c)h[c]*=d;i[o]=h}return i}},{}],462:[function(t,e,r){\"use strict\";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=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,o,s=function(t){if(null===t||void 0===t)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}(t),l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var c in r)i.call(r,c)&&(s[c]=r[c]);if(n){o=n(r);for(var u=0;u<o.length;u++)a.call(r,o[u])&&(s[o[u]]=r[o[u]])}}return s}},{}],463:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f>0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c);f=Math.sqrt(2*h-u+1),e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],464:[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=s([r]),this.center=s(e),this.rotation=s(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)}e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),a(r=[].slice.call(r,0,4),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};var s=t(\"filtered-vector\"),l=t(\"gl-mat4/lookAt\"),c=t(\"gl-mat4/fromQuat\"),u=t(\"gl-mat4/invert\"),f=t(\"./lib/quatFromFrame\"),h=o.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.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,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.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},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.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],c=n(o,s,l);o/=c,s/=c,l/=c;var u=a[0],f=a[4],h=a[8],d=u*o+f*s+h*l,p=n(u-=o*d,f-=s*d,h-=l*d);u/=p,f/=p,h/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,x=m*u+g*f+v*h,b=n(m-=y*o+x*u,g-=y*s+x*f,v-=y*l+x*h);m/=b,g/=b,v/=b;var _=u*e+o*r,w=f*e+s*r,M=h*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))},h.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],c=o[8],u=o[1],f=o[5],h=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*u,v=e*l+r*f,y=e*c+r*h,x=-(p*y-m*v),b=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),M=i(x,b,_,w);M>1e-6?(x/=M,b/=M,_/=M,w/=M):(x=b=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*x+T*_-S*b,C=T*w+E*b+S*x-A*_,z=S*w+E*_+A*b-T*x,D=E*w-A*x-T*b-S*_;if(a){x=d,b=p,_=m;var I=Math.sin(a)/n(x,b,_);x*=I,b*=I,_*=I,D=D*(w=Math.cos(e))-(L=L*w+D*x+C*_-z*b)*x-(C=C*w+D*b+z*x-L*_)*b-(z=z*w+D*_+L*b-C*x)*_}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)},h.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;l(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,c=0;c<3;++c)s+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.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;u(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 c=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*c,s-n[6]*c,l-n[10]*c),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.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},h.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])]},h.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]}},h.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\":463,\"filtered-vector\":142,\"gl-mat4/fromQuat\":183,\"gl-mat4/invert\":186,\"gl-mat4/lookAt\":187}],465:[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\":507}],466:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),\"m\"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o=\"l\",r=\"m\"==r?\"l\":\"L\");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length<n[o])throw new Error(\"malformed path data\");e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi,a=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi},{}],467:[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}},{}],468:[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<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var i=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/,a=function(t){return i.exec(t).slice(1)};r.resolve=function(){for(var r=\"\",i=!1,a=arguments.length-1;a>=-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(\"/\"))||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<t.length&&\"\"===t[e];e++);for(var r=t.length-1;r>=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;l<o;l++)if(i[l]!==a[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push(\"..\");return(c=c.concat(a.slice(s))).join(\"/\")},r.sep=\"/\",r.delimiter=\":\",r.dirname=function(t){var e=a(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):\".\"},r.basename=function(t,e){var r=a(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return a(t)[3]};var o=\"b\"===\"ab\".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t(\"_process\"))},{_process:488}],469:[function(t,e,r){\"use strict\";function n(t){var e;t&&t.length&&(t=(e=t).length);var r=new Uint8Array(t||0);return e&&r.set(e),r.readUInt32LE=a.readUInt32LE,r.writeUInt32LE=a.writeUInt32LE,r.readInt32LE=a.readInt32LE,r.writeInt32LE=a.writeInt32LE,r.readFloatLE=a.readFloatLE,r.writeFloatLE=a.writeFloatLE,r.readDoubleLE=a.readDoubleLE,r.writeDoubleLE=a.writeDoubleLE,r.toString=a.toString,r.write=a.write,r.slice=a.slice,r.copy=a.copy,r._isBuffer=!0,r}function i(t){for(var e,r,n=t.length,i=[],a=0;a<n;a++){if((e=t.charCodeAt(a))>55295&&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<r;a++){var o=this[a];o<=127?(n+=decodeURIComponent(i)+String.fromCharCode(o),i=\"\"):i+=\"%\"+o.toString(16)}return n+=decodeURIComponent(i)},write:function(t,e){for(var r=t===o?s:i(t),n=0;n<r.length;n++)this[e+n]=r[n]},slice:function(t,e){return this.subarray(t,e)},copy:function(t,e){e=e||0;for(var r=0;r<this.length;r++)t[e+r]=this[r]}}).writeInt32LE=a.writeUInt32LE,n.byteLength=function(t){return o=t,(s=i(t)).length},n.isBuffer=function(t){return!(!t||!t._isBuffer)}},{ieee754:277}],470:[function(t,e,r){(function(r){\"use strict\";function n(t){this.buf=d.isBuffer(t)?t:new d(t||0),this.pos=0,this.length=this.buf.length}function i(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function a(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function o(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function s(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function l(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function u(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}e.exports=n;var d=r.Buffer||t(\"./buffer\");n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;var p=Math.pow(2,63);n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>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:function(t,e){var r,n=e.buf;if(r=n[e.pos++],t+=268435456*(127&r),r<128)return t;if(r=n[e.pos++],t+=34359738368*(127&r),r<128)return t;if(r=n[e.pos++],t+=4398046511104*(127&r),r<128)return t;if(r=n[e.pos++],t+=562949953421312*(127&r),r<128)return t;if(r=n[e.pos++],t+=72057594037927940*(127&r),r<128)return t;if(r=n[e.pos++],t+=0x8000000000000000*(127&r),r<128)return t;throw new Error(\"Expected varint not more than 10 bytes\")}(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e<p)return e;for(var r=this.pos-2;255===this.buf[r];)r--;r<t&&(r=t),e=0;for(var n=0;n<r-t+1;n++){var i=127&~this.buf[t+n];e+=n<4?i<<7*n:i*Math.pow(2,7*n)}return-e-1},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.buf.toString(\"utf8\",this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.slice(this.pos,t);return this.pos=t,e},readPackedVarint:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readVarint());return e},readPackedSVarint:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);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;e<this.pos+t;)e*=2;if(e!==this.length){var r=new d(e);this.buf.copy(r),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.slice(0,this.length)},writeFixed32:function(t){this.realloc(4),this.buf.writeUInt32LE(t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),this.buf.writeInt32LE(t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),this.buf.writeInt32LE(-1&t,this.pos),this.buf.writeUInt32LE(Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),this.buf.writeInt32LE(-1&t,this.pos),this.buf.writeInt32LE(Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t)>268435455?function(t,e){e.realloc(10);for(var r=e.pos+10;t>=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}}(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=d.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<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&function(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]}(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,i,e)},writePackedSVarint:function(t,e){this.writeMessage(t,a,e)},writePackedBoolean:function(t,e){this.writeMessage(t,l,e)},writePackedFloat:function(t,e){this.writeMessage(t,o,e)},writePackedDouble:function(t,e){this.writeMessage(t,s,e)},writePackedFixed32:function(t,e){this.writeMessage(t,c,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,u,e)},writePackedFixed64:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,h,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\":469}],471:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(e<n){for(var r=1,a=0;a<e;++a)for(var o=0;o<a;++o)if(t[a]<t[o])r=-r;else if(t[a]===t[o])return 0;return r}var s=i.mallocUint8(e);for(a=0;a<e;++a)s[a]=0;for(r=1,a=0;a<e;++a)if(!s[a]){var l=1;for(s[a]=1,o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(\"typedarray-pool\")},{\"typedarray-pool\":554}],472:[function(t,e,r){\"use strict\";var n=t(\"typedarray-pool\"),i=t(\"invert-permutation\");r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o<e;++o)s[o]=t[o];for(o=e-1;o>0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(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]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a<t;++a)r[a]=a,o=o*a|0;for(a=t-1;a>0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{\"invert-permutation\":280,\"typedarray-pool\":554}],473:[function(t,e,r){\"use strict\";function n(t){return i[t]?i[t]:(\"string\"==typeof t&&(t=i[t]=t.split(/\\s*,\\s*|\\s+/)),t)}e.exports=function(t,e,r){var i,a,o={};if(\"string\"==typeof e&&(e=n(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(i in e)e[i]=n(e[i]);var l={};for(i in e){var c=e[i];if(Array.isArray(c))for(a=0;a<c.length;a++){var u=c[a];if(r&&(l[u]=!0),u in t){if(o[i]=t[u],r)for(var f=a;f<c.length;f++)l[c[f]]=!0;break}}else i in t&&(e[i]&&(o[i]=t[i]),r&&(l[i]=!0))}if(r)for(i in t)l[i]||(o[i]=t[i]);return o};var i={}},{}],474:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(t,e){var r=c[e][t[e]];r.splice(r.indexOf(t),1)}function i(t,i,a){for(var o,s,l,u=0;u<2;++u)if(c[u][i].length>0){o=c[u][i][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=c[f][i],d=0;d<h.length;++d){var p=h[d],m=p[1^f];n(e[t],e[i],e[s],e[m])>0&&(o=p,s=m,l=f)}return a?s:(o&&r(o,l),s)}function a(t,a){var o=c[a][t][0],s=[t];r(o,a);for(var l=o[1^a];;){for(;l!==t;)s.push(l),l=i(s[s.length-2],l,!1);if(c[0][t].length+c[1][t].length===0)break;var u=s[s.length-1],f=t,h=s[1],d=i(u,f,!0);if(n(e[u],e[f],e[h],e[d])<0)break;s.push(t),l=i(u,f)}return s}function o(t,e){return e[1]===e[e.length-1]}for(var s=0|e.length,l=t.length,c=[new Array(s),new Array(s)],u=0;u<s;++u)c[0][u]=[],c[1][u]=[];for(u=0;u<l;++u){var f=t[u];c[0][f[0]].push(f),c[1][f[1]].push(f)}var h=[];for(u=0;u<s;++u)c[0][u].length+c[1][u].length===0&&h.push([u]);for(u=0;u<s;++u)for(var d=0;d<2;++d){for(var p=[];c[d][u].length>0;){c[0][u].length;var m=a(u,d);o(0,m)?p.push.apply(p,m):(p.length>0&&h.push(p),p=m)}p.length>0&&h.push(p)}return h};var n=t(\"compare-angle\")},{\"compare-angle\":106}],475:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){i[d=o.pop()]=!1;var c=r[d];for(s=0;s<c.length;++s){var u=c[s];0==--a[u]&&o.push(u)}}var f=new Array(e.length),h=[];for(s=0;s<e.length;++s)if(i[s]){var d=h.length;f[s]=d,h.push(e[s])}else f[s]=-1;var p=[];for(s=0;s<t.length;++s){var m=t[s];i[m[0]]&&i[m[1]]&&p.push([f[m[0]],f[m[1]]])}return[p,h]};var n=t(\"edges-to-adjacency-list\")},{\"edges-to-adjacency-list\":136}],476:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}e.exports=function(t,e){function r(t){for(var e=t.length,r=0;r<e;++r)if(!C[t[r]])return!1;return!0}t=(R=u(t,e))[0];for(var f=(e=R[1]).length,h=(t.length,i(t,e.length)),d=0;d<f;++d)if(h[d].length%2==1)throw new Error(\"planar-graph-to-polyline: graph must be manifold\");var p=a(t,e),m=(p=p.filter(function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],o=e[t[(i+1)%r]],c=s(-a[0],a[1]),u=s(-a[0],o[1]),f=s(o[0],a[1]),h=s(o[0],o[1]);n=l(n,l(l(c,u),l(f,h)))}return n[n.length-1]>0})).length,g=new Array(m),v=new Array(m);for(d=0;d<m;++d){g[d]=d;var y=new Array(m),x=p[d].map(function(t){return e[t]}),b=o([x]),_=0;t:for(var w=0;w<m;++w)if(y[w]=0,d!==w){for(var M=(H=p[w]).length,k=0;k<M;++k){var A=b(e[H[k]]);if(0!==A){A<0&&(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}v[d]=[_,d,y]}for(v.sort(function(t,e){return e[0]-t[0]}),d=0;d<m;++d){var T=(y=v[d])[1],S=y[2];for(w=0;w<m;++w)S[w]&&(g[w]=T)}var E=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(m);for(d=0;d<m;++d)E[d].push(g[d]),E[g[d]].push(d);var L={},C=n(f,!1);for(d=0;d<m;++d)for(M=(H=p[d]).length,w=0;w<M;++w){var z=H[w],D=H[(w+1)%M],I=Math.min(z,D)+\":\"+Math.max(z,D);if(I in L){var P=L[I];E[P].push(d),E[d].push(P),C[z]=C[D]=!0}else L[I]=d}var O=[],F=n(m,-1);for(d=0;d<m;++d)g[d]!==d||r(p[d])?F[d]=-1:(O.push(d),F[d]=0);for(var R=[];O.length>0;){var N=O.pop(),j=E[N];c(j,function(t,e){return t-e});var B,U=j.length,V=F[N];for(0===V&&(B=[H=p[N]]),d=0;d<U;++d){var q=j[d];if(!(F[q]>=0)&&(F[q]=1^V,O.push(q),0===V)){var H;r(H=p[q])||(H.reverse(),B.push(H))}}0===V&&R.push(B)}return R};var i=t(\"edges-to-adjacency-list\"),a=t(\"planar-dual\"),o=t(\"point-in-big-polygon\"),s=t(\"two-product\"),l=t(\"robust-sum\"),c=t(\"uniq\"),u=t(\"./lib/trim-leaves\")},{\"./lib/trim-leaves\":475,\"edges-to-adjacency-list\":136,\"planar-dual\":474,\"point-in-big-polygon\":478,\"robust-sum\":520,\"two-product\":552,uniq:556}],477:[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}},{}],478:[function(t,e,r){function n(){return!0}function i(t){for(var e={},r=0;r<t.length;++r){var i=t[r],a=i[0][0],o=i[0][1],s=i[1][1],c=[Math.min(o,s),Math.max(o,s)];a in e?e[a].push(c):e[a]=[c]}var u={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];u[f[r]]=l(h)}return function(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}(u)}function a(t){return 1}e.exports=function(t){for(var e=t.length,r=[],n=[],l=0;l<e;++l)for(var u=t[l],f=u.length,h=f-1,d=0;d<f;h=d++){var p=u[h],m=u[d];p[0]===m[0]?n.push([p,m]):r.push([p,m])}if(0===r.length)return 0===n.length?a:function(t){return function(e){return t(e[0],e[1])?0:1}}(i(n));var g=s(r),v=function(t,e){return function(r){var n=c.le(e,r[0]);if(n<0)return 1;var i=t[n];if(!i){if(!(n>0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var s=i.key,l=o(r,s[0],s[1]);if(s[0][0]<s[1][0])if(l<0)i=i.left;else{if(!(l>0))return 0;a=-1,i=i.right}else if(l>0)i=i.left;else{if(!(l<0))return 0;a=1,i=i.right}}return a}}(g.slabs,g.coordinates);return 0===n.length?v:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(i(n),v)};var o=t(\"robust-orientation\")[3],s=t(\"slab-decomposition\"),l=t(\"interval-tree-1d\"),c=t(\"binary-search-bounds\")},{\"binary-search-bounds\":70,\"interval-tree-1d\":279,\"robust-orientation\":515,\"slab-decomposition\":532}],479:[function(t,e,r){function n(t,e,r){var n=i.segments(t),a=i.segments(e),o=r(i.combine(n,a));return i.polygon(o)}var i,a=t(\"./lib/build-log\"),o=t(\"./lib/epsilon\"),s=t(\"./lib/intersecter\"),l=t(\"./lib/segment-chainer\"),c=t(\"./lib/segment-selector\"),u=t(\"./lib/geojson\"),f=!1,h=o();i={buildLog:function(t){return!0===t?f=a():!1===t&&(f=!1),!1!==f&&f.list},epsilon:function(t){return h.epsilon(t)},segments:function(t){var e=s(!0,h,f);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:s(!1,h,f).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:c.union(t.combined,f),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:c.intersect(t.combined,f),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:c.difference(t.combined,f),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:c.differenceRev(t.combined,f),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:c.xor(t.combined,f),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:l(t.segments,h,f),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(i,t)},polygonToGeoJSON:function(t){return u.fromPolygon(i,h,t)},union:function(t,e){return n(t,e,i.selectUnion)},intersect:function(t,e){return n(t,e,i.selectIntersect)},difference:function(t,e){return n(t,e,i.selectDifference)},differenceRev:function(t,e){return n(t,e,i.selectDifferenceRev)},xor:function(t,e){return n(t,e,i.selectXor)}},\"object\"==typeof window&&(window.PolyBool=i),e.exports=i},{\"./lib/build-log\":480,\"./lib/epsilon\":481,\"./lib/geojson\":482,\"./lib/intersecter\":483,\"./lib/segment-chainer\":485,\"./lib/segment-selector\":486}],480:[function(t,e,r){e.exports=function(){function t(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}var e,r=0,n=!1;return e={list:[],segmentId:function(){return r++},checkIntersection:function(e,r){return t(\"check\",{seg1:e,seg2:r})},segmentChop:function(e,r){return t(\"div_seg\",{seg:e,pt:r}),t(\"chop\",{seg:e,pt:r})},statusRemove:function(e){return t(\"pop_seg\",{seg:e})},segmentUpdate:function(e){return t(\"seg_update\",{seg:e})},segmentNew:function(e,r){return t(\"new_seg\",{seg:e,primary:r})},segmentRemove:function(e){return t(\"rem_seg\",{seg:e})},tempStatus:function(e,r,n){return t(\"temp_status\",{seg:e,above:r,below:n})},rewind:function(e){return t(\"rewind\",{seg:e})},status:function(e,r,n){return t(\"status\",{seg:e,above:r,below:n})},vert:function(r){return r===n?e:(n=r,t(\"vert\",{x:r}))},log:function(e){return\"string\"!=typeof e&&(e=JSON.stringify(e,!1,\" \")),t(\"log\",{txt:e})},reset:function(){return t(\"reset\")},selected:function(e){return t(\"selected\",{segs:e})},chainStart:function(e){return t(\"chain_start\",{seg:e})},chainRemoveHead:function(e,r){return t(\"chain_rem_head\",{index:e,pt:r})},chainRemoveTail:function(e,r){return t(\"chain_rem_tail\",{index:e,pt:r})},chainNew:function(e,r){return t(\"chain_new\",{pt1:e,pt2:r})},chainMatch:function(e){return t(\"chain_match\",{index:e})},chainClose:function(e){return t(\"chain_close\",{index:e})},chainAddHead:function(e,r){return t(\"chain_add_head\",{index:e,pt:r})},chainAddTail:function(e,r){return t(\"chain_add_tail\",{index:e,pt:r})},chainConnect:function(e,r){return t(\"chain_con\",{index1:e,index2:r})},chainReverse:function(e){return t(\"chain_rev\",{index:e})},chainJoin:function(e,r){return t(\"chain_join\",{index1:e,index2:r})},done:function(){return t(\"done\")}}}},{}],481:[function(t,e,r){e.exports=function(t){\"number\"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return\"number\"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t)&&!(l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)<t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,d=(a*f-o*u)/c,p={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return p.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,p.alongB=d<=-t?-2:d<t?-1:d-1<=-t?0:d-1<t?1:2,p},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var c=r[l][0],u=r[l][1];u-i>t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],482:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}if(e.length<=0)return t.segments({inverted:!1,regions:[]});for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(\"Polygon\"===e.type)return t.polygon(r(e.coordinates));if(\"MultiPolygon\"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}function a(t,e){for(var r=0;r<t.children.length;r++){if(n(e,(s=t.children[r]).region))return void a(s,e)}var o=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(o.children.push(s),t.children.splice(r,1),r--)}t.children.push(o)}function o(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}function s(t){var e=[o(t.region,!1)];f.push(e);for(var r=0;r<t.children.length;r++)e.push(function(t){for(var e=0;e<t.children.length;e++)s(t.children[e]);return o(t.region,!0)}(t.children[r]))}r=t.polygon(t.segments(r));for(var l=i(null),c=0;c<r.regions.length;c++){var u=r.regions[c];u.length<3||a(l,u)}var f=[];for(c=0;c<l.children.length;c++)s(l.children[c]);return f.length<=0?{type:\"Polygon\",coordinates:[]}:1==f.length?{type:\"Polygon\",coordinates:f[0]}:{type:\"MultiPolygon\",coordinates:f}}};e.exports=n},{}],483:[function(t,e,r){var n=t(\"./linked-list\");e.exports=function(t,e,r){function i(t,e){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:null,below:null},otherFill:null}}function a(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}function o(t,r){u.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)<0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=a(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){function o(t){return c.findTransition(function(r){return function(t,r){var n=t.seg.start,i=t.seg.end,a=r.seg.start,o=r.seg.end;return e.pointsCollinear(n,a,o)?e.pointsCollinear(i,a,o)?1:e.pointAboveOrOnLine(i,a,o)?1:-1:e.pointAboveOrOnLine(n,a,o)?1:-1}(t,r.ev)>0})}function s(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),d=e.pointsSame(s,u);if(h&&d)return n;var p=!h&&e.pointBetween(o,c,u),m=!d&&e.pointBetween(s,c,u);if(h)return m?l(n,s):l(t,u),n;p&&(d||(m?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var c=n.create(),f=[];!u.isEmpty();){var h=u.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var d=o(h),p=d.before?d.before.ev:null,m=d.after?d.after.ev:null;r&&r.tempStatus(h.seg,!!p&&p.seg,!!m&&m.seg);var g=function(){if(p){var t=s(h,p);if(t)return t}return!!m&&s(h,m)}();if(g&&(t?(v=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(g.seg.myFill.above=!g.seg.myFill.above):g.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(g.seg),h.other.remove(),h.remove()),u.getHead()!==h){r&&r.rewind(h.seg);continue}if(t){var v;v=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=v?!h.seg.myFill.below:h.seg.myFill.below}else if(null===h.seg.otherFill){var y;y=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?a:i,h.seg.otherFill={above:y,below:y}}r&&r.status(h.seg,!!p&&p.seg,!!m&&m.seg),h.other.status=d.insert(n.node({ev:h}))}else{var x=h.status;if(null===x)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(c.exists(x.prev)&&c.exists(x.next)&&s(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!h.primary){var b=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=b}f.push(h.seg)}u.getHead().remove()}return r&&r.done(),f}var u=n.create();return t?{addRegion:function(t){for(var r,n=t[t.length-1],a=0;a<t.length;a++){r=n,n=t[a];var o=e.pointsCompare(r,n);0!==o&&s(i(o<0?r:n,o<0?n:r),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(a(t.start,t.end,t),!0)}),r.forEach(function(t){s(a(t.start,t.end,t),!1)}),c(e,n)}}}},{\"./linked-list\":484}],484:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],485:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){function a(t,e,r){return h.index=t,h.matches_head=e,h.matches_pt1=r,h===u?(h=f,!1):(h=null,!0)}function o(t){r&&r.chainReverse(t),n[t].reverse()}function s(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&&(r&&r.chainRemoveHead(i,c),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}var l=t.start,c=t.end;if(e.pointsSame(l,c))console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");else{r&&r.chainStart(t);for(var u={index:0,matches_head:!1,matches_pt1:!1},f={index:0,matches_head:!1,matches_pt1:!1},h=u,d=0;d<n.length;d++){var p=(x=n[d])[0],m=(x[1],x[x.length-1]);if(x[x.length-2],e.pointsSame(p,l)){if(a(d,!0,!0))break}else if(e.pointsSame(p,c)){if(a(d,!0,!1))break}else if(e.pointsSame(m,l)){if(a(d,!1,!0))break}else if(e.pointsSame(m,c)&&a(d,!1,!1))break}if(h===u)return n.push([l,c]),void(r&&r.chainNew(l,c));if(h===f){r&&r.chainMatch(u.index);var g=u.index,v=u.matches_pt1?c:l,y=u.matches_head,x=n[g],b=y?x[0]:x[x.length-1],_=y?x[1]:x[x.length-2],w=y?x[x.length-1]:x[0],M=y?x[x.length-2]:x[1];return e.pointsCollinear(_,b,v)&&(y?(r&&r.chainRemoveHead(u.index,v),x.shift()):(r&&r.chainRemoveTail(u.index,v),x.pop()),b=_),e.pointsSame(w,v)?(n.splice(g,1),e.pointsCollinear(M,w,b)&&(y?(r&&r.chainRemoveTail(u.index,b),x.pop()):(r&&r.chainRemoveHead(u.index,b),x.shift())),r&&r.chainClose(u.index),void i.push(x)):void(y?(r&&r.chainAddHead(u.index,v),x.unshift(v)):(r&&r.chainAddTail(u.index,v),x.push(v)))}var k=u.index,A=f.index;r&&r.chainConnect(k,A);var T=n[k].length<n[A].length;u.matches_head?f.matches_head?T?(o(k),s(k,A)):(o(A),s(A,k)):s(A,k):f.matches_head?s(k,A):T?(o(k),s(A,k)):(o(A),s(k,A))}}),i}},{}],486:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&&r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],487:[function(t,e,r){\"use strict\";var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,d=0,p=0;for(l=0;l<o.length;++l){var m=i[l],g=a[l],v=n[l];c+=m*m,u+=m*g,f+=g*g,h+=v*m,d+=v*g,p+=v*v}var y,x=Math.abs(c*f-u*u),b=u*d-f*h,_=u*h-c*d;if(b+_<=x)if(b<0)_<0&&h<0?(_=0,-h>=c?(b=1,y=c+2*h+p):y=h*(b=-h/c)+p):(b=0,d>=0?(_=0,y=p):-d>=f?(_=1,y=f+2*d+p):y=d*(_=-d/f)+p);else if(_<0)_=0,h>=0?(b=0,y=p):-h>=c?(b=1,y=c+2*h+p):y=h*(b=-h/c)+p;else{var w=1/x;y=(b*=w)*(c*b+u*(_*=w)+2*h)+_*(u*b+f*_+2*d)+p}else{var M,k,A,T;b<0?(k=f+d)>(M=u+h)?(A=k-M)>=(T=c-2*u+f)?(b=1,_=0,y=c+2*h+p):y=(b=A/T)*(c*b+u*(_=1-b)+2*h)+_*(u*b+f*_+2*d)+p:(b=0,k<=0?(_=1,y=f+2*d+p):d>=0?(_=0,y=p):y=d*(_=-d/f)+p):_<0?(k=c+h)>(M=u+d)?(A=k-M)>=(T=c-2*u+f)?(_=1,b=0,y=f+2*d+p):y=(b=1-(_=A/T))*(c*b+u*_+2*h)+_*(u*b+f*_+2*d)+p:(_=0,k<=0?(b=1,y=c+2*h+p):h>=0?(b=0,y=p):y=h*(b=-h/c)+p):(A=f+d-u-h)<=0?(b=0,_=1,y=f+2*d+p):A>=(T=c-2*u+f)?(b=1,_=0,y=c+2*h+p):y=(b=A/T)*(c*b+u*(_=1-b)+2*h)+_*(u*b+f*_+2*d)+p}var S=1-b-_;for(l=0;l<o.length;++l)s[l]=S*t[l]+b*e[l]+_*r[l];return y<0?0:y}},{}],488:[function(t,e,r){function n(){throw new Error(\"setTimeout has not been defined\")}function i(){throw new Error(\"clearTimeout has not been defined\")}function a(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var t=a(o);m=!0;for(var e=p.length;e;){for(d=p,p=[];++g<e;)d&&d[g].run();g=-1,e=p.length}d=null,m=!1,function(t){if(f===clearTimeout)return clearTimeout(t);if((f===i||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var u,f,h=e.exports={};!function(){try{u=\"function\"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{f=\"function\"==typeof clearTimeout?clearTimeout:i}catch(t){f=i}}();var d,p=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];p.push(new l(t,e)),1!==p.length||m||a(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title=\"browser\",h.browser=!0,h.env={},h.argv=[],h.version=\"\",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error(\"process.binding is not supported\")},h.cwd=function(){return\"/\"},h.chdir=function(t){throw new Error(\"process.chdir is not supported\")},h.umask=function(){return 0}},{}],489:[function(t,e,r){(function(t){!function(n){function i(t){throw new RangeError(z[t])}function a(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function o(t,e){var r=t.split(\"@\"),n=\"\";r.length>1&&(n=r[0]+\"@\",t=r[1]);return n+a((t=t.replace(C,\".\")).split(\".\"),e).join(\".\")}function s(t){for(var e,r,n=[],i=0,a=t.length;i<a;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<a?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function l(t){return a(t,function(t){var e=\"\";return t>65535&&(e+=P((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=P(t)}).join(\"\")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function u(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?I(t/k):t>>1,t+=I(t/e);t>D*w>>1;n+=b)t=I(t/D);return I(n+(D+1)*t/(t+M))}function h(t){var e,r,n,a,o,s,u,h,d,p,m=[],g=t.length,v=0,y=T,M=A;for((r=t.lastIndexOf(S))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&i(\"not-basic\"),m.push(t.charCodeAt(n));for(a=r>0?r+1:0;a<g;){for(o=v,s=1,u=b;a>=g&&i(\"invalid-input\"),((h=c(t.charCodeAt(a++)))>=b||h>I((x-v)/s))&&i(\"overflow\"),v+=h*s,d=u<=M?_:u>=M+w?w:u-M,!(h<d);u+=b)s>I(x/(p=b-d))&&i(\"overflow\"),s*=p;M=f(v-o,e=m.length+1,0==o),I(v/e)>x-y&&i(\"overflow\"),y+=I(v/e),v%=e,m.splice(v++,0,y)}return l(m)}function d(t){var e,r,n,a,o,l,c,h,d,p,m,g,v,y,M,k=[];for(g=(t=s(t)).length,e=T,r=0,o=A,l=0;l<g;++l)(m=t[l])<128&&k.push(P(m));for(n=a=k.length,a&&k.push(S);n<g;){for(c=x,l=0;l<g;++l)(m=t[l])>=e&&m<c&&(c=m);for(c-e>I((x-r)/(v=n+1))&&i(\"overflow\"),r+=(c-e)*v,e=c,l=0;l<g;++l)if((m=t[l])<e&&++r>x&&i(\"overflow\"),m==e){for(h=r,d=b;p=d<=o?_:d>=o+w?w:d-o,!(h<p);d+=b)M=h-p,y=b-p,k.push(P(u(p+M%y,0))),h=I(M/y);k.push(P(u(h,0))),o=f(r,v,n==a),r=0,++n}++r,++e}return k.join(\"\")}var p=\"object\"==typeof r&&r&&!r.nodeType&&r,m=\"object\"==typeof e&&e&&!e.nodeType&&e,g=\"object\"==typeof t&&t;g.global!==g&&g.window!==g&&g.self!==g||(n=g);var v,y,x=2147483647,b=36,_=1,w=26,M=38,k=700,A=72,T=128,S=\"-\",E=/^xn--/,L=/[^\\x20-\\x7E]/,C=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,z={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},D=b-_,I=Math.floor,P=String.fromCharCode;if(v={version:\"1.4.1\",ucs2:{decode:s,encode:l},decode:h,encode:d,toASCII:function(t){return o(t,function(t){return L.test(t)?\"xn--\"+d(t):t})},toUnicode:function(t){return o(t,function(t){return E.test(t)?h(t.slice(4).toLowerCase()):t})}},p&&m)if(e.exports==p)m.exports=v;else for(y in v)v.hasOwnProperty(y)&&(p[y]=v[y]);else n.punycode=v}(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],490:[function(t,e,r){e.exports=t(\"gl-quat/slerp\")},{\"gl-quat/slerp\":236}],491:[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;var s=/\\+/g;t=t.split(e);var l=1e3;a&&\"number\"==typeof a.maxKeys&&(l=a.maxKeys);var c=t.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var f,h,d,p,m=t[u].replace(s,\"%20\"),g=m.indexOf(r);g>=0?(f=m.substr(0,g),h=m.substr(g+1)):(f=m,h=\"\"),d=decodeURIComponent(f),p=decodeURIComponent(h),n(o,d)?i(o[d])?o[d].push(p):o[d]=[o[d],p]:o[d]=p}return o};var i=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}},{}],492:[function(t,e,r){\"use strict\";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return\"\"}};e.exports=function(t,e,r,s){return e=e||\"&\",r=r||\"=\",null===t&&(t=void 0),\"object\"==typeof t?n(o(t),function(o){var s=encodeURIComponent(i(o))+r;return a(t[o])?n(t[o],function(t){return s+encodeURIComponent(i(t))}).join(e):s+encodeURIComponent(i(t[o]))}).join(e):s?encodeURIComponent(i(s))+r+encodeURIComponent(i(t)):\"\"};var a=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)},o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],493:[function(t,e,r){\"use strict\";r.decode=r.parse=t(\"./decode\"),r.encode=r.stringify=t(\"./encode\")},{\"./decode\":491,\"./encode\":492}],494:[function(t,e,r){\"use strict\";function n(t,e,r,a,o){for(r=r||0,a=a||t.length-1,o=o||function(t,e){return t<e?-1:t>e?1:0};a>r;){if(a-r>600){var s=a-r+1,l=e-r+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-l*u/s+f)),Math.min(a,Math.floor(e+(s-l)*u/s+f)),o)}var h=t[e],d=r,p=a;for(i(t,r,e),o(t[a],h)>0&&i(t,r,a);d<p;){for(i(t,d,p),d++,p--;o(t[d],h)<0;)d++;for(;o(t[p],h)>0;)p--}0===o(t[r],h)?i(t,r,p):i(t,++p,a),p<=e&&(r=p+1),e<=p&&(a=p-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],495:[function(t,e,r){\"use strict\";var n=t(\"big-rat/add\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/add\":54}],496:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=t(\"big-rat\")},{\"big-rat\":57}],497:[function(t,e,r){\"use strict\";var n=t(\"big-rat\"),i=t(\"big-rat/mul\");e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},{\"big-rat\":57,\"big-rat/mul\":66}],498:[function(t,e,r){\"use strict\";var n=t(\"big-rat/sub\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/sub\":68}],499:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"compare-oriented-cell\"),a=t(\"cell-orientation\");e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{\"cell-orientation\":90,\"compare-cell\":107,\"compare-oriented-cell\":108}],500:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\"),i=t(\"color-normalize\"),a=t(\"update-diff\"),o=t(\"pick-by-alias\"),s=t(\"object-assign\"),l=t(\"flatten-vertex-data\"),c=t(\"to-float32\"),u=c.float32,f=c.fract32;e.exports=function(t,e){function r(t){t?p(t):null===t&&m(),c()}function c(e){if(\"number\"==typeof e)return d(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),k.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?d(r):t.draw=!0)})}function d(t){\"number\"==typeof t&&(t=k[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],g(t),t.after&&t.after(t))}function p(t){if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(k=t.map(function(t,c){var u=k[c];return t?(\"function\"==typeof t?t={after:t}:\"number\"==typeof t[0]&&(t={positions:t}),t=o(t,{color:\"color colors fill\",capSize:\"capSize cap capsize cap-size\",lineWidth:\"lineWidth line-width width line thickness\",opacity:\"opacity alpha\",range:\"range dataBox\",viewport:\"viewport viewBox\",errors:\"errors error\",positions:\"positions position data points\"}),u||(k[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},M,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,\"float64\"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=\"transparent\"),!Array.isArray(t)||\"number\"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error(\"Not enough colors\");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],\"uint8\");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:w.drawingBufferWidth,height:w.drawingBufferHeight},e}}]),u):u}),e||r){var c=k.reduce(function(t,e,r){return t+(e?e.count:0)},0),h=new Float64Array(2*c),d=new Uint8Array(4*c),p=new Float32Array(4*c);k.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(d.set(a,4*i),p.set(o,4*i),h.set(r,2*i))}}),v(u(h)),y(f(h)),x(d),b(p)}}}function m(){v.destroy(),y.destroy(),x.destroy(),b.destroy(),_.destroy()}if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");var g,v,y,x,b,_,w=t._gl,M={color:\"black\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},k=[];return x=t.buffer({usage:\"dynamic\",type:\"uint8\",data:null}),v=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),y=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),b=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),_=t.buffer({usage:\"static\",type:\"float\",data:h}),p(e),g=t({vert:\"\\n\\t\\tprecision highp float;\\n\\n\\t\\tattribute vec2 position, positionFract;\\n\\t\\tattribute vec4 error;\\n\\t\\tattribute vec4 color;\\n\\n\\t\\tattribute vec2 direction, lineOffset, capOffset;\\n\\n\\t\\tuniform vec4 viewport;\\n\\t\\tuniform float lineWidth, capSize;\\n\\t\\tuniform vec2 scale, scaleFract, translate, translateFract;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tfragColor = color / 255.;\\n\\n\\t\\t\\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\\n\\n\\t\\t\\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\\n\\n\\t\\t\\tvec2 position = position + dxy;\\n\\n\\t\\t\\tvec2 pos = (position + translate) * scale\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n\\t\\t\\tpos += pixelOffset / viewport.zw;\\n\\n\\t\\t\\tgl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\t\\t}\\n\\t\\t\",frag:\"\\n\\t\\tprecision mediump float;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tuniform float opacity;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tgl_FragColor = fragColor;\\n\\t\\t\\tgl_FragColor.a *= opacity;\\n\\t\\t}\\n\\t\\t\",uniforms:{range:t.prop(\"range\"),lineWidth:t.prop(\"lineWidth\"),capSize:t.prop(\"capSize\"),opacity:t.prop(\"opacity\"),scale:t.prop(\"scale\"),translate:t.prop(\"translate\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:x,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:v,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:y,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:b,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,stride:24,offset:16}},primitive:\"triangles\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:!1,instances:t.prop(\"count\"),count:h.length}),s(r,{update:p,draw:c,destroy:m,regl:t,gl:w,canvas:w.canvas,groups:k}),r};var h=[[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]]},{\"array-bounds\":48,\"color-normalize\":99,\"flatten-vertex-data\":143,\"object-assign\":462,\"pick-by-alias\":473,\"to-float32\":547,\"update-diff\":558}],501:[function(t,e,r){\"use strict\";function n(t){var e=new Float32Array(t.length);e.set(t);for(var r=0,n=e.length;r<n;r++)e[r]=t[r]-e[r];return e}var i=t(\"color-normalize\"),a=t(\"array-bounds\"),o=t(\"object-assign\"),s=t(\"glslify\"),l=t(\"pick-by-alias\"),c=t(\"update-diff\"),u=t(\"flatten-vertex-data\"),f=t(\"earcut\"),h=t(\"array-normalize\");e.exports=function(t,e){function r(t){t?m(t):null===t&&g(),d()}function d(t){if(\"number\"==typeof t)return p(t);t&&!Array.isArray(t)&&(t=[t]),S.forEach(function(e,r){t&&(t[r]?e.draw=!0:e.draw=!1),e.draw?p(r):e.draw=!0})}function p(e){\"number\"==typeof e&&(e=S[e]),e&&e.count&&e.opacity&&e.positions&&e.positions.length>2&&(t._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&x(e),e.thickness&&e.color&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],e.scaleRatio[0]>L||e.scaleRatio[1]>L?y(e):\"rect\"===e.join||!e.join&&(e.thickness<=2||e.positions.length>=C)?y(e):v(e),e.after&&e.after(e)))}function m(t){if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0;if(S=t.map(function(t,r){var s=S[r];return t?(\"function\"==typeof t?t={after:t}:\"number\"==typeof t[0]&&(t={positions:t}),t=l(t,{positions:\"positions points data coords\",thickness:\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\",join:\"lineJoin linejoin join type mode\",miterLimit:\"miterlimit miterLimit\",dashes:\"dash dashes dasharray dash-array dashArray\",color:\"color stroke colors stroke-color strokeColor\",fill:\"fill fill-color fillColor\",opacity:\"alpha opacity\",overlay:\"overlay crease overlap intersect\",close:\"closed close closed-path closePath\",range:\"range dataBox\",viewport:\"viewport viewBox\",hole:\"holes hole hollow\",after:\"after callback done pass\"}),s||(S[r]=s={id:r,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,offset:0,dashLength:0,hole:!0},t=o({},T,t)),c(s,t,[{thickness:parseFloat,opacity:parseFloat,miterLimit:parseFloat,overlay:Boolean,join:function(t){return t},after:function(t){return t},hole:function(t){return t||[]},positions:function(t,r,n){t=u(t,\"float64\");var i=Math.floor(t.length/2),o=a(t,2);return r.range||n.range||(n.range=o),r.count=i,r.bounds=o,e+=i,t},fill:function(t){return t?i(t,\"uint8\"):null},dashes:function(t,e,r){var n,i=e.dashLength;if(!t||t.length<2)i=1,n=new Uint8Array([255,255,255,255,255,255,255,255]);else{i=0;for(var a=0;a<t.length;++a)i+=t[a];n=new Uint8Array(i*E);for(var o=0,s=255,l=0;l<2;l++)for(var c=0;c<t.length;++c){for(var u=0,f=t[c]*E*.5;u<f;++u)n[o++]=s;s^=255}}return k.subimage({data:n,width:n.length,height:1},0,e.id),e.dashLength=i,n}},{close:function(t,e,r){return null!=t?t:e.positions.length>=4&&e.positions[0]===e.positions[e.positions.length-2]&&e.positions[1]===e.positions[e.positions.length-1]},positions:function(t,e,r){if(e.fill&&t.length){for(var n=[],i={},a=0,o=0,s=0,l=e.count;o<l;o++){var c=e.positions[2*o],u=e.positions[2*o+1];Number.isNaN(c)||Number.isNaN(u)?(c=e.positions[2*a],u=e.positions[2*a+1],i[o]=a):a=o,n[s++]=c,n[s++]=u}for(var h=f(n,e.hole),d=0,p=h.length;d<p;d++)null!=i[h[d]]&&(h[d]=i[h[d]]);e.triangles=h}return e.positions},color:function(t,e,r){var n=e.count;if(t||(t=\"transparent\"),!Array.isArray(t)||\"number\"==typeof t[0]){var a=t;t=Array(n);for(var o=0;o<n;o++)t[o]=a}if(t.length<n)throw Error(\"Not enough colors\");for(var s=new Uint8Array(4*n+4),l=0;l<n;l++){var c=i(t[l],\"uint8\");s.set(c,4*l)}return s},range:function(t,e,r){if(!e.count)return null;var i=e.bounds;t||(t=i);var a=h(t.slice(),2,i);return e.scale=[1/(a[2]-a[0]),1/(a[3]-a[1])],e.translate=[-a[0],-a[1]],e.scaleFract=n(e.scale),e.translateFract=n(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:A.drawingBufferWidth,height:A.drawingBufferHeight},e}}]),s):s}),e){var s=2*e+6*S.length,d=new Float64Array(s),p=0,m=new Uint8Array(2*s);S.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.color;if(t.offset=p,n){var a=new Float64Array(r.length);a.set(r),h(a,2,t.bounds),t.close?r[0]===r[2*n-2]&&r[1]===r[2*n-1]?(d[2*p+0]=a[2*n-4],d[2*p+1]=a[2*n-3]):(d[2*p+0]=a[2*n-2],d[2*p+1]=a[2*n-1]):(d[2*p+0]=a[0],d[2*p+1]=a[1]),m[4*p+0]=i[0],m[4*p+1]=i[1],m[4*p+2]=i[2],m[4*p+3]=i[3],d.set(a,2*p+2),m.set(i,4*p+4),t.close?r[0]===r[2*n-2]&&r[1]===r[2*n-1]?(d[2*p+2*n+2]=a[2],d[2*p+2*n+3]=a[3],p+=n+2,t.count-=1):(d[2*p+2*n+2]=a[0],d[2*p+2*n+3]=a[1],d[2*p+2*n+4]=a[2],d[2*p+2*n+5]=a[3],p+=n+3):(d[2*p+2*n+2]=a[2*n-2],d[2*p+2*n+3]=a[2*n-1],d[2*p+2*n+4]=a[2*n-2],d[2*p+2*n+5]=a[2*n-1],p+=n+3)}}}),b(m),w(function(t){if(t instanceof Float32Array)return t;var e=new Float32Array(t);return e.set(t),e}(d)),M(n(d))}return r}}function g(){S.length=0,b.destroy(),_.destroy(),w.destroy(),k.destroy()}if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");var v,y,x,b,_,w,M,k,A=t._gl,T={positions:[],dashes:null,join:null,miterLimit:1,thickness:10,cap:\"square\",color:\"black\",opacity:1,overlay:!1,viewport:null,range:null,close:null,fill:null},S=[],E=2,L=3e6,C=1e4;b=t.buffer({usage:\"dynamic\",type:\"uint8\",data:null}),_=t.buffer({usage:\"static\",type:\"float\",data:[0,1,0,0,1,1,1,0]}),w=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),M=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),k=t.texture({channels:1,data:new Uint8Array(524288),width:256,height:2048,mag:\"linear\",min:\"linear\"}),m(e);var z={primitive:\"triangle strip\",instances:t.prop(\"count\"),count:4,offset:0,uniforms:{miterMode:function(t,e){return\"round\"===e.join?2:1},miterLimit:t.prop(\"miterLimit\"),scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),thickness:t.prop(\"thickness\"),dashPattern:k,dashLength:t.prop(\"dashLength\"),dashShape:[256,2048],opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),scaleRatio:t.prop(\"scaleRatio\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:function(t,e){return!e.overlay}},scissor:{enable:!0,box:t.prop(\"viewport\")},stencil:!1,viewport:t.prop(\"viewport\")};return v=t(o({cull:{enable:!0,face:\"back\"},vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\\nattribute vec4 aColor, bColor;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, translate, scaleRatio;\\nuniform float thickness, pixelRatio, id;\\nuniform vec4 viewport;\\nuniform float miterLimit, dashLength, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 tangent;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nconst float MAX_LINES = 256.;\\nconst float REVERSE_THRESHOLD = -.875;\\nconst float MIN_DIST = 1.;\\n\\n//TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\\n//TODO: precalculate dot products, normalize things beforehead etc.\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nbool isNaN( float val ){\\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\\n}\\n\\nvoid main() {\\n\\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineBot = 1. - lineTop;\\n\\tfloat depth = (MAX_LINES - 1. - id) / MAX_LINES;\\n\\n\\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\\n\\n\\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\\n\\n\\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\\n\\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\\n\\n\\tvec2 prevDiff = aCoord - prevCoord;\\n\\tvec2 currDiff = bCoord - aCoord;\\n\\tvec2 nextDiff = nextCoord - bCoord;\\n\\n\\tvec2 prevDirection = normalize(prevDiff);\\n\\tvec2 currDirection = normalize(currDiff);\\n\\tvec2 nextDirection = normalize(nextDiff);\\n\\n\\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\\n\\tvec2 currTangent = normalize(currDiff * scaleRatio);\\n\\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\\n\\n\\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\\n\\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\\n\\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\\n\\n\\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\\n\\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\\n\\n\\t//collapsed/unidirectional segment cases\\n\\tif (prevDirection == currDirection) {\\n\\t\\tstartJoinDirection = currNormal;\\n\\t}\\n\\tif (nextDirection == currDirection) {\\n\\t\\tendJoinDirection = currNormal;\\n\\t}\\n\\tif (aCoord == bCoord) {\\n\\t\\tendJoinDirection = startJoinDirection;\\n\\t\\tcurrNormal = prevNormal;\\n\\t\\tcurrTangent = prevTangent;\\n\\t}\\n\\n\\ttangent = currTangent;\\n\\n\\t//calculate join shifts relative to normals\\n\\tfloat startJoinShift = dot(currNormal, startJoinDirection);\\n\\tfloat endJoinShift = dot(currNormal, endJoinDirection);\\n\\n\\tfloat startMiterRatio = abs(1. / startJoinShift);\\n\\tfloat endMiterRatio = abs(1. / endJoinShift);\\n\\n\\tvec2 startJoin = startJoinDirection * startMiterRatio;\\n\\tvec2 endJoin = endJoinDirection * endMiterRatio;\\n\\n\\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\\n\\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\\n\\tstartBotJoin = -startTopJoin;\\n\\n\\tendTopJoin = sign(endJoinShift) * endJoin * .5;\\n\\tendBotJoin = -endTopJoin;\\n\\n\\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\\n\\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\\n\\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\\n\\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\\n\\n\\t//miter anti-clipping\\n\\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\\n\\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\\n\\n\\t//prevent close to reverse direction switch\\n\\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\\n\\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\\n\\n\\tif (prevReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\\n\\t\\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\tbTopCoord -= normalWidth * endTopJoin;\\n\\t\\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\\n\\t}\\n\\n\\tif (nextReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\\n\\t\\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\taBotCoord -= normalWidth * startBotJoin;\\n\\t\\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\\n\\t}\\n\\n\\tvec2 aTopPosition = (aTopCoord + translate) * scale;\\n\\tvec2 aBotPosition = (aBotCoord + translate) * scale;\\n\\n\\tvec2 bTopPosition = (bTopCoord + translate) * scale;\\n\\tvec2 bBotPosition = (bBotCoord + translate) * scale;\\n\\n\\t//position is normalized 0..1 coord on the screen\\n\\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\\n\\n\\tstartCoord = (aCoord + translate) * scaleRatio + viewport.xy;\\n\\tendCoord = (bCoord + translate) * scaleRatio + viewport.xy;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\\n\\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\\n\\n\\t//bevel miter cutoffs\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = (startCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\\n\\t\\t\\tendCutoff = (endCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n\\n\\t//round miter cutoffs\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = (startCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\\n\\t\\t\\tendCutoff = (endCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\nuniform vec2 dashShape;\\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nvoid main() {\\n\\tfloat alpha = 1., distToStart, distToEnd;\\n\\tfloat cutoff = thickness * .5;\\n\\n\\t//bevel miter\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToStart + 1., 0.), 1.);\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToEnd + 1., 0.), 1.);\\n\\t\\t}\\n\\t}\\n\\n\\t// round miter\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - startCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - endCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t * dashLength * 2. / dashShape.x, (id + .5) / dashShape.y)).r;\\n\\n\\tgl_FragColor = fragColor * dash;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:_,divisor:0,stride:8,offset:0},lineTop:{buffer:_,divisor:0,stride:8,offset:4},aColor:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset},divisor:1},bColor:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset+4},divisor:1},prevCoord:{buffer:w,stride:8,offset:function(t,e){return 8*e.offset},divisor:1},aCoord:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoord:{buffer:w,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},nextCoord:{buffer:w,stride:8,offset:function(t,e){return 24+8*e.offset},divisor:1}}},z)),y=t(o({vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\\nattribute vec4 color;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract, scaleRatio;\\nuniform float thickness, pixelRatio, id;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nconst float MAX_LINES = 256.;\\n\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\n return (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n}\\n\\nvoid main() {\\n\\t// vec2 scaleRatio = scale * viewport.zw;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineOffset = lineTop * 2. - 1.;\\n\\tfloat depth = (MAX_LINES - 1. - id) / (MAX_LINES);\\n\\n\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\n\\ttangent = normalize(diff * scaleRatio);\\n\\tvec2 normal = vec2(-tangent.y, tangent.x);\\n\\n\\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\\n\\t\\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\\n\\n\\t\\t+ thickness * normal * .5 * lineOffset / viewport.zw;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\nuniform vec2 dashShape;\\nuniform float dashLength, pixelRatio, thickness, opacity, id;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nvoid main() {\\n\\tfloat alpha = 1.;\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t * dashLength * 2. / dashShape.x, (id + .5) / dashShape.y)).r;\\n\\n\\tgl_FragColor = fragColor * dash;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:_,divisor:0,stride:8,offset:0},lineTop:{buffer:_,divisor:0,stride:8,offset:4},aCoord:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoord:{buffer:w,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},aCoordFract:{buffer:M,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoordFract:{buffer:M,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},color:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset},divisor:1}}},z)),x=t({primitive:\"triangle\",elements:function(t,e){return e.triangles},offset:0,vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\n\\nuniform vec4 color;\\nuniform vec2 scale, scaleFract, translate, translateFract, scaleRatio;\\nuniform float pixelRatio, id;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\n\\nconst float MAX_LINES = 256.;\\n\\nvoid main() {\\n\\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\\n\\n\\tvec2 position = (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float opacity;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= opacity;\\n}\\n\"]),uniforms:{scale:t.prop(\"scale\"),color:t.prop(\"fill\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset}},positionFract:{buffer:M,stride:8,offset:function(t,e){return 8+8*e.offset}}},blend:z.blend,depth:{enable:!1},scissor:z.scissor,stencil:z.stencil,viewport:z.viewport}),o(r,{update:m,draw:d,destroy:g,regl:t,gl:A,canvas:A.canvas,lines:S}),r}},{\"array-bounds\":48,\"array-normalize\":49,\"color-normalize\":99,earcut:135,\"flatten-vertex-data\":143,glslify:502,\"object-assign\":462,\"pick-by-alias\":473,\"update-diff\":558}],502:[function(t,e,r){arguments[4][169][0].apply(r,arguments)},{dup:169}],503:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\"),i=t(\"array-bounds\"),a=t(\"color-id\"),o=t(\"snap-points-2d\"),s=t(\"object-assign\"),l=t(\"glslify\"),c=t(\"binary-search-bounds\"),u=t(\"pick-by-alias\"),f=t(\"update-diff\"),h=t(\"flatten-vertex-data\"),d=t(\"is-iexplorer\"),p=t(\"to-float32\"),m=p.float32,g=p.fract32;e.exports=function(t,e){function r(t){t?x(t):null===t&&M(),p()}function p(t){if(\"number\"==typeof t)return v(t);Array.isArray(t)?t.forEach(function(t,e){if(null!=t)return t.length?v(t,e):v(t)}):O.forEach(function(t,e){t&&v(e)})}function v(e,r){\"number\"==typeof e&&(e=O[e]);var n;if(Array.isArray(e)&&(n=e,e=O[r]),e&&e.count&&e.opacity){var i;if(n){i=Array(e.count);for(var a=0;a<n.length;a++)i[n[a]]=!0}if(e.markerIds[0]){t._refresh();var o=y(e.markerIds[0],e,i);A(o)}for(var s=[],l=1;l<e.markerIds.length;l++){var c=e.markerIds[l];c&&c.length&&[].push.apply(s,y(c,e,i))}s.length&&(t._refresh(),k(s))}}function y(t,e,r){function n(t,e){for(var r=[],n=0,i=t.length;n<i;n++){var o=t[n];e[o-a]&&r.push(o)}return r}var i=e.range,a=e.offset;if(!t.snap){var o=r?n(t.data,r):t.elements;return[s({},e,{elements:o,offset:0,count:r?o.length:t.length,marker:F[t.id]})]}for(var l=[],u=t.lod,f=t.x,h=t.id,d=(i[2]-i[0])/e.viewport.width,p=u.length;p--;){var m=u[p];if(!(m.pixelSize&&m.pixelSize<d&&p>1)){var g=m.offset,v=m.count+g,y=c.ge(f,i[0],g,v-1),x=c.lt(f,i[2],y,v-1)+1;if(!(x<=y))if(r){var b=n(t.data.subarray(y,x),r);l.push(s({},e,{elements:b,marker:F[h],offset:0,count:b.length}))}else l.push(s({},e,{elements:t.elements,marker:F[h],offset:y,count:x-y}))}}return l}function x(e){if(e){null!=e.length?\"number\"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var r=0,n=0,a=0;O=e.map(function(e,l){var c=O[l];return e?(\"function\"==typeof e?e={after:e}:\"number\"==typeof e[0]&&(e={positions:e}),e=u(e,{positions:\"positions data points\",snap:\"snap cluster\",size:\"sizes size radius\",borderSize:\"borderSizes borderSize stroke-width strokeWidth outline\",color:\"colors color fill fill-color fillColor\",borderColor:\"borderColors borderColor stroke stroke-color strokeColor\",palette:\"palette swatch\",marker:\"markers marker shape\",range:\"range dataBox\",viewport:\"viewport viewBox\",opacity:\"opacity alpha\"}),c||(O[l]=c={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,markerIds:[]},e=s({},P,e)),!e.positions||\"marker\"in e||(e.marker=c.marker,delete c.marker),f(c,e,[{snap:!0,size:function(t){return n+=t.length?1:0,t},borderSize:function(t){return n+=t.length?1:0,t},opacity:parseFloat,color:function(t){return t=w(t),a++,t},borderColor:function(t){return t=w(t),a++,t},positions:function(t,e,n){t=h(t,\"float64\");var a=e.count=Math.floor(t.length/2),o=e.bounds=a?i(t,2):null;return n.range||e.range||(delete e.range,n.range=o),e.offset=r,r+=a,n.marker||e.marker||(delete e.marker,n.marker=null),t}},{marker:function(t,e,r){if(e.markerIds.length=0,t&&\"number\"!=typeof t[0])for(var n=0,i=t.length;n<i;n++){var a=_(t[n]);e.markerIds[a]||(e.markerIds[a]=[]),e.markerIds[a].push(n)}else{for(var o=_(t),s=Array(e.count),l=0;l<e.count;l++)s[l]=l;e.markerIds[o]=s}return t}},{positions:function(e,r){for(var n=r.markerIds,i=r.snap,a=r.bounds,s=r.offset,l=0;l<n.length;l++){var c=n[l];if(c&&c.length){var u=c.length,f=void 0;if(c.id=l,i&&(!0===i||u>i)){c.snap=!0;var h=c.x=Array(u),d=c.w=Array(u),p=void 0;if(n.length>1){p=Array(2*u);for(var m=0;m<u;m++){var g=c[m];p[2*m]=e[2*g],p[2*m+1]=e[2*g+1]}}else(p=new Float64Array(e.length)).set(e);var v=new Uint32Array(u);c.lod=o(p,v,d,a),f=new Uint32Array(u);for(var y=0;y<u;y++){var x=c[v[y]];f[y]=x+s,h[y]=e[2*x]}}else{f=new Uint32Array(u);for(var b=0;b<u;b++)f[b]=c[b]+s}c.data=f,c.elements=t.elements({primitive:\"points\",type:\"uint32\",data:f})}}},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=g(e.scale),e.translateFract=g(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:z.drawingBufferWidth,height:z.drawingBufferHeight},e}}]),c):c}),b({point:r,size:n,color:a})}}function b(t){var e=t.point,r=t.size,n=t.color,i=O.reduce(function(t,e,r){return t+(e?e.count:0)},0);if(e){var a=new Float32Array(2*i),o=new Float32Array(2*i);O.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset;n&&(a.set(m(r),2*i),o.set(g(r),2*i))}}),S(a),E(o)}if(r){var s=new Uint8Array(2*i);O.forEach(function(t,e){if(t){var r=t.count,n=t.offset,i=t.size,a=t.borderSize;if(r&&(i.length||a.length)){for(var o=new Uint8Array(2*r),l=0;l<r;l++)o[2*l]=Math.round(255*(null==i[l]?i:i[l])/j),o[2*l+1]=Math.round(255*(null==a[l]?a:a[l])/j);s.set(o,2*n)}}}),T(s)}if(n){var l=new Uint16Array(2*i);O.forEach(function(t,e){if(t){var r=t.count,n=t.offset,i=t.color,a=t.borderColor;if(r&&(i.length||a.length)){for(var o=new Uint16Array(2*r),s=0;s<r;s++)o[2*s]=null==i[s]?i:i[s],o[2*s+1]=null==a[s]?a:a[s];l.set(o,2*n)}}}),L(l)}}function _(e){var r=null==e?0:R.indexOf(e);if(r>=0)return r;var n;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)n=e;else{n=new Uint8Array(e.length);for(var i=0,a=e.length;i<a;i++)n[i]=255*e[i]}var o=Math.floor(Math.sqrt(n.length));return r=F.length,R.push(e),F.push(t.texture({channels:1,data:n,radius:o,mag:\"linear\",min:\"linear\"})),r}function w(t){Array.isArray(t)||(t=[t]);for(var e=D.length,r=[],i=0;i<t.length;i++){var o=t[i];if(\"number\"!=typeof o){o=n(o,\"uint8\");var s=a(o,!1);if(null==I[s]){var l=D.length;I[s]=Math.floor(l/4),D[l]=o[0],D[l+1]=o[1],D[l+2]=o[2],D[l+3]=o[3]}r[i]=Math.min(I[s],N-1)}else r[i]=o}return e<4*N&&C.subimage({width:Math.min(.25*D.length,N),height:1,data:D.slice(0,4*N)},0,0),1===r.length?r[0]:r}function M(){O.length=0,T.destroy(),S.destroy(),E.destroy(),L.destroy(),C.destroy()}\"function\"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var k,A,T,S,E,L,C,z=(t=e.regl)._gl,D=[],I={},P={color:\"black\",borderColor:\"transparent\",borderSize:1,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,offset:0,count:0,bounds:null,positions:[],snap:1e4},O=[],F=[null],R=[null],N=4096,j=100;C=t.texture({data:new Uint8Array(4*N),width:N,height:1,type:\"uint8\",format:\"rgba\",wrapS:\"clamp\",wrapT:\"clamp\",mag:\"nearest\",min:\"nearest\"}),T=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),L=t.buffer({usage:\"dynamic\",type:\"uint16\",data:null}),S=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),E=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),e.clone?(O=e.clone.groups.map(function(e){return(e=s({},e)).markerIds&&(e.markerIds=e.markerIds.map(function(e){var r=e.slice();return r.lod=e.lod,r.snap=e.snap,r.data=e.data,r.id=e.id,r.x=e.x,r.w=e.w,r.elements=t.elements({primitive:\"points\",type:\"uint32\",data:e.data}),r})),e}),e.clone.markers.forEach(function(t){_(t)}),b({point:!0,color:!0,size:!0})):x(e);var B={uniforms:{pixelRatio:t.context(\"pixelRatio\"),palette:C,scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translate:t.prop(\"translate\"),translateFract:t.prop(\"translateFract\"),opacity:t.prop(\"opacity\"),marker:t.prop(\"marker\")},attributes:{position:S,positionFract:E,size:function(t,e){return e.size.length?{buffer:T,stride:2,offset:0}:{constant:[Math.round(255*e.size/j)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:T,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/j)]}},colorId:function(t,e){return e.color.length?{buffer:L,stride:4,offset:0}:{constant:[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:L,stride:4,offset:2}:{constant:[e.borderColor]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(\"elements\"),count:t.prop(\"count\"),offset:t.prop(\"offset\"),primitive:\"points\"};if(d)A=t(s({},B,{frag:l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color, borderColor;\\nuniform float opacity;\\nvarying float fragBorderRadius, fragWidth, fragBorderSize, fragSize;\\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\\n float centerFraction = fragBorderSize == 0. ? 2. : fragSize / (fragSize + fragBorderSize + 1.25);\\n\\n vec4 baseColor = mix(borderColor, color, smoothStep(radius, centerFraction));\\n float alpha = 1.0 - pow(1.0 - baseColor.a, 1.);\\n gl_FragColor = vec4(baseColor.rgb * alpha, alpha);\\n}\\n\"]),vert:l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth, fragBorderSize, fragSize;\\n\\nvoid main() {\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n fragBorderSize = borderSize;\\n fragSize = size;\\n\\n gl_PointSize = (size + borderSize) * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragBorderRadius = borderSize == 0. ? 2. : 1. - 2. * borderSize / (size + borderSize);\\n fragWidth = 1. / gl_PointSize;\\n}\\n\"]),uniforms:{color:function(t,e){var r=e.color.length?e.color[0]:e.color;return D.slice(4*r,4*r+4).map(function(t){return t/255})},borderColor:function(t,e){var r=e.borderColor.length?e.borderColor[0]:e.borderColor;return D.slice(4*r,4*r+4).map(function(t){return t/255})},pixelRatio:t.context(\"pixelRatio\"),palette:C,scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translate:t.prop(\"translate\"),translateFract:t.prop(\"translateFract\"),opacity:t.prop(\"opacity\"),marker:t.prop(\"marker\")},attributes:{position:S,positionFract:E,size:B.attributes.size,borderSize:B.attributes.borderSize}}));else{var U=s({},B);U.frag=l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nuniform sampler2D marker;\\nuniform float pixelRatio, opacity;\\n\\nfloat smoothStep(float x, float y) {\\n return 1.0 / (1.0 + exp(50.0*(x - y)));\\n}\\n\\nvoid main() {\\n float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\\n\\n //max-distance alpha\\n if (dist < 0.003) discard;\\n\\n //null-border case\\n if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\\n float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\\n gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a);\\n return;\\n }\\n\\n float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\\n float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\\n\\n vec4 color = fragBorderColor;\\n color.a *= borderColorAmt;\\n color = mix(color, fragColor, colorAmt);\\n color.a *= opacity;\\n\\n gl_FragColor = color;\\n}\\n\"]),U.vert=l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\nattribute float colorId, borderColorId;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\nconst float borderLevel = .5;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragPointSize, fragBorderRadius,\\n\\t\\tfragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nvoid main() {\\n vec4 color = texture2D(palette, vec2((colorId + .5) / paletteSize, 0));\\n vec4 borderColor = texture2D(palette, vec2((borderColorId + .5) / paletteSize, 0));\\n\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n\\n gl_PointSize = 2. * size * pixelRatio;\\n fragPointSize = size * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragColor = color;\\n fragBorderColor = borderColor;\\n fragWidth = 1. / gl_PointSize;\\n\\n fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\\n fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\\n}\\n\"]),k=t(U);var V=s({},B);V.frag=l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\n\\nuniform float opacity;\\nvarying float fragBorderRadius, fragWidth;\\n\\nvoid main() {\\n\\tfloat radius, alpha = 1.0, delta = fragWidth;\\n\\n\\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\\n\\n\\tif(radius > 1.0 + delta) {\\n\\t\\tdiscard;\\n\\t\\treturn;\\n\\t}\\n\\n\\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\\n\\n\\tfloat borderRadius = fragBorderRadius;\\n\\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\\n\\tvec4 color = mix(fragColor, fragBorderColor, ratio);\\n\\tcolor.a *= alpha * opacity;\\n\\tgl_FragColor = color;\\n}\\n\"]),V.vert=l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\nattribute float colorId, borderColorId;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nvoid main() {\\n vec4 color = texture2D(palette, vec2((colorId + .5) / paletteSize, 0));\\n vec4 borderColor = texture2D(palette, vec2((borderColorId + .5) / paletteSize, 0));\\n\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n\\n gl_PointSize = (size + borderSize) * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragBorderRadius = borderSize == 0. ? 2. : 1. - 2. * borderSize / (size + borderSize);\\n fragColor = color;\\n fragBorderColor = borderColor;\\n fragWidth = 1. / gl_PointSize;\\n}\\n\"]),A=t(V)}return s(r,{update:x,draw:p,destroy:M,regl:t,gl:z,canvas:z.canvas,groups:O,markers:R}),r}},{\"array-bounds\":48,\"binary-search-bounds\":504,\"color-id\":97,\"color-normalize\":99,\"flatten-vertex-data\":143,glslify:505,\"is-iexplorer\":284,\"object-assign\":462,\"pick-by-alias\":473,\"snap-points-2d\":534,\"to-float32\":547,\"update-diff\":558}],504:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=[\"function \",t,\"(a,l,h,\",n.join(\",\"),\"){\",i?\"\":\"var i=\",r?\"l-1\":\"h+1\",\";while(l<=h){var m=(l+h)>>>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)}},{}],505:[function(t,e,r){arguments[4][169][0].apply(r,arguments)},{dup:169}],506:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.createREGL=n()}(this,function(){function t(t,e){this.id=j++,this.type=t,this.data=e}function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(1<t.length&&r===n&&('\"'===r||\"'\"===r))return['\"'+t.substr(1,t.length-2).replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];if(r=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(t))return e(t.substr(0,r.index)).concat(e(r[1])).concat(e(t.substr(r.index+r[0].length)));if(1===(r=t.split(\".\")).length)return['\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];for(t=[],n=0;n<r.length;++n)t=t.concat(e(r[n]));return t}function r(t){return\"[\"+e(t).join(\"][\")+\"]\"}function n(t){return\"string\"==typeof t?t.split():t}function i(t){return\"string\"==typeof t?document.querySelector(t):t}function a(t){var e,r,a,o,s=t||{};t={};var l=[],c=[],u=\"undefined\"==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},d=function(){};if(\"string\"==typeof s?e=document.querySelector(s):\"object\"==typeof s&&(\"string\"==typeof s.nodeName&&\"function\"==typeof s.appendChild&&\"function\"==typeof s.getBoundingClientRect?e=s:\"function\"==typeof s.drawArrays||\"function\"==typeof s.drawElements?(o=s,a=o.canvas):(\"gl\"in s?o=s.gl:\"canvas\"in s?a=i(s.canvas):\"container\"in s&&(r=i(s.container)),\"attributes\"in s&&(t=s.attributes),\"extensions\"in s&&(l=n(s.extensions)),\"optionalExtensions\"in s&&(c=n(s.optionalExtensions)),\"onDone\"in s&&(h=s.onDone),\"profile\"in s&&(f=!!s.profile),\"pixelRatio\"in s&&(u=+s.pixelRatio))),e&&(\"canvas\"===e.nodeName.toLowerCase()?a=e:r=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(n=t.getBoundingClientRect(),e=n.right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,N(i.style,{width:e+\"px\",height:n+\"px\"})}var i=document.createElement(\"canvas\");return N(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position=\"absolute\",N(t.style,{margin:0,padding:0})),window.addEventListener(\"resize\",n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(\"resize\",n),t.removeChild(i)}}}(r||document.body,0,u)))return null;a=e.canvas,d=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(\"webgl\")||r(\"experimental-webgl\")||r(\"webgl-experimental\")}(a,t)}return o?{gl:o,canvas:a,container:r,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:d}:(d(),h(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function o(t){return!!t&&\"object\"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&\"number\"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||q(t.data))}function s(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function l(t){var e,r;return e=(65535<t)<<4,t>>>=e,r=(255<t)<<3,t>>>=r,e|=r,r=(15<t)<<2,t>>>=r,e|=r,r=(3<t)<<1,e|r|t>>>r>>1}function c(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=G[l(t)>>2]).length?e.pop():new ArrayBuffer(t)}function u(t){G[l(t.byteLength)>>2].push(t)}function f(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)i[a++]=c[u]}function h(t,e,r,n,i){for(var a=1,o=r+1;o<e.length;++o)a*=e[o];var s=e[r];if(4==e.length-r){var l=e[r+1],c=e[r+2];for(e=e[r+3],o=0;o<s;++o)f(t[o],l,c,e,n,i),i+=a}else for(o=0;o<s;++o)h(t[o],e,r+1,n,i),i+=a}function d(t){return 0|X[Object.prototype.toString.call(t)]}function p(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function m(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)t[s++]=e[i*l+a*c+o]}function g(t){for(var e=Y.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{et[0]=t[r];var n=(a=rt[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function v(t){return Array.isArray(t)||q(t)}function y(t){return Array.isArray(t)&&(0===t.length||\"number\"==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!v(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0<=ot.indexOf(e)||(y(t)||x(t)||o(t))}function w(t,e){36193===t.type?(t.data=g(e),Y.freeType(e)):t.data=e}function M(t,e,r,n,i,a){if(t=void 0!==lt[t]?lt[t]:at[t]*st[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function k(t,e,r,n,i,a,s){function l(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(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,e){if(\"object\"==typeof e&&e){\"premultiplyAlpha\"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),\"flipY\"in e&&(t.flipY=e.flipY),\"alignment\"in e&&(t.unpackAlignment=e.alignment),\"colorSpace\"in e&&(t.colorSpace=V[e.colorSpace]),\"type\"in e&&(t.type=G[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;\"shape\"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):(\"radius\"in e&&(r=n=e.radius),\"width\"in e&&(r=e.width),\"height\"in e&&(n=e.height),\"channels\"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,\"format\"in e&&(r=e.format,n=t.internalformat=Z[r],t.format=st[n],r in G&&!(\"type\"in e)&&(t.type=G[r]),r in J&&(t.compressed=!0),r=!0),!a&&r?t.channels=at[t.format]:a&&!r&&t.channels!==it[t.format]&&(t.format=t.internalformat=it[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){l.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function d(t,e){var r=null;if(_(e)?r=e:e&&(u(t,e),\"x\"in e&&(t.xOffset=0|e.x),\"y\"in e&&(t.yOffset=0|e.y),_(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(q(r))t.channels=t.channels||4,t.data=r,\"type\"in e||5121!==t.type||(t.type=0|X[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,n=r,a=n.length,t.type){case 5121:case 5123:case 5125:case 5126:(a=Y.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(o(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|X[Object.prototype.toString.call(n)]);a=r.shape;var s,l,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,s=a[0],l=a[1],a=h[0],h=h[1],t.alignment=1,t.width=s,t.height=l,t.channels=c,t.format=t.internalformat=it[c],t.needsFree=!0,s=f,r=r.offset,c=t.width,f=t.height,l=t.channels;for(var d=Y.allocType(36193===t.type?5126:t.type,c*f*l),p=0,m=0;m<f;++m)for(var M=0;M<c;++M)for(var k=0;k<l;++k)d[p++]=n[a*M+h*m+s*k+r];w(t,d)}else if(\"[object HTMLCanvasElement]\"===b(r)||\"[object CanvasRenderingContext2D]\"===b(r))\"[object HTMLCanvasElement]\"===b(r)?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(\"[object HTMLImageElement]\"===b(r))t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(\"[object HTMLVideoElement]\"===b(r))t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=v(r[0][0])?h||r[0][0].length:h||1,s=W.shape(r),c=1,f=0;f<s.length;++f)c*=s[f];c=Y.allocType(36193===t.type?5126:t.type,c),W.flatten(r,s,\"\",c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=it[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function p(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,d=e.width,p=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,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,u,h,l)}function m(){return lt.pop()||new h}function k(t){t.needsFree&&Y.freeType(t.data),h.call(t),lt.push(t)}function A(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 T(t,e){var r=null;if(_(e))r=t.images[0]=m(),c(r,t),d(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)r=t.images[i]=m(),c(r,t),r.width>>=i,r.height>>=i,d(r,n[i]),t.mipmask|=1<<i;else r=t.images[0]=m(),c(r,t),d(r,e),t.mipmask=1;c(t,t.images[0])}function S(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,d=o.format,p=o.type,m=o.width,g=o.height;f(o),c?t.texImage2D(s,l,d,d,p,c):o.compressed?t.compressedTexImage2D(s,l,h,m,g,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,d,o.xOffset,o.yOffset,m,g,0)):t.texImage2D(s,l,d,m,g,0,d,p,u)}}function E(){var t=ct.pop()||new function(){l.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)};l.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&k(e[r]),e[r]=null;ct.push(t)}function C(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function z(t,e){\"min\"in e&&(t.minFilter=U[e.min],0<=nt.indexOf(t.minFilter)&&(t.genMipmaps=!0)),\"mag\"in e&&(t.magFilter=B[e.mag]);var r=t.wrapS,n=t.wrapT;if(\"wrap\"in e){var i=e.wrap;\"string\"==typeof i?r=n=j[i]:Array.isArray(i)&&(r=j[i[0]],n=j[i[1]])}else\"wrapS\"in e&&(r=j[e.wrapS]),\"wrapT\"in e&&(n=j[e.wrapT]);if(t.wrapS=r,t.wrapT=n,\"anisotropic\"in e&&(t.anisotropic=e.anisotropic),\"mipmap\"in e){switch(r=!1,typeof e.mipmap){case\"string\":t.mipmapHint=R[e.mipmap],r=t.genMipmaps=!0;break;case\"boolean\":r=t.genMipmaps=e.mipmap;break;case\"object\":t.genMipmaps=!1,r=!0}!r||\"min\"in e||(t.minFilter=9984)}}function D(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function I(e){l.call(this),this.mipmask=0,this.internalformat=6408,this.id=ut++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new C,s.profile&&(this.stats={size:0})}function P(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function O(){var e=dt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function F(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),dt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete ft[e.id],a.textureCount--}var R={\"don't care\":4352,\"dont care\":4352,nice:4354,fast:4353},j={repeat:10497,clamp:33071,mirror:33648},B={nearest:9728,linear:9729},U=N({mipmap:9987,\"nearest mipmap nearest\":9984,\"linear mipmap nearest\":9985,\"nearest mipmap linear\":9986,\"linear mipmap linear\":9987},B),V={none:0,browser:37444},G={uint8:5121,rgba4:32819,rgb565:33635,\"rgb5 a1\":32820},Z={alpha:6406,luminance:6409,\"luminance alpha\":6410,rgb:6407,rgba:6408,rgba4:32854,\"rgb5 a1\":32855,rgb565:36194},J={};e.ext_srgb&&(Z.srgb=35904,Z.srgba=35906),e.oes_texture_float&&(G.float32=G.float=5126),e.oes_texture_half_float&&(G.float16=G[\"half float\"]=36193),e.webgl_depth_texture&&(N(Z,{depth:6402,\"depth stencil\":34041}),N(G,{uint16:5123,uint32:5125,\"depth stencil\":34042})),e.webgl_compressed_texture_s3tc&&N(J,{\"rgb s3tc dxt1\":33776,\"rgba s3tc dxt1\":33777,\"rgba s3tc dxt3\":33778,\"rgba s3tc dxt5\":33779}),e.webgl_compressed_texture_atc&&N(J,{\"rgb atc\":35986,\"rgba atc explicit alpha\":35987,\"rgba atc interpolated alpha\":34798}),e.webgl_compressed_texture_pvrtc&&N(J,{\"rgb pvrtc 4bppv1\":35840,\"rgb pvrtc 2bppv1\":35841,\"rgba pvrtc 4bppv1\":35842,\"rgba pvrtc 2bppv1\":35843}),e.webgl_compressed_texture_etc1&&(J[\"rgb etc1\"]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0<=K.indexOf(e)&&(Z[t]=e)});var Q=Object.keys(Z);r.textureFormats=Q;var $=[];Object.keys(Z).forEach(function(t){$[Z[t]]=t});var tt=[];Object.keys(G).forEach(function(t){tt[G[t]]=t});var et=[];Object.keys(B).forEach(function(t){et[B[t]]=t});var rt=[];Object.keys(U).forEach(function(t){rt[U[t]]=t});var ot=[];Object.keys(j).forEach(function(t){ot[j[t]]=t});var st=Q.reduce(function(t,e){var r=Z[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0<=e.indexOf(\"rgba\")?t[r]=6408:t[r]=6407,t},{}),lt=[],ct=[],ut=0,ft={},ht=r.maxTextureUnits,dt=Array(ht).map(function(){return null});return N(I.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<ht;++r){var n=dt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}dt[r]=this,e=r;break}s.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&F(this)}}),s.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(ft).forEach(function(e){t+=ft[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;C.call(r);var a=E();return\"number\"==typeof t?\"number\"==typeof e?A(a,0|t,0|e):A(a,0|t,0|t):t?(z(r,t),T(a,t)):A(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,P(i),S(a,3553),D(r,3553),O(),L(a),s.profile&&(i.stats.size=M(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=$[i.internalformat],n.type=tt[i.type],n.mag=et[r.magFilter],n.min=rt[r.minFilter],n.wrapS=ot[r.wrapS],n.wrapT=ot[r.wrapT],n}var i=new I(3553);return ft[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,d(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,P(i),p(o,3553,e,r,a),O(),k(o),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,P(i);for(var l=0;i.mipmask>>l;++l)t.texImage2D(3553,l,i.format,a>>l,o>>l,0,i.format,i.type,null);return O(),s.profile&&(i.stats.size=M(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType=\"texture2d\",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,o,l){function f(t,e,r,n,i,a){var o,l=h.texInfo;for(C.call(l),o=0;6>o;++o)g[o]=E();if(\"number\"!=typeof t&&t){if(\"object\"==typeof t)if(e)T(g[0],t),T(g[1],e),T(g[2],r),T(g[3],n),T(g[4],i),T(g[5],a);else if(z(l,t),u(h,t),\"faces\"in t)for(t=t.faces,o=0;6>o;++o)c(g[o],h),T(g[o],t[o]);else for(o=0;6>o;++o)T(g[o],t)}else for(t=0|t||1,o=0;6>o;++o)A(g[o],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,P(h),o=0;6>o;++o)S(g[o],34069+o);for(D(l,34067),O(),s.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=$[h.internalformat],f.type=tt[h.type],f.mag=et[l.magFilter],f.min=rt[l.minFilter],f.wrapS=ot[l.wrapS],f.wrapT=ot[l.wrapT],o=0;6>o;++o)L(g[o]);return f}var h=new I(34067);ft[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,o,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,h),a.width=0,a.height=0,d(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,P(h),p(a,34069+t,r,n,i),O(),k(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,P(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return O(),s.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=\"textureCube\",f._texture=h,s.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<ht;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),dt[e]=null;H(ft).forEach(F),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){H(ft).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)})}}}function A(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function T(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?l:c)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&&(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l<f;++l)if(c=t.getActiveUniform(u,l))if(1<c.size)for(var d=0;d<c.size;++d){var p=c.name.replace(\"[0]\",\"[\"+d+\"]\");a(h,new i(p,e.id(p),t.getUniformLocation(u,p),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&&(r.stats.attributesCount=f),h=r.attributes,l=0;l<f;++l)(c=t.getActiveAttrib(u,l))&&a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var l={},c={},u={},f=[],h=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return f.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);H(l).forEach(e),l={},H(c).forEach(e),c={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,u={},r.shaderCount=0},program:function(t,e,i){var a=u[e];a||(a=u[e]={});var o=a[t];return o||(o=new function(t,e){this.id=h++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}(e,t),r.shaderCount++,s(o),a[t]=o,f.push(o)),o},restore:function(){l={},c={};for(var t=0;t<f.length;++t)s(f[t])},shader:o,frag:-1,vert:-1}}function S(t,e,r,n,i,a){function o(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return q(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&&(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&&\"framebuffer\"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}(t):o(t)}}function E(t){return Array.prototype.slice.call(t)}function L(t){return E(t).join(\"\")}function C(t){return Array.isArray(t)||q(t)||o(t)}function z(t){return t.sort(function(t,e){return\"viewport\"===t?-1:\"viewport\"===e?1:t<e?-1:1})}function D(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function I(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function P(t){return new D(!1,!1,!1,t)}function O(t,e){var r=t.type;return 0===r?(r=t.data.length,new D(!0,1<=r,2<=r,e)):4===r?(r=t.data,new D(r.thisDep,r.contextDep,r.propDep,e)):new D(3===r,2===r,1===r,e)}function F(t,e,r,n,i,a,o,l,c,u,f,h,d,p,m){function g(t){return t.replace(\".\",\"_\")}function y(t,e,r){var n=g(t);$.push(t),Q[n]=K[n]=!!r,et[n]=e}function x(t,e,r){var n=g(t);$.push(t),Array.isArray(r)?(K[n]=r.slice(),Q[n]=r.slice()):K[n]=Q[n]=r,rt[n]=e}function b(){var t=function(){function t(){var t=[],e=[];return N(function(){t.push.apply(t,E(arguments))},{def:function(){var n=\"v\"+r++;return e.push(n),0<arguments.length&&(t.push(n,\"=\"),t.push.apply(t,E(arguments)),t.push(\";\")),n},toString:function(){return L([0<e.length?\"var \"+e+\";\":\"\",L(t)])}})}function e(){function e(t,e){n(t,e,\"=\",r.def(t,e),\";\")}var r=t(),n=t(),i=r.toString,a=n.toString;return N(function(){r.apply(r,E(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,\"=\",i,\";\")},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return n[e];return e=\"g\"+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=\"a\"+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a<r;++a)n();var s=(a=e()).toString;return o[t]=N(a,{arg:n,toString:function(){return L([\"function(\",i.join(),\"){\",s(),\"}\"])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return N(r,{then:function(){return r.apply(r,E(arguments)),this},else:function(){return n.apply(n,E(arguments)),this},toString:function(){var e=a();return e&&(e=\"else{\"+e+\"}\"),L([\"if(\",t,\"){\",i(),\"}\",e])}})},compile:function(){var t=['\"use strict\";',a,\"return {\"];Object.keys(o).forEach(function(e){t.push('\"',e,'\":',o[e].toString(),\",\")}),t.push(\"}\");var e=L(t).replace(/;/g,\";\\n\").replace(/}/g,\"}\\n\").replace(/{/g,\"{\\n\");return Function.apply(null,n.concat(e)).apply(null,i)}}}(),r=t.link,n=t.global;t.id=at++,t.batchId=\"0\";var i=r(nt),a=t.shared={props:\"a0\"};Object.keys(nt).forEach(function(t){a[t]=n.def(i,\".\",t)});var o=t.next={},s=t.current={};Object.keys(rt).forEach(function(t){Array.isArray(K[t])&&(o[t]=n.def(a.next,\".\",t),s[t]=n.def(a.current,\".\",t))});var l=t.constants={};Object.keys(it).forEach(function(t){l[t]=n.def(JSON.stringify(it[t]))}),t.invoke=function(e,n){switch(n.type){case 0: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 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(\"this\",n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Y),c[t]=r(n)},t}function _(t,r,n,o,c){var u=function(t,e){var r=t.static,n=t.dynamic;if(\"framebuffer\"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),P(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\".width\"),e.set(n,\".framebufferHeight\",r+\".height\"),r})):P(function(t,e){var r=t.shared;return e.set(r.framebuffer,\".next\",\"null\"),r=r.context,e.set(r,\".framebufferWidth\",r+\".drawingBufferWidth\"),e.set(r,\".framebufferHeight\",r+\".drawingBufferHeight\"),\"null\"})}if(\"framebuffer\"in n){var a=n.framebuffer;return O(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;return r=e.def(i,\".getFramebuffer(\",r,\")\"),e.set(i,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\"?\"+r+\".width:\"+n+\".drawingBufferWidth\"),e.set(n,\".framebufferHeight\",r+\"?\"+r+\".height:\"+n+\".drawingBufferHeight\"),r})}return null}(t),h=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return\"width\"in r?n=0|r.width:t=!1,\"height\"in r?o=0|r.height:t=!1,new D(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;\"width\"in r||(a=e.def(i,\".\",\"framebufferWidth\",\"-\",s));var c=o;return\"height\"in r||(c=e.def(i,\".\",\"framebufferHeight\",\"-\",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=O(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,\".x|0\"),a=e.def(r,\".y|0\");return[i,a,e.def('\"width\" in ',r,\"?\",r,\".width|0:\",\"(\",n,\".\",\"framebufferWidth\",\"-\",i,\")\"),r=e.def('\"height\" in ',r,\"?\",r,\".height|0:\",\"(\",n,\".\",\"framebufferHeight\",\"-\",a,\")\")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new D(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,\".\",\"framebufferWidth\"),e.def(r,\".\",\"framebufferHeight\")]}):null}var i=t.static,a=t.dynamic;if(t=n(\"viewport\")){var o=t;t=new D(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,\".viewportWidth\",r[2]),e.set(n,\".viewportHeight\",r[3]),r})}return{viewport:t,scissor_box:n(\"scissor.box\")}}(t,u),d=function(t,e){function r(t,e){if(t in n){var r=0|n[t];return P(function(t,n){return e&&(t.OFFSET=r),r})}if(t in i){var a=i[t];return O(a,function(t,r){var n=t.invoke(r,a);return e&&(t.OFFSET=n),n})}return e&&o?P(function(t,e){return t.OFFSET=\"0\",0}):null}var n=t.static,i=t.dynamic,o=function(){if(\"elements\"in n){var t=n.elements;C(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t));var e=P(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(\"elements\"in i){var r=i.elements;return O(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(\"null\");return n=e.def(n,\"(\",a,\")\"),a=t.cond(n).then(o,\"=\",i,\".createStream(\",a,\");\").else(o,\"=\",i,\".getElements(\",a,\");\"),e.entry(a),e.exit(t.cond(n).then(i,\".destroyStream(\",o,\");\")),t.ELEMENTS=o})}return null}(),s=r(\"offset\",!0);return{elements:o,primitive:function(){if(\"primitive\"in n){var t=n.primitive;return P(function(e,r){return tt[t]})}if(\"primitive\"in i){var e=i.primitive;return O(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,\"[\",i,\"]\")})}return o?I(o)?P(o.value?function(t,e){return e.def(t.ELEMENTS,\".primType\")}:function(){return 4}):new D(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,\"?\",r,\".primType:\",4)}):null}(),count:function(){if(\"count\"in n){var t=0|n.count;return P(function(){return t})}if(\"count\"in i){var e=i.count;return O(e,function(t,r){return t.invoke(r,e)})}return o?I(o)?o?s?new D(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,\".vertCount-\",t.OFFSET)}):P(function(t,e){return e.def(t.ELEMENTS,\".vertCount\")}):P(function(){return-1}):new D(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\")}):null}(),instances:r(\"instances\",!1),offset:s}}(t),p=function(t,e){var r=t.static,n=t.dynamic,i={};return $.forEach(function(t){function e(e,o){if(t in r){var s=e(r[t]);i[a]=P(function(){return s})}else if(t in n){var l=n[t];i[a]=O(l,function(t,e){return o(t,e,t.invoke(e,l))})}}var a=g(t);switch(t){case\"cull.enable\":case\"blend.enable\":case\"dither\":case\"stencil.enable\":case\"depth.enable\":case\"scissor.enable\":case\"polygonOffset.enable\":case\"sample.alpha\":case\"sample.enable\":case\"depth.mask\":return e(function(t){return t},function(t,e,r){return r});case\"depth.func\":return e(function(t){return mt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,\"[\",r,\"]\")});case\"depth.range\":return e(function(t){return t},function(t,e,r){return t=e.def(\"+\",r,\"[0]\"),e=e.def(\"+\",r,\"[1]\"),[t,e]});case\"blend.func\":return e(function(t){return[pt[\"srcRGB\"in t?t.srcRGB:t.src],pt[\"dstRGB\"in t?t.dstRGB:t.dst],pt[\"srcAlpha\"in t?t.srcAlpha:t.src],pt[\"dstAlpha\"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('\"',t,n,'\" in ',r,\"?\",r,\".\",t,n,\":\",r,\".\",t)}t=t.constants.blendFuncs;var i=n(\"src\",\"RGB\"),a=n(\"dst\",\"RGB\"),o=(i=e.def(t,\"[\",i,\"]\"),e.def(t,\"[\",n(\"src\",\"Alpha\"),\"]\"));return a=e.def(t,\"[\",a,\"]\"),t=e.def(t,\"[\",n(\"dst\",\"Alpha\"),\"]\"),[i,a,o,t]});case\"blend.equation\":return e(function(t){return\"string\"==typeof t?[W[t],W[t]]:\"object\"==typeof t?[W[t.rgb],W[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(\"typeof \",r,'===\"string\"')).then(i,\"=\",a,\"=\",n,\"[\",r,\"];\"),t.else(i,\"=\",n,\"[\",r,\".rgb];\",a,\"=\",n,\"[\",r,\".alpha];\"),e(t),[i,a]});case\"blend.color\":return e(function(t){return s(4,function(e){return+t[e]})},function(t,e,r){return s(4,function(t){return e.def(\"+\",r,\"[\",t,\"]\")})});case\"stencil.mask\":return e(function(t){return 0|t},function(t,e,r){return e.def(r,\"|0\")});case\"stencil.func\":return e(function(t){return[mt[t.cmp||\"keep\"],t.ref||0,\"mask\"in t?t.mask:-1]},function(t,e,r){t=e.def('\"cmp\" in ',r,\"?\",t.constants.compareFuncs,\"[\",r,\".cmp]\",\":\",7680);var n=e.def(r,\".ref|0\");return e=e.def('\"mask\" in ',r,\"?\",r,\".mask|0:-1\"),[t,n,e]});case\"stencil.opFront\":case\"stencil.opBack\":return e(function(e){return[\"stencil.opBack\"===t?1029:1028,gt[e.fail||\"keep\"],gt[e.zfail||\"keep\"],gt[e.zpass||\"keep\"]]},function(e,r,n){function i(t){return r.def('\"',t,'\" in ',n,\"?\",a,\"[\",n,\".\",t,\"]:\",7680)}var a=e.constants.stencilOps;return[\"stencil.opBack\"===t?1029:1028,i(\"fail\"),i(\"zfail\"),i(\"zpass\")]});case\"polygonOffset.offset\":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return t=e.def(r,\".factor|0\"),e=e.def(r,\".units|0\"),[t,e]});case\"cull.face\":return e(function(t){var e=0;return\"front\"===t?e=1028:\"back\"===t&&(e=1029),e},function(t,e,r){return e.def(r,'===\"front\"?',1028,\":\",1029)});case\"lineWidth\":return e(function(t){return t},function(t,e,r){return r});case\"frontFace\":return e(function(t){return vt[t]},function(t,e,r){return e.def(r+'===\"cw\"?2304:2305')});case\"colorMask\":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return s(4,function(t){return\"!!\"+r+\"[\"+t+\"]\"})});case\"sample.coverage\":return e(function(t){return[\"value\"in t?t.value:1,!!t.invert]},function(t,e,r){return t=e.def('\"value\" in ',r,\"?+\",r,\".value:1\"),e=e.def(\"!!\",r,\".invert\"),[t,e]})}}),i}(t),m=function(t){function r(t){if(t in n){var r=e.id(n[t]);return t=P(function(){return r}),t.id=r,t}if(t in i){var a=i[t];return O(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,\".id(\",r,\")\")})}return null}var n=t.static,i=t.dynamic,a=r(\"frag\"),o=r(\"vert\"),s=null;return I(a)&&I(o)?(s=f.program(o.id,a.id),t=P(function(t,e){return t.link(s)})):t=new D(a&&a.thisDep||o&&o.thisDep,a&&a.contextDep||o&&o.contextDep,a&&a.propDep||o&&o.propDep,function(t,e){var r,n=t.shared.shader;r=a?a.append(t,e):e.def(n,\".\",\"frag\");var i;return i=o?o.append(t,e):e.def(n,\".\",\"vert\"),e.def(n+\".program(\"+i+\",\"+r+\")\")}),{frag:a,vert:o,progVar:t,program:s}}(t),y=h.viewport;return y&&(p.viewport=y),y=g(\"scissor.box\"),(h=h[y])&&(p[y]=h),h=0<Object.keys(p).length,u={framebuffer:u,draw:d,shader:m,state:p,dirty:h},u.profile=function(t){var e=t.static;t=t.dynamic;var r;if(\"profile\"in e){var n=!!e.profile;(r=P(function(t,e){return n})).enable=n}else if(\"profile\"in t){var i=t.profile;r=O(i,function(t,e){return t.invoke(e,i)})}return r}(t),u.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(\"number\"==typeof n||\"boolean\"==typeof n)e=P(function(){return n});else if(\"function\"==typeof n){var a=n._reglType;\"texture2d\"===a||\"textureCube\"===a?e=P(function(t){return t.link(n)}):\"framebuffer\"!==a&&\"framebufferCube\"!==a||(e=P(function(t){return t.link(n.color[0])}))}else v(n)&&(e=P(function(t){return t.global.def(\"[\",s(n.length,function(t){return n[t]}),\"]\")}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=O(e,function(t,r){return t.invoke(r,e)})}),i}(n),u.attributes=function(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Y;if(C(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(r.constant){var l=r.constant;s.buffer=\"null\",s.state=2,\"number\"==typeof l?s.x=l:ht.forEach(function(t,e){e<l.length&&(s[t]=l[e])})}else{var c=C(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,d=!!r.normalized,p=0;\"type\"in r&&(p=Z[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=d,s.type=p||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=P(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+\".dtype\"),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=O(e,function(t,r){function n(t){r(l[t],\"=\",i,\".\",t,\"|0;\")}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Y;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(\"\"+c[t])});var u=l.buffer,f=l.type;return r(\"if(\",o,\"(\",i,\")){\",l.isStream,\"=true;\",u,\"=\",s,\".createStream(\",34962,\",\",i,\");\",f,\"=\",u,\".dtype;\",\"}else{\",u,\"=\",s,\".getBuffer(\",i,\");\",\"if(\",u,\"){\",f,\"=\",u,\".dtype;\",'}else if(\"constant\" in ',i,\"){\",l.state,\"=\",2,\";\",\"if(typeof \"+i+'.constant === \"number\"){',l[ht[0]],\"=\",i,\".constant;\",ht.slice(1).map(function(t){return l[t]}).join(\"=\"),\"=0;\",\"}else{\",ht.map(function(t,e){return l[t]+\"=\"+i+\".constant.length>=\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",o,\"(\",i,\".buffer)){\",u,\"=\",s,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",s,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",a.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",s,\".destroyStream(\",u,\");\",\"}\"),l})}),o}(r),u.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=P(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]=O(e,function(t,r){return t.invoke(r,e)})}),n}(o),u}function w(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,\".\"+a),i(n,\".\",a,\"=\",r[a].append(t,e),\";\")}),e(i)}function M(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;J&&(i=e.def(s.extensions,\".webgl_draw_buffers\"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,\".next\"),n||e(\"if(\",t,\"!==\",o,\".cur){\"),e(\"if(\",t,\"){\",a,\".bindFramebuffer(\",36160,\",\",t,\".framebuffer);\"),J&&e(i,\".drawBuffersWEBGL(\",s,\"[\",t,\".colorAttachments.length]);\"),e(\"}else{\",a,\".bindFramebuffer(\",36160,\",null);\"),J&&e(i,\".drawBuffersWEBGL(\",l,\");\"),e(\"}\",o,\".cur=\",t,\";\"),n||e(\"}\")}function k(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,l=n.current,c=n.next,u=t.cond(l,\".dirty\");$.forEach(function(e){if(!((e=g(e))in r.state)){var n,f;if(e in o){n=o[e],f=a[e];var h=s(K[e].length,function(t){return u.def(n,\"[\",t,\"]\")});u(t.cond(h.map(function(t,e){return t+\"!==\"+f+\"[\"+e+\"]\"}).join(\"||\")).then(i,\".\",rt[e],\"(\",h,\");\",h.map(function(t,e){return f+\"[\"+e+\"]=\"+t}).join(\";\"),\";\"))}else n=u.def(c,\".\",e),h=t.cond(n,\"!==\",l,\".\",e),u(h),e in et?h(t.cond(n).then(i,\".enable(\",et[e],\");\").else(i,\".disable(\",et[e],\");\"),l,\".\",e,\"=\",n,\";\"):h(i,\".\",rt[e],\"(\",n,\");\",l,\".\",e,\"=\",n,\";\")}}),0===Object.keys(r.state).length&&u(l,\".dirty=false;\"),e(u)}function A(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;z(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(et[i]){var u=et[i];I(l)?c?e(s,\".enable(\",u,\");\"):e(s,\".disable(\",u,\");\"):e(t.cond(c).then(s,\".enable(\",u,\");\").else(s,\".disable(\",u,\");\")),e(o,\".\",i,\"=\",c,\";\")}else if(v(c)){var f=a[i];e(s,\".\",rt[i],\"(\",c,\");\",c.map(function(t,e){return f+\"[\"+e+\"]=\"+t}).join(\";\"),\";\")}else e(s,\".\",rt[i],\"(\",c,\");\",o,\".\",i,\"=\",c,\";\")}})}function T(t,e){X&&(t.instancing=e.def(t.shared.extensions,\".angle_instanced_arrays\"))}function S(t,e,r,n,i){function a(){return\"undefined\"==typeof performance?\"Date.now()\":\"performance.now()\"}function o(t){t(c=e.def(),\"=\",a(),\";\"),\"string\"==typeof i?t(h,\".count+=\",i,\";\"):t(h,\".count++;\"),p&&(n?(u=e.def(),t(u,\"=\",m,\".getNumPendingQueries();\")):t(m,\".beginQuery(\",h,\");\"))}function s(t){t(h,\".cpuTime+=\",a(),\"-\",c,\";\"),p&&(n?t(m,\".pushScopeStats(\",u,\",\",m,\".getNumPendingQueries(),\",h,\");\"):t(m,\".endQuery();\"))}function l(t){var r=e.def(d,\".profile\");e(d,\".profile=\",t,\";\"),e.exit(d,\".profile=\",r,\";\")}var c,u,f=t.shared,h=t.stats,d=f.current,m=f.timer;if(r=r.profile){if(I(r))return void(r.enable?(o(e),s(e.exit),l(\"true\")):l(\"false\"));l(r=r.append(t,e))}else r=e.def(d,\".profile\");o(f=t.block()),e(\"if(\",r,\"){\",f,\"}\"),s(t=t.block()),e.exit(\"if(\",r,\"){\",t,\"}\")}function F(t,e,r,n,i){var a=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(yt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Y).forEach(function(t){o[t]=e.def(c,\".\",t)})}!function(r,n,i){function o(){e(\"if(!\",u,\".buffer){\",l,\".enableVertexAttribArray(\",c,\");}\");var r,a=i.type;r=i.size?e.def(i.size,\"||\",n):n,e(\"if(\",u,\".type!==\",a,\"||\",u,\".size!==\",r,\"||\",d.map(function(t){return u+\".\"+t+\"!==\"+i[t]}).join(\"||\"),\"){\",l,\".bindBuffer(\",34962,\",\",f,\".buffer);\",l,\".vertexAttribPointer(\",[c,r,a,i.normalized,i.stride,i.offset],\");\",u,\".type=\",a,\";\",u,\".size=\",r,\";\",d.map(function(t){return u+\".\"+t+\"=\"+i[t]+\";\"}).join(\"\"),\"}\"),X&&(a=i.divisor,e(\"if(\",u,\".divisor!==\",a,\"){\",t.instancing,\".vertexAttribDivisorANGLE(\",[c,a],\");\",u,\".divisor=\",a,\";}\"))}function s(){e(\"if(\",u,\".buffer){\",l,\".disableVertexAttribArray(\",c,\");\",\"}if(\",ht.map(function(t,e){return u+\".\"+t+\"!==\"+h[e]}).join(\"||\"),\"){\",l,\".vertexAttrib4f(\",c,\",\",h,\");\",ht.map(function(t,e){return u+\".\"+t+\"=\"+h[e]+\";\"}).join(\"\"),\"}\")}var l=a.gl,c=e.def(r,\".location\"),u=e.def(a.attributes,\"[\",c,\"]\");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],d=[\"buffer\",\"normalized\",\"offset\",\"stride\"];1===r?o():2===r?s():(e(\"if(\",r,\"===\",1,\"){\"),o(),e(\"}else{\"),s(),e(\"}\"))}(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function R(t,r,n,i,a){for(var o,l=t.shared,c=l.gl,u=0;u<i.length;++u){var f,h=(m=i[u]).name,d=m.info.type,p=n.uniforms[h],m=t.link(m)+\".location\";if(p){if(!a(p))continue;if(I(p)){if(h=p.value,35678===d||35680===d)d=t.link(h._texture||h.color[0]._texture),r(c,\".uniform1i(\",m,\",\",d+\".bind());\"),r.exit(d,\".unbind();\");else if(35674===d||35675===d||35676===d)h=t.global.def(\"new Float32Array([\"+Array.prototype.slice.call(h)+\"])\"),p=2,35675===d?p=3:35676===d&&(p=4),r(c,\".uniformMatrix\",p,\"fv(\",m,\",false,\",h,\");\");else{switch(d){case 5126:o=\"1f\";break;case 35664:o=\"2f\";break;case 35665:o=\"3f\";break;case 35666:o=\"4f\";break;case 35670:case 5124:o=\"1i\";break;case 35671:case 35667:o=\"2i\";break;case 35672:case 35668:o=\"3i\";break;case 35673:o=\"4i\";break;case 35669:o=\"4i\"}r(c,\".uniform\",o,\"(\",m,\",\",v(h)?Array.prototype.slice.call(h):h,\");\")}continue}f=p.append(t,r)}else{if(!a(yt))continue;f=r.def(l.uniforms,\"[\",e.id(h),\"]\")}switch(35678===d?r(\"if(\",f,\"&&\",f,'._reglType===\"framebuffer\"){',f,\"=\",f,\".color[0];\",\"}\"):35680===d&&r(\"if(\",f,\"&&\",f,'._reglType===\"framebufferCube\"){',f,\"=\",f,\".color[0];\",\"}\"),h=1,d){case 35678:case 35680:r(c,\".uniform1i(\",m,\",\",d=r.def(f,\"._texture\"),\".bind());\"),r.exit(d,\".unbind();\");continue;case 5124:case 35670:o=\"1i\";break;case 35667:case 35671:o=\"2i\",h=2;break;case 35668:case 35672:o=\"3i\",h=3;break;case 35669:case 35673:o=\"4i\",h=4;break;case 5126:o=\"1f\";break;case 35664:o=\"2f\",h=2;break;case 35665:o=\"3f\",h=3;break;case 35666:o=\"4f\",h=4;break;case 35674:o=\"Matrix2fv\";break;case 35675:o=\"Matrix3fv\";break;case 35676:o=\"Matrix4fv\"}if(r(c,\".uniform\",o,\"(\",m,\",\"),\"M\"===o.charAt(0)){m=Math.pow(d-35674+2,2);var g=t.global.def(\"new Float32Array(\",m,\")\");r(\"false,(Array.isArray(\",f,\")||\",f,\" instanceof Float32Array)?\",f,\":(\",s(m,function(t){return g+\"[\"+t+\"]=\"+f+\"[\"+t+\"]\"}),\",\",g,\")\")}else r(1<h?s(h,function(t){return f+\"[\"+t+\"]\"}):f);r(\");\")}}function j(t,e,r,n){function i(i){var a=u[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(c,\".\",i)}function a(){function t(){r(g,\".drawElementsInstancedANGLE(\",[h,p,v,d+\"<<((\"+v+\"-5121)>>1)\",m],\");\")}function e(){r(g,\".drawArraysInstancedANGLE(\",[h,d,p,m],\");\")}f?y?t():(r(\"if(\",f,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(l+\".drawElements(\"+[h,p,v,d+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(l+\".drawArrays(\"+[h,d,p]+\");\")}f?y?t():(r(\"if(\",f,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}var s=t.shared,l=s.gl,c=s.draw,u=n.draw,f=function(){var i=u.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(c,\".\",\"elements\"),i&&a(\"if(\"+i+\")\"+l+\".bindBuffer(34963,\"+i+\".buffer.buffer);\"),i}(),h=i(\"primitive\"),d=i(\"offset\"),p=function(){var i=u.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(c,\".\",\"count\"),i}();if(\"number\"==typeof p){if(0===p)return}else r(\"if(\",p,\"){\"),r.exit(\"}\");var m,g;X&&(m=i(\"instances\"),g=t.instancing);var v=f+\".type\",y=u.elements&&I(u.elements);X&&(\"number\"!=typeof m||0<=m)?\"string\"==typeof m?(r(\"if(\",m,\">0){\"),a(),r(\"}else if(\",m,\"<0){\"),o(),r(\"}\")):a():o()}function U(t,e,r,n,i){return e=b(),i=e.proc(\"body\",i),X&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function V(t,e,r,n){T(t,e),F(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId=\"a1\",T(t,e),F(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function H(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}T(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,\"for(\",s,\"=0;\",s,\"<\",\"a1\",\";++\",s,\"){\",l,\"=\",\"a0\",\"[\",s,\"];\",u,\"}\",c.exit),r.needsContext&&w(t,u,r.context),r.needsFramebuffer&&M(t,u,r.framebuffer),A(t,u,r.state,i),r.profile&&i(r.profile)&&S(t,u,r,!1,!0),n?(F(t,c,r,n.attributes,a),F(t,u,r,n.attributes,i),R(t,c,r,n.uniforms,a),R(t,u,r,n.uniforms,i),j(t,c,u,r)):(e=t.global.def(\"{}\"),n=r.shader.progVar.append(t,u),l=u.def(n,\".id\"),c=u.def(e,\"[\",l,\"]\"),u(t.shared.gl,\".useProgram(\",n,\".program);\",\"if(!\",c,\"){\",c,\"=\",e,\"[\",l,\"]=\",t.link(function(e){return U(q,t,r,e,2)}),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function G(t,e,r){function n(t,e){o.forEach(function(r){var n=i[r];B.isDynamic(n)&&(n=t.invoke(e,n),e(u,\".\",r,\"=\",n,\";\"))})}var i=e.static[r];if(i&&function(t){if(\"object\"==typeof t&&!v(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(B.isDynamic(t[e[r]]))return!0;return!1}}(i)){var a=t.global,o=Object.keys(i),s=!1,l=!1,c=!1,u=t.global.def(\"{}\");o.forEach(function(e){var r=i[e];if(B.isDynamic(r))\"function\"==typeof r&&(r=i[e]=B.unbox(r)),e=O(r,null),s=s||e.thisDep,c=c||e.propDep,l=l||e.contextDep;else{switch(a(u,\".\",e,\"=\"),typeof r){case\"number\":a(r);break;case\"string\":a('\"',r,'\"');break;case\"object\":Array.isArray(r)&&a(\"[\",r.join(),\"]\");break;default:a(t.link(r))}a(\";\")}}),e.dynamic[r]=new B.DynamicVariable(4,{thisDep:s,contextDep:l,propDep:c,ref:u,append:n}),delete e.static[r]}}var Y=u.Record,W={add:32774,subtract:32778,\"reverse subtract\":32779};r.ext_blend_minmax&&(W.min=32775,W.max=32776);var X=r.angle_instanced_arrays,J=r.webgl_draw_buffers,K={dirty:!0,profile:m.profile},Q={},$=[],et={},rt={};y(\"dither\",3024),y(\"blend.enable\",3042),x(\"blend.color\",\"blendColor\",[0,0,0,0]),x(\"blend.equation\",\"blendEquationSeparate\",[32774,32774]),x(\"blend.func\",\"blendFuncSeparate\",[1,0,1,0]),y(\"depth.enable\",2929,!0),x(\"depth.func\",\"depthFunc\",513),x(\"depth.range\",\"depthRange\",[0,1]),x(\"depth.mask\",\"depthMask\",!0),x(\"colorMask\",\"colorMask\",[!0,!0,!0,!0]),y(\"cull.enable\",2884),x(\"cull.face\",\"cullFace\",1029),x(\"frontFace\",\"frontFace\",2305),x(\"lineWidth\",\"lineWidth\",1),y(\"polygonOffset.enable\",32823),x(\"polygonOffset.offset\",\"polygonOffset\",[0,0]),y(\"sample.alpha\",32926),y(\"sample.enable\",32928),x(\"sample.coverage\",\"sampleCoverage\",[1,!1]),y(\"stencil.enable\",2960),x(\"stencil.mask\",\"stencilMask\",-1),x(\"stencil.func\",\"stencilFunc\",[519,0,-1]),x(\"stencil.opFront\",\"stencilOpSeparate\",[1028,7680,7680,7680]),x(\"stencil.opBack\",\"stencilOpSeparate\",[1029,7680,7680,7680]),y(\"scissor.enable\",3089),x(\"scissor.box\",\"scissor\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(\"viewport\",\"viewport\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var nt={gl:t,context:d,strings:e,next:Q,current:K,draw:h,elements:a,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:p,isBufferArgs:C},it={primTypes:tt,compareFuncs:mt,blendFuncs:pt,blendEquations:W,stencilOps:gt,glTypes:Z,orientationType:vt};J&&(it.backBuffer=[1029],it.drawBuffer=s(n.maxDrawbuffers,function(t){return 0===t?[0]:s(t,function(t){return 36064+t})}));var at=0;return{next:Q,current:K,procs:function(){var e=b(),r=e.proc(\"poll\"),i=e.proc(\"refresh\"),a=e.block();r(a),i(a);var o=e.shared,l=o.gl,c=o.next,u=o.current;a(u,\".dirty=false;\"),M(e,r),M(e,i,null,!0);var f,h=t.getExtension(\"angle_instanced_arrays\");h&&(f=e.link(h));for(var d=0;d<n.maxAttributes;++d){var p=i.def(o.attributes,\"[\",d,\"]\"),m=e.cond(p,\".buffer\");m.then(l,\".enableVertexAttribArray(\",d,\");\",l,\".bindBuffer(\",34962,\",\",p,\".buffer.buffer);\",l,\".vertexAttribPointer(\",d,\",\",p,\".size,\",p,\".type,\",p,\".normalized,\",p,\".stride,\",p,\".offset);\").else(l,\".disableVertexAttribArray(\",d,\");\",l,\".vertexAttrib4f(\",d,\",\",p,\".x,\",p,\".y,\",p,\".z,\",p,\".w);\",p,\".buffer=null;\"),i(m),h&&i(f,\".vertexAttribDivisorANGLE(\",d,\",\",p,\".divisor);\")}return Object.keys(et).forEach(function(t){var n=et[t],o=a.def(c,\".\",t),s=e.block();s(\"if(\",o,\"){\",l,\".enable(\",n,\")}else{\",l,\".disable(\",n,\")}\",u,\".\",t,\"=\",o,\";\"),i(s),r(\"if(\",o,\"!==\",u,\".\",t,\"){\",s,\"}\")}),Object.keys(rt).forEach(function(t){var n,o,f=rt[t],h=K[t],d=e.block();d(l,\".\",f,\"(\"),v(h)?(f=h.length,n=e.global.def(c,\".\",t),o=e.global.def(u,\".\",t),d(s(f,function(t){return n+\"[\"+t+\"]\"}),\");\",s(f,function(t){return o+\"[\"+t+\"]=\"+n+\"[\"+t+\"];\"}).join(\"\")),r(\"if(\",s(f,function(t){return n+\"[\"+t+\"]!==\"+o+\"[\"+t+\"]\"}).join(\"||\"),\"){\",d,\"}\")):(n=a.def(c,\".\",t),o=a.def(u,\".\",t),d(n,\");\",u,\".\",t,\"=\",n,\";\"),r(\"if(\",n,\"!==\",o,\"){\",d,\"}\")),i(d)}),e.compile()}(),compile:function(t,r,n,i,a){var o=b();return o.stats=o.link(a),Object.keys(r.static).forEach(function(t){G(o,r,t)}),dt.forEach(function(e){G(o,t,e)}),n=_(t,r,n,i),function(t,e){var r=t.proc(\"draw\",1);T(t,r),w(t,r,e.context),M(t,r,e.framebuffer),k(t,r,e),A(t,r,e.state),S(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,\".useProgram(\",n,\".program);\"),e.shader.program)V(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 U(V,t,e,r,1)}),\"(\",n,\");\",o,\".call(this,a0);\"))}0<Object.keys(e.state).length&&r(t.shared.current,\".dirty=true;\")}(o,n),function(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;w(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),z(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)}):i.set(a.next,\".\"+e,n)}),S(t,i,r,!0,!0),[\"elements\",\"offset\",\"count\",\"instances\",\"primitive\"].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 Y).forEach(function(t){i.set(a,\".\"+t,n[t])})}),n(\"vert\"),n(\"frag\"),0<Object.keys(r.state).length&&(i(o,\".dirty=true;\"),i.exit(o,\".dirty=true;\")),i(\"a1(\",t.shared.context,\",a0,\",t.batchId,\");\")}(o,n),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc(\"batch\",2);t.batchId=\"0\",T(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(w(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||M(t,n,s)):M(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),k(t,n,e),A(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||S(t,n,e,!1,\"a1\"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)H(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,\".useProgram(\",a,\".program);\"),e.shader.program)H(t,n,e,e.shader.program);else{var s=t.global.def(\"{}\"),l=(o=n.def(a,\".id\"),n.def(s,\"[\",o,\"]\"));n(t.cond(l).then(l,\".call(this,a0,a1);\").else(l,\"=\",s,\"[\",o,\"]=\",t.link(function(r){return U(H,t,e,r,2)}),\"(\",a,\");\",l,\".call(this,a0,a1);\"))}0<Object.keys(e.state).length&&n(t.shared.current,\".dirty=true;\")}(o,n),o.compile()}}}function R(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var N=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},j=0,B={DynamicVariable:t,define:function(e,n){return new t(e,r(n+\"\"))},isDynamic:function(e){return\"function\"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,r){return\"function\"==typeof e?new t(0,e):e},accessor:r},U={next:\"function\"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:\"function\"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},V=\"undefined\"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},q=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},H=function(t){return Object.keys(t).map(function(e){return t[e]})},G=s(8,function(){return[]}),Y={alloc:c,free:u,allocType:function(t,e){var r=null;switch(t){case 5120:r=new Int8Array(c(e),0,e);break;case 5121:r=new Uint8Array(c(e),0,e);break;case 5122:r=new Int16Array(c(2*e),0,e);break;case 5123:r=new Uint16Array(c(2*e),0,e);break;case 5124:r=new Int32Array(c(4*e),0,e);break;case 5125:r=new Uint32Array(c(4*e),0,e);break;case 5126:r=new Float32Array(c(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r},freeType:function(t){u(t.buffer)}},W={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||Y.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:f(t,e[0],e[1],e[2],r,0);break;default:h(t,e,0,r,0)}return r}},X={\"[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},Z={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},J={dynamic:35048,stream:35040,static:35044},K=W.flatten,Q=W.shape,$=[];$[5120]=1,$[5122]=2,$[5124]=4,$[5121]=1,$[5123]=2,$[5125]=4,$[5126]=4;var tt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},et=new Float32Array(1),rt=new Uint32Array(et.buffer),nt=[9984,9986,9985,9987],it=[0,6409,6410,6407,6408],at={};at[6409]=at[6406]=at[6402]=1,at[34041]=at[6410]=2,at[6407]=at[35904]=3,at[6408]=at[35906]=4;var ot=Object.keys(X).concat([\"[object HTMLCanvasElement]\",\"[object CanvasRenderingContext2D]\",\"[object HTMLImageElement]\",\"[object HTMLVideoElement]\"]),st=[];st[5121]=1,st[5126]=4,st[36193]=2,st[5123]=2,st[5125]=4;var lt=[];lt[32854]=2,lt[32855]=2,lt[36194]=2,lt[34041]=4,lt[33776]=.5,lt[33777]=.5,lt[33778]=1,lt[33779]=1,lt[35986]=.5,lt[35987]=1,lt[34798]=1,lt[35840]=.5,lt[35841]=.25,lt[35842]=.5,lt[35843]=.25,lt[36196]=.5;var ct=[];ct[32854]=2,ct[32855]=2,ct[36194]=2,ct[33189]=2,ct[36168]=1,ct[34041]=4,ct[35907]=4,ct[34836]=16,ct[34842]=8,ct[34843]=6;var ut=[];ut[6408]=4;var ft=[];ft[5121]=1,ft[5126]=4,ft[36193]=2;var ht=[\"x\",\"y\",\"z\",\"w\"],dt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),pt={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},mt={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},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},vt={cw:2304,ccw:2305},yt=new D(!1,!1,!1,function(){});return function(t){function e(){if(0===it.length)E&&E.update(),lt=null;else{lt=U.next(e),h();for(var t=it.length-1;0<=t;--t){var r=it[t];r&&r(D,null,0)}y.flush(),E&&E.update()}}function r(){!lt&&0<it.length&&(lt=U.next(e))}function n(){lt&&(U.cancel(e),lt=null)}function i(t){t.preventDefault(),n(),at.forEach(function(t){t()})}function s(t){y.getError(),b.restore(),j.restore(),P.restore(),G.restore(),W.restore(),X.restore(),E&&E.restore(),et.procs.refresh(),r(),ot.forEach(function(t){t()})}function l(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];B.isDynamic(i)?r[n]=B.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(e){function r(t){if(t in n){var e=n[t];delete n[t],Object.keys(e).forEach(function(r){n[t+\".\"+r]=e[r]})}}var n=N({},t);return delete n.uniforms,delete n.attributes,delete n.context,\"stencil\"in n&&n.stencil.op&&(n.stencil.opBack=n.stencil.opFront=n.stencil.op,delete n.stencil.op),r(\"blend\"),r(\"depth\"),r(\"cull\"),r(\"stencil\"),r(\"polygonOffset\"),r(\"scissor\"),r(\"sample\"),n}());t={gpuTime:0,cpuTime:0,count:0};var o=(r=et.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return N(function(t,e){var r;if(\"function\"==typeof t)return l.call(this,null,t,0);if(\"function\"==typeof e)if(\"number\"==typeof t)for(r=0;r<t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r<t.length;++r)l.call(this,t[r],e,r)}else if(\"number\"==typeof t){if(0<t)return s.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function c(t,e){var r=0;et.procs.poll();var n=e.color;n&&(y.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),\"depth\"in e&&(y.clearDepth(+e.depth),r|=256),\"stencil\"in e&&(y.clearStencil(0|e.stencil),r|=1024),y.clear(r)}function u(t){return it.push(t),r(),{cancel:function(){function e(){var t=R(it,e);it[t]=it[it.length-1],--it.length,0>=it.length&&n()}var r=R(it,t);it[r]=e}}}function f(){var t=rt.viewport,e=rt.scissor_box;t[0]=t[1]=e[0]=e[1]=0,D.viewportWidth=D.framebufferWidth=D.drawingBufferWidth=t[2]=e[2]=y.drawingBufferWidth,D.viewportHeight=D.framebufferHeight=D.drawingBufferHeight=t[3]=e[3]=y.drawingBufferHeight}function h(){D.tick+=1,D.time=v(),f(),et.procs.poll()}function g(){f(),et.procs.refresh(),E&&E.update()}function v(){return(V()-L)/1e3}if(!(t=a(t)))return null;var y=t.gl,x=y.getContextAttributes();y.isContextLost();var b=function(t,e){function r(e){e=e.toLowerCase();var r;try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('\"'+a+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(\"(regl): error restoring extension \"+t)})}}}(y,t);if(!b)return null;var _=function(){var t={\"\":0},e=[\"\"];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),w={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},M=b.extensions,E=function(t,e){function r(t,e,r){var n=o.pop()||new function(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null};n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,s.push(n)}var n=e.ext_disjoint_timer_query;if(!n)return null;var i=[],a=[],o=[],s=[],l=[],c=[];return{beginQuery:function(t){var e=i.pop()||n.createQueryEXT();n.beginQueryEXT(35007,e),a.push(e),r(a.length-1,a.length,t)},endQuery:function(){n.endQueryEXT(35007)},pushScopeStats:r,update:function(){var t,e;if(0!==(t=a.length)){c.length=Math.max(c.length,t+1),l.length=Math.max(l.length,t+1),l[0]=0;var r=c[0]=0;for(e=t=0;e<a.length;++e){var u=a[e];n.getQueryObjectEXT(u,34919)?(r+=n.getQueryObjectEXT(u,34918),i.push(u)):a[t++]=u,l[e+1]=r,c[e+1]=t}for(a.length=t,e=t=0;e<s.length;++e){var f=(r=s[e]).startQueryIndex;u=r.endQueryIndex,r.sum+=l[u]-l[f],f=c[f],(u=c[u])===f?(r.stats.gpuTime+=r.sum/1e6,o.push(r)):(r.startQueryIndex=f,r.endQueryIndex=u,s[t++]=r)}s.length=t}},getNumPendingQueries:function(){return a.length},clear:function(){i.push.apply(i,a);for(var t=0;t<i.length;t++)n.deleteQueryEXT(i[t]);a.length=0,i.length=0},restore:function(){a.length=0,i.length=0}}}(0,M),L=V(),C=y.drawingBufferWidth,z=y.drawingBufferHeight,D={tick:0,time:0,viewportWidth:C,viewportHeight:z,framebufferWidth:C,framebufferHeight:z,drawingBufferWidth:C,drawingBufferHeight:z,pixelRatio:t.pixelRatio},I=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;return e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063)),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938)}}(y,M),P=function(t,e,r){function n(e){this.id=l++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function i(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function a(t,e,r,n,a,s){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){a=Q(e);for(var l=n=1;l<a.length;++l)n*=a[l];t.dimension=n,i(t,e=K(e,a,t.dtype),r),s?t.persistentData=e:Y.freeType(e)}else\"number\"==typeof e[0]?(t.dimension=a,a=Y.allocType(t.dtype,e.length),p(a,e),i(t,a,r),s?t.persistentData=a:Y.freeType(a)):q(e[0])&&(t.dimension=e[0].length,t.dtype=n||d(e[0])||5126,e=K(e,[e.length,e[0].length],t.dtype),i(t,e,r),s?t.persistentData=e:Y.freeType(e))}else if(q(e))t.dtype=n||d(e),t.dimension=a,i(t,e,r),s&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(o(e)){a=e.shape;var c=e.stride,u=(l=e.offset,0),f=0,h=0,g=0;1===a.length?(u=a[0],f=1,h=c[0],g=0):2===a.length&&(u=a[0],f=a[1],h=c[0],g=c[1]),t.dtype=n||d(e.data)||5126,t.dimension=f,m(a=Y.allocType(t.dtype,u*f),e.data,u,f,h,g,l),i(t,a,r),s?t.persistentData=a:Y.freeType(a)}}function s(r){e.bufferCount--,t.deleteBuffer(r.buffer),r.buffer=null,delete c[r.id]}var l=0,c={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){s(this)};var u=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(c).forEach(function(e){t+=c[e].stats.size}),t}),{create:function(i,l,u,f){function h(e){var n=35044,i=null,s=0,l=0,c=1;return Array.isArray(e)||q(e)||o(e)?i=e:\"number\"==typeof e?s=0|e:e&&(\"data\"in e&&(i=e.data),\"usage\"in e&&(n=J[e.usage]),\"type\"in e&&(l=Z[e.type]),\"dimension\"in e&&(c=0|e.dimension),\"length\"in e&&(s=0|e.length)),g.bind(),i?a(g,i,n,l,c,f):(t.bufferData(g.type,s,n),g.dtype=l||5121,g.usage=n,g.dimension=c,g.byteLength=s),r.profile&&(g.stats.size=g.byteLength*$[g.dtype]),h}e.bufferCount++;var g=new n(l);return c[g.id]=g,u||h(i),h._reglType=\"buffer\",h._buffer=g,h.subdata=function(e,r){var n,i=0|(r||0);if(g.bind(),q(e))t.bufferSubData(g.type,i,e);else if(Array.isArray(e)){if(0<e.length)if(\"number\"==typeof e[0]){var a=Y.allocType(g.dtype,e.length);p(a,e),t.bufferSubData(g.type,i,a),Y.freeType(a)}else(Array.isArray(e[0])||q(e[0]))&&(n=Q(e),a=K(e,n,g.dtype),t.bufferSubData(g.type,i,a),Y.freeType(a))}else if(o(e)){n=e.shape;var s=e.stride,l=a=0,c=0,u=0;1===n.length?(a=n[0],l=1,c=s[0],u=0):2===n.length&&(a=n[0],l=n[1],c=s[0],u=s[1]),n=Array.isArray(e.data)?g.dtype:d(e.data),m(n=Y.allocType(n,a*l),e.data,a,l,c,u,e.offset),t.bufferSubData(g.type,i,n),Y.freeType(n)}return h},r.profile&&(h.stats=g.stats),h.destroy=function(){s(g)},h},createStream:function(t,e){var r=u.pop();return r||(r=new n(t)),r.bind(),a(r,e,35040,0,1,!1),r},destroyStream:function(t){u.push(t)},clear:function(){H(c).forEach(s),u.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:function(){H(c).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:a}}(y,w,t),O=function(t,e,r,n){function i(t){this.id=c++,l[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,s,l,c,u){if(n.buffer.bind(),i){var f=u;u||q(i)&&(!o(i)||q(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=l)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=s,0>s&&(i=4,1===(s=n.buffer.dimension)&&(i=0),2===s&&(i=1),3===s&&(i=4)),n.primType=i}function s(t){n.elementsCount--,delete l[t.id],t.buffer.destroy(),t.buffer=null}var l={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function l(t){if(t)if(\"number\"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,s=0,h=0;Array.isArray(t)||q(t)||o(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=J[t.usage]),\"primitive\"in t&&(n=tt[t.primitive]),\"count\"in t&&(i=0|t.count),\"type\"in t&&(h=u[t.type]),\"length\"in t?s=0|t.length:(s=i,5123===h||5122===h?s*=2:5125!==h&&5124!==h||(s*=4))),a(f,e,r,n,i,s,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return l}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,l(t),l._reglType=\"elements\",l._elements=f,l.subdata=function(t,e){return c.subdata(t,e),l},l.destroy=function(){s(f)},l},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return\"function\"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){H(l).forEach(s)}}}(y,M,P,w),j=(C=function(t,e,r,n,i){for(t=r.maxAttributes,e=Array(t),r=0;r<t;++r)e[r]=new A;return{Record:A,scope:{},state:e}}(y,M,I),T(y,_,w,t)),G=k(y,M,I,function(){et.procs.poll()},D,w,t),W=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,\"rgb5 a1\":32855,depth:33189,stencil:36168,\"depth stencil\":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(\"object\"==typeof e&&e?(\"shape\"in e?(a=e.shape,n=0|a[0],a=0|a[1]):(\"radius\"in e&&(n=a=0|e.radius),\"width\"in e&&(n=0|e.width),\"height\"in e&&(a=0|e.height)),\"format\"in e&&(u=s[e.format])):\"number\"==typeof e?(n=0|e,a=\"number\"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=ct[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=ct[c.format]*c.width*c.height),o)},o._reglType=\"renderbuffer\",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){H(u).forEach(o)},restore:function(){H(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}}(y,M,0,w,t),X=function(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return\"object\"==typeof t&&(i=t.data,\"target\"in t&&(e=0|t.target)),\"texture2d\"===(t=i._reglType)?r=i:\"textureCube\"===t?r=i:\"renderbuffer\"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?(t=n.create2D({width:t,height:e,format:a,type:s}),t._texture.refCount=0,new o(3553,t,null)):(t=i.create({width:t,height:e,format:a}),t._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function d(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r))}function p(){this.id=M++,k[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function g(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete k[e.id]}function v(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)c(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var d=!0,p=\"rgba\",g=\"uint8\",y=1,x=null,w=null,M=null,k=!1;\"number\"==typeof t?(a=0|t,o=0|e||a):t?(\"shape\"in t?(o=t.shape,a=o[0],o=o[1]):(\"radius\"in t&&(a=o=t.radius),\"width\"in t&&(a=t.width),\"height\"in t&&(o=t.height)),(\"color\"in t||\"colors\"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||(\"colorCount\"in t&&(y=0|t.colorCount),\"colorTexture\"in t&&(d=!!t.colorTexture,p=\"rgba4\"),\"colorType\"in t&&(g=t.colorType,!d)&&(\"half float\"===g||\"float16\"===g?p=\"rgba16f\":\"float\"!==g&&\"float32\"!==g||(p=\"rgba32f\")),\"colorFormat\"in t&&(p=t.colorFormat,0<=b.indexOf(p)?d=!0:0<=_.indexOf(p)&&(d=!1))),(\"depthTexture\"in t||\"depthStencilTexture\"in t)&&(k=!(!t.depthTexture&&!t.depthStencilTexture)),\"depth\"in t&&(\"boolean\"==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),\"stencil\"in t&&(\"boolean\"==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),\"depthStencil\"in t&&(\"boolean\"==typeof t.depthStencil?s=c=t.depthStencil:(M=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,E=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i<y;++i)A[i]=f(a,o,d,p,g);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&&!c&&(T=f(a,o,k,\"depth\",\"uint32\")),w?S=u(w):c&&!s&&(S=f(a,o,!1,\"stencil\",\"uint8\")),M?E=u(M):!x&&!w&&c&&s&&(E=f(a,o,k,\"depth stencil\",\"depth stencil\")),s=null,i=0;i<A.length;++i)l(A[i]),A[i]&&A[i].texture&&(c=ut[A[i].texture._texture.format]*ft[A[i].texture._texture.type],null===s&&(s=c));return l(T),l(S),l(E),m(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,v(n),r}var n=new p;return a.framebufferCount++,r(t,e),N(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)d(o[s],i,a);return d(n.depthAttachment,i,a),d(n.stencilAttachment,i,a),d(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,v(n),r},_reglType:\"framebuffer\",_framebuffer:n,destroy:function(){g(n),m(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[\"rgba\"],_=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];e.ext_srgb&&_.push(\"srgba\"),e.ext_color_buffer_half_float&&_.push(\"rgba16f\",\"rgb16f\"),e.webgl_color_buffer_float&&_.push(\"rgba32f\");var w=[\"uint8\"];e.oes_texture_half_float&&w.push(\"half float\",\"float16\"),e.oes_texture_float&&w.push(\"float\",\"float32\");var M=0,k={};return N(x,{getFramebuffer:function(t){return\"function\"==typeof t&&\"framebuffer\"===t._reglType&&(t=t._framebuffer)instanceof p?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=\"rgba\";var l=\"uint8\",c=1;if(\"number\"==typeof t?o=0|t:t?(\"shape\"in t?o=t.shape[0]:(\"radius\"in t&&(o=0|t.radius),\"width\"in t?o=0|t.width:\"height\"in t&&(o=0|t.height)),(\"color\"in t||\"colors\"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||(\"colorCount\"in t&&(c=0|t.colorCount),\"colorType\"in t&&(l=t.colorType),\"colorFormat\"in t&&(i=t.colorFormat)),\"depth\"in t&&(a.depth=t.depth),\"stencil\"in t&&(a.stencil=t.stencil),\"depthStencil\"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i<c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(c=0;c<t.length;++c)a.color[c].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return N(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),N(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:\"framebufferCube\",destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){H(k).forEach(g)},restore:function(){H(k).forEach(function(e){e.framebuffer=t.createFramebuffer(),v(e)})}})}(y,M,I,G,W,w),et=F(y,_,M,I,P,O,0,X,{},C,j,{elements:null,primitive:4,count:-1,offset:0,instances:-1},D,E,t),rt=(_=S(y,X,et.procs.poll,D),et.next),nt=y.canvas,it=[],at=[],ot=[],st=[t.onDestroy],lt=null;nt&&(nt.addEventListener(\"webglcontextlost\",i,!1),nt.addEventListener(\"webglcontextrestored\",s,!1));var ht=X.setFBO=l({framebuffer:B.define.call(null,1,\"framebuffer\")});return g(),x=N(l,{clear:function(t){if(\"framebuffer\"in t)if(t.framebuffer&&\"framebufferCube\"===t.framebuffer_reglType)for(var e=0;6>e;++e)ht(N({framebuffer:t.framebuffer.faces[e]},t),c);else ht(t,c);else c(0,t)},prop:B.define.bind(null,1),context:B.define.bind(null,2),this:B.define.bind(null,3),draw:l({}),buffer:function(t){return P.create(t,34962,!1,!1)},elements:function(t){return O.create(t,!1)},texture:G.create2D,cube:G.createCube,renderbuffer:W.create,framebuffer:X.create,framebufferCube:X.createCube,attributes:x,frame:u,on:function(t,e){var r;switch(t){case\"frame\":return u(e);case\"lost\":r=at;break;case\"restore\":r=ot;break;case\"destroy\":r=st}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:I,hasExtension:function(t){return 0<=I.extensions.indexOf(t.toLowerCase())},read:_,destroy:function(){it.length=0,n(),nt&&(nt.removeEventListener(\"webglcontextlost\",i),nt.removeEventListener(\"webglcontextrestored\",s)),j.clear(),X.clear(),W.clear(),G.clear(),O.clear(),P.clear(),E&&E.clear(),st.forEach(function(t){t()})},_gl:y,_refresh:g,poll:function(){h(),E&&E.update()},now:v,stats:w}),t.onDone(null,x),x}})},{}],507:[function(t,e,r){\"use strict\";var n,i=\"\";e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"expected a string\");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i=\"\";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i+=t,i=i.substr(0,r)}},{}],508:[function(t,e,r){!function(t,n){\"object\"==typeof r?e.exports=n():t.resolveUrl=n()}(this,function(){return function(){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<t;a++)i.href=arguments[a],n=i.href,e.href=n;return r.removeChild(e),n}})},{}],509:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],510:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r;(l=(s=t[i])-((r=a+s)-a))&&(t[--n]=r,r=l)}var o=0;for(i=n;i<e;++i){var s,l;(l=(s=r)-((r=(a=t[i])+s)-a))&&(t[o++]=l)}return t[o++]=r,t.length=o,t}},{}],511:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){return 1&t?\"-\":\"\"}function a(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",a(t.slice(0,e)),\",\",a(t.slice(e)),\")\"].join(\"\")}function o(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<t.length;++r)e.push([\"scale(\",o(n(t,r)),\",\",i(r),t[0][r],\")\"].join(\"\"));return a(e)}function s(t){return new Function(\"sum\",\"scale\",\"prod\",\"compress\",[\"function robustDeterminant\",t,\"(m){return compress(\",o(function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m[\",r,\"][\",n,\"]\"].join(\"\")}return e}(t)),\")};return robustDeterminant\",t].join(\"\"))(c,u,l,f)}var l=t(\"two-product\"),c=t(\"robust-sum\"),u=t(\"robust-scale\"),f=t(\"robust-compress\"),h=6,d=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;d.length<h;)d.push(s(d.length));for(var t=[],r=[\"function robustDeterminant(m){switch(m.length){\"],n=0;n<h;++n)t.push(\"det\"+n),r.push(\"case \",n,\":return det\",n,\"(m);\");r.push(\"}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant\"),t.push(\"CACHE\",\"gen\",r.join(\"\"));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,d.concat([d,s])),n=0;n<d.length;++n)e.exports[n]=d[n]}()},{\"robust-compress\":510,\"robust-scale\":517,\"robust-sum\":520,\"two-product\":552}],512:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\");e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},{\"robust-sum\":520,\"two-product\":552}],513:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",i(t.slice(0,e)),\",\",i(t.slice(e)),\")\"].join(\"\")}function a(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 a(e,t)}function o(t){return!0&t?\"-\":\"\"}function s(t){if(2===t.length)return[[\"diff(\",a(t[0][0],t[1][1]),\",\",a(t[1][0],t[0][1]),\")\"].join(\"\")];for(var e=[],r=0;r<t.length;++r)e.push([\"scale(\",i(s(n(t,r))),\",\",o(r),t[0][r],\")\"].join(\"\"));return e}function l(t,e){for(var r=[],n=0;n<e-2;++n)r.push([\"prod(m\",t,\"[\",n,\"],m\",t,\"[\",n,\"])\"].join(\"\"));return i(r)}function c(t){for(var e=[],r=[],a=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m\",n,\"[\",t-r-2,\"]\"].join(\"\")}return e}(t),o=0;o<t;++o)a[0][o]=\"1\",a[t-1][o]=\"w\"+o;for(o=0;o<t;++o)0==(1&o)?e.push.apply(e,s(n(a,o))):r.push.apply(r,s(n(a,o)));var c=i(e),p=i(r),m=\"exactInSphere\"+t,g=[];for(o=0;o<t;++o)g.push(\"m\"+o);var v=[\"function \",m,\"(\",g.join(),\"){\"];for(o=0;o<t;++o){v.push(\"var w\",o,\"=\",l(o,t),\";\");for(var y=0;y<t;++y)y!==o&&v.push(\"var w\",o,\"m\",y,\"=scale(w\",o,\",m\",y,\"[0]);\")}v.push(\"var p=\",c,\",n=\",p,\",d=diff(p,n);return d[d.length-1];}return \",m);return new Function(\"sum\",\"diff\",\"prod\",\"scale\",v.join(\"\"))(f,h,u,d)}var u=t(\"two-product\"),f=t(\"robust-sum\"),h=t(\"robust-subtract\"),d=t(\"robust-scale\"),p=6,m=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;m.length<=p;)m.push(c(m.length));for(var t=[],r=[\"slow\"],n=0;n<=p;++n)t.push(\"a\"+n),r.push(\"o\"+n);var i=[\"function testInSphere(\",t.join(),\"){switch(arguments.length){case 0:case 1:return 0;\"];for(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;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere\"),r.push(i.join(\"\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=c(t.length)),e.apply(void 0,t)}].concat(m)),n=0;n<=p;++n)e.exports[n]=m[n]}()},{\"robust-scale\":517,\"robust-subtract\":519,\"robust-sum\":520,\"two-product\":552}],514:[function(t,e,r){\"use strict\";function n(t){for(var e=\"robustLinearSolve\"+t+\"d\",r=[\"function \",e,\"(A,b){return [\"],n=0;n<t;++n){r.push(\"det([\");for(var a=0;a<t;++a){a>0&&r.push(\",\"),r.push(\"[\");for(var o=0;o<t;++o)o>0&&r.push(\",\"),o===n?r.push(\"+b[\",a,\"]\"):r.push(\"+A[\",a,\"][\",o,\"]\");r.push(\"]\")}r.push(\"]),\")}r.push(\"det(A)]}return \",e);var s=new Function(\"det\",r.join(\"\"));return s(t<6?i[t]:i)}var i=t(\"robust-determinant\"),a=6,o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length<a;)o.push(n(o.length));for(var t=[],r=[\"function dispatchLinearSolve(A,b){switch(A.length){\"],i=0;i<a;++i)t.push(\"s\"+i),r.push(\"case \",i,\":return s\",i,\"(A,b);\");r.push(\"}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve\"),t.push(\"CACHE\",\"g\",r.join(\"\"));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,n])),i=0;i<a;++i)e.exports[i]=o[i]}()},{\"robust-determinant\":511}],515:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){return 1&t?\"-\":\"\"}function a(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",a(t.slice(0,e)),\",\",a(t.slice(e)),\")\"].join(\"\")}function o(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<t.length;++r)e.push([\"scale(\",a(o(n(t,r))),\",\",i(r),t[0][r],\")\"].join(\"\"));return e}function s(t){for(var e=[],r=[],i=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m\",n,\"[\",t-r-1,\"]\"].join(\"\")}return e}(t),s=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,o(n(i,h))):r.push.apply(r,o(n(i,h))),s.push(\"m\"+h);var d=a(e),p=a(r),m=\"orientation\"+t+\"Exact\",g=[\"function \",m,\"(\",s.join(),\"){var p=\",d,\",n=\",p,\",d=sub(p,n);return d[d.length-1];};return \",m].join(\"\");return new Function(\"sum\",\"prod\",\"scale\",\"sub\",g)(c,l,u,f)}var l=t(\"two-product\"),c=t(\"robust-sum\"),u=t(\"robust-scale\"),f=t(\"robust-subtract\"),h=5,d=s(3),p=s(4),m=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){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:d(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],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,m=o*l,g=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-m)+f*(g-v)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;m.length<=h;)m.push(s(m.length));for(var t=[],r=[\"slow\"],n=0;n<=h;++n)t.push(\"a\"+n),r.push(\"o\"+n);var i=[\"function getOrientation(\",t.join(),\"){switch(arguments.length){case 0:case 1:return 0;\"];for(n=2;n<=h;++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;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation\"),r.push(i.join(\"\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=s(t.length)),e.apply(void 0,t)}].concat(m)),n=0;n<=h;++n)e.exports[n]=m[n]}()},{\"robust-scale\":517,\"robust-subtract\":519,\"robust-sum\":520,\"two-product\":552}],516:[function(t,e,r){\"use strict\";var n=t(\"robust-sum\"),i=t(\"robust-scale\");e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},{\"robust-scale\":517,\"robust-sum\":520}],517:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"two-sum\");e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&&(o[c++]=s[0]);for(var u=1;u<r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[c++]=s[0]);var h=l[1],d=s[1],p=h+d,m=d-(p-h);s[1]=p,m&&(o[c++]=m)}return s[1]&&(o[c++]=s[1]),0===c&&(o[c++]=0),o.length=c,o}},{\"two-product\":552,\"two-sum\":553}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u);if(Math.max(c,u)<s||l<f)return!1}return!0}(t,e,r,i))};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":515}],519:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],-e[0]);var i,a,o=r+n,s=new Array(o),l=0,c=0,u=0,f=Math.abs,h=t[c],d=f(h),p=-e[u],m=f(p);d<m?(a=h,(c+=1)<r&&(d=f(h=t[c]))):(a=p,(u+=1)<n&&(m=f(p=-e[u]))),c<r&&d<m||u>=n?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=-e[u])));for(var g,v,y=i+a,x=y-i,b=a-x,_=b,w=y;c<r&&u<n;)d<m?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=-e[u]))),(b=(a=_)-(x=(y=i+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g;for(;c<r;)(b=(a=_)-(x=(y=(i=h)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(c+=1)<r&&(h=t[c]);for(;u<n;)(b=(a=_)-(x=(y=(i=p)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(u+=1)<n&&(p=-e[u]);return _&&(s[l++]=_),w&&(s[l++]=w),l||(s[l++]=0),s.length=l,s}},{}],520:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],e[0]);var i,a,o=r+n,s=new Array(o),l=0,c=0,u=0,f=Math.abs,h=t[c],d=f(h),p=e[u],m=f(p);d<m?(a=h,(c+=1)<r&&(d=f(h=t[c]))):(a=p,(u+=1)<n&&(m=f(p=e[u]))),c<r&&d<m||u>=n?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=e[u])));for(var g,v,y=i+a,x=y-i,b=a-x,_=b,w=y;c<r&&u<n;)d<m?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=e[u]))),(b=(a=_)-(x=(y=i+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g;for(;c<r;)(b=(a=_)-(x=(y=(i=h)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(c+=1)<r&&(h=t[c]);for(;u<n;)(b=(a=_)-(x=(y=(i=p)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(u+=1)<n&&(p=e[u]);return _&&(s[l++]=_),w&&(s[l++]=w),l||(s[l++]=0),s.length=l,s}},{}],521:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.ShelfPack=n()}(this,function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.stats={},this.count=function(t){this.stats[t]=1+(0|this.stats[t])}}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a=[],o=0;o<t.length;o++)if(r=t[o].w||t[o].width,n=t[o].h||t[o].height,r&&n){if(!(i=this.packOne(r,n)))continue;e.inPlace&&(t[o].x=i.x,t[o].y=i.y),a.push(i)}if(this.shelves.length>0){for(var s=0,l=0,c=0;c<this.shelves.length;c++){var u=this.shelves[c];l+=u.h,s=Math.max(u.w-u.free,s)}this.resize(s,l)}return a},t.prototype.packOne=function(t,r){for(var n,i,a=0,o={shelf:-1,waste:1/0},s=0;s<this.shelves.length;s++){if(n=this.shelves[s],a+=n.h,r===n.h&&t<=n.free)return this.count(r),n.alloc(t,r);r>n.h||t>n.free||r<n.h&&t<=n.free&&(i=n.h-r)<o.waste&&(o.waste=i,o.shelf=s)}if(-1!==o.shelf)return n=this.shelves[o.shelf],this.count(r),n.alloc(t,r);if(r<=this.h-a&&t<=this.w)return n=new e(a,this.w,r),this.shelves.push(n),this.count(r),n.alloc(t,r);if(this.autoResize){var l,c,u,f;return l=c=this.h,((u=f=this.w)<=l||t>u)&&(f=2*Math.max(t,u)),(l<u||r>l)&&(c=2*Math.max(r,l)),this.resize(f,c),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;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e){if(t>this.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})},{}],522:[function(t,e,r){\"use strict\";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],523:[function(t,e,r){\"use strict\";e.exports=function(t){return i(n(t))};var n=t(\"boundary-cells\"),i=t(\"reduce-simplicial-complex\")},{\"boundary-cells\":74,\"reduce-simplicial-complex\":499}],524:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t)),0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c<r;++c)for(var u=t[c],f=(e=u.length,0);f<e;++f)for(var h=0;h<f;++h){var d=u[h],p=u[f];s[l++]=0|Math.min(d,p),s[l++]=0|Math.max(d,p)}a(n(s,[l/2|0,2]));var m=2;for(c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[m++]=s[c],s[m++]=s[c+1]);return n(s,[m/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u<s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var d=e[f],p=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(p-a)/(p-d)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}for(r[2*o+1]=n;++o<e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),d=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),p=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:d,vertexWeights:p}};var n=t(\"ndarray\"),i=t(\"typedarray-pool\"),a=t(\"ndarray-sort\"),o=t(\"./lib/codegen\")},{\"./lib/codegen\":525,ndarray:458,\"ndarray-sort\":456,\"typedarray-pool\":554}],525:[function(t,e,r){\"use strict\";e.exports=function(t){var e=a[t];return e||(e=a[t]=function(t){function e(t){if(!(t.length<=0)){c.push(\"R.push(\");for(var e=0;e<t.length;++e){var r=t[e];e>0&&c.push(\",\"),c.push(\"[\");for(var n=0;n<r.length;++n){var i=r[n];n>0&&c.push(\",\"),c.push(\"B(C,E,c[\",i[0],\"],c[\",i[1],\"])\")}c.push(\"]\")}c.push(\");\")}}var r=0,a=new Array(t+1);a[0]=[[]];for(var o=1;o<=t;++o)for(var s=a[o]=i(o),l=0;l<s.length;++l)r=Math.max(r,s[o].length);var c=[\"function B(C,E,i,j){\",\"var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];\",\"while(l<h){\",\"var m=(l+h)>>1,v=E[2*m+1];\",\"if(v===b){return m}\",\"if(b<v){h=m}else{l=m+1}\",\"}\",\"return l;\",\"};\",\"function getContour\",t,\"d(F,E,C,S){\",\"var n=F.length,R=[];\",\"for(var i=0;i<n;++i){var c=F[i],l=c.length;\"];for(o=t+1;o>1;--o){o<t+1&&c.push(\"else \"),c.push(\"if(l===\",o,\"){\");var u=[];for(l=0;l<o;++l)u.push(\"(S[c[\"+l+\"]]<<\"+l+\")\");for(c.push(\"var M=\",u.join(\"+\"),\";if(M===0||M===\",(1<<o)-1,\"){continue}switch(M){\"),s=a[o-1],l=0;l<s.length;++l)c.push(\"case \",l,\":\"),e(s[l]),c.push(\"break;\");c.push(\"}}\")}return c.push(\"}return R;};return getContour\",t,\"d\"),new Function(\"pool\",c.join(\"\"))(n)}(t)),e};var n=t(\"typedarray-pool\"),i=t(\"marching-simplex-table\"),a={}},{\"marching-simplex-table\":436,\"typedarray-pool\":554}],526:[function(t,e,r){\"use strict\";\"use restrict\";function n(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=u[h]-f[h])return n;return 0}}function i(t,e){return n(t[0],e[0])}function a(t,e){if(e){for(var r=t.length,a=new Array(r),o=0;o<r;++o)a[o]=[t[o],e[o]];a.sort(i);for(o=0;o<r;++o)t[o]=a[o][0],e[o]=a[o][1];return t}return t.sort(n),t}function o(t){if(0===t.length)return[];for(var e=1,r=t.length,i=1;i<r;++i){var a=t[i];if(n(a,t[i-1])){if(i===e){e++;continue}t[e++]=a}}return t.length=e,t}function s(t,e){for(var r=0,i=t.length-1,a=-1;r<=i;){var o=r+i>>1,s=n(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(i=o-1)}return a}function l(t,e){for(var r=new Array(t.length),i=0,a=r.length;i<a;++i)r[i]=[];for(var o=[],l=(i=0,e.length);i<l;++i)for(var c=e[i],f=c.length,h=1,d=1<<f;h<d;++h){o.length=u.popCount(h);for(var p=0,m=0;m<f;++m)h&1<<m&&(o[p++]=c[m]);var g=s(t,o);if(!(g<0))for(;r[g++].push(i),!(g>=t.length||0!==n(t[g],o)););}return r}function c(t,e){if(e<0)return[];for(var r=[],n=(1<<e+1)-1,i=0;i<t.length;++i)for(var o=t[i],s=n;s<1<<o.length;s=u.nextCombination(s)){for(var l=new Array(e+1),c=0,f=0;f<o.length;++f)s&1<<f&&(l[c++]=o[f]);r.push(l)}return a(r)}var u=t(\"bit-twiddle\"),f=t(\"union-find\");r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},r.compareCells=n,r.normalize=a,r.unique=o,r.findCell=s,r.incidence=l,r.dual=function(t,e){if(!e)return l(o(c(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],s=0,u=a.length;s<u;++s)r[a[s]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],o=0|i.length,s=1,l=1<<o;s<l;++s){for(var c=[],u=0;u<o;++u)s>>>u&1&&c.push(i[u]);e.push(c)}return a(e)},r.skeleton=c,r.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,s=i.length;o<s;++o){for(var l=new Array(i.length-1),c=0,u=0;c<s;++c)c!==o&&(l[u++]=i[c]);e.push(l)}return a(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new f(e),n=0;n<t.length;++n)for(var i=t[n],a=0;a<i.length;++a)for(var o=a+1;o<i.length;++o)r.link(i[a],i[o]);var s=[],l=r.ranks;for(n=0;n<l.length;++n)l[n]=-1;for(n=0;n<t.length;++n){var c=r.find(t[n][0]);l[c]<0?(l[c]=s.length,s.push([t[n].slice(0)])):s[l[c]].push(t[n].slice(0))}return s}(t,e):function(t){for(var e=o(a(c(t,0))),r=new f(e.length),n=0;n<t.length;++n)for(var i=t[n],l=0;l<i.length;++l)for(var u=s(e,[i[l]]),h=l+1;h<i.length;++h)r.link(u,s(e,[i[h]]));var d=[],p=r.ranks;for(n=0;n<p.length;++n)p[n]=-1;for(n=0;n<t.length;++n){var m=r.find(s(e,[t[n][0]]));p[m]<0?(p[m]=d.length,d.push([t[n].slice(0)])):d[p[m]].push(t[n].slice(0))}return d}(t)}},{\"bit-twiddle\":71,\"union-find\":555}],527:[function(t,e,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],528:[function(t,e,r){arguments[4][526][0].apply(r,arguments)},{\"bit-twiddle\":527,dup:526,\"union-find\":529}],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;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],530:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){function a(t){if(b[t])return 1/0;var r=v[t],i=y[t];return r<0||i<0?1/0:function(t,e,r){return Math.abs(n(t,e,r))/Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}(e[t],e[r],e[i])}function o(t,e){var r=A[t],n=A[e];A[t]=n,A[e]=r,T[r]=e,T[n]=t}function s(t){return x[A[t]]}function l(t){return 1&t?t-1>>1:(t>>1)-1}function c(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<S){var l=s(n);l<r&&(a=n,r=l)}if(i<S&&s(i)<r&&(a=i),a===t)return t;o(t,a),t=a}}function u(t){for(var e=s(t);t>0;){var r=l(t);if(!(r>=0&&e<s(r)))return t;o(t,r),t=r}}function f(){if(S>0){var t=A[0];return o(0,S-1),S-=1,c(0),t}return-1}function h(t,e){var r=A[t];return x[r]===e?t:(x[r]=-1/0,u(t),f(),x[r]=e,S+=1,u(S-1))}function d(t){if(!b[t]){b[t]=!0;var e=v[t],r=y[t];v[r]>=0&&(v[r]=e),y[e]>=0&&(y[e]=r),T[e]>=0&&h(T[e],a(e)),T[r]>=0&&h(T[r],a(r))}}function p(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 m=e.length,g=t.length,v=new Array(m),y=new Array(m),x=new Array(m),b=new Array(m),_=0;_<m;++_)v[_]=y[_]=-1,x[_]=1/0,b[_]=!1;for(_=0;_<g;++_){var w=t[_];if(2!==w.length)throw new Error(\"Input must be a graph\");var M=w[1],k=w[0];-1!==y[k]?y[k]=-2:y[k]=M,-1!==v[M]?v[M]=-2:v[M]=k}var A=[],T=new Array(m);for(_=0;_<m;++_)(x[_]=a(_))<1/0?(T[_]=A.length,A.push(_)):T[_]=-1;var S=A.length;for(_=S>>1;_>=0;--_)c(_);for(;;){var E=f();if(E<0||x[E]>r)break;d(E)}var L=[];for(_=0;_<m;++_)b[_]||(T[_]=L.length,L.push(e[_].slice()));L.length;var C=[];return t.forEach(function(t){var e=p(v,t[0]),r=p(y,t[1]);if(e>=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&C.push([n,i])}}),i.unique(i.normalize(C)),{positions:L,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":515,\"simplicial-complex\":528}],531:[function(t,e,r){\"use strict\";function n(t,e){var r,n;if(e[0][0]<e[1][0])r=e[0],n=e[1];else{if(!(e[0][0]>e[1][0])){var a=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 o<s?o-s:a>l?a-l:o-l}r=e[1],n=e[0]}var c,u;t[0][1]<t[1][1]?(c=t[0],u=t[1]):(c=t[1],u=t[0]);var f=i(n,r,c);return f||((f=i(n,r,u))||u-n)}e.exports=function(t,e){var r,a;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return n(e,t);r=e[1],a=e[0]}var o,s;if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=i(r,a,s),c=i(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=i(s,o,a),c=i(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var i=t(\"robust-orientation\")},{\"robust-orientation\":515}],532:[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]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=u(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=a(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=a(t.right,e))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}e.exports=function(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a<e;++a){var l=t[a],u=l[0][0]<l[1][0];i[2*a]=new s(l[0][0],l,u,a),i[2*a+1]=new s(l[1][0],l,!u,a)}i.sort(function(t,e){var r=t.x-e.x;return r||(r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1])});var h=c(f),d=[],p=[],m=[];for(a=0;a<r;){for(var g=i[a].x,v=[];a<r;){var y=i[a];if(y.x!==g)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(v.push(new o(y.segment[0][1],y.index,!0,!0)),v.push(new o(y.segment[1][1],y.index,!1,!1))):(v.push(new o(y.segment[1][1],y.index,!0,!1)),v.push(new o(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}d.push(h.root),p.push(g),m.push(v)}return new n(d,p,m)};var l=t(\"binary-search-bounds\"),c=t(\"functional-red-black-tree\"),u=t(\"robust-orientation\"),f=t(\"./lib/order-segments\");n.prototype.castUp=function(t){var e=l.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=a(this.slabs[e],t),n=-1;if(r&&(n=r.value),this.coordinates[e]===t[0]){var o=null;if(r&&(o=r.key),e>0){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 c=this.horizontal[e];if(c.length>0){var h=l.ge(c,t[1],i);if(h<c.length){var d=c[h];if(t[1]===d.y){if(d.closed)return d.index;for(;h<c.length-1&&c[h+1].y===t[1];)if(h+=1,(d=c[h]).closed)return d.index;if(d.y===t[1]&&!d.start){if((h+=1)>=c.length)return n;d=c[h]}}if(d.start)if(o){var p=u(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\":531,\"binary-search-bounds\":70,\"functional-red-black-tree\":144,\"robust-orientation\":515}],533:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],c=n[2*o+1],u=i[o],f=a[o],h=o;h>t;){var d=r[h-1],p=n[2*(h-1)];if((d-s||l-p)>=0)break;r[h]=d,n[2*h]=p,n[2*h+1]=n[2*h-1],i[h]=i[h-1],a[h]=a[h-1],h-=1}r[h]=s,n[2*h]=l,n[2*h+1]=c,i[h]=u,a[h]=f}}function i(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],c=i[t],u=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]=c,a[e]=u}function a(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 o(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],c=i[2*t+1],u=a[t],f=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]=c,a[r]=u,o[r]=f}function s(t,e,r,n,i,a,o,s,l,c,u){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],c[t]=c[e],u[t]=u[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,c[e]=a,u[e]=o}function l(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 u(t,e,r,h,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,x=y-m,b=y+m,_=g,w=x,M=y,k=b,A=v,T=t+1,S=e-1,E=0;l(_,w,r,h,d)&&(E=_,_=w,w=E),l(k,A,r,h,d)&&(E=k,k=A,A=E),l(_,M,r,h,d)&&(E=_,_=M,M=E),l(w,M,r,h,d)&&(E=w,w=M,M=E),l(_,k,r,h,d)&&(E=_,_=k,k=E),l(M,k,r,h,d)&&(E=M,M=k,k=E),l(w,A,r,h,d)&&(E=w,w=A,A=E),l(w,M,r,h,d)&&(E=w,w=M,M=E),l(k,A,r,h,d)&&(E=k,k=A,A=E);var L=r[w],C=h[2*w],z=h[2*w+1],D=d[w],I=p[w],P=r[k],O=h[2*k],F=h[2*k+1],R=d[k],N=p[k],j=_,B=M,U=A,V=g,q=y,H=v,G=r[j],Y=r[B],W=r[U];r[V]=G,r[q]=Y,r[H]=W;for(var X=0;X<2;++X){var Z=h[2*j+X],J=h[2*B+X],K=h[2*U+X];h[2*V+X]=Z,h[2*q+X]=J,h[2*H+X]=K}var Q=d[j],$=d[B],tt=d[U];d[V]=Q,d[q]=$,d[H]=tt;var et=p[j],rt=p[B],nt=p[U];p[V]=et,p[q]=rt,p[H]=nt,a(x,t,r,h,d,p),a(b,e,r,h,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,0,D,r,h,d))it!==T&&i(it,T,r,h,d,p),++T;else if(!c(it,P,O,0,R,r,h,d))for(;;){if(c(S,P,O,0,R,r,h,d)){c(S,L,C,0,D,r,h,d)?(o(it,T,S,r,h,d,p),++T,--S):(i(it,S,r,h,d,p),--S);break}if(--S<it)break}s(t,T-1,L,C,z,D,I,r,h,d,p),s(e,S+1,P,O,F,R,N,r,h,d,p),T-2-t<=f?n(t,T-2,r,h,d,p):u(t,T-2,r,h,d,p),e-(S+2)<=f?n(S+2,e,r,h,d,p):u(S+2,e,r,h,d,p),S-T<=f?n(T,S,r,h,d,p):u(T,S,r,h,d,p)}e.exports=function(t,e,r,i,a){a<=4*f?n(0,a-1,t,e,r,i):u(0,a-1,t,e,r,i)};var f=32},{}],534:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s){for(var l=r,c=r;c<n;++c){var u=t[2*c],f=t[2*c+1],h=e[c];i<=u&&u<=o&&a<=f&&f<=s&&(c===l?l+=1:(t[2*c]=t[2*l],t[2*c+1]=t[2*l+1],e[c]=e[l],t[2*l]=u,t[2*l+1]=f,e[l]=h,l+=1))}return l}function i(t,e,r){this.pixelSize=t,this.offset=e,this.count=r}var a=t(\"./lib/sort\"),o=t(\"array-bounds\");e.exports=function(t,e,r,s){function l(i,a,o,s,c,u){var f=.5*o,h=s+1,d=c-s;r[b]=d,x[b++]=u;for(var p=0;p<2;++p)for(var m=0;m<2;++m){var g=i+p*f,v=a+m*f,y=n(t,e,h,c,g,v,g+f,v+f);if(y!==h){if(y-h>=Math.max(.9*d,32)){var _=c+s>>>1;l(g,v,f,h,_,u+1),h=_}l(g,v,f,h,y,u+1),h=y}}}var c=t.length>>>1;if(c<1)return[];e||(e=Array(c)),r||(r=Array(c)),s||(s=[]);for(var u=0;u<c;++u)e[u]=u;if(!s.length||s.length<4||s[0]>=s[2]||s[1]>=s[3]){var f=o(t,2);f[0]===f[2]&&(f[2]+=1),f[1]===f[3]&&(f[3]+=1),s[0]=f[0],s[1]=f[1],s[2]=f[2],s[3]=f[3]}var h=s[0],d=s[1],p=s[2],m=s[3],g=1/(p-h),v=1/(m-d),y=Math.max(p-h,m-d),x=new Int32Array(c),b=0;l(h,d,y,0,c,0),a(x,t,e,r,c);var _=[],w=0,M=c;for(b=c-1;b>=0;--b){t[2*b]=(t[2*b]-h)*g,t[2*b+1]=(t[2*b+1]-d)*v;var k=x[b];k!==w&&(_.push(new i(y*Math.pow(.5,k),b+1,M-(b+1))),M=b+1,w=k)}return _.push(new i(y*Math.pow(.5,k+1),0,M)),_}},{\"./lib/sort\":533,\"array-bounds\":48}],535:[function(t,e,r){\"use strict\";function n(t,e){var r=o(a(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}var a=t(\"robust-dot-product\"),o=t(\"robust-sum\");e.exports=function(t,e){for(var r=[],a=[],o=n(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c<t.length;++c,s=l){var u=n(l=t[c],e);if(o<0&&u>0||o>0&&u<0){var f=i(s,u,l,o);r.push(f),a.push(f.slice())}u<0?a.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=u}return{positive:r,negative:a}},e.exports.positive=function(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l<t.length;++l,o=s){var c=n(s=t[l],e);(a<0&&c>0||a>0&&c<0)&&r.push(i(o,c,s,a)),c>=0&&r.push(s.slice()),a=c}return r},e.exports.negative=function(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l<t.length;++l,o=s){var c=n(s=t[l],e);(a<0&&c>0||a>0&&c<0)&&r.push(i(o,c,s,a)),c<=0&&r.push(s.slice()),a=c}return r}},{\"robust-dot-product\":512,\"robust-sum\":520}],536:[function(t,e,r){!function(t){function e(){var t=arguments[0],r=e.cache;return r[t]&&r.hasOwnProperty(t)||(r[t]=e.parse(t)),e.format.call(null,r[t],arguments)}function n(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var i={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:/^[\\+\\-]/};e.format=function(t,r){var a,o,s,l,c,u,f,h=1,d=t.length,p=\"\",m=[],g=!0,v=\"\";for(o=0;o<d;o++)if(\"string\"===(p=n(t[o])))m[m.length]=t[o];else if(\"array\"===p){if((l=t[o])[2])for(a=r[h],s=0;s<l[2].length;s++){if(!a.hasOwnProperty(l[2][s]))throw new Error(e(\"[sprintf] property '%s' does not exist\",l[2][s]));a=a[l[2][s]]}else a=l[1]?r[l[1]]:r[h++];if(\"function\"==n(a)&&(a=a()),i.not_string.test(l[8])&&i.not_json.test(l[8])&&\"number\"!=n(a)&&isNaN(a))throw new TypeError(e(\"[sprintf] expecting number but found %s\",n(a)));switch(i.number.test(l[8])&&(g=a>=0),l[8]){case\"b\":a=a.toString(2);break;case\"c\":a=String.fromCharCode(a);break;case\"d\":case\"i\":a=parseInt(a,10);break;case\"j\":a=JSON.stringify(a,null,l[6]?parseInt(l[6]):0);break;case\"e\":a=l[7]?a.toExponential(l[7]):a.toExponential();break;case\"f\":a=l[7]?parseFloat(a).toFixed(l[7]):parseFloat(a);break;case\"g\":a=l[7]?parseFloat(a).toPrecision(l[7]):parseFloat(a);break;case\"o\":a=a.toString(8);break;case\"s\":a=(a=String(a))&&l[7]?a.substring(0,l[7]):a;break;case\"u\":a>>>=0;break;case\"x\":a=a.toString(16);break;case\"X\":a=a.toString(16).toUpperCase()}i.json.test(l[8])?m[m.length]=a:(!i.number.test(l[8])||g&&!l[3]?v=\"\":(v=g?\"+\":\"-\",a=a.toString().replace(i.sign,\"\")),u=l[4]?\"0\"===l[4]?\"0\":l[4].charAt(1):\" \",f=l[6]-(v+a).length,c=l[6]&&f>0?function(t,e){return Array(e+1).join(t)}(u,f):\"\",m[m.length]=l[5]?v+a+c:\"0\"===u?v+c+a:c+v+a)}return m.join(\"\")},e.cache={},e.parse=function(t){for(var e=t,r=[],n=[],a=0;e;){if(null!==(r=i.text.exec(e)))n[n.length]=r[0];else if(null!==(r=i.modulo.exec(e)))n[n.length]=\"%\";else{if(null===(r=i.placeholder.exec(e)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(r[2]){a|=1;var o=[],s=r[2],l=[];if(null===(l=i.key.exec(s)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o[o.length]=l[1];\"\"!==(s=s.substring(l[0].length));)if(null!==(l=i.key_access.exec(s)))o[o.length]=l[1];else{if(null===(l=i.index_access.exec(s)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o[o.length]=l[1]}r[2]=o}else a|=2;if(3===a)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 a=function(t,r,n){return(n=(r||[]).slice(0)).splice(0,0,t),e.apply(null,n)};void 0!==r?(r.sprintf=e,r.vsprintf=a):(t.sprintf=e,t.vsprintf=a)}(\"undefined\"==typeof window?this:window)},{}],537:[function(t,e,r){\"use strict\";e.exports=function(t){function e(e){var r=[e],c=[e];for(n[e]=i[e]=u,a[e]=!0,u+=1;c.length>0;){e=c[c.length-1];var d=t[e];if(o[e]<d.length){for(var p=o[e];p<d.length;++p){var m=d[p];if(n[m]<0){n[m]=i[m]=u,a[m]=!0,u+=1,r.push(m),c.push(m);break}a[m]&&(i[e]=0|Math.min(i[e],i[m])),s[m]>=0&&l[e].push(s[m])}o[e]=p}else{if(i[e]===n[e]){var g=[],v=[],y=0;for(p=r.length-1;p>=0;--p){var x=r[p];if(a[x]=!1,g.push(x),v.push(l[x]),y+=l[x].length,s[x]=f.length,x===e){r.length=p;break}}f.push(g);var b=new Array(y);for(p=0;p<v.length;p++)for(var _=0;_<v[p].length;_++)b[--y]=v[p][_];h.push(b)}c.pop()}}}for(var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o=new Array(r),s=new Array(r),l=new Array(r),c=0;c<r;++c)n[c]=-1,i[c]=0,a[c]=!1,o[c]=0,s[c]=-1,l[c]=[];var u=0,f=[],h=[];for(c=0;c<r;++c)n[c]<0&&e(c);var d;for(c=0;c<h.length;c++){var p=h[c];if(0!==p.length){p.sort(function(t,e){return t-e}),d=[p[0]];for(var m=1;m<p.length;m++)p[m]!==p[m-1]&&d.push(p[m]);h[c]=d}}return{components:f,adjacencyList:h}}},{}],538:[function(t,e,r){\"use strict\";function n(t){this.options=c(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function i(t,e){var r=t.geometry.coordinates;return{x:s(r[0]),y:l(r[1]),zoom:1/0,id:e,parentId:-1}}function a(t){return{type:\"Feature\",properties:o(t),geometry:{type:\"Point\",coordinates:[function(t){return 360*(t-.5)}(t.x),function(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}(t.y)]}}}function o(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return c(c({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function s(t){return t/360+.5}function l(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 c(t,e){for(var r in e)t[r]=e[r];return t}function u(t){return t.x}function f(t){return t.y}var h=t(\"kdbush\");e.exports=function(t){return new n(t)},n.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(i);e&&console.timeEnd(r);for(var a=this.options.maxZoom;a>=this.options.minZoom;a--){var o=+Date.now();this.trees[a+1]=h(n,u,f,this.options.nodeSize,Float32Array),n=this._cluster(n,a),e&&console.log(\"z%d: %d clusters in %dms\",a,n.length,+Date.now()-o)}return this.trees[this.options.minZoom]=h(n,u,f,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(s(t[0]),l(t[3]),s(t[2]),l(t[1])),i=[],o=0;o<n.length;o++){var c=r.points[n[o]];i.push(c.numPoints?a(c):this.points[c.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),o=[],s=0;s<i.length;s++){var l=this.trees[e+1].points[i[s]];l.parentId===t&&o.push(l.numPoints?a(l):this.points[l.id])}return o},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s<o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count<=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a<i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var s=0;s<t.length;s++){var l=e[t[s]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(l.x*i-r)),Math.round(this.options.extent*(l.y*i-n))]],tags:l.numPoints?o(l):this.points[l.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&&(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h<s.length;h++){var d=o.points[s[h]];if(e<d.zoom){var p=d.numPoints||1;d.zoom=e,c+=d.x*p,u+=d.y*p,l+=p,d.parentId=i,this.options.reduce&&this._accumulate(f,d)}}1===l?r.push(a):(a.parentId=i,r.push(function(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}}},{kdbush:288}],539:[function(t,e,r){\"use strict\";e.exports=function(t){return t.split(\"\").map(function(t){return t in n?n[t]:\"\"}).join(\"\")};var n={\" \":\" \",0:\"\\u2070\",1:\"\\xb9\",2:\"\\xb2\",3:\"\\xb3\",4:\"\\u2074\",5:\"\\u2075\",6:\"\\u2076\",7:\"\\u2077\",8:\"\\u2078\",9:\"\\u2079\",\"+\":\"\\u207a\",\"-\":\"\\u207b\",a:\"\\u1d43\",b:\"\\u1d47\",c:\"\\u1d9c\",d:\"\\u1d48\",e:\"\\u1d49\",f:\"\\u1da0\",g:\"\\u1d4d\",h:\"\\u02b0\",i:\"\\u2071\",j:\"\\u02b2\",k:\"\\u1d4f\",l:\"\\u02e1\",m:\"\\u1d50\",n:\"\\u207f\",o:\"\\u1d52\",p:\"\\u1d56\",r:\"\\u02b3\",s:\"\\u02e2\",t:\"\\u1d57\",u:\"\\u1d58\",v:\"\\u1d5b\",w:\"\\u02b7\",x:\"\\u02e3\",y:\"\\u02b8\",z:\"\\u1dbb\"}},{}],540:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s<n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+\"-\"+t.dtype,s=o[r];return e=+e||0,s||(s=o[r]=function(t,e){var r=t.length,a=[\"'use strict';\"],o=\"surfaceNets\"+t.join(\"_\")+\"d\"+e;a.push(\"var contour=genContour({\",\"order:[\",t.join(),\"],\",\"scalarArguments: 3,\",\"phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },\"),\"generic\"===e&&a.push(\"getters:[0],\");for(var s=[],l=[],c=0;c<r;++c)s.push(\"d\"+c),l.push(\"d\"+c);for(c=0;c<1<<r;++c)s.push(\"v\"+c),l.push(\"v\"+c);for(c=0;c<1<<r;++c)s.push(\"p\"+c),l.push(\"p\"+c);s.push(\"a\",\"b\",\"c\"),l.push(\"a\",\"c\"),a.push(\"vertex:function vertexFunc(\",s.join(),\"){\");var u=[];for(c=0;c<1<<r;++c)u.push(\"(p\"+c+\"<<\"+c+\")\");a.push(\"var m=(\",u.join(\"+\"),\")|0;if(m===0||m===\",(1<<(1<<r))-1,\"){return}\");var f=[],h=[];for(1<<(1<<r)<=128?(a.push(\"switch(m){\"),h=a):a.push(\"switch(m>>>7){\"),c=0;c<1<<(1<<r);++c){if(1<<(1<<r)>128&&c%128==0){f.length>0&&h.push(\"}}\");var d=\"vExtra\"+f.length;a.push(\"case \",c>>>7,\":\",d,\"(m&0x7f,\",l.join(),\");break;\"),h=[\"function \",d,\"(m,\",l.join(),\"){switch(m){\"],f.push(h)}h.push(\"case \",127&c,\":\");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,x=0;x<r;++x)p[x]=[],m[x]=[],g[x]=0,v[x]=0;for(x=0;x<1<<r;++x)for(var b=0;b<r;++b){var _=x^1<<b;if(!(_>x)&&!(c&1<<_)!=!(c&1<<x)){var w=1;c&1<<_?m[b].push(\"v\"+_+\"-v\"+x):(m[b].push(\"v\"+x+\"-v\"+_),w=-w),w<0?(p[b].push(\"-v\"+x+\"-v\"+_),g[b]+=2):(p[b].push(\"v\"+x+\"+v\"+_),g[b]-=2),y+=1;for(var M=0;M<r;++M)M!==b&&(_&1<<M?v[M]+=1:v[M]-=1)}}var k=[];for(b=0;b<r;++b)if(0===p[b].length)k.push(\"d\"+b+\"-0.5\");else{var A=\"\";g[b]<0?A=g[b]+\"*c\":g[b]>0&&(A=\"+\"+g[b]+\"*c\");var T=p[b].length/y*.5,S=.5+v[b]/y*.5;k.push(\"d\"+b+\"-\"+S+\"-\"+T+\"*(\"+p[b].join(\"+\")+A+\")/(\"+m[b].join(\"+\")+\")\")}h.push(\"a.push([\",k.join(),\"]);\",\"break;\")}a.push(\"}},\"),f.length>0&&h.push(\"}}\");var E=[];for(c=0;c<1<<r-1;++c)E.push(\"v\"+c);E.push(\"c0\",\"c1\",\"p0\",\"p1\",\"a\",\"b\",\"c\"),a.push(\"cell:function cellFunc(\",E.join(),\"){\");var L=i(r-1);for(a.push(\"if(p0){b.push(\",L.map(function(t){return\"[\"+t.map(function(t){return\"v\"+t})+\"]\"}).join(),\")}else{b.push(\",L.map(function(t){var e=t.slice();return e.reverse(),\"[\"+e.map(function(t){return\"v\"+t})+\"]\"}).join(),\")}}});function \",o,\"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return \",o,\";\"),c=0;c<f.length;++c)a.push(f[c].join(\"\"));return new Function(\"genContour\",a.join(\"\"))(n)}(t.order,t.dtype)),s(t,e)};var n=t(\"ndarray-extract-contour\"),i=t(\"triangulate-hypercube\"),a=t(\"zero-crossings\"),o={}},{\"ndarray-extract-contour\":447,\"triangulate-hypercube\":550,\"zero-crossings\":598}],541:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r<0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,d=void 0===h?0:h,p=t.largeArcFlag,m=void 0===p?0:p,g=t.sweepFlag,v=void 0===g?0:g,y=[];if(0===u||0===f)return[];var x=Math.sin(d*i/360),b=Math.cos(d*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var M=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);M>1&&(u*=Math.sqrt(M),f*=Math.sqrt(M));var k=function(t,e,r,n,a,o,l,c,u,f,h,d){var p=Math.pow(a,2),m=Math.pow(o,2),g=Math.pow(h,2),v=Math.pow(d,2),y=p*m-p*v-m*g;y<0&&(y=0),y/=p*v+m*g;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*d,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,M=(h-x)/a,k=(d-b)/o,A=(-h-x)/a,T=(-d-b)/o,S=s(1,0,M,k),E=s(M,k,A,T);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,m,v,x,b,_,w),A=n(k,4),T=A[0],S=A[1],E=A[2],L=A[3],C=Math.max(Math.ceil(Math.abs(L)/(i/4)),1);L/=C;for(var z=0;z<C;z++)y.push(o(E,L)),E+=L;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],542:[function(t,e,r){\"use strict\";var n=t(\"parse-svg-path\"),i=t(\"abs-svg-path\"),a=t(\"normalize-svg-path\"),o=t(\"is-svg-path\"),s=t(\"assert\");e.exports=function(t){if(Array.isArray(t)&&1===t.length&&\"string\"==typeof t[0]&&(t=t[0]),\"string\"==typeof t&&(s(o(t),\"String is not an SVG path.\"),t=n(t)),s(Array.isArray(t),\"Argument should be a string or an array of path segments.\"),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var c=t[r].slice(1),u=0;u<c.length;u+=2)c[u+0]<e[0]&&(e[0]=c[u+0]),c[u+1]<e[1]&&(e[1]=c[u+1]),c[u+0]>e[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":43,assert:51,\"is-svg-path\":287,\"normalize-svg-path\":543,\"parse-svg-path\":466}],543:[function(t,e,r){\"use strict\";function n(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function i(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,d=0,p=0,m=t.length;p<m;p++){var g=t[p],v=g[0];switch(v){case\"M\":l=g[1],c=g[2];break;case\"A\":var y=a({px:h,py:d,cx:g[6],cy:g[7],rx:g[1],ry:g[2],xAxisRotation:g[3],largeArcFlag:g[4],sweepFlag:g[5]});if(!y.length)continue;for(var x,b=0;b<y.length;b++)g=[\"C\",(x=y[b]).x1,x.y1,x.x2,x.y2,x.x,x.y],b<y.length-1&&r.push(g);break;case\"S\":var _=h,w=d;\"C\"!=e&&\"S\"!=e||(_+=_-o,w+=w-s),g=[\"C\",_,w,g[1],g[2],g[3],g[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(u=2*h-u,f=2*d-f):(u=h,f=d),g=i(h,d,u,f,g[1],g[2]);break;case\"Q\":u=g[1],f=g[2],g=i(h,d,g[1],g[2],g[3],g[4]);break;case\"L\":g=n(h,d,g[1],g[2]);break;case\"H\":g=n(h,d,g[1],d);break;case\"V\":g=n(h,d,h,g[1]);break;case\"Z\":g=n(h,d,l,c)}e=v,h=g[g.length-2],d=g[g.length-1],g.length>4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=d),r.push(g)}return r};var a=t(\"svg-arc-to-cubic-bezier\")},{\"svg-arc-to-cubic-bezier\":541}],544:[function(t,e,r){(function(r){\"use strict\";var n=t(\"svg-path-bounds\"),i=t(\"parse-svg-path\"),a=t(\"draw-svg-path\"),o=t(\"is-svg-path\"),s=t(\"bitmap-sdf\"),l=document.createElement(\"canvas\"),c=l.getContext(\"2d\");e.exports=function(t,e){if(!o(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var u,f;e.shape?(u=e.shape[0],f=e.shape[1]):(u=l.width=e.w||e.width||200,f=l.height=e.h||e.height||200);var h=Math.min(u,f),d=e.stroke||0,p=e.viewbox||e.viewBox||n(t),m=[u/(p[2]-p[0]),f/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(c.fillStyle=\"black\",c.fillRect(0,0,u,f),c.fillStyle=\"white\",d&&(\"number\"!=typeof d&&(d=1),c.strokeStyle=d>0?\"white\":\"black\",c.lineWidth=Math.abs(d)),c.translate(.5*u,.5*f),c.scale(g,g),r.Path2D){var v=new Path2D(t);c.fill(v),d&&c.stroke(v)}else{var y=i(t);a(c,y),c.fill(),d&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bitmap-sdf\":72,\"draw-svg-path\":132,\"is-svg-path\":287,\"parse-svg-path\":466,\"svg-path-bounds\":542}],545:[function(t,e,r){(function(r){\"use strict\";function n(t,e,r){r=r||{};var a=o[t];a||(a=o[t]={\" \":{data:new Float32Array(0),shape:.2}});var s=a[e];if(!s)if(e.length<=1||!/\\d/.test(e))s=a[e]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(i(e,{triangles:!0,font:t,textAlign:r.textAlign||\"left\",textBaseline:\"alphabetic\"}));else{for(var l=e.split(/(\\d|\\s)/),c=new Array(l.length),u=0,f=0,h=0;h<l.length;++h)c[h]=n(t,l[h]),u+=c[h].data.length,f+=c[h].shape,h>0&&(f+=.02);var d=new Float32Array(u),p=0,m=-.5*f;for(h=0;h<c.length;++h){for(var g=c[h].data,v=0;v<g.length;v+=2)d[p++]=g[v]+m,d[p++]=g[v+1];m+=c[h].shape+.02}s=a[e]={data:d,shape:f}}return s}e.exports=n;var i=t(\"vectorize-text\"),a=window||r.global||{},o=a.__TEXT_CACHE||{};a.__TEXT_CACHE={}}).call(this,t(\"_process\"))},{_process:488,\"vectorize-text\":568}],546:[function(t,e,r){!function(t){function r(e,n){if(e=e||\"\",n=n||{},e instanceof r)return e;if(!(this instanceof r))return new r(e,n);var i=function(e){var r={r:0,g:0,b:0},n=1,i=null,a=null,o=null,s=!1,l=!1;\"string\"==typeof e&&(e=function(t){t=t.replace(L,\"\").replace(C,\"\").toLowerCase();var e=!1;if(F[t])t=F[t],e=!0;else if(\"transparent\"==t)return{r:0,g:0,b:0,a:0,format:\"name\"};var r;if(r=N.rgb.exec(t))return{r:r[1],g:r[2],b:r[3]};if(r=N.rgba.exec(t))return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=N.hsl.exec(t))return{h:r[1],s:r[2],l:r[3]};if(r=N.hsla.exec(t))return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=N.hsv.exec(t))return{h:r[1],s:r[2],v:r[3]};if(r=N.hsva.exec(t))return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=N.hex8.exec(t))return{r:M(r[1]),g:M(r[2]),b:M(r[3]),a:S(r[4]),format:e?\"name\":\"hex8\"};if(r=N.hex6.exec(t))return{r:M(r[1]),g:M(r[2]),b:M(r[3]),format:e?\"name\":\"hex\"};if(r=N.hex4.exec(t))return{r:M(r[1]+\"\"+r[1]),g:M(r[2]+\"\"+r[2]),b:M(r[3]+\"\"+r[3]),a:S(r[4]+\"\"+r[4]),format:e?\"name\":\"hex8\"};if(r=N.hex3.exec(t))return{r:M(r[1]+\"\"+r[1]),g:M(r[2]+\"\"+r[2]),b:M(r[3]+\"\"+r[3]),format:e?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(E(e.r)&&E(e.g)&&E(e.b)?(r=function(t,e,r){return{r:255*_(t,255),g:255*_(e,255),b:255*_(r,255)}}(e.r,e.g,e.b),s=!0,l=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):E(e.h)&&E(e.s)&&E(e.v)?(i=A(e.s),a=A(e.v),r=function(e,r,n){e=6*_(e,360),r=_(r,100),n=_(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,i,a),s=!0,l=\"hsv\"):E(e.h)&&E(e.s)&&E(e.l)&&(i=A(e.s),o=A(e.l),r=function(t,e,r){function n(t,e,r){return r<0&&(r+=1),r>1&&(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;t=_(t,360),e=_(e,100),r=_(r,100);if(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}}(e.h,i,o),s=!0,l=\"hsl\"),e.hasOwnProperty(\"a\")&&(n=e.a));return n=b(n),{ok:s,format:e.format||l,r:I(255,P(r.r,0)),g:I(255,P(r.g,0)),b:I(255,P(r.b,0)),a:n}}(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=D(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=D(this._r)),this._g<1&&(this._g=D(this._g)),this._b<1&&(this._b=D(this._b)),this._ok=i.ok,this._tc_id=z++}function n(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n,i,a=P(t,e,r),o=I(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,l:s}}function i(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n,i,a=P(t,e,r),o=I(t,e,r),s=a-o;if(i=0===a?0:s/a,a==o)n=0;else{switch(a){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:i,v:a}}function a(t,e,r,n){var i=[k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function o(t,e,r,n){return[k(T(n)),k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16))].join(\"\")}function s(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s-=e/100,n.s=w(n.s),r(n)}function l(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s+=e/100,n.s=w(n.s),r(n)}function c(t){return r(t).desaturate(100)}function u(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l+=e/100,n.l=w(n.l),r(n)}function f(t,e){e=0===e?0:e||10;var n=r(t).toRgb();return n.r=P(0,I(255,n.r-D(-e/100*255))),n.g=P(0,I(255,n.g-D(-e/100*255))),n.b=P(0,I(255,n.b-D(-e/100*255))),r(n)}function h(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l-=e/100,n.l=w(n.l),r(n)}function d(t,e){var n=r(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,r(n)}function p(t){var e=r(t).toHsl();return e.h=(e.h+180)%360,r(e)}function m(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+120)%360,s:e.s,l:e.l}),r({h:(n+240)%360,s:e.s,l:e.l})]}function g(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+90)%360,s:e.s,l:e.l}),r({h:(n+180)%360,s:e.s,l:e.l}),r({h:(n+270)%360,s:e.s,l:e.l})]}function v(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+72)%360,s:e.s,l:e.l}),r({h:(n+216)%360,s:e.s,l:e.l})]}function y(t,e,n){e=e||6,n=n||30;var i=r(t).toHsl(),a=360/n,o=[r(t)];for(i.h=(i.h-(a*e>>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(r(i));return o}function x(t,e){e=e||6;for(var n=r(t).toHsv(),i=n.h,a=n.s,o=n.v,s=[],l=1/e;e--;)s.push(r({h:i,s:a,v:o})),o=(o+l)%1;return s}function b(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function _(e,r){(function(t){return\"string\"==typeof t&&-1!=t.indexOf(\".\")&&1===parseFloat(t)})(e)&&(e=\"100%\");var n=function(t){return\"string\"==typeof t&&-1!=t.indexOf(\"%\")}(e);return e=I(r,P(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function w(t){return I(1,P(0,t))}function M(t){return parseInt(t,16)}function k(t){return 1==t.length?\"0\"+t:\"\"+t}function A(t){return t<=1&&(t=100*t+\"%\"),t}function T(e){return t.round(255*parseFloat(e)).toString(16)}function S(t){return M(t)/255}function E(t){return!!N.CSS_UNIT.exec(t)}var L=/^\\s+/,C=/\\s+$/,z=0,D=t.round,I=t.min,P=t.max,O=t.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 e,r,n,i,a,o,s=this.toRgb();return e=s.r/255,r=s.g/255,n=s.b/255,i=e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4),a=r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=b(t),this._roundA=D(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=D(360*t.h),r=D(100*t.s),n=D(100*t.v);return 1==this._a?\"hsv(\"+e+\", \"+r+\"%, \"+n+\"%)\":\"hsva(\"+e+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=D(360*t.h),r=D(100*t.s),i=D(100*t.l);return 1==this._a?\"hsl(\"+e+\", \"+r+\"%, \"+i+\"%)\":\"hsla(\"+e+\", \"+r+\"%, \"+i+\"%, \"+this._roundA+\")\"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return\"#\"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16)),k(T(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(\"\")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return\"#\"+this.toHex8(t)},toRgb:function(){return{r:D(this._r),g:D(this._g),b:D(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\"rgb(\"+D(this._r)+\", \"+D(this._g)+\", \"+D(this._b)+\")\":\"rgba(\"+D(this._r)+\", \"+D(this._g)+\", \"+D(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:D(100*_(this._r,255))+\"%\",g:D(100*_(this._g,255))+\"%\",b:D(100*_(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+D(100*_(this._r,255))+\"%, \"+D(100*_(this._g,255))+\"%, \"+D(100*_(this._b,255))+\"%)\":\"rgba(\"+D(100*_(this._r,255))+\"%, \"+D(100*_(this._g,255))+\"%, \"+D(100*_(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(R[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=\"#\"+o(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?\"GradientType = 1, \":\"\";if(t){var a=r(t);n=\"#\"+o(a._r,a._g,a._b,a._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+i+\"startColorstr=\"+e+\",endColorstr=\"+n+\")\"},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 r(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(u,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(h,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(l,arguments)},greyscale:function(){return this._applyModification(c,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(g,arguments)}},r.fromRatio=function(t,e){if(\"object\"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=\"a\"===i?t[i]:A(t[i]));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:O(),g:O(),b:O()})},r.mix=function(t,e,n){n=0===n?0:n||50;var i=r(t).toRgb(),a=r(e).toRgb(),o=n/100;return r({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})},r.readability=function(e,n){var i=r(e),a=r(n);return(t.max(i.getLuminance(),a.getLuminance())+.05)/(t.min(i.getLuminance(),a.getLuminance())+.05)},r.isReadable=function(t,e,n){var i,a,o=r.readability(t,e);switch(a=!1,(i=function(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}}(n)).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},r.mostReadable=function(t,e,n){var i,a,o,s,l=null,c=0;a=(n=n||{}).includeFallbackColors,o=n.level,s=n.size;for(var u=0;u<e.length;u++)(i=r.readability(t,e[u]))>c&&(c=i,l=r(e[u]));return r.isReadable(t,l,{level:o,size:s})||!a?l:(n.includeFallbackColors=!1,r.mostReadable(t,[\"#fff\",\"#000\"],n))};var F=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\"},R=r.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(F),N=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!==e&&e.exports?e.exports=r:window.tinycolor=r}(Math)},{}],547:[function(t,e,r){\"use strict\";function n(t){if(t instanceof Float32Array)return t;if(\"number\"==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(\"number\"==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r<i;r++)e[r]=t[r]-e[r];return e}},{}],548:[function(t,e,r){\"use strict\";function n(t,e){var r=a(getComputedStyle(t).getPropertyValue(e));return r[0]*i(r[1],t)}function i(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 function(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}(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 o;case\"cm\":return o/2.54;case\"mm\":return o/25.4;case\"pt\":return o/72;case\"pc\":return o/6}return 1}var a=t(\"parse-unit\");e.exports=i;var o=96},{\"parse-unit\":467}],549:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.topojson=t.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=f[t<0?~t:t],n=0,i=r.length;n<i;++n)e.push(u(r[n].slice(),n));t<0&&l(e,i)}function n(t){return u(t.slice())}function i(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0].slice()),e}function a(t){for(var e=i(t);e.length<4;)e.push(e[0].slice());return e}function s(t){return t.map(a)}function c(t){var e,r=t.type;switch(r){case\"GeometryCollection\":return{type:r,geometries:t.geometries.map(c)};case\"Point\":e=n(t.coordinates);break;case\"MultiPoint\":e=t.coordinates.map(n);break;case\"LineString\":e=i(t.arcs);break;case\"MultiLineString\":e=t.arcs.map(i);break;case\"Polygon\":e=s(t.arcs);break;case\"MultiPolygon\":e=t.arcs.map(s);break;default:return null}return{type:r,coordinates:e}}var u=o(t),f=t.arcs;return c(e)}function n(t,e,r){var n,i,a;if(arguments.length>1)n=function(t,e,r){function n(t){var e=t<0?~t:t;(c[e]||(c[e]=[])).push({i:t,g:s})}function i(t){t.forEach(n)}function a(t){t.forEach(i)}function o(t){switch(s=t,t.type){case\"GeometryCollection\":t.geometries.forEach(o);break;case\"LineString\":i(t.arcs);break;case\"MultiLineString\":case\"Polygon\":a(t.arcs);break;case\"MultiPolygon\":!function(t){t.forEach(a)}(t.arcs)}}var s,l=[],c=[];return o(e),c.forEach(null==r?function(t){l.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&l.push(t[0].i)}),l}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i<a;++i)n[i]=i;return{type:\"MultiLineString\",arcs:c(t,n)}}function i(t,e){function n(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(n);break;case\"Polygon\":i(t.arcs);break;case\"MultiPolygon\":t.arcs.forEach(i)}}function i(t){t.forEach(function(e){e.forEach(function(e){(o[e=e<0?~e:e]||(o[e]=[])).push(t)})}),s.push(t)}function a(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r<n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(r(t,{type:\"Polygon\",arcs:[e]}).coordinates[0])}var o={},s=[],l=[];return e.forEach(n),s.forEach(function(t){if(!t._){var e=[],r=[t];for(t._=1,l.push(e);t=r.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){o[t<0?~t:t].forEach(function(t){t._||(t._=1,r.push(t))})})})}}),s.forEach(function(t){delete t._}),{type:\"MultiPolygon\",arcs:l.map(function(e){var r,n=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){o[t<0?~t:t].length<2&&n.push(t)})})}),n=c(t,n),(r=n.length)>1)for(var i,s,l=1,u=a(n[0]);l<r;++l)(i=a(n[l]))>u&&(s=n[0],n[0]=n[l],n[l]=s,u=i);return n})}}var a=function(t){return t},o=function(t){if(null==(e=t.transform))return a;var e,r,n,i=e.scale[0],o=e.scale[1],s=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+s,t[1]=(n+=t[1])*o+l,t}},s=function(t){function e(t){l[0]=t[0],l[1]=t[1],s(l),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[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,s=o(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e<r;)i=t[e],l[0]=i[0],l[1]=i[1],s(l,e),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[c,u,f,h]}return n},l=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},c=function(t,e){function r(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){n[t<0?~t:t]=1}),o.push(i)}}var n={},i={},a={},o=[],s=-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[++s],e[s]=r,e[n]=i)}),e.forEach(function(e){var r,n,o=function(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]}(e),s=o[0],l=o[1];if(r=a[s])if(delete a[r.end],r.push(e),r.end=l,n=i[l]){delete i[n.start];var c=n===r?r:r.concat(n);i[c.start=r.start]=a[c.end=n.end]=c}else i[r.start]=a[r.end]=r;else if(r=i[l])if(delete i[r.start],r.unshift(e),r.start=s,n=a[s]){delete a[n.end];var u=n===r?r:n.concat(r);i[u.start=n.start]=a[u.end=r.end]=u}else i[r.start]=a[r.end]=r;else i[(r=[e]).start=s]=a[r.end=l]=r}),r(a,i),r(i,a),e.forEach(function(t){n[t<0?~t:t]||o.push([t])}),o},u=function(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r};t.bbox=s,t.feature=function(t,r){return\"GeometryCollection\"===r.type?{type:\"FeatureCollection\",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},t.mesh=function(t){return r(t,n.apply(this,arguments))},t.meshArcs=n,t.merge=function(t){return r(t,i.apply(this,arguments))},t.mergeArcs=i,t.neighbors=function(t){function e(t,e){t.forEach(function(t){t<0&&(t=~t);var r=i[t];r?r.push(e):i[t]=[e]})}function r(t,r){t.forEach(function(t){e(t,r)})}function n(t,e){\"GeometryCollection\"===t.type?t.geometries.forEach(function(t){n(t,e)}):t.type in o&&o[t.type](t.arcs,e)}var i={},a=t.map(function(){return[]}),o={LineString:e,MultiLineString:r,Polygon:r,MultiPolygon:function(t,e){t.forEach(function(t){r(t,e)})}};t.forEach(n);for(var s in i)for(var l=i[s],c=l.length,f=0;f<c;++f)for(var h=f+1;h<c;++h){var d,p=l[f],m=l[h];(d=a[p])[s=u(d,m)]!==m&&d.splice(s,0,m),(d=a[m])[s=u(d,p)]!==p&&d.splice(s,0,p)}return a},t.quantize=function(t,e){function r(t){t[0]=Math.round((t[0]-o)/l),t[1]=Math.round((t[1]-c)/u)}function n(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(n);break;case\"Point\":r(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(r)}}if(!((e=Math.floor(e))>=2))throw new Error(\"n must be \\u22652\");if(t.transform)throw new Error(\"already quantized\");var i,a=s(t),o=a[0],l=(a[2]-o)/(e-1)||1,c=a[1],u=(a[3]-c)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,s=t.length,f=t[0],h=f[0]=Math.round((f[0]-o)/l),d=f[1]=Math.round((f[1]-c)/u);i<s;++i)f=t[i],r=Math.round((f[0]-o)/l),n=Math.round((f[1]-c)/u),r===h&&n===d||((e=t[a++])[0]=r-h,h=r,e[1]=n-d,d=n);a<2&&((e=t[a++])[0]=0,e[1]=0),t.length=a});for(i in t.objects)n(t.objects[i]);return t.transform={scale:[l,u],translate:[o,c]},t},t.transform=o,t.untransform=function(t){if(null==(e=t.transform))return a;var e,r,n,i=e.scale[0],o=e.scale[1],s=e.translate[0],l=e.translate[1];return function(t,e){e||(r=n=0);var a=Math.round((t[0]-s)/i),c=Math.round((t[1]-l)/o);return t[0]=a-r,r=a,t[1]=c-n,n=c,t}},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],550:[function(t,e,r){\"use strict\";e.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o<e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u<s.length;++u)c+=1<<s[u],l.push(c);i(s)<1&&(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(\"permutation-rank\"),i=t(\"permutation-parity\"),a=t(\"gamma\")},{gamma:145,\"permutation-parity\":471,\"permutation-rank\":472}],551:[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){return Math.min(1,Math.max(-1,t))}function a(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.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(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,l){this.center=s(r),this.up=s(n),this.right=s(i),this.radius=s([a]),this.angle=s([o,l]),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 c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,c=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 d=t.eye,p=[d[0]-e[0],d[1]-e[1],d[2]-e[2]];u(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=h(r,p)/s,g=h(i,p)/s;c=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,c)};var s=t(\"filtered-vector\"),l=t(\"gl-mat4/invert\"),c=t(\"gl-mat4/rotate\"),u=t(\"gl-vec3/cross\"),f=t(\"gl-vec3/normalize\"),h=t(\"gl-vec3/dot\"),d=o.prototype;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[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])]},d.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];var s=Math.sqrt(i),l=0;for(o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;var c=Math.sqrt(l);for(o=0;o<3;++o)r[o]/=c;var h=this.computedToward;u(h,e,r),f(h,h);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),x=Math.sin(m),b=this.computedCenter,_=g*y,w=v*y,M=x,k=-g*x,A=-v*x,T=y,S=this.computedEye,E=this.computedMatrix;for(o=0;o<3;++o){var L=_*r[o]+w*h[o]+M*e[o];E[4*o+1]=k*r[o]+A*h[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],F=z*O-D*P,R=D*I-C*O,N=C*P-z*I,j=n(F,R,N);F/=j,R/=j,N/=j,E[0]=F,E[4]=R,E[8]=N;for(o=0;o<3;++o)S[o]=b[o]+E[2+4*o]*d;for(o=0;o<3;++o){l=0;for(var B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},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};var p=[0,0,0];d.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[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,p);for(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])}},d.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],c=n(o,s,l);o/=c,s/=c,l/=c;var u=a[0],f=a[4],h=a[8],d=u*o+f*s+h*l,p=n(u-=o*d,f-=s*d,h-=l*d),m=(u/=p)*e+o*r,g=(f/=p)*e+s*r,v=(h/=p)*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))},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.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 c=e[o],u=e[o+4],f=e[o+8];if(a){var h=Math.abs(c),d=Math.abs(u),p=Math.abs(f),m=Math.max(h,d,p);h===m?(c=c<0?-1:1,u=f=0):p===m?(f=f<0?-1:1,c=u=0):(u=u<0?-1:1,c=f=0)}else{var g=n(c,u,f);c/=g,u/=g,f/=g}var v=e[s],y=e[s+4],x=e[s+8],b=v*c+y*u+x*f,_=n(v-=c*b,y-=u*b,x-=f*b),w=u*(x/=_)-f*(y/=_),M=f*(v/=_)-c*x,k=c*y-u*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,c,u,f),this.right.jump(t,v,y,x);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*x,D=E*w+L*M+C*k;T=F<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],F=I*c+P*u+O*f,R=I*v+P*y+O*x,N=I*w+P*M+O*k;T=Math.asin(i(F)),S=Math.atan2(N,R)}this.angle.jump(t,S,T),this.recalcMatrix(t);var j=e[2],B=e[6],U=e[10],V=this.computedMatrix;l(V,e);var q=V[15],H=V[12]/q,G=V[13]/q,Y=V[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-j*W,G-B*W,Y-U*W)},d.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},d.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},d.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var o=(a=a||this.computedUp)[0],s=a[1],l=a[2],c=n(o,s,l);if(!(c<1e-6)){o/=c,s/=c,l/=c;var u=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],d=n(u,f,h);if(!(d<1e-6)){u/=d,f/=d,h/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v,x=n(m-=y*o,g-=y*s,v-=y*l);if(!(x<.01&&(m=s*h-l*f,g=l*u-o*h,v=o*f-s*u,(x=n(m,g,v))<1e-6))){m/=x,g/=x,v/=x,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 b=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(b,_,w),k=o*u+s*f+l*h,A=m*u+g*f+v*h,T=(b/=M)*u+(_/=M)*f+(w/=M)*h,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);D<I&&(C+=2*Math.PI),P<I&&(C-=2*Math.PI),this.angle.jump(this.angle.lastT(),C,z),this.angle.set(t,E,S)}}}}},{\"filtered-vector\":142,\"gl-mat4/invert\":186,\"gl-mat4/rotate\":190,\"gl-vec3/cross\":260,\"gl-vec3/dot\":261,\"gl-vec3/normalize\":264}],552:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);return r?(r[0]=f,r[1]=i,r):[f,i]};var n=+(Math.pow(2,27)+1)},{}],553:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);return r?(r[0]=o+a,r[1]=n,r):[o+a,n]}},{}],554:[function(t,e,r){(function(e,n){\"use strict\";function i(t){if(t){var e=t.length||t.byteLength,r=v.log2(e);_[r].push(t)}}function a(t){t=v.nextPow2(t);var e=v.log2(t),r=_[e];return r.length>0?r.pop():new ArrayBuffer(t)}function o(t){return new Uint8Array(a(t),0,t)}function s(t){return new Uint16Array(a(2*t),0,t)}function l(t){return new Uint32Array(a(4*t),0,t)}function c(t){return new Int8Array(a(t),0,t)}function u(t){return new Int16Array(a(2*t),0,t)}function f(t){return new Int32Array(a(4*t),0,t)}function h(t){return new Float32Array(a(4*t),0,t)}function d(t){return new Float64Array(a(8*t),0,t)}function p(t){return x?new Uint8ClampedArray(a(t),0,t):o(t)}function m(t){return new DataView(a(t),0,t)}function g(t){t=v.nextPow2(t);var e=v.log2(t),r=w[e];return r.length>0?r.pop():new n(t)}var v=t(\"bit-twiddle\"),y=t(\"dup\");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:y([32,0]),UINT16:y([32,0]),UINT32:y([32,0]),INT8:y([32,0]),INT16:y([32,0]),INT32:y([32,0]),FLOAT:y([32,0]),DOUBLE:y([32,0]),DATA:y([32,0]),UINT8C:y([32,0]),BUFFER:y([32,0])});var x=\"undefined\"!=typeof Uint8ClampedArray,b=e.__TYPEDARRAY_POOL;b.UINT8C||(b.UINT8C=y([32,0])),b.BUFFER||(b.BUFFER=y([32,0]));var _=b.DATA,w=b.BUFFER;r.free=function(t){if(n.isBuffer(t))w[v.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|v.log2(e);_[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=function(t){i(t.buffer)},r.freeArrayBuffer=i,r.freeBuffer=function(t){w[v.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return a(t);switch(e){case\"uint8\":return o(t);case\"uint16\":return s(t);case\"uint32\":return l(t);case\"int8\":return c(t);case\"int16\":return u(t);case\"int32\":return f(t);case\"float\":case\"float32\":return h(t);case\"double\":case\"float64\":return d(t);case\"uint8_clamped\":return p(t);case\"buffer\":return g(t);case\"data\":case\"dataview\":return m(t);default:return null}return null},r.mallocArrayBuffer=a,r.mallocUint8=o,r.mallocUint16=s,r.mallocUint32=l,r.mallocInt8=c,r.mallocInt16=u,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=h,r.mallocFloat64=r.mallocDouble=d,r.mallocUint8Clamped=p,r.mallocDataView=m,r.mallocBuffer=g,r.clearCache=function(){for(var t=0;t<32;++t)b.UINT8[t].length=0,b.UINT16[t].length=0,b.UINT32[t].length=0,b.INT8[t].length=0,b.INT16[t].length=0,b.INT32[t].length=0,b.FLOAT[t].length=0,b.DOUBLE[t].length=0,b.UINT8C[t].length=0,_[t].length=0,w[t].length=0}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{},t(\"buffer\").Buffer)},{\"bit-twiddle\":71,buffer:82,dup:134}],555:[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;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,\"length\",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],556:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,i=t[o],e(i,a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],557:[function(t,e,r){function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}e.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){void 0===e&&(e=1e-6);var r,n,i,a,o;for(i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,(i=t)<r)return r;if(i>n)return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],558:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(\"function\"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],559:[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&&o.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}var a=t(\"punycode\"),o=t(\"./util\");r.parse=i,r.resolve=function(t,e){return i(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?i(t,!1,!0).resolveObject(e):e},r.format=function(t){return o.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)},r.Url=n;var s=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,c=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,u=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),f=[\"'\"].concat(u),h=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(f),d=[\"/\",\"?\",\"#\"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,\"javascript:\":!0},v={javascript:!0,\"javascript:\":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},x=t(\"querystring\");n.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var n=t.indexOf(\"?\"),i=-1!==n&&n<t.indexOf(\"#\")?\"?\":\"#\",l=t.split(i);l[0]=l[0].replace(/\\\\/g,\"/\");var u=t=l.join(i);if(u=u.trim(),!r&&1===t.split(\"#\").length){var b=c.exec(u);if(b)return this.path=u,this.href=u,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search=\"\",this.query={}),this}var _=s.exec(u);if(_){var w=(_=_[0]).toLowerCase();this.protocol=w,u=u.substr(_.length)}if(r||_||u.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var M=\"//\"===u.substr(0,2);!M||_&&v[_]||(u=u.substr(2),this.slashes=!0)}if(!v[_]&&(M||_&&!y[_])){for(var k=-1,A=0;A<d.length;A++){-1!==(E=u.indexOf(d[A]))&&(-1===k||E<k)&&(k=E)}var T,S;-1!==(S=-1===k?u.lastIndexOf(\"@\"):u.lastIndexOf(\"@\",k))&&(T=u.slice(0,S),u=u.slice(S+1),this.auth=decodeURIComponent(T)),k=-1;for(A=0;A<h.length;A++){var E;-1!==(E=u.indexOf(h[A]))&&(-1===k||E<k)&&(k=E)}-1===k&&(k=u.length),this.host=u.slice(0,k),u=u.slice(k),this.parseHost(),this.hostname=this.hostname||\"\";var L=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!L)for(var C=this.hostname.split(/\\./),z=(A=0,C.length);A<z;A++){var D=C[A];if(D&&!D.match(p)){for(var I=\"\",P=0,O=D.length;P<O;P++)D.charCodeAt(P)>127?I+=\"x\":I+=D[P];if(!I.match(p)){var F=C.slice(0,A),R=C.slice(A+1),N=D.match(m);N&&(F.push(N[1]),R.unshift(N[2])),R.length&&(u=\"/\"+R.join(\".\")+u),this.hostname=F.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=a.toASCII(this.hostname));var j=this.port?\":\"+this.port:\"\",B=this.hostname||\"\";this.host=B+j,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==u[0]&&(u=\"/\"+u))}if(!g[w])for(A=0,z=f.length;A<z;A++){var U=f[A];if(-1!==u.indexOf(U)){var V=encodeURIComponent(U);V===U&&(V=escape(U)),u=u.split(U).join(V)}}var q=u.indexOf(\"#\");-1!==q&&(this.hash=u.substr(q),u=u.slice(0,q));var H=u.indexOf(\"?\");if(-1!==H?(this.search=u.substr(H),this.query=u.substr(H+1),e&&(this.query=x.parse(this.query)),u=u.slice(0,H)):e&&(this.search=\"\",this.query={}),u&&(this.pathname=u),y[w]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){j=this.pathname||\"\";var G=this.search||\"\";this.path=j+G}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||\"\";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,\":\"),t+=\"@\");var e=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,a=\"\";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=x.stringify(this.query));var s=this.search||a&&\"?\"+a||\"\";return e&&\":\"!==e.substr(-1)&&(e+=\":\"),this.slashes||(!e||y[e])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),s&&\"?\"!==s.charAt(0)&&(s=\"?\"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace(\"#\",\"%23\"),e+i+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(o.isString(t)){var e=new n;e.parse(t,!1,!0),t=e}for(var r=new n,i=Object.keys(this),a=0;a<i.length;a++){var s=i[a];r[s]=this[s]}if(r.hash=t.hash,\"\"===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),c=0;c<l.length;c++){var u=l[c];\"protocol\"!==u&&(r[u]=t[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname=\"/\"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var d=f[h];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||v[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||\"\").split(\"/\");p.length&&!(t.host=p.shift()););t.host||(t.host=\"\"),t.hostname||(t.hostname=\"\"),\"\"!==p[0]&&p.unshift(\"\"),p.length<2&&p.unshift(\"\"),r.pathname=p.join(\"/\")}if(r.search=t.search,r.query=t.query,r.host=t.host||\"\",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||\"\",g=r.search||\"\";r.path=m+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var x=r.pathname&&\"/\"===r.pathname.charAt(0),b=t.host||t.pathname&&\"/\"===t.pathname.charAt(0),_=b||x||r.host&&t.pathname,w=_,M=r.pathname&&r.pathname.split(\"/\")||[],k=(p=t.pathname&&t.pathname.split(\"/\")||[],r.protocol&&!y[r.protocol]);if(k&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===M[0]?M[0]=r.host:M.unshift(r.host)),r.host=\"\",t.protocol&&(t.hostname=null,t.port=null,t.host&&(\"\"===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(\"\"===p[0]||\"\"===M[0])),b)r.host=t.host||\"\"===t.host?t.host:r.host,r.hostname=t.hostname||\"\"===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,M=p;else if(p.length)M||(M=[]),M.pop(),M=M.concat(p),r.search=t.search,r.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(k){r.hostname=r.host=M.shift();(C=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.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 A=M.slice(-1)[0],T=(r.host||t.host||M.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,S=0,E=M.length;E>=0;E--)\".\"===(A=M[E])?M.splice(E,1):\"..\"===A?(M.splice(E,1),S++):S&&(M.splice(E,1),S--);if(!_&&!w)for(;S--;S)M.unshift(\"..\");!_||\"\"===M[0]||M[0]&&\"/\"===M[0].charAt(0)||M.unshift(\"\"),T&&\"/\"!==M.join(\"/\").substr(-1)&&M.push(\"\");var L=\"\"===M[0]||M[0]&&\"/\"===M[0].charAt(0);if(k){r.hostname=r.host=L?\"\":M.length?M.shift():\"\";var C;(C=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return(_=_||r.host&&M.length)&&!L&&M.unshift(\"\"),M.length?r.pathname=M.join(\"/\"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.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=l.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{\"./util\":560,punycode:489,querystring:493}],560:[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}}},{}],561:[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}},{}],562:[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}},{}],563:[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]),f(e)?n.showHidden=e:e&&r._extend(n,e),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),s(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,e,n){if(t.customInspect&&e&&b(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return p(i)||(i=s(t,i,n)),i}var a=function(t,e){if(m(e))return t.stylize(\"undefined\",\"undefined\");if(p(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}if(d(e))return t.stylize(\"\"+e,\"number\");if(f(e))return t.stylize(\"\"+e,\"boolean\");if(h(e))return t.stylize(\"null\",\"null\")}(t,e);if(a)return a;var o=Object.keys(e),v=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),x(e)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return l(e);if(0===o.length){if(b(e)){var _=e.name?\": \"+e.name:\"\";return t.stylize(\"[Function\"+_+\"]\",\"special\")}if(g(e))return t.stylize(RegExp.prototype.toString.call(e),\"regexp\");if(y(e))return t.stylize(Date.prototype.toString.call(e),\"date\");if(x(e))return l(e)}var w=\"\",k=!1,A=[\"{\",\"}\"];if(u(e)&&(k=!0,A=[\"[\",\"]\"]),b(e)){w=\" [Function\"+(e.name?\": \"+e.name:\"\")+\"]\"}if(g(e)&&(w=\" \"+RegExp.prototype.toString.call(e)),y(e)&&(w=\" \"+Date.prototype.toUTCString.call(e)),x(e)&&(w=\" \"+l(e)),0===o.length&&(!k||0==e.length))return A[0]+w+A[1];if(n<0)return g(e)?t.stylize(RegExp.prototype.toString.call(e),\"regexp\"):t.stylize(\"[Object]\",\"special\");t.seen.push(e);var T;return T=k?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)M(e,String(o))?a.push(c(t,e,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(i){i.match(/^\\d+$/)||a.push(c(t,e,r,n,i,!0))}),a}(t,e,n,v,o):o.map(function(r){return c(t,e,n,v,r,k)}),t.seen.pop(),function(t,e,r){var n=0;if(t.reduce(function(t,e){return n++,e.indexOf(\"\\n\")>=0&&n++,t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0)>60)return r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n \")+\" \"+r[1];return r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(T,w,A)}function l(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function c(t,e,r,n,i,a){var o,l,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?l=c.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):c.set&&(l=t.stylize(\"[Setter]\",\"special\")),M(n,i)||(o=\"[\"+i+\"]\"),l||(t.seen.indexOf(c.value)<0?(l=h(r)?s(t,c.value,null):s(t,c.value,r-1)).indexOf(\"\\n\")>-1&&(l=a?l.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\").substr(2):\"\\n\"+l.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\")):l=t.stylize(\"[Circular]\",\"special\")),m(o)){if(a&&i.match(/^\\d+$/))return l;(o=JSON.stringify(\"\"+i)).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+\": \"+l}function u(t){return Array.isArray(t)}function f(t){return\"boolean\"==typeof t}function h(t){return null===t}function d(t){return\"number\"==typeof t}function p(t){return\"string\"==typeof t}function m(t){return void 0===t}function g(t){return v(t)&&\"[object RegExp]\"===_(t)}function v(t){return\"object\"==typeof t&&null!==t}function y(t){return v(t)&&\"[object Date]\"===_(t)}function x(t){return v(t)&&(\"[object Error]\"===_(t)||t instanceof Error)}function b(t){return\"function\"==typeof t}function _(t){return Object.prototype.toString.call(t)}function w(t){return t<10?\"0\"+t.toString(10):t.toString(10)}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!p(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(k,function(t){if(\"%%\"===t)return\"%\";if(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<a;s=n[++r])h(s)||!v(s)?o+=\" \"+s:o+=\" \"+i(s);return o},r.deprecate=function(t,i){if(m(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var A,T={};r.debuglog=function(t){if(m(A)&&(A=e.env.NODE_DEBUG||\"\"),t=t.toUpperCase(),!T[t])if(new RegExp(\"\\\\b\"+t+\"\\\\b\",\"i\").test(A)){var n=e.pid;T[t]=function(){var e=r.format.apply(r,arguments);console.error(\"%s %d: %s\",t,n,e)}}else T[t]=function(){};return T[t]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},r.isArray=u,r.isBoolean=f,r.isNull=h,r.isNullOrUndefined=function(t){return null==t},r.isNumber=d,r.isString=p,r.isSymbol=function(t){return\"symbol\"==typeof t},r.isUndefined=m,r.isRegExp=g,r.isObject=v,r.isDate=y,r.isError=x,r.isFunction=b,r.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},r.isBuffer=t(\"./support/isBuffer\");var S=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];r.log=function(){console.log(\"%s - %s\",function(){var t=new Date,e=[w(t.getHours()),w(t.getMinutes()),w(t.getSeconds())].join(\":\");return[t.getDate(),S[t.getMonth()],e].join(\" \")}(),r.format.apply(r,arguments))},r.inherits=t(\"inherits\"),r._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./support/isBuffer\":562,_process:488,inherits:561}],564:[function(t,e,r){e.exports.VectorTile=t(\"./lib/vectortile.js\"),e.exports.VectorTileFeature=t(\"./lib/vectortilefeature.js\"),e.exports.VectorTileLayer=t(\"./lib/vectortilelayer.js\")},{\"./lib/vectortile.js\":565,\"./lib/vectortilefeature.js\":566,\"./lib/vectortilelayer.js\":567}],565:[function(t,e,r){\"use strict\";function n(t,e,r){if(3===t){var n=new i(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}var i=t(\"./vectortilelayer\");e.exports=function(t,e){this.layers=t.readFields(n,{},e)}},{\"./vectortilelayer\":567}],566:[function(t,e,r){\"use strict\";function n(t,e,r,n,a){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=a,t.readFields(i,this,e)}function i(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){var r=t.readVarint()+t.pos;for(;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}var a=t(\"point-geometry\");e.exports=n,n.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],n.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,s=0,l=[];t.pos<r;){if(!i){var c=t.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},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,c=-1/0;t.pos<e;){if(!n){var u=t.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),i<o&&(o=i),i>s&&(s=i),a<l&&(l=a),a>c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+c)/s;t[e]=[360*(r.x+l)/s-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}var a,o,s=this.extent*Math.pow(2,r),l=this.extent*t,c=this.extent*e,u=this.loadGeometry(),f=n.types[this.type];switch(this.type){case 1:var h=[];for(a=0;a<u.length;a++)h[a]=u[a][0];i(u=h);break;case 2:for(a=0;a<u.length;a++)i(u[a]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],r=t[o],n+=(r.x-e.x)*(e.y+r.y);return n}(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(u),a=0;a<u.length;a++)for(o=0;o<u[a].length;o++)i(u[a][o])}1===u.length?u=u[0]:f=\"Multi\"+f;var d={type:\"Feature\",geometry:{type:f,coordinates:u},properties:this.properties};return\"id\"in this&&(d.id=this.id),d}},{\"point-geometry\":477}],567:[function(t,e,r){\"use strict\";function n(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(i,this,e),this.length=this._features.length}function i(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){var e=null,r=t.readVarint()+t.pos;for(;t.pos<r;){var n=t.readVarint()>>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}(r))}var a=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 a(this._pbf,e,this.extent,this._keys,this._values)}},{\"./vectortilefeature.js\":566}],568:[function(t,e,r){\"use strict\";e.exports=function(t,e){return\"object\"==typeof e&&null!==e||(e={}),n(t,e.canvas||i,e.context||a,e)};var n=t(\"./lib/vtext\"),i=null,a=null;\"undefined\"!=typeof document&&((i=document.createElement(\"canvas\")).width=8192,i.height=1024,a=i.getContext(\"2d\"))},{\"./lib/vtext\":569}],569:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=function(t,e){var r=a(t,128);return e?s(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}(t,n),o=function(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;l<s;++l)for(var c=t[l],u=0;u<2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case\"center\":f=-.5*(a[0]+o[0]);break;case\"right\":case\"end\":f=-o[0];break;case\"left\":case\"start\":f=-a[0];break;default:throw new Error(\"vectorize-text: Unrecognized textAlign: '\"+n+\"'\")}var h=0;switch(i){case\"hanging\":case\"top\":h=-a[1];break;case\"middle\":h=-.5*(a[1]+o[1]);break;case\"alphabetic\":case\"ideographic\":h=-3*r;break;case\"bottom\":h=-o[1];break;default:throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\"+i+\"'\")}var d=1/r;return\"lineHeight\"in e?d*=+e.lineHeight:\"width\"in e?d=e.width/(o[0]-a[0]):\"height\"in e&&(d=e.height/(o[1]-a[1])),t.map(function(t){return[d*(t[0]+f),d*(t[1]+h)]})}(i.positions,e,r),f=i.edges,h=\"ccw\"===e.orientation;if(l(o,f),e.polygons||e.polygon||e.polyline){for(var d=u(f,o),p=new Array(d.length),m=0;m<d.length;++m){for(var g=d[m],v=new Array(g.length),y=0;y<g.length;++y){for(var x=g[y],b=new Array(x.length),_=0;_<x.length;++_)b[_]=o[x[_]].slice();h&&b.reverse(),v[y]=b}p[m]=v}return p}return e.triangles||e.triangulate||e.triangle?{cells:c(o,f,{delaunay:!1,exterior:!1,interior:!0}),positions:o}:{edges:f,positions:o}}function i(t,e,r){try{return n(t,e,r,!0)}catch(t){}try{return n(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}e.exports=function(t,e,r,n){var a=n.size||64,s=n.font||\"normal\";return r.font=a+\"px \"+s,r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",i(function(t,e,r,n){var i=0|Math.ceil(e.measureText(r).width+2*n);if(i>8192)throw new Error(\"vectorize-text: String too long (sorry, this will get fixed later)\");var a=3*n;t.height<a&&(t.height=a),e.fillStyle=\"#000\",e.fillRect(0,0,t.width,t.height),e.fillStyle=\"#fff\",e.fillText(r,n,2*n);var s=e.getImageData(0,0,i,a);return o(s.data,[a,i,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=i;var a=t(\"surface-nets\"),o=t(\"ndarray\"),s=t(\"simplify-planar-graph\"),l=t(\"clean-pslg\"),c=t(\"cdt2d\"),u=t(\"planar-graph-to-polyline\")},{cdt2d:84,\"clean-pslg\":94,ndarray:458,\"planar-graph-to-polyline\":476,\"simplify-planar-graph\":530,\"surface-nets\":540}],570:[function(t,e,r){function n(t){var e=[];for(var r in t.layers)e.push(function(t){for(var e={name:t.name||\"\",version:t.version||1,extent:t.extent||4096,keys:[],values:[],features:[]},r={},n={},o=0;o<t.length;o++){var s=t.feature(o);s.geometry=function(t){for(var e=[],r=0,n=0,o=t.length,s=0;s<o;s++){var l=t[s];e.push(i(1,1));for(var c=0;c<l.length;c++){1===c&&e.push(i(2,l.length-1));var u=l[c].x-r,f=l[c].y-n;e.push(a(u),a(f)),r+=u,n+=f}}return e}(s.loadGeometry());var l=[];for(var c in s.properties){var u=r[c];void 0===u&&(e.keys.push(c),u=e.keys.length-1,r[c]=u);var f=function(t){var e,r=typeof t;\"string\"===r?e={string_value:t}:\"boolean\"===r?e={bool_value:t}:\"number\"===r?e=t%1!=0?{double_value:t}:t<0?{sint_value:t}:{uint_value:t}:(t=JSON.stringify(t),e={string_value:t});return e.key=r+\":\"+t,e}(s.properties[c]),h=n[f.key];void 0===h&&(e.values.push(f),h=e.values.length-1,n[f.key]=h),l.push(u),l.push(h)}s.tags=l,e.features.push(s)}return e}(t.layers[r]));var n=new o;return s.tile.write({layers:e},n),n.finish()}function i(t,e){return(e<<3)+(7&t)}function a(t){return t<<1^t>>31}var o=t(\"pbf\"),s=t(\"./vector-tile-pb\"),l=t(\"./lib/geojson_wrapper\");e.exports=n,e.exports.fromVectorTileJs=n,e.exports.fromGeojsonVt=function(t){var e={};for(var r in t)e[r]=new l(t[r].features),e[r].name=r;return n({layers:e})},e.exports.GeoJSONWrapper=l},{\"./lib/geojson_wrapper\":571,\"./vector-tile-pb\":572,pbf:470}],571:[function(t,e,r){\"use strict\";function n(t){this.features=t,this.length=t.length}function i(t){this.id=\"number\"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=4096}var a=t(\"point-geometry\"),o=t(\"vector-tile\").VectorTileFeature;e.exports=n,n.prototype.feature=function(t){return new i(this.features[t])},i.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new a(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},i.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},i.prototype.toGeoJSON=o.prototype.toGeoJSON},{\"point-geometry\":477,\"vector-tile\":564}],572:[function(t,e,r){\"use strict\";function n(t,e,r){3===t&&e.layers.push(u(r,r.readVarint()+r.pos))}function i(t,e){return t.readFields(a,{},e)}function a(t,e,r){1===t?e.string_value=r.readString():2===t?e.float_value=r.readFloat():3===t?e.double_value=r.readDouble():4===t?e.int_value=r.readVarint():5===t?e.uint_value=r.readVarint():6===t?e.sint_value=r.readSVarint():7===t&&(e.bool_value=r.readBoolean())}function o(t,e){void 0!==t.string_value&&e.writeStringField(1,t.string_value),void 0!==t.float_value&&e.writeFloatField(2,t.float_value),void 0!==t.double_value&&e.writeDoubleField(3,t.double_value),void 0!==t.int_value&&e.writeVarintField(4,t.int_value),void 0!==t.uint_value&&e.writeVarintField(5,t.uint_value),void 0!==t.sint_value&&e.writeSVarintField(6,t.sint_value),void 0!==t.bool_value&&e.writeBooleanField(7,t.bool_value)}function s(t,e){var r=t.readFields(l,{},e);return void 0===r.type&&(r.type=\"Unknown\"),r}function l(t,e,r){1===t?e.id=r.readVarint():2===t?e.tags=r.readPackedVarint():3===t?e.type=r.readVarint():4===t&&(e.geometry=r.readPackedVarint())}function c(t,e){void 0!==t.id&&e.writeVarintField(1,t.id),void 0!==t.tags&&e.writePackedVarint(2,t.tags),void 0!==t.type&&e.writeVarintField(3,t.type),void 0!==t.geometry&&e.writePackedVarint(4,t.geometry)}function u(t,e){return t.readFields(f,{features:[],keys:[],values:[]},e)}function f(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():2===t?e.features.push(s(r,r.readVarint()+r.pos)):3===t?e.keys.push(r.readString()):4===t?e.values.push(i(r,r.readVarint()+r.pos)):5===t&&(e.extent=r.readVarint())}function h(t,e){void 0!==t.version&&e.writeVarintField(15,t.version),void 0!==t.name&&e.writeStringField(1,t.name);var r;if(void 0!==t.features)for(r=0;r<t.features.length;r++)e.writeMessage(2,c,t.features[r]);if(void 0!==t.keys)for(r=0;r<t.keys.length;r++)e.writeStringField(3,t.keys[r]);if(void 0!==t.values)for(r=0;r<t.values.length;r++)e.writeMessage(4,o,t.values[r]);void 0!==t.extent&&e.writeVarintField(5,t.extent)}var d=r.tile={read:function(t,e){return t.readFields(n,{layers:[]},e)},write:function(t,e){var r;if(void 0!==t.layers)for(r=0;r<t.layers.length;r++)e.writeMessage(3,h,t.layers[r])}};d.GeomType={Unknown:0,Point:1,LineString:2,Polygon:3},d.value={read:i,write:o},d.feature={read:s,write:c},d.layer={read:u,write:h}},{}],573:[function(t,e,r){!function(){\"use strict\";function t(e){e.permitHostObjects___&&e.permitHostObjects___(t)}function r(t){return!(t.substr(0,d.length)==d&&\"___\"===t.substr(t.length-3))}function n(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[p];if(e&&e.key===t)return e;if(h(t)){e={key:t};try{return f(t,p,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function i(t){return t.prototype=null,Object.freeze(t)}function a(){y||\"undefined\"==typeof console||(y=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}if(\"undefined\"==typeof ses||!ses.ok||ses.ok()){\"undefined\"!=typeof ses&&(ses.weakMapPermitHostObjects=t);var o=!1;if(\"function\"==typeof WeakMap){var s=WeakMap;if(\"undefined\"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var l=new s,c=Object.freeze({});if(l.set(c,1),1===l.get(c))return void(e.exports=WeakMap);o=!0}}Object.prototype.hasOwnProperty;var u=Object.getOwnPropertyNames,f=Object.defineProperty,h=Object.isExtensible,d=\"weakmap:\",p=d+\"ident:\"+Math.random()+\"___\";if(\"undefined\"!=typeof crypto&&\"function\"==typeof crypto.getRandomValues&&\"function\"==typeof ArrayBuffer&&\"function\"==typeof Uint8Array){var m=new ArrayBuffer(25),g=new Uint8Array(m);crypto.getRandomValues(g),p=d+\"rand:\"+Array.prototype.map.call(g,function(t){return(t%36).toString(36)}).join(\"\")+\"___\"}if(f(Object,\"getOwnPropertyNames\",{value:function(t){return u(t).filter(r)}}),\"getPropertyNames\"in Object){var v=Object.getPropertyNames;f(Object,\"getPropertyNames\",{value:function(t){return v(t).filter(r)}})}!function(){var t=Object.freeze;f(Object,\"freeze\",{value:function(e){return n(e),t(e)}});var e=Object.seal;f(Object,\"seal\",{value:function(t){return n(t),e(t)}});var r=Object.preventExtensions;f(Object,\"preventExtensions\",{value:function(t){return n(t),r(t)}})}();var y=!1,x=0,b=function(){this instanceof b||a();var t=[],e=[],r=x++;return Object.create(b.prototype,{get___:{value:i(function(i,a){var o,s=n(i);return s?r in s?s[r]:a:(o=t.indexOf(i))>=0?e[o]:a})},has___:{value:i(function(e){var i=n(e);return i?r in i:t.indexOf(e)>=0})},set___:{value:i(function(i,a){var o,s=n(i);return s?s[r]=a:(o=t.indexOf(i))>=0?e[o]=a:(o=t.length,e[o]=a,t[o]=i),this})},delete___:{value:i(function(i){var a,o,s=n(i);return s?r in s&&delete s[r]:!((a=t.indexOf(i))<0||(o=t.length-1,t[a]=void 0,e[a]=e[o],t[a]=t[o],t.length=o,e.length=o,0))})}})};b.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(){this instanceof b||a();var e,r=new s,n=void 0,l=!1;return e=o?function(t,e){return r.set(t,e),r.has(t)||(n||(n=new b),n.set(t,e)),this}:function(t,e){if(l)try{r.set(t,e)}catch(r){n||(n=new b),n.set___(t,e)}else r.set(t,e);return this},Object.create(b.prototype,{get___:{value:i(function(t,e){return n?r.has(t)?r.get(t):n.get___(t,e):r.get(t,e)})},has___:{value:i(function(t){return r.has(t)||!!n&&n.has___(t)})},set___:{value:i(e)},delete___:{value:i(function(t){var e=!!r.delete(t);return n?n.delete___(t)||e:e})},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error(\"bogus call to permitHostObjects___\");l=!0})}})}o&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),r.prototype=b.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=b)}}()},{}],574:[function(t,e,r){var n=t(\"./hidden-store.js\");e.exports=function(){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:n(e,t)}}},{\"./hidden-store.js\":575}],575:[function(t,e,r){e.exports=function(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}},{}],576:[function(t,e,r){var n=t(\"./create-store.js\");e.exports=function(){var t=n();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}}}},{\"./create-store.js\":574}],577:[function(t,e,r){var n=t(\"get-canvas-context\");e.exports=function(t){return n(\"webgl\",t)}},{\"get-canvas-context\":156}],578:[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),c=0,u=l.length;c<u;c++){var f=l[c],h=a[f].exports;if(h===t||h&&h.default===t){s=f;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var d={};for(c=0,u=l.length;c<u;c++){d[f=l[c]]=f}i[s]=[Function([\"require\",\"module\",\"exports\"],\"(\"+t+\")(self)\"),d]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,i[p]=[Function([\"require\"],\"var f = require(\"+o(s)+\");(f.default ? f.default : f)(self);\"),m];var g={};r(p);var v=\"(\"+n+\")({\"+Object.keys(g).map(function(t){return o(t)+\":[\"+i[t][0]+\",\"+o(i[t][1])+\"]\"}).join(\",\")+\"},{},[\"+o(p)+\"])\",y=window.URL||window.webkitURL||window.mozURL||window.msURL,x=new Blob([v],{type:\"text/javascript\"});if(e&&e.bare)return x;var b=y.createObjectURL(x),_=new Worker(b);return _.objectURL=b,_}},{}],579:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],580:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.WhooTS=t.WhooTS||{})}(this,function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+\",\"+i[1]+\",\"+a[0]+\",\"+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+\"?\"+[\"bbox=\"+e(n,i,a),\"format=\"+(o.format||\"image/png\"),\"service=\"+(o.service||\"WMS\"),\"version=\"+(o.version||\"1.1.1\"),\"request=\"+(o.request||\"GetMap\"),\"srs=\"+(o.srs||\"EPSG:3857\"),\"width=\"+(o.width||256),\"height=\"+(o.height||256),\"layers=\"+r].join(\"&\")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],581:[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();a(n.prototype=new i.baseCalendar,{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(l);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(c);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"\\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\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"\\u95f0\"+i),i},monthNamesShort:function(t){if(\"string\"==typeof t){var e=t.match(u);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"\\u4e00\",\"\\u4e8c\",\"\\u4e09\",\"\\u56db\",\"\\u4e94\",\"\\u516d\",\"\\u4e03\",\"\\u516b\",\"\\u4e5d\",\"\\u5341\",\"\\u5341\\u4e00\",\"\\u5341\\u4e8c\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"\\u95f0\"+i),i},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 i.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw i.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){t=this._validateYear(t);return f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).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,a=this._validateYear(t,i.local.invalidyear),s=h[a-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(n=o.newDate(l,c,u)).add(4-(n.dayOfWeek()||7),\"d\");var f=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(f/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=f[t-f[0]];if(e>(r>>13?12:11))throw i.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,i.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var a=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o;if(\"object\"==typeof t)o=t,a=e||{};else{if(!(\"number\"==typeof t&&t>=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 c,u=f[o.year-f[0]],d=u>>13;c=d?o.month>d?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var p=0;p<c;p++)l+=u&1<<12-p?30:29;var m=h[o.year-h[0]],g=m>>9&4095,v=m>>5&15,y=31&m,x=new Date(g,v-1,y+l);return a.year=x.getFullYear(),a.month=1+x.getMonth(),a.day=x.getDate(),a}(t,s,r,a);return o.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=o.fromJD(t),r=function(t,e,r,n){var i,a;if(\"object\"==typeof t)i=t,a=e||{};else{if(!(\"number\"==typeof t&&t>=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=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1;var l,c=(o=h[a.year-h[0]])>>9&4095,u=o>>5&15,d=31&o,p=new Date(c,u-1,d),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-p)/864e5);var g,v=f[a.year-f[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l<y)break;l-=y}var x=v>>13;return!x||g<x?(a.isIntercalary=!1,a.month=1+g):g===x?(a.isIntercalary=!0,a.month=g):(a.isIntercalary=!1,a.month=g),a.day=1+l,a}(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(s),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 c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=o&&f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&&l.month(h)}return l}});var s=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m,l=/^\\d?\\d[iI]?/m,c=/^\\u95f0?\\u5341?[\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d]?\\u6708/m,u=/^\\u95f0?\\u5341?[\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d]?/m;i.calendars.chinese=n;var f=[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],h=[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\":595,\"object-assign\":462}],582:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()+(e.year()<0?1:0))%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())<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\":595,\"object-assign\":462}],583:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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:a[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 a={20:\"Fruitbat\",21:\"Anchovy\"};i.calendars.discworld=n},{\"../main\":595,\"object-assign\":462}],584:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()+(e.year()<0?1:0))%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())<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\":595,\"object-assign\":462}],585:[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\");t(\"object-assign\")(n.prototype=new a.baseCalendar,{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(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return i(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.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\":595,\"object-assign\":462}],586:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],587:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()<0?e.year()+1:e.year())%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)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),i.calendars.julian=n},{\"../main\":595,\"object-assign\":462}],588:[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\");t(\"object-assign\")(n.prototype=new o.baseCalendar,{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);t%=400,t+=t<0?400:0;return e+\".\"+Math.floor(t/20)+\".\"+t%20},forYear:function(t){if((t=t.split(\".\")).length<3)throw\"Invalid Mayan year\";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||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).toJD(),i=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(t){var e=i((t-=this.jdEpoch)+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\":595,\"object-assign\":462}],589:[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())<0&&t++;for(var a=n.day(),s=1;s<n.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=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\":595,\"object-assign\":462}],590:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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 c=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(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,\"d\").toJD()},fromJD:function(t){var e=i.instance().fromJD(t),r=e.year(),n=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),i.calendars.nepali=n},{\"../main\":595,\"object-assign\":462}],591:[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\");t(\"object-assign\")(n.prototype=new a.baseCalendar,{name:\"Persian\",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Persian\",epochs:[\"BP\",\"AP\"],monthNames:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Day\",\"Bahman\",\"Esfand\"],monthNamesShort:[\"Far\",\"Ord\",\"Kho\",\"Tir\",\"Mor\",\"Sha\",\"Meh\",\"Aba\",\"Aza\",\"Day\",\"Bah\",\"Esf\"],dayNames:[\"Yekshambe\",\"Doshambe\",\"Seshambe\",\"Ch\\xe6harshambe\",\"Panjshambe\",\"Jom'e\",\"Shambe\"],dayNamesShort:[\"Yek\",\"Do\",\"Se\",\"Ch\\xe6\",\"Panj\",\"Jom\",\"Sha\"],dayNamesMin:[\"Ye\",\"Do\",\"Se\",\"Ch\",\"Pa\",\"Jo\",\"Sh\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return 682*((e.year()-(e.year()>0?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){var e=(t=Math.floor(t)+.5)-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 c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),a.calendars.persian=n,a.calendars.jalali=n},{\"../main\":595,\"object-assign\":462}],592:[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();a(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],593:[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();a(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],594:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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).toJD()-24e5+.5,n=0,o=0;o<a.length;o++){if(a[o]>r)return a[n]-a[n-1];n++}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),o=12*(n.year()-1)+n.month()-15292;return n.day()+a[o-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<a.length&&!(a[n]>e);n++)r++;var i=r+15292,o=Math.floor((i-1)/12),s=o+1,l=i-12*o,c=e-a[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(n=(t=null!=t.year?t.year: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 a=[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\":595,\"object-assign\":462}],595:[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(c.local.invalidDate||c.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()).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(c.local.invalidDate||c.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(c.local.differentCalendars||c.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,c.local.invalidDate||c.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,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return(e.year()<0?\"-\":\"\")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.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,c.local.invalidMonth||c.regionalOptions[\"\"].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.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(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-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,c.local.invalidDate||c.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.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(c.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this.local.name).replace(/\\{1\\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\\{0\\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l(s.prototype=new o,{name:\"Gregorian\",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Gregorian\",epochs:[\"BCE\",\"CE\"],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,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==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,c.local.invalidMonth||c.regionalOptions[\"\"].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,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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 c=e.exports=new n;c.cdate=i,c.baseCalendar=o,c.calendars.gregorian=s},{\"object-assign\":462}],596:[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;for(var n=(r=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,c=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;x+n<t.length&&t.charAt(x+n)===e;)n++;return x+=n-1,Math.floor(n/(r||1))>1}),u=function(t,e,r,n){var i=\"\"+e;if(c(t,n))for(;i.length<r;)i=\"0\"+i;return i},f=function(t,e,r,n){return c(t)?n[e]:r[e]},h=this,d=function(t){return\"function\"==typeof o?o.call(h,t,c(\"m\")):g(u(\"m\",t.month(),2))},p=function(t,e){return e?\"function\"==typeof l?l.call(h,t):l[t.month()-h.minMonth]:\"function\"==typeof s?s.call(h,t):s[t.month()-h.minMonth]},m=this.local.digits,g=function(t){return r.localNumbers&&m?m(t):t},v=\"\",y=!1,x=0;x<t.length;x++)if(y)\"'\"!==t.charAt(x)||c(\"'\")?v+=t.charAt(x):y=!1;else switch(t.charAt(x)){case\"d\":v+=g(u(\"d\",e.day(),2));break;case\"D\":v+=f(\"D\",e.dayOfWeek(),n,a);break;case\"o\":v+=u(\"o\",e.dayOfYear(),3);break;case\"w\":v+=u(\"w\",e.weekOfYear(),2);break;case\"m\":v+=d(e);break;case\"M\":v+=p(e,c(\"M\"));break;case\"y\":v+=c(\"y\",2)?e.year():(e.year()%100<10?\"0\":\"\")+e.year()%100;break;case\"Y\":c(\"Y\",2),v+=e.formatYear();break;case\"J\":v+=e.toJD();break;case\"@\":v+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\"!\":v+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\"'\":c(\"'\")?v+=\"'\":y=!0;break;default:v+=t.charAt(x)}return v},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[\"\"].invalidArguments;if(\"\"===(e=\"object\"==typeof e?e.toString():e+\"\"))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=\"string\"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,h=-1,d=-1,p=-1,m=-1,g=!1,v=!1,y=function(e,r){for(var n=1;T+n<t.length&&t.charAt(T+n)===e;)n++;return T+=n-1,Math.floor(n/(r||1))>1},x=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(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[\"\"].missingNumberAt).replace(/\\{0\\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(\"function\"==typeof l){y(\"m\");var t=l.call(b,e.substring(A));return A+=t.length,t}return x(\"m\")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[\"\"].unknownNameAt).replace(/\\{0\\}/,A)},M=function(){if(\"function\"==typeof u){var t=y(\"M\")?u.call(b,e.substring(A)):c.call(b,e.substring(A));return A+=t.length,t}return w(\"M\",c,u)},k=function(){if(e.charAt(A)!==t.charAt(T))throw(i.local.unexpectedLiteralAt||i.regionalOptions[\"\"].unexpectedLiteralAt).replace(/\\{0\\}/,A);A++},A=0,T=0;T<t.length;T++)if(v)\"'\"!==t.charAt(T)||y(\"'\")?k():v=!1;else switch(t.charAt(T)){case\"d\":p=x(\"d\");break;case\"D\":w(\"D\",a,o);break;case\"o\":m=x(\"o\");break;case\"w\":x(\"w\");break;case\"m\":d=_();break;case\"M\":d=M();break;case\"y\":var S=T;g=!y(\"y\",2),T=S,h=x(\"y\",2);break;case\"Y\":h=x(\"Y\",2);break;case\"J\":f=x(\"J\")+.5,\".\"===e.charAt(A)&&(A++,x(\"J\"));break;case\"@\":f=x(\"@\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\"!\":f=x(\"!\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\"*\":A=e.length;break;case\"'\":y(\"'\")?k():v=!0;break;default:k()}if(A<e.length)throw i.local.unexpectedText||i.regionalOptions[\"\"].unexpectedText;if(-1===h?h=this.today().year():h<100&&g&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),\"string\"==typeof d&&(d=s.call(this,h,d)),m>-1){d=1,p=m;for(var E=this.daysInMonth(h,d);p>E;E=this.daysInMonth(h,d))d++,p-=E}return f>-1?this.fromJD(f):this.newDate(h,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){}for(var e=((t=t.toLowerCase()).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\":595,\"object-assign\":462}],597:[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\":116}],598:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(\"./lib/zc-core\")},{\"./lib/zc-core\":597}],599:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"./common_defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s,l){function c(r,i){return n.coerce(t,e,o,r,i)}s=s||{};var u=c(\"visible\",!(l=l||{}).itemIsNotPlainObject),f=c(\"clicktoshow\");if(!u&&!f)return e;a(t,e,r,c);for(var h=e.showarrow,d=[\"x\",\"y\"],p=[-10,-30],m={_fullLayout:r},g=0;g<2;g++){var v=d[g],y=i.coerceRef(t,e,m,v,\"\",\"paper\");if(i.coercePosition(e,m,c,y,v,.5),h){var x=\"a\"+v,b=i.coerceRef(t,e,m,x,\"pixel\");\"pixel\"!==b&&b!==y&&(b=e[x]=\"pixel\");var _=\"pixel\"===b?p[g]:.4;i.coercePosition(e,m,c,b,x,_)}c(v+\"anchor\"),c(v+\"shift\")}if(n.noneOrAll(t,e,[\"x\",\"y\"]),h&&n.noneOrAll(t,e,[\"ax\",\"ay\"]),f){var w=c(\"xclick\"),M=c(\"yclick\");e._xclick=void 0===w?e.x:i.cleanPosition(w,m,e.xref),e._yclick=void 0===M?e.y:i.cleanPosition(M,m,e.yref)}return e}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./attributes\":601,\"./common_defaults\":604}],600:[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,noRotate:!0},{path:\"M2,2V-2H-2V2Z\",backoff:0,noRotate:!0}]},{}],601:[function(t,e,r){\"use strict\";var n=t(\"./arrow_paths\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../plots/cartesian/constants\");e.exports={_isLinkedToArray:\"annotation\",visible:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},text:{valType:\"string\",editType:\"calcIfAutorange\"},textangle:{valType:\"angle\",dflt:0,editType:\"calcIfAutorange\"},font:i({editType:\"calcIfAutorange\",colorEditType:\"arraydraw\"}),width:{valType:\"number\",min:1,dflt:null,editType:\"calcIfAutorange\"},height:{valType:\"number\",min:1,dflt:null,editType:\"calcIfAutorange\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"center\",editType:\"arraydraw\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"arraydraw\"},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},borderpad:{valType:\"number\",min:0,dflt:1,editType:\"calcIfAutorange\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"calcIfAutorange\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},arrowcolor:{valType:\"color\",editType:\"arraydraw\"},arrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},startarrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},arrowside:{valType:\"flaglist\",flags:[\"end\",\"start\"],extras:[\"none\"],dflt:\"end\",editType:\"arraydraw\"},arrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calcIfAutorange\"},startarrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calcIfAutorange\"},arrowwidth:{valType:\"number\",min:.1,editType:\"calcIfAutorange\"},standoff:{valType:\"number\",min:0,dflt:0,editType:\"calcIfAutorange\"},startstandoff:{valType:\"number\",min:0,dflt:0,editType:\"calcIfAutorange\"},ax:{valType:\"any\",editType:\"calcIfAutorange\"},ay:{valType:\"any\",editType:\"calcIfAutorange\"},axref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.x.toString()],editType:\"calc\"},ayref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.y.toString()],editType:\"calc\"},xref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.x.toString()],editType:\"calc\"},x:{valType:\"any\",editType:\"calcIfAutorange\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calcIfAutorange\"},xshift:{valType:\"number\",dflt:0,editType:\"calcIfAutorange\"},yref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.y.toString()],editType:\"calc\"},y:{valType:\"any\",editType:\"calcIfAutorange\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"calcIfAutorange\"},yshift:{valType:\"number\",dflt:0,editType:\"calcIfAutorange\"},clicktoshow:{valType:\"enumerated\",values:[!1,\"onoff\",\"onout\"],dflt:!1,editType:\"arraydraw\"},xclick:{valType:\"any\",editType:\"arraydraw\"},yclick:{valType:\"any\",editType:\"arraydraw\"},hovertext:{valType:\"string\",editType:\"arraydraw\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",editType:\"arraydraw\"},font:i({editType:\"arraydraw\"}),editType:\"arraydraw\"},captureevents:{valType:\"boolean\",editType:\"arraydraw\"},editType:\"calc\",_deprecated:{ref:{valType:\"string\",editType:\"calc\"}}}},{\"../../plots/cartesian/constants\":794,\"../../plots/font_attributes\":816,\"./arrow_paths\":600}],602:[function(t,e,r){\"use strict\";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r,n,i,o,s=a.getFromId(t,e.xref),l=a.getFromId(t,e.yref),c=3*e.arrowsize*e.arrowwidth||0,u=3*e.startarrowsize*e.arrowwidth||0;s&&s.autorange&&(r=c+e.xshift,n=c-e.xshift,i=u+e.xshift,o=u-e.xshift,e.axref===e.xref?(a.expand(s,[s.r2c(e.x)],{ppadplus:r,ppadminus:n}),a.expand(s,[s.r2c(e.ax)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,o)})):(i=e.ax?i+e.ax:i,o=e.ax?o-e.ax:o,a.expand(s,[s.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r,i),ppadminus:Math.max(e._xpadminus,n,o)}))),l&&l.autorange&&(r=c-e.yshift,n=c+e.yshift,i=u-e.yshift,o=u+e.yshift,e.ayref===e.yref?(a.expand(l,[l.r2c(e.y)],{ppadplus:r,ppadminus:n}),a.expand(l,[l.r2c(e.ay)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,o)})):(i=e.ay?i+e.ay:i,o=e.ay?o-e.ay:o,a.expand(l,[l.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r,i),ppadminus:Math.max(e._ypadminus,n,o)})))})}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]=1,s[t.yref]=1});for(var l in s){var c=a.getFromId(t,l);if(c&&c.autorange)return i.syncOrAsync([o,n],t)}}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./draw\":607}],603:[function(t,e,r){\"use strict\";function n(t,e){var r,n,a,o,s,l,c,u=t._fullLayout.annotations,f=[],h=[],d=[],p=(e||[]).length;for(r=0;r<u.length;r++)if(a=u[r],o=a.clicktoshow){for(n=0;n<p;n++)if(s=e[n],l=s.xaxis,c=s.yaxis,l._id===a.xref&&c._id===a.yref&&l.d2r(s.x)===i(a._xclick,l)&&c.d2r(s.y)===i(a._yclick,c)){(a.visible?\"onout\"===o?h:d:f).push(r);break}n===p&&a.visible&&\"onout\"===o&&h.push(r)}return{on:f,off:h,explicitOff:d}}function i(t,e){return\"log\"===e.type?e.l2r(t):e.d2r(t)}var a=t(\"../../plotly\");e.exports={hasClickToShow:function(t,e){var r=n(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,i=n(t,e),o=i.on,s=i.off.concat(i.explicitOff),l={};if(o.length||s.length){for(r=0;r<o.length;r++)l[\"annotations[\"+o[r]+\"].visible\"]=!0;for(r=0;r<s.length;r++)l[\"annotations[\"+s[r]+\"].visible\"]=!1;return a.update(t,{},l)}}}},{\"../../plotly\":784}],604:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\");e.exports=function(t,e,r,a){a(\"opacity\");var o=a(\"bgcolor\"),s=a(\"bordercolor\"),l=i.opacity(s);a(\"borderpad\");var c=a(\"borderwidth\"),u=a(\"showarrow\");a(\"text\",u?\" \":r._dfltTitle.annotation),a(\"textangle\"),n.coerceFont(a,\"font\",r.font),a(\"width\"),a(\"align\");if(a(\"height\")&&a(\"valign\"),u){var f,h,d=a(\"arrowside\");-1!==d.indexOf(\"end\")&&(f=a(\"arrowhead\"),h=a(\"arrowsize\")),-1!==d.indexOf(\"start\")&&(a(\"startarrowhead\",f),a(\"startarrowsize\",h)),a(\"arrowcolor\",l?e.bordercolor:i.defaultLine),a(\"arrowwidth\",2*(l&&c||1)),a(\"standoff\"),a(\"startstandoff\")}var p=a(\"hovertext\"),m=r.hoverlabel||{};if(p){var g=a(\"hoverlabel.bgcolor\",m.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),v=a(\"hoverlabel.bordercolor\",m.bordercolor||i.contrast(g));n.coerceFont(a,\"hoverlabel.font\",{family:m.font.family,size:m.font.size,color:m.font.color||v})}a(\"captureevents\",!!p)}},{\"../../lib\":743,\"../color\":618}],605:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib/to_log_range\");e.exports=function(t,e,r,a){function o(t){var r=c[t],o=null;o=s?i(r,e.range):Math.pow(10,r),n(o)||(o=null),a(u+t,o)}e=e||{};var s=\"log\"===r&&\"linear\"===e.type,l=\"linear\"===r&&\"log\"===e.type;if(s||l)for(var c,u,f=t._fullLayout.annotations,h=e._id.charAt(0),d=0;d<f.length;d++)c=f[d],u=\"annotations[\"+d+\"].\",c[h+\"ref\"]===e._id&&o(h),c[\"a\"+h+\"ref\"]===e._id&&o(\"a\"+h)}},{\"../../lib/to_log_range\":768,\"fast-isnumeric\":140}],606:[function(t,e,r){\"use strict\";var n=t(\"../../plots/array_container_defaults\"),i=t(\"./annotation_defaults\");e.exports=function(t,e){n(t,e,{name:\"annotations\",handleItemDefaults:i})}},{\"../../plots/array_container_defaults\":786,\"./annotation_defaults\":599}],607:[function(t,e,r){\"use strict\";function n(t,e){var r=t._fullLayout.annotations[e]||{};i(t,r,e,!1,c.getFromId(t,r.xref),c.getFromId(t,r.yref))}function i(t,e,r,n,i,s){function c(r){return r.call(f.font,R).attr({\"text-anchor\":{left:\"start\",right:\"end\"}[e.align]||\"middle\"}),d.convertToTspans(r,t,v),r}function v(){function r(t,e){return\"auto\"===e&&(e=t<1/3?\"left\":t>2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}var a=N.selectAll(\"a\");if(1===a.size()&&a.text()===N.text()){C.insert(\"a\",\":first-child\").attr({\"xlink:xlink:href\":a.attr(\"xlink:href\"),\"xlink:xlink:show\":a.attr(\"xlink:show\")}).style({cursor:\"pointer\"}).node().appendChild(P.node())}var c=C.select(\".annotation-text-math-group\"),h=!c.empty(),v=f.bBox((h?c:N).node()),y=v.width,L=v.height,D=e.width||y,R=e.height||L,j=Math.round(D+2*I),B=Math.round(R+2*I);e._w=D,e._h=R;for(var U=!1,V=[\"x\",\"y\"],q=0;q<V.length;q++){var H,G,Y,W,X,Z=V[q],J=e[Z+\"ref\"]||Z,K=e[\"a\"+Z+\"ref\"],Q={x:i,y:s}[Z],$=(A+(\"x\"===Z?0:-90))*Math.PI/180,tt=j*Math.cos($),et=B*Math.sin($),rt=Math.abs(tt)+Math.abs(et),nt=e[Z+\"anchor\"],it=e[Z+\"shift\"]*(\"x\"===Z?1:-1),at=k[Z];if(Q){var ot=Q.r2fraction(e[Z]);if((t._dragging||!Q.autorange)&&(ot<0||ot>1)&&(K===J?((ot=Q.r2fraction(e[\"a\"+Z]))<0||ot>1)&&(U=!0):U=!0,U))continue;H=Q._offset+Q.r2p(e[Z]),W=.5}else\"x\"===Z?(Y=e[Z],H=_.l+_.w*Y):(Y=1-e[Z],H=_.t+_.h*Y),W=e.showarrow?.5:Y;if(e.showarrow){at.head=H;var st=e[\"a\"+Z];X=tt*r(.5,e.xanchor)-et*r(.5,e.yanchor),K===J?(at.tail=Q._offset+Q.r2p(st),G=X):(at.tail=H+st,G=X+st),at.text=at.tail+X;var lt=b[\"x\"===Z?\"width\":\"height\"];if(\"paper\"===J&&(at.head=l.constrain(at.head,1,lt-1)),\"pixel\"===K){var ct=-Math.max(at.tail-3,at.text),ut=Math.min(at.tail+3,at.text)-lt;ct>0?(at.tail+=ct,at.text+=ct):ut>0&&(at.tail-=ut,at.text-=ut)}at.tail+=it,at.head+=it}else G=X=rt*r(W,nt),at.text=H+X;at.text+=it,X+=it,G+=it,e[\"_\"+Z+\"padplus\"]=rt/2+G,e[\"_\"+Z+\"padminus\"]=rt/2-G,e[\"_\"+Z+\"size\"]=rt,e[\"_\"+Z+\"shift\"]=X}if(U)C.remove();else{var ft=0,ht=0;if(\"left\"!==e.align&&(ft=(D-y)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(ht=(R-L)*(\"middle\"===e.valign?.5:1)),h)c.select(\"svg\").attr({x:I+ft-1,y:I+ht}).call(f.setClipUrl,O?M:null);else{var dt=I+ht-v.top,pt=I+ft-v.left;N.call(d.positionText,pt,dt).call(f.setClipUrl,O?M:null)}F.select(\"rect\").call(f.setRect,I,I,D,R),P.call(f.setRect,z/2,z/2,j-z,B-z),C.call(f.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-B/2)),S.attr({transform:\"rotate(\"+A+\",\"+k.x.text+\",\"+k.y.text+\")\"});var mt=function(r,a){T.selectAll(\".annotation-arrow-g\").remove();var c=k.x.head,h=k.y.head,d=k.x.tail+r,p=k.y.tail+a,v=k.x.text+r,y=k.y.text+a,b=l.rotationXYMatrix(A,v,y),M=l.apply2DTransform(b),E=l.apply2DTransform2(b),L=+P.attr(\"width\"),z=+P.attr(\"height\"),D=v-.5*L,I=D+L,O=y-.5*z,F=O+z,R=[[D,O,D,F],[D,F,I,F],[I,F,I,O],[I,O,D,O]].map(E);if(!R.reduce(function(t,e){return t^!!l.segmentsIntersect(c,h,c+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){R.forEach(function(t){var e=l.segmentsIntersect(d,p,c,h,t[0],t[1],t[2],t[3]);e&&(d=e.x,p=e.y)});var N=e.arrowwidth,j=e.arrowcolor,B=e.arrowside,U=T.append(\"g\").style({opacity:u.opacity(j)}).classed(\"annotation-arrow-g\",!0),V=U.append(\"path\").attr(\"d\",\"M\"+d+\",\"+p+\"L\"+c+\",\"+h).style(\"stroke-width\",N+\"px\").call(u.stroke,u.rgb(j));if(g(V,B,e),w.annotationPosition&&V.node().parentNode&&!n){var q=c,H=h;if(e.standoff){var G=Math.sqrt(Math.pow(c-d,2)+Math.pow(h-p,2));q+=e.standoff*(d-c)/G,H+=e.standoff*(p-h)/G}var Y,W,X,Z=U.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(d-q)+\",\"+(p-H),transform:\"translate(\"+q+\",\"+H+\")\"}).style(\"stroke-width\",N+6+\"px\").call(u.stroke,\"rgba(0,0,0,0)\").call(u.fill,\"rgba(0,0,0,0)\");m.init({element:Z.node(),gd:t,prepFn:function(){var t=f.getTranslate(C);W=t.x,X=t.y,Y={},i&&i.autorange&&(Y[i._name+\".autorange\"]=!0),s&&s.autorange&&(Y[s._name+\".autorange\"]=!0)},moveFn:function(t,r){var n=M(W,X),a=n[0]+t,o=n[1]+r;C.call(f.setTranslate,a,o),Y[x+\".x\"]=i?i.p2r(i.r2p(e.x)+t):e.x+t/_.w,Y[x+\".y\"]=s?s.p2r(s.r2p(e.y)+r):e.y-r/_.h,e.axref===e.xref&&(Y[x+\".ax\"]=i.p2r(i.r2p(e.ax)+t)),e.ayref===e.yref&&(Y[x+\".ay\"]=s.p2r(s.r2p(e.ay)+r)),U.attr(\"transform\",\"translate(\"+t+\",\"+r+\")\"),S.attr({transform:\"rotate(\"+A+\",\"+a+\",\"+o+\")\"})},doneFn:function(){o.relayout(t,Y);var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&mt(0,0),E){var gt,vt;m.init({element:C.node(),gd:t,prepFn:function(){vt=S.attr(\"transform\"),gt={}},moveFn:function(t,r){var a=\"pointer\";if(e.showarrow)e.axref===e.xref?gt[x+\".ax\"]=i.p2r(i.r2p(e.ax)+t):gt[x+\".ax\"]=e.ax+t,e.ayref===e.yref?gt[x+\".ay\"]=s.p2r(s.r2p(e.ay)+r):gt[x+\".ay\"]=e.ay+r,mt(t,r);else{if(n)return;if(i)gt[x+\".x\"]=e.x+t/i._m;else{var o=e._xsize/_.w,l=e.x+(e._xshift-e.xshift)/_.w-o/2;gt[x+\".x\"]=m.align(l+t/_.w,o,0,1,e.xanchor)}if(s)gt[x+\".y\"]=e.y+r/s._m;else{var c=e._ysize/_.h,u=e.y-(e._yshift+e.yshift)/_.h-c/2;gt[x+\".y\"]=m.align(u-r/_.h,c,0,1,e.yanchor)}i&&s||(a=m.getCursor(i?.5:gt[x+\".x\"],s?.5:gt[x+\".y\"],e.xanchor,e.yanchor))}S.attr({transform:\"translate(\"+t+\",\"+r+\")\"+vt}),p(C,a)},doneFn:function(){p(C),o.relayout(t,gt);var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}var y,x,b=t._fullLayout,_=t._fullLayout._size,w=t._context.edits;n?(y=\"annotation-\"+n,x=n+\".annotations[\"+r+\"]\"):(y=\"annotation\",x=\"annotations[\"+r+\"]\"),b._infolayer.selectAll(\".\"+y+'[data-index=\"'+r+'\"]').remove();var M=\"clip\"+b._uid+\"_ann\"+r;if(e._input&&!1!==e.visible){var k={x:{},y:{}},A=+e.textangle||0,T=b._infolayer.append(\"g\").classed(y,!0).attr(\"data-index\",String(r)).style(\"opacity\",e.opacity),S=T.append(\"g\").classed(\"annotation-text-g\",!0),E=w[e.showarrow?\"annotationTail\":\"annotationPosition\"],L=e.captureevents||w.annotationText||E,C=S.append(\"g\").style(\"pointer-events\",L?\"all\":null).call(p,\"default\").on(\"click\",function(){t._dragging=!1;var i={index:r,annotation:e._input,fullAnnotation:e,event:a.event};n&&(i.subplotId=n),t.emit(\"plotly_clickannotation\",i)});e.hovertext&&C.on(\"mouseover\",function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();h.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:t})}).on(\"mouseout\",function(){h.loneUnhover(b._hoverlayer.node())});var z=e.borderwidth,D=e.borderpad,I=z+D,P=C.append(\"rect\").attr(\"class\",\"bg\").style(\"stroke-width\",z+\"px\").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),O=e.width||e.height,F=b._topclips.selectAll(\"#\"+M).data(O?[0]:[]);F.enter().append(\"clipPath\").classed(\"annclip\",!0).attr(\"id\",M).append(\"rect\"),F.exit().remove();var R=e.font,N=C.append(\"text\").classed(\"annotation-text\",!0).text(e.text);w.annotationText?N.call(d.makeEditable,{delegate:C,gd:t}).call(c).on(\"edit\",function(r){e.text=r,this.call(c);var n={};n[x+\".text\"]=e.text,i&&i.autorange&&(n[i._name+\".autorange\"]=!0),s&&s.autorange&&(n[s._name+\".autorange\"]=!0),o.relayout(t,n)}):N.call(c)}else a.selectAll(\"#\"+M).remove()}var a=t(\"d3\"),o=t(\"../../plotly\"),s=t(\"../../plots/plots\"),l=t(\"../../lib\"),c=t(\"../../plots/cartesian/axes\"),u=t(\"../color\"),f=t(\"../drawing\"),h=t(\"../fx\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib/setcursor\"),m=t(\"../dragelement\"),g=t(\"./draw_arrow_head\");e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&n(t,r);return s.previousPromises(t)},drawOne:n,drawRaw:i}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../../plots/plots\":852,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"../fx\":660,\"./draw_arrow_head\":608,d3:128}],608:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../color\"),a=t(\"./arrow_paths\");e.exports=function(t,e,r){function o(){t.style(\"stroke-dasharray\",\"0px,100px\")}function s(e,a,o,s){e.path&&(e.noRotate&&(o=0),n.select(h.parentNode).append(\"path\").attr({class:t.attr(\"class\"),d:e.path,transform:\"translate(\"+a.x+\",\"+a.y+\")\"+(o?\"rotate(\"+180*o/Math.PI+\")\":\"\")+\"scale(\"+s+\")\"}).style({fill:i.rgb(r.arrowcolor),\"stroke-width\":0}))}var l,c,u,f,h=t.node(),d=a[r.arrowhead||0],p=a[r.startarrowhead||0],m=(r.arrowwidth||1)*(r.arrowsize||1),g=(r.arrowwidth||1)*(r.startarrowsize||1),v=e.indexOf(\"start\")>=0,y=e.indexOf(\"end\")>=0,x=d.backoff*m+r.standoff,b=p.backoff*g+r.startstandoff;if(\"line\"===h.nodeName){l={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},c={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var _=l.x-c.x,w=l.y-c.y;if(u=Math.atan2(w,_),f=u+Math.PI,x&&b&&x+b>Math.sqrt(_*_+w*w))return void o();if(x){if(x*x>_*_+w*w)return void o();var M=x*Math.cos(u),k=x*Math.sin(u);c.x+=M,c.y+=k,t.attr({x2:c.x,y2:c.y})}if(b){if(b*b>_*_+w*w)return void o();var A=b*Math.cos(u),T=b*Math.sin(u);l.x-=A,l.y-=T,t.attr({x1:l.x,y1:l.y})}}else if(\"path\"===h.nodeName){var S=h.getTotalLength(),E=\"\";if(S<x+b)return void o();var L=h.getPointAtLength(0),C=h.getPointAtLength(.1);u=Math.atan2(L.y-C.y,L.x-C.x),l=h.getPointAtLength(Math.min(b,S)),E=\"0px,\"+b+\"px,\";var z=h.getPointAtLength(S),D=h.getPointAtLength(S-.1);f=Math.atan2(z.y-D.y,z.x-D.x),c=h.getPointAtLength(Math.max(0,S-x));E+=S-(E?b+x:x)+\"px,\"+S+\"px\",t.style(\"stroke-dasharray\",E)}v&&s(p,l,u,g),y&&s(d,c,f,m)}},{\"../color\":618,\"./arrow_paths\":600,d3:128}],609:[function(t,e,r){\"use strict\";var n=t(\"./draw\"),i=t(\"./click\");e.exports={moduleType:\"component\",name:\"annotations\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"annotations\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":601,\"./calc_autorange\":602,\"./click\":603,\"./convert_coords\":605,\"./defaults\":606,\"./draw\":607}],610:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../plot_api/edit_types\").overrideAll;e.exports=i({_isLinkedToArray:\"annotation\",visible:n.visible,x:{valType:\"any\"},y:{valType:\"any\"},z:{valType:\"any\"},ax:{valType:\"number\"},ay:{valType:\"number\"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents},\"calc\",\"from-root\")},{\"../../plot_api/edit_types\":773,\"../annotations/attributes\":601}],611:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\");e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)!function(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:\"linear\",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t.pdata[0]/t.pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t.pdata[1]/t.pdata[3])*a.h*(r.y[1]-r.y[0])}}(e[r],t);t.fullLayout._infolayer.selectAll(\".annotation-\"+t.id).remove()}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789}],612:[function(t,e,r){\"use strict\";function n(t,e,r,n,o){function c(r,n){return i.coerce(t,e,l,r,n)}function u(t){var n=t+\"axis\",i={_fullLayout:{}};return i._fullLayout[n]=r[n],a.coercePosition(e,i,c,t,t,.5)}return c(\"visible\",!o.itemIsNotPlainObject)?(s(t,e,n.fullLayout,c),u(\"x\"),u(\"y\"),u(\"z\"),i.noneOrAll(t,e,[\"x\",\"y\",\"z\"]),e.xref=\"x\",e.yref=\"y\",e.zref=\"z\",c(\"xanchor\"),c(\"yanchor\"),c(\"xshift\"),c(\"yshift\"),e.showarrow&&(e.axref=\"pixel\",e.ayref=\"pixel\",c(\"ax\",-10),c(\"ay\",-30),i.noneOrAll(t,e,[\"ax\",\"ay\"])),e):e}var i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/array_container_defaults\"),s=t(\"../annotations/common_defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r){o(t,e,{name:\"annotations\",handleItemDefaults:n,fullLayout:r.fullLayout})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"../../plots/cartesian/axes\":789,\"../annotations/common_defaults\":604,\"./attributes\":610}],613:[function(t,e,r){\"use strict\";var n=t(\"../annotations/draw\").drawRaw,i=t(\"../../plots/gl3d/project\"),a=[\"x\",\"y\",\"z\"];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var f=a[u],h=l[f],d=e[f+\"axis\"].r2fraction(h);if(d<0||d>1){c=!0;break}}c?t.fullLayout._infolayer.select(\".annotation-\"+t.id+'[data-index=\"'+s+'\"]').remove():(l.pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{\"../../plots/gl3d/project\":841,\"../annotations/draw\":607}],614:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports={moduleType:\"component\",name:\"annotations3d\",schema:{subplots:{scene:{annotations:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(\"./convert\"),draw:t(\"./draw\")}},{\"../../lib\":743,\"../../registry\":873,\"./attributes\":610,\"./convert\":611,\"./defaults\":612,\"./draw\":613}],615:[function(t,e,r){\"use strict\";e.exports=t(\"world-calendars/dist/main\"),t(\"world-calendars/dist/plus\"),t(\"world-calendars/dist/calendars/chinese\"),t(\"world-calendars/dist/calendars/coptic\"),t(\"world-calendars/dist/calendars/discworld\"),t(\"world-calendars/dist/calendars/ethiopian\"),t(\"world-calendars/dist/calendars/hebrew\"),t(\"world-calendars/dist/calendars/islamic\"),t(\"world-calendars/dist/calendars/julian\"),t(\"world-calendars/dist/calendars/mayan\"),t(\"world-calendars/dist/calendars/nanakshahi\"),t(\"world-calendars/dist/calendars/nepali\"),t(\"world-calendars/dist/calendars/persian\"),t(\"world-calendars/dist/calendars/taiwan\"),t(\"world-calendars/dist/calendars/thai\"),t(\"world-calendars/dist/calendars/ummalqura\")},{\"world-calendars/dist/calendars/chinese\":581,\"world-calendars/dist/calendars/coptic\":582,\"world-calendars/dist/calendars/discworld\":583,\"world-calendars/dist/calendars/ethiopian\":584,\"world-calendars/dist/calendars/hebrew\":585,\"world-calendars/dist/calendars/islamic\":586,\"world-calendars/dist/calendars/julian\":587,\"world-calendars/dist/calendars/mayan\":588,\"world-calendars/dist/calendars/nanakshahi\":589,\"world-calendars/dist/calendars/nepali\":590,\"world-calendars/dist/calendars/persian\":591,\"world-calendars/dist/calendars/taiwan\":592,\"world-calendars/dist/calendars/thai\":593,\"world-calendars/dist/calendars/ummalqura\":594,\"world-calendars/dist/main\":595,\"world-calendars/dist/plus\":596}],616:[function(t,e,r){\"use strict\";function n(t){var e=m[t];return e||(e=m[t]=o.instance(t))}function i(t){return s.extendFlat({},f,{description:t})}function a(t){return\"Sets the calendar system to use with `\"+t+\"` date data.\"}var o=t(\"./calendars\"),s=t(\"../../lib\"),l=t(\"../../constants/numerical\"),c=l.EPOCHJD,u=l.ONEDAY,f={valType:\"enumerated\",values:Object.keys(o.calendars),editType:\"calc\",dflt:\"gregorian\"},h=function(t,e,r,n){var i={};return i[r]=f,s.coerce(t,e,i,r,n)},d=\"##\",p={d:{0:\"dd\",\"-\":\"d\"},e:{0:\"d\",\"-\":\"d\"},a:{0:\"D\",\"-\":\"D\"},A:{0:\"DD\",\"-\":\"DD\"},j:{0:\"oo\",\"-\":\"o\"},W:{0:\"ww\",\"-\":\"w\"},m:{0:\"mm\",\"-\":\"m\"},b:{0:\"M\",\"-\":\"M\"},B:{0:\"MM\",\"-\":\"MM\"},y:{0:\"yy\",\"-\":\"yy\"},Y:{0:\"yyyy\",\"-\":\"yyyy\"},U:d,w:d,c:{0:\"D M d %X yyyy\",\"-\":\"D M d %X yyyy\"},x:{0:\"mm/dd/yyyy\",\"-\":\"mm/dd/yyyy\"}},m={},g={xcalendar:i(a(\"x\"))},v=s.extendFlat({},g,{ycalendar:i(a(\"y\"))}),y=s.extendFlat({},v,{zcalendar:i(a(\"z\"))}),x=i([\"Sets the calendar system to use for `range` and `tick0`\",\"if this is a date axis. This does not set the calendar for\",\"interpreting data on this axis, that's specified in the trace\",\"or via the global `layout.calendar`\"].join(\" \"));e.exports={moduleType:\"component\",name:\"calendars\",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:g,candlestick:g},layout:{calendar:i([\"Sets the default calendar system to use for interpreting and\",\"displaying dates throughout the plot.\"].join(\" \"))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:i([\"Sets the calendar system to use for `value`, if it is a date.\"].join(\" \")),targetcalendar:i([\"Sets the calendar system to use for `target`, if it is an\",\"array of dates. If `target` is a string (eg *x*) we use the\",\"corresponding trace attribute (eg `xcalendar`) if it exists,\",\"even if `targetcalendar` is provided.\"].join(\" \"))}}},layoutAttributes:f,handleDefaults:h,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)h(t,e,r[i]+\"calendar\",n.calendar)},CANONICAL_SUNDAY:{chinese:\"2000-01-02\",coptic:\"2000-01-03\",discworld:\"2000-01-03\",ethiopian:\"2000-01-05\",hebrew:\"5000-01-01\",islamic:\"1000-01-02\",julian:\"2000-01-03\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-05\",nepali:\"2000-01-05\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-04\",thai:\"2000-01-04\",ummalqura:\"1400-01-06\"},CANONICAL_TICK:{chinese:\"2000-01-01\",coptic:\"2000-01-01\",discworld:\"2000-01-01\",ethiopian:\"2000-01-01\",hebrew:\"5000-01-01\",islamic:\"1000-01-01\",julian:\"2000-01-01\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-01\",nepali:\"2000-01-01\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-01\",thai:\"2000-01-01\",ummalqura:\"1400-01-01\"},DFLTRANGE:{chinese:[\"2000-01-01\",\"2001-01-01\"],coptic:[\"1700-01-01\",\"1701-01-01\"],discworld:[\"1800-01-01\",\"1801-01-01\"],ethiopian:[\"2000-01-01\",\"2001-01-01\"],hebrew:[\"5700-01-01\",\"5701-01-01\"],islamic:[\"1400-01-01\",\"1401-01-01\"],julian:[\"2000-01-01\",\"2001-01-01\"],mayan:[\"5200-01-01\",\"5201-01-01\"],nanakshahi:[\"0500-01-01\",\"0501-01-01\"],nepali:[\"2000-01-01\",\"2001-01-01\"],persian:[\"1400-01-01\",\"1401-01-01\"],jalali:[\"1400-01-01\",\"1401-01-01\"],taiwan:[\"0100-01-01\",\"0101-01-01\"],thai:[\"2500-01-01\",\"2501-01-01\"],ummalqura:[\"1400-01-01\",\"1401-01-01\"]},getCal:n,worldCalFmt:function(t,e,r){for(var i,a,o,s,l,f=Math.floor((e+.05)/u)+c,h=n(r).fromJD(f),m=0;-1!==(m=t.indexOf(\"%\",m));)\"0\"===(i=t.charAt(m+1))||\"-\"===i||\"_\"===i?(o=3,a=t.charAt(m+2),\"_\"===i&&(i=\"-\")):(a=i,i=\"0\",o=2),(s=p[a])?(l=s===d?d:h.formatDate(s[i]),t=t.substr(0,m)+l+t.substr(m+o),m+=l.length):m+=o;return t}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./calendars\":615}],617:[function(t,e,r){\"use strict\";r.defaults=[\"#1f77b4\",\"#ff7f0e\",\"#2ca02c\",\"#d62728\",\"#9467bd\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\",\"#17becf\"],r.defaultLine=\"#444\",r.lightLine=\"#eee\",r.background=\"#fff\",r.borderLine=\"#BEC8D9\",r.lightFraction=1e3/11},{}],618:[function(t,e,r){\"use strict\";function n(t){if(a(t)||\"string\"!=typeof t)return t;var e=t.trim();if(\"rgb\"!==e.substr(0,3))return t;var r=e.match(/^rgba?\\s*\\(([^()]*)\\)$/);if(!r)return t;var n=r[1].trim().split(/\\s*[\\s,]\\s*/),i=\"a\"===e.charAt(3)&&4===n.length;if(!i&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=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 c=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||c).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);1!==n.getAlpha()&&(n=i(o.combine(t,c)));return(n.isDark()?e?n.lighten(e):c: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;e<s.length;e++)if(i=s[e],a=t[i],\"color\"===i.substr(i.length-5))if(Array.isArray(a))for(r=0;r<a.length;r++)a[r]=n(a[r]);else t[i]=n(a);else if(\"colorscale\"===i.substr(i.length-10)&&Array.isArray(a))for(r=0;r<a.length;r++)Array.isArray(a[r])&&(a[r][1]=n(a[r][1]));else if(Array.isArray(a)){var l=a[0];if(!Array.isArray(l)&&l&&\"object\"==typeof l)for(r=0;r<a.length;r++)o.clean(a[r])}else a&&\"object\"==typeof a&&o.clean(a)}}},{\"./attributes\":617,\"fast-isnumeric\":140,tinycolor2:546}],619:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/layout_attributes\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll;e.exports=o({thicknessmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\"},thickness:{valType:\"number\",min:0,dflt:30},lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",dflt:1.02,min:-2,max:3},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\"},xpad:{valType:\"number\",min:0,dflt:10},y:{valType:\"number\",dflt:.5,min:-2,max:3},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\"},ypad:{valType:\"number\",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:\"number\",min:0,dflt:0},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:\"\"}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{valType:\"string\"},titlefont:i({}),titleside:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"],dflt:\"top\"}},\"colorbars\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/font_attributes\":816}],620:[function(t,e,r){\"use strict\";e.exports={cn:{colorbar:\"colorbar\",cbbg:\"cbbg\",cbfill:\"cbfill\",cbfills:\"cbfills\",cbline:\"cbline\",cblines:\"cblines\",cbaxis:\"cbaxis\",cbtitleunshift:\"cbtitleunshift\",cbtitle:\"cbtitle\",cboutline:\"cboutline\",crisp:\"crisp\",jsPlaceholder:\"js-placeholder\"}}},{}],621:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/tick_value_defaults\"),a=t(\"../../plots/cartesian/tick_mark_defaults\"),o=t(\"../../plots/cartesian/tick_label_defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r){function l(t,e){return n.coerce(u,c,s,t,e)}var c=e.colorbar={},u=t.colorbar||{};l(\"thickness\",\"fraction\"===l(\"thicknessmode\")?30/(r.width-r.margin.l-r.margin.r):30);l(\"len\",\"fraction\"===l(\"lenmode\")?1:r.height-r.margin.t-r.margin.b),l(\"x\"),l(\"xanchor\"),l(\"xpad\"),l(\"y\"),l(\"yanchor\"),l(\"ypad\"),n.noneOrAll(u,c,[\"x\",\"y\"]),l(\"outlinecolor\"),l(\"outlinewidth\"),l(\"bordercolor\"),l(\"borderwidth\"),l(\"bgcolor\"),i(u,c,l,\"linear\"),o(u,c,l,\"linear\",{outerTicks:!1,font:r.font,noHover:!0}),a(u,c,l,\"linear\",{outerTicks:!1,font:r.font,noHover:!0}),l(\"title\",r._dfltTitle.colorbar),n.coerceFont(l,\"titlefont\",r.font),l(\"titleside\")}},{\"../../lib\":743,\"../../plots/cartesian/tick_label_defaults\":809,\"../../plots/cartesian/tick_mark_defaults\":810,\"../../plots/cartesian/tick_value_defaults\":811,\"./attributes\":619}],622:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"tinycolor2\"),a=t(\"../../plotly\"),o=t(\"../../plots/plots\"),s=t(\"../../registry\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../dragelement\"),u=t(\"../../lib\"),f=t(\"../../lib/extend\").extendFlat,h=t(\"../../lib/setcursor\"),d=t(\"../drawing\"),p=t(\"../color\"),m=t(\"../titles\"),g=t(\"../../lib/svg_text_utils\"),v=t(\"../../constants/alignment\").LINE_SPACING,y=t(\"../../plots/cartesian/axis_defaults\"),x=t(\"../../plots/cartesian/position_defaults\"),b=t(\"../../plots/cartesian/layout_attributes\"),_=t(\"./attributes\"),w=t(\"./constants\").cn;e.exports=function(t,e){function r(){function _(t,e){return u.coerce(tt,et,b,t,e)}function A(e,r){var n,i=M();n=s.traceIs(i,\"markerColorscale\")?\"marker.colorbar.title\":\"colorbar.title\";var a={propContainer:et,propName:n,traceIndex:i.index,placeholder:T._dfltTitle.colorbar,containerGroup:st.select(\".cbtitle\")},o=\"h\"===e.charAt(0)?e.substr(1):\"h\"+e;st.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),m.draw(t,e,f(a,r||{}))}var T=t._fullLayout,S=T._size;if(\"function\"==typeof k.fillcolor||\"function\"==typeof k.line.color){var E,L,C=n.extent((\"function\"==typeof k.fillcolor?k.fillcolor:k.line.color).domain()),z=[],D=[],I=\"function\"==typeof k.line.color?k.line.color:function(){return k.line.color},P=\"function\"==typeof k.fillcolor?k.fillcolor:function(){return k.fillcolor},O=k.levels.end+k.levels.size/100,F=k.levels.size,R=1.001*C[0]-.001*C[1],N=1.001*C[1]-.001*C[0];for(L=0;L<1e5&&(E=k.levels.start+L*F,!(F>0?E>=O:E<=O));L++)E>R&&E<N&&z.push(E);if(\"function\"==typeof k.fillcolor)if(k.filllevels)for(O=k.filllevels.end+k.filllevels.size/100,F=k.filllevels.size,L=0;L<1e5&&(E=k.filllevels.start+L*F,!(F>0?E>=O:E<=O));L++)E>C[0]&&E<C[1]&&D.push(E);else(D=z.map(function(t){return t-k.levels.size/2})).push(D[D.length-1]+k.levels.size);else k.fillcolor&&\"string\"==typeof k.fillcolor&&(D=[0]);k.levels.size<0&&(z.reverse(),D.reverse());var j,B=T.height-T.margin.t-T.margin.b,U=T.width-T.margin.l-T.margin.r,V=Math.round(k.thickness*(\"fraction\"===k.thicknessmode?U:1)),q=V/S.w,H=Math.round(k.len*(\"fraction\"===k.lenmode?B:1)),G=H/S.h,Y=k.xpad/S.w,W=(k.borderwidth+k.outlinewidth)/2,X=k.ypad/S.h,Z=Math.round(k.x*S.w+k.xpad),J=k.x-q*({middle:.5,right:1}[k.xanchor]||0),K=k.y+G*(({top:-.5,bottom:.5}[k.yanchor]||0)-.5),Q=Math.round(S.h*(1-K)),$=Q-H,tt={type:\"linear\",range:C,tickmode:k.tickmode,nticks:k.nticks,tick0:k.tick0,dtick:k.dtick,tickvals:k.tickvals,ticktext:k.ticktext,ticks:k.ticks,ticklen:k.ticklen,tickwidth:k.tickwidth,tickcolor:k.tickcolor,showticklabels:k.showticklabels,tickfont:k.tickfont,tickangle:k.tickangle,tickformat:k.tickformat,exponentformat:k.exponentformat,separatethousands:k.separatethousands,showexponent:k.showexponent,showtickprefix:k.showtickprefix,tickprefix:k.tickprefix,showticksuffix:k.showticksuffix,ticksuffix:k.ticksuffix,title:k.title,titlefont:k.titlefont,showline:!0,anchor:\"free\",position:1},et={type:\"linear\",_id:\"y\"+e},rt={letter:\"y\",font:T.font,noHover:!0,calendar:T.calendar};if(y(tt,et,_,rt,T),x(tt,et,_,rt),et.position=k.x+Y+q,r.axis=et,-1!==[\"top\",\"bottom\"].indexOf(k.titleside)&&(et.titleside=k.titleside,et.titlex=k.x+Y,et.titley=K+(\"top\"===k.titleside?G-X:X)),k.line.color&&\"auto\"===k.tickmode){et.tickmode=\"linear\",et.tick0=k.levels.start;var nt=k.levels.size,it=u.constrain((Q-$)/50,4,15)+1,at=(C[1]-C[0])/((k.nticks||it)*nt);if(at>1){var ot=Math.pow(10,Math.floor(Math.log(at)/Math.LN10));nt*=ot*u.roundUp(at/ot,[2,5,10]),(Math.abs(k.levels.start)/k.levels.size+1e-6)%1<2e-6&&(et.tick0=0)}et.dtick=nt}et.domain=[K+X,K+G-X],et.setScale();var st=T._infolayer.selectAll(\"g.\"+e).data([0]);st.enter().append(\"g\").classed(e,!0).classed(w.colorbar,!0).each(function(){var t=n.select(this);t.append(\"rect\").classed(w.cbbg,!0),t.append(\"g\").classed(w.cbfills,!0),t.append(\"g\").classed(w.cblines,!0),t.append(\"g\").classed(w.cbaxis,!0).classed(w.crisp,!0),t.append(\"g\").classed(w.cbtitleunshift,!0).append(\"g\").classed(w.cbtitle,!0),t.append(\"rect\").classed(w.cboutline,!0),t.select(\".cbtitle\").datum(0)}),st.attr(\"transform\",\"translate(\"+Math.round(S.l)+\",\"+Math.round(S.t)+\")\");var lt=st.select(\".cbtitleunshift\").attr(\"transform\",\"translate(-\"+Math.round(S.l)+\",-\"+Math.round(S.t)+\")\");et._axislayer=st.select(\".cbaxis\");var ct=0;if(-1!==[\"top\",\"bottom\"].indexOf(k.titleside)){var ut,ft=S.l+(k.x+Y)*S.w,ht=et.titlefont.size;ut=\"top\"===k.titleside?(1-(K+G-X))*S.h+S.t+3+.75*ht:(1-(K+X))*S.h+S.t-3-.25*ht,A(et._id+\"title\",{attributes:{x:ft,y:ut,\"text-anchor\":\"start\"}})}var dt=u.syncOrAsync([o.previousPromises,function(){if(-1!==[\"top\",\"bottom\"].indexOf(k.titleside)){var e=st.select(\".cbtitle\"),r=e.select(\"text\"),a=[-k.outlinewidth/2,k.outlinewidth/2],o=e.select(\".h\"+et._id+\"title-math-group\").node(),s=15.6;if(r.node()&&(s=parseInt(r.node().style.fontSize,10)*v),o?(ct=d.bBox(o).height)>s&&(a[1]-=(ct-s)/2):r.node()&&!r.classed(w.jsPlaceholder)&&(ct=d.bBox(r.node()).height),ct){if(ct+=5,\"top\"===k.titleside)et.domain[1]-=ct/S.h,a[1]*=-1;else{et.domain[0]+=ct/S.h;var c=g.lineCount(r);a[1]+=(1-c)*s}e.attr(\"transform\",\"translate(\"+a+\")\"),et.setScale()}}st.selectAll(\".cbfills,.cblines\").attr(\"transform\",\"translate(0,\"+Math.round(S.h*(1-et.domain[1]))+\")\"),et._axislayer.attr(\"transform\",\"translate(0,\"+Math.round(-S.t)+\")\");var f=st.select(\".cbfills\").selectAll(\"rect.cbfill\").data(D);f.enter().append(\"rect\").classed(w.cbfill,!0).style(\"stroke\",\"none\"),f.exit().remove(),f.each(function(t,e){var r=[0===e?C[0]:(D[e]+D[e-1])/2,e===D.length-1?C[1]:(D[e]+D[e+1])/2].map(et.c2p).map(Math.round);e!==D.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=P(t).replace(\"e-\",\"\"),o=i(a).toHexString();n.select(this).attr({x:Z,width:Math.max(V,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var h=st.select(\".cblines\").selectAll(\"path.cbline\").data(k.line.color&&k.line.width?z:[]);return h.enter().append(\"path\").classed(w.cbline,!0),h.exit().remove(),h.each(function(t){n.select(this).attr(\"d\",\"M\"+Z+\",\"+(Math.round(et.c2p(t))+k.line.width/2%1)+\"h\"+V).call(d.lineGroupStyle,k.line.width,I(t),k.line.dash)}),et._axislayer.selectAll(\"g.\"+et._id+\"tick,path\").remove(),et._pos=Z+V+(k.outlinewidth||0)/2-(\"outside\"===k.ticks?1:0),et.side=\"right\",u.syncOrAsync([function(){return l.doTicks(t,et,!0)},function(){if(-1===[\"top\",\"bottom\"].indexOf(k.titleside)){var e=et.titlefont.size,r=et._offset+et._length/2,i=S.l+(et.position||0)*S.w+(\"right\"===et.side?10+e*(et.showticklabels?1:.5):-10-e*(et.showticklabels?.5:0));A(\"h\"+et._id+\"title\",{avoid:{selection:n.select(t).selectAll(\"g.\"+et._id+\"tick\"),side:k.titleside,offsetLeft:S.l,offsetTop:0,maxShift:T.width},attributes:{x:i,y:r,\"text-anchor\":\"middle\"},transform:{rotate:\"-90\",offset:0}})}}])},o.previousPromises,function(){var r=V+k.outlinewidth/2+d.bBox(et._axislayer.node()).width;if((j=lt.select(\"text\")).node()&&!j.classed(w.jsPlaceholder)){var n,i=lt.select(\".h\"+et._id+\"title-math-group\").node();n=i&&-1!==[\"top\",\"bottom\"].indexOf(k.titleside)?d.bBox(i).width:d.bBox(lt.node()).right-Z-S.l,r=Math.max(r,n)}var a=2*k.xpad+r+k.borderwidth+k.outlinewidth/2,s=Q-$;st.select(\".cbbg\").attr({x:Z-k.xpad-(k.borderwidth+k.outlinewidth)/2,y:$-W,width:Math.max(a,2),height:Math.max(s+2*W,2)}).call(p.fill,k.bgcolor).call(p.stroke,k.bordercolor).style({\"stroke-width\":k.borderwidth}),st.selectAll(\".cboutline\").attr({x:Z,y:$+k.ypad+(\"top\"===k.titleside?ct:0),width:Math.max(V,2),height:Math.max(s-2*k.ypad-ct,2)}).call(p.stroke,k.outlinecolor).style({fill:\"None\",\"stroke-width\":k.outlinewidth});var l=({center:.5,right:1}[k.xanchor]||0)*a;st.attr(\"transform\",\"translate(\"+(S.l-l)+\",\"+S.t+\")\"),o.autoMargin(t,e,{x:k.x,y:k.y,l:a*({right:1,center:.5}[k.xanchor]||0),r:a*({left:1,center:.5}[k.xanchor]||0),t:s*({bottom:1,middle:.5}[k.yanchor]||0),b:s*({top:1,middle:.5}[k.yanchor]||0)})}],t);if(dt&&dt.then&&(t._promises||[]).push(dt),t._context.edits.colorbarPosition){var pt,mt,gt;c.init({element:st.node(),gd:t,prepFn:function(){pt=st.attr(\"transform\"),h(st)},moveFn:function(t,e){st.attr(\"transform\",pt+\" translate(\"+t+\",\"+e+\")\"),mt=c.align(J+t/S.w,q,0,1,k.xanchor),gt=c.align(K-e/S.h,G,0,1,k.yanchor);var r=c.getCursor(mt,gt,k.xanchor,k.yanchor);h(st,r)},doneFn:function(){h(st),void 0!==mt&&void 0!==gt&&a.restyle(t,{\"colorbar.x\":mt,\"colorbar.y\":gt},M().index)}})}return dt}T._infolayer.selectAll(\"g.\"+e).remove()}function M(){var r,n,i=e.substr(2);for(r=0;r<t._fullData.length;r++)if((n=t._fullData[r]).uid===i)return n}var k={};return Object.keys(_).forEach(function(t){k[t]=null}),k.fillcolor=null,k.line={color:null,width:null,dash:null},k.levels={start:null,end:null,size:null},k.filllevels=null,Object.keys(k).forEach(function(t){r[t]=function(e){return arguments.length?(k[t]=u.isPlainObject(k[t])?u.extendFlat(k[t],e):e,r):k[t]}}),r.options=function(t){return Object.keys(t).forEach(function(e){\"function\"==typeof r[e]&&r[e](t[e])}),r},r._opts=k,r}},{\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/extend\":732,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/axis_defaults\":791,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/cartesian/position_defaults\":805,\"../../plots/plots\":852,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"../titles\":709,\"./attributes\":619,\"./constants\":620,d3:128,tinycolor2:546}],623:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":743}],624:[function(t,e,r){\"use strict\";e.exports={zauto:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{zmin:void 0,zmax:void 0}},zmin:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{zauto:!1}},zmax:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{zauto:!1}},colorscale:{valType:\"colorscale\",editType:\"calc\",impliedEdits:{autocolorscale:!1}},autocolorscale:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{colorscale:void 0}},reversescale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},showscale:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],625:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./scales\"),a=t(\"./flip_scale\");e.exports=function(t,e,r,o){var s,l;r?(s=n.nestedProperty(t,r).get(),l=n.nestedProperty(t._input,r).get()):(s=t,l=t._input);var c=o+\"auto\",u=o+\"min\",f=o+\"max\",h=s[c],d=s[u],p=s[f],m=s.colorscale;!1===h&&void 0!==d||(d=n.aggNums(Math.min,null,e)),!1===h&&void 0!==p||(p=n.aggNums(Math.max,null,e)),d===p&&(d-=.5,p+=.5),s[u]=d,s[f]=p,l[u]=d,l[f]=p,l[c]=!1!==h||void 0===d&&void 0===p,s.autocolorscale&&(m=d*p<0?i.RdBu:d>=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{\"../../lib\":743,\"./flip_scale\":630,\"./scales\":637}],626:[function(t,e,r){\"use strict\";var n=t(\"./attributes\"),i=t(\"../../lib/extend\").extendFlat;t(\"./scales.js\");e.exports=function(t,e,r){return{color:{valType:\"color\",arrayOk:!0,editType:e||\"style\"},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{impliedEdits:{cmin:void 0,cmax:void 0}}),cmax:i({},n.zmax,{editType:e||n.zmax.editType,impliedEdits:{cauto:!1}}),cmin:i({},n.zmin,{editType:e||n.zmin.editType,impliedEdits:{cauto:!1}}),autocolorscale:i({},n.autocolorscale,{dflt:!1===r?r:n.autocolorscale.dflt}),reversescale:i({},n.reversescale,{})}}},{\"../../lib/extend\":732,\"./attributes\":624,\"./scales.js\":637}],627:[function(t,e,r){\"use strict\";var n=t(\"./scales\");e.exports=n.RdBu},{\"./scales\":637}],628:[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,c,u){var f=u.prefix,h=u.cLetter,d=f.slice(0,f.length-1),p=f?i.nestedProperty(t,d).get()||{}:t,m=f?i.nestedProperty(e,d).get()||{}:e,g=p[h+\"min\"],v=p[h+\"max\"],y=p.colorscale;c(f+h+\"auto\",!(n(g)&&n(v)&&g<v)),c(f+h+\"min\"),c(f+h+\"max\");var x;void 0!==y&&(x=!s(y)),c(f+\"autocolorscale\",x);var b=c(f+\"colorscale\");if(c(f+\"reversescale\")&&(m.colorscale=l(b)),\"marker.line.\"!==f){var _;f&&(_=a(p));c(f+\"showscale\",_)&&o(p,m,r)}}},{\"../../lib\":743,\"../colorbar/defaults\":621,\"../colorbar/has_colorbar\":623,\"./flip_scale\":630,\"./is_valid_scale\":634,\"fast-isnumeric\":140}],629:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){for(var n=t.length,i=new Array(n),a=new Array(n),o=0;o<n;o++){var s=t[o];i[o]=e+s[0]*(r-e),a[o]=s[1]}return{domain:i,range:a}}},{}],630:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=new Array(r),i=r-1,a=0;i>=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],631:[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\":627,\"./is_valid_scale_array\":635,\"./scales\":637}],632:[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;l<o.length;l++)if(n(o[l])){s=!0;break}return i.isPlainObject(r)&&(s||!0===r.showscale||n(r.cmin)&&n(r.cmax)||a(r.colorscale)||i.isPlainObject(r.colorbar))}},{\"../../lib\":743,\"./is_valid_scale\":634,\"fast-isnumeric\":140}],633:[function(t,e,r){\"use strict\";r.scales=t(\"./scales\"),r.defaultScale=t(\"./default_scale\"),r.attributes=t(\"./attributes\"),r.handleDefaults=t(\"./defaults\"),r.calc=t(\"./calc\"),r.hasColorscale=t(\"./has_colorscale\"),r.isValidScale=t(\"./is_valid_scale\"),r.getScale=t(\"./get_scale\"),r.flipScale=t(\"./flip_scale\"),r.extractScale=t(\"./extract_scale\"),r.makeColorScaleFunc=t(\"./make_color_scale_func\")},{\"./attributes\":624,\"./calc\":625,\"./default_scale\":627,\"./defaults\":628,\"./extract_scale\":629,\"./flip_scale\":630,\"./get_scale\":631,\"./has_colorscale\":632,\"./is_valid_scale\":634,\"./make_color_scale_func\":636,\"./scales\":637}],634:[function(t,e,r){\"use strict\";var n=t(\"./scales\"),i=t(\"./is_valid_scale_array\");e.exports=function(t){return void 0!==n[t]||i(t)}},{\"./is_valid_scale_array\":635,\"./scales\":637}],635:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\");e.exports=function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}},{tinycolor2:546}],636:[function(t,e,r){\"use strict\";function n(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return a(e).toRgbString()}var i=t(\"d3\"),a=t(\"tinycolor2\"),o=t(\"fast-isnumeric\"),s=t(\"../color\");e.exports=function(t,e){e=e||{};for(var r=t.domain,l=t.range,c=l.length,u=new Array(c),f=0;f<c;f++){var h=a(l[f]).toRgb();u[f]=[h.r,h.g,h.b,h.a]}var d,p=i.scale.linear().domain(r).range(u).clamp(!0),m=e.noNumericCheck,g=e.returnArray;return d=m&&g?p:m?function(t){return n(p(t))}:g?function(t){return o(t)?p(t):a(t).isValid()?t:s.defaultLine}:function(t){return o(t)?n(p(t)):a(t).isValid()?t:s.defaultLine},d.domain=p.domain,d.range=function(){return l},d}},{\"../color\":618,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],637:[function(t,e,r){\"use strict\";e.exports={Greys:[[0,\"rgb(0,0,0)\"],[1,\"rgb(255,255,255)\"]],YlGnBu:[[0,\"rgb(8,29,88)\"],[.125,\"rgb(37,52,148)\"],[.25,\"rgb(34,94,168)\"],[.375,\"rgb(29,145,192)\"],[.5,\"rgb(65,182,196)\"],[.625,\"rgb(127,205,187)\"],[.75,\"rgb(199,233,180)\"],[.875,\"rgb(237,248,217)\"],[1,\"rgb(255,255,217)\"]],Greens:[[0,\"rgb(0,68,27)\"],[.125,\"rgb(0,109,44)\"],[.25,\"rgb(35,139,69)\"],[.375,\"rgb(65,171,93)\"],[.5,\"rgb(116,196,118)\"],[.625,\"rgb(161,217,155)\"],[.75,\"rgb(199,233,192)\"],[.875,\"rgb(229,245,224)\"],[1,\"rgb(247,252,245)\"]],YlOrRd:[[0,\"rgb(128,0,38)\"],[.125,\"rgb(189,0,38)\"],[.25,\"rgb(227,26,28)\"],[.375,\"rgb(252,78,42)\"],[.5,\"rgb(253,141,60)\"],[.625,\"rgb(254,178,76)\"],[.75,\"rgb(254,217,118)\"],[.875,\"rgb(255,237,160)\"],[1,\"rgb(255,255,204)\"]],Bluered:[[0,\"rgb(0,0,255)\"],[1,\"rgb(255,0,0)\"]],RdBu:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(106,137,247)\"],[.5,\"rgb(190,190,190)\"],[.6,\"rgb(220,170,132)\"],[.7,\"rgb(230,145,90)\"],[1,\"rgb(178,10,28)\"]],Reds:[[0,\"rgb(220,220,220)\"],[.2,\"rgb(245,195,157)\"],[.4,\"rgb(245,160,105)\"],[1,\"rgb(178,10,28)\"]],Blues:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(40,60,190)\"],[.5,\"rgb(70,100,245)\"],[.6,\"rgb(90,120,245)\"],[.7,\"rgb(106,137,247)\"],[1,\"rgb(220,220,220)\"]],Picnic:[[0,\"rgb(0,0,255)\"],[.1,\"rgb(51,153,255)\"],[.2,\"rgb(102,204,255)\"],[.3,\"rgb(153,204,255)\"],[.4,\"rgb(204,204,255)\"],[.5,\"rgb(255,255,255)\"],[.6,\"rgb(255,204,255)\"],[.7,\"rgb(255,153,255)\"],[.8,\"rgb(255,102,204)\"],[.9,\"rgb(255,102,102)\"],[1,\"rgb(255,0,0)\"]],Rainbow:[[0,\"rgb(150,0,90)\"],[.125,\"rgb(0,0,200)\"],[.25,\"rgb(0,25,255)\"],[.375,\"rgb(0,152,255)\"],[.5,\"rgb(44,255,150)\"],[.625,\"rgb(151,255,0)\"],[.75,\"rgb(255,234,0)\"],[.875,\"rgb(255,111,0)\"],[1,\"rgb(255,0,0)\"]],Portland:[[0,\"rgb(12,51,131)\"],[.25,\"rgb(10,136,186)\"],[.5,\"rgb(242,211,56)\"],[.75,\"rgb(242,143,56)\"],[1,\"rgb(217,30,30)\"]],Jet:[[0,\"rgb(0,0,131)\"],[.125,\"rgb(0,60,170)\"],[.375,\"rgb(5,255,255)\"],[.625,\"rgb(255,255,0)\"],[.875,\"rgb(250,0,0)\"],[1,\"rgb(128,0,0)\"]],Hot:[[0,\"rgb(0,0,0)\"],[.3,\"rgb(230,0,0)\"],[.6,\"rgb(255,210,0)\"],[1,\"rgb(255,255,255)\"]],Blackbody:[[0,\"rgb(0,0,0)\"],[.2,\"rgb(230,0,0)\"],[.4,\"rgb(230,210,0)\"],[.7,\"rgb(255,255,255)\"],[1,\"rgb(160,200,255)\"]],Earth:[[0,\"rgb(0,0,130)\"],[.1,\"rgb(0,180,180)\"],[.2,\"rgb(40,210,40)\"],[.4,\"rgb(230,230,50)\"],[.6,\"rgb(120,70,20)\"],[1,\"rgb(255,255,255)\"]],Electric:[[0,\"rgb(0,0,0)\"],[.15,\"rgb(30,0,100)\"],[.4,\"rgb(120,0,100)\"],[.6,\"rgb(160,90,0)\"],[.8,\"rgb(230,200,0)\"],[1,\"rgb(255,250,220)\"]],Viridis:[[0,\"#440154\"],[.06274509803921569,\"#48186a\"],[.12549019607843137,\"#472d7b\"],[.18823529411764706,\"#424086\"],[.25098039215686274,\"#3b528b\"],[.3137254901960784,\"#33638d\"],[.3764705882352941,\"#2c728e\"],[.4392156862745098,\"#26828e\"],[.5019607843137255,\"#21918c\"],[.5647058823529412,\"#1fa088\"],[.6274509803921569,\"#28ae80\"],[.6901960784313725,\"#3fbc73\"],[.7529411764705882,\"#5ec962\"],[.8156862745098039,\"#84d44b\"],[.8784313725490196,\"#addc30\"],[.9411764705882353,\"#d8e219\"],[1,\"#fde725\"]],Cividis:[[0,\"rgb(0,32,76)\"],[.058824,\"rgb(0,42,102)\"],[.117647,\"rgb(0,52,110)\"],[.176471,\"rgb(39,63,108)\"],[.235294,\"rgb(60,74,107)\"],[.294118,\"rgb(76,85,107)\"],[.352941,\"rgb(91,95,109)\"],[.411765,\"rgb(104,106,112)\"],[.470588,\"rgb(117,117,117)\"],[.529412,\"rgb(131,129,120)\"],[.588235,\"rgb(146,140,120)\"],[.647059,\"rgb(161,152,118)\"],[.705882,\"rgb(176,165,114)\"],[.764706,\"rgb(192,177,109)\"],[.823529,\"rgb(209,191,102)\"],[.882353,\"rgb(225,204,92)\"],[.941176,\"rgb(243,219,79)\"],[1,\"rgb(255,233,69)\"]]}},{}],638:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return\"left\"===i||\"bottom\"===i?a:\"center\"===i||\"middle\"===i?s:\"right\"===i||\"top\"===i?o:a<2/3-s?a:o>4/3-s?o:s}},{}],639:[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\":743}],640:[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){return a(t.changedTouches?t.changedTouches[0]:t,document.body)}var a=t(\"mouse-event-offset\"),o=t(\"has-hover\"),s=t(\"../../plotly\"),l=t(\"../../lib\"),c=t(\"../../plots/cartesian/constants\"),u=t(\"../../constants/interactions\"),f=e.exports={};f.align=t(\"./align\"),f.getCursor=t(\"./cursor\");var h=t(\"./unhover\");f.unhover=h.wrapped,f.unhoverRaw=h.raw;var d=l.eventListenerOptionsSupported();f.init=function(t){function e(e){_._dragged=!1,_._dragging=!0;var s=i(e);return h=s[0],p=s[1],x=e.target,y=e,b=e.buttons&&2===e.buttons||e.ctrlKey,(m=(new Date).getTime())-_._mouseDownTime<M?w+=1:(w=1,_._mouseDownTime=m),t.prepFn&&t.prepFn(e,h,p),o&&!b?(v=n()).style.cursor=window.getComputedStyle(k).cursor:o||(v=document,g=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(k).cursor),document.addEventListener(\"mousemove\",r),document.addEventListener(\"mouseup\",a),document.addEventListener(\"touchmove\",r),document.addEventListener(\"touchend\",a),l.pauseEvent(e)}function r(e){var r=i(e),n=t.minDrag||c.MINDRAG,a=A(r[0]-h,r[1]-p,n),o=a[0],s=a[1];return(o||s)&&(_._dragged=!0,f.unhover(_)),_._dragged&&t.moveFn&&!b&&t.moveFn(o,s),l.pauseEvent(e)}function a(e){if(document.removeEventListener(\"mousemove\",r),document.removeEventListener(\"mouseup\",a),document.removeEventListener(\"touchmove\",r),document.removeEventListener(\"touchend\",a),o?l.removeElement(v):g&&(v.documentElement.style.cursor=g,g=null),_._dragging){if(_._dragging=!1,(new Date).getTime()-_._mouseDownTime>M&&(w=Math.max(w-1,1)),_._dragged)t.doneFn&&t.doneFn(e);else if(t.clickFn&&t.clickFn(w,y),!b){var n;try{n=new MouseEvent(\"click\",e)}catch(t){var c=i(e);(n=document.createEvent(\"MouseEvents\")).initMouseEvent(\"click\",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,c[0],c[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}x.dispatchEvent(n)}return function(t){t._dragging=!1,t._replotPending&&s.plot(t)}(_),_._dragged=!1,l.pauseEvent(e)}_._dragged=!1}var h,p,m,g,v,y,x,b,_=t.gd,w=1,M=u.DBLCLICKDELAY,k=t.element;_._mouseDownTime||(_._mouseDownTime=0),k.style.pointerEvents=\"all\",k.onmousedown=e,d?(k._ontouchstart&&k.removeEventListener(\"touchstart\",k._ontouchstart),k._ontouchstart=e,k.addEventListener(\"touchstart\",e,{passive:!1})):k.ontouchstart=e;var A=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]}},f.coverSlip=n},{\"../../constants/interactions\":720,\"../../lib\":743,\"../../plotly\":784,\"../../plots/cartesian/constants\":794,\"./align\":638,\"./cursor\":639,\"./unhover\":641,\"has-hover\":276,\"mouse-event-offset\":444}],641:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/get_graph_div\"),o=t(\"../fx/constants\"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.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(),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\":731,\"../../lib/get_graph_div\":738,\"../../lib/throttle\":767,\"../fx/constants\":655}],642:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"}},{}],643:[function(t,e,r){\"use strict\";function n(t,e){var r=t%100;return _.symbolFuncs[r](e)+(t>=200?k:\"\")}function i(t,e,r,n){var i=l.select(t.node().parentNode),a=-1!==e.indexOf(\"top\")?\"top\":-1!==e.indexOf(\"bottom\")?\"bottom\":\"middle\",o=-1!==e.indexOf(\"left\")?\"end\":-1!==e.indexOf(\"right\")?\"start\":\"middle\",s=n?n/.8+1:0,c=(m.lineCount(t)-1)*v+1,u=S[o]*s,f=.75*r+S[a]*s+(S[a]-1)*c*r/2;t.attr(\"text-anchor\",o),i.attr(\"transform\",\"translate(\"+u+\",\"+f+\")\")}function a(t,e){var r=t.ts||e.textfont.size;return c(r)&&r>0?r:0}function o(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],c=Math.pow(i*i+a*a,E/2),u=Math.pow(o*o+s*s,E/2),f=(u*u*i-c*c*o)*n,h=(u*u*a-c*c*s)*n,d=3*u*(c+u),p=3*c*(c+u);return[[l.round(e[0]+(d&&f/d),2),l.round(e[1]+(d&&h/d),2)],[l.round(e[0]-(p&&f/p),2),l.round(e[1]-(p&&h/p),2)]]}function s(t){var e=t.getAttribute(\"data-unformatted\");if(null!==e)return e+t.getAttribute(\"data-math\")+t.getAttribute(\"text-anchor\")+t.getAttribute(\"style\")}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../registry\"),h=t(\"../color\"),d=t(\"../colorscale\"),p=t(\"../../lib\"),m=t(\"../../lib/svg_text_utils\"),g=t(\"../../constants/xmlns_namespaces\"),v=t(\"../../constants/alignment\").LINE_SPACING,y=t(\"../../constants/interactions\").DESELECTDIM,x=t(\"../../traces/scatter/subtypes\"),b=t(\"../../traces/scatter/make_bubble_size_func\"),_=e.exports={};_.font=function(t,e,r,n){p.isPlainObject(e)&&(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(h.fill,n)},_.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},_.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},_.setRect=function(t,e,r,n,i){t.call(_.setPosition,e,r).call(_.setSize,n,i)},_.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(c(i)&&c(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",\"translate(\"+i+\",\"+a+\")\"),!0)},_.translatePoints=function(t,e,r){t.each(function(t){var n=l.select(this);_.translatePoint(t,n,e,r)})},_.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},_.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,n=e.yaxis;t.each(function(e){var i=e[0].trace,a=i.xcalendar,o=i.ycalendar;t.selectAll(\".point,.textpoint\").each(function(t){_.hideOutsideRangePoint(t,l.select(this),r,n,a,o)})})}},_.crispRound=function(t,e,r){return e&&c(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},_.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||\"\";h.stroke(e,n||a.color),_.dashLine(e,s,o)},_.lineGroupStyle=function(t,e,r,n){t.style(\"fill\",\"none\").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},a=e||i.width||0,o=n||i.dash||\"\";l.select(this).call(h.stroke,r||i.color).call(_.dashLine,o,a)})},_.dashLine=function(t,e,r){r=+r||0,e=_.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},_.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},_.singleFillStyle=function(t){var e=(((l.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(h.fill,e)},_.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each(function(e){var r=l.select(this);try{r.call(h.fill,e[0].trace.fillcolor)}catch(e){p.error(e,t),r.remove()}})};var w=t(\"./symbol_defs\");_.symbolNames=[],_.symbolFuncs=[],_.symbolNeedLines={},_.symbolNoDot={},_.symbolNoFill={},_.symbolList=[],Object.keys(w).forEach(function(t){var e=w[t];_.symbolList=_.symbolList.concat([e.n,t,e.n+100,t+\"-open\"]),_.symbolNames[e.n]=t,_.symbolFuncs[e.n]=e.f,e.needLine&&(_.symbolNeedLines[e.n]=!0),e.noDot?_.symbolNoDot[e.n]=!0:_.symbolList=_.symbolList.concat([e.n+200,t+\"-dot\",e.n+300,t+\"-open-dot\"]),e.noFill&&(_.symbolNoFill[e.n]=!0)});var M=_.symbolNames.length,k=\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\";_.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=_.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=M||t>=400?0:Math.floor(Math.max(t,0))};var A={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0};_.gradient=function(t,e,r,n,i,a){var o=e._fullLayout._defs.select(\".gradients\").selectAll(\"#\"+r).data([n+i+a],p.identity);o.exit().remove(),o.enter().append(\"radial\"===n?\"radialGradient\":\"linearGradient\").each(function(){var t=l.select(this);\"horizontal\"===n?t.attr(A):\"vertical\"===n&&t.attr(T),t.attr(\"id\",r);var e=u(i),o=u(a);t.append(\"stop\").attr({offset:\"0%\",\"stop-color\":h.tinyRGB(o),\"stop-opacity\":o.getAlpha()}),t.append(\"stop\").attr({offset:\"100%\",\"stop-color\":h.tinyRGB(e),\"stop-opacity\":e.getAlpha()})}),t.style({fill:\"url(#\"+r+\")\",\"fill-opacity\":null})},_.initGradients=function(t){var e=t._fullLayout._defs.selectAll(\".gradients\").data([0]);e.enter().append(\"g\").classed(\"gradients\",!0),e.selectAll(\"linearGradient,radialGradient\").remove()},_.singlePointStyle=function(t,e,r,i,a,o){var s=r.marker;!function(t,e,r,i,a,o,s,l){if(f.traceIs(r,\"symbols\")){var c=b(r);e.attr(\"d\",function(t){var e;e=\"various\"===t.ms||\"various\"===o.size?3:x.isBubble(r)?c(t.ms):(o.size||6)/2,t.mrc=e;var i=_.symbolNumber(t.mx||o.symbol)||0;return t.om=i%200>=100,n(i,e)})}e.style(\"opacity\",function(t){return(t.mo+1||o.opacity+1)-1});var u,d,p,m=!1;if(t.so?(p=s.outlierwidth,d=s.outliercolor,u=o.outliercolor):(p=(t.mlw+1||s.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,d=\"mlc\"in t?t.mlcc=a(t.mlc):Array.isArray(s.color)?h.defaultLine:s.color,Array.isArray(o.color)&&(u=h.defaultLine,m=!0),u=\"mc\"in t?t.mcc=i(t.mc):o.color||\"rgba(0,0,0,0)\"),t.om)e.call(h.stroke,u).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",p+\"px\");var g=o.gradient,v=t.mgt;if(v?m=!0:v=g&&g.type,v&&\"none\"!==v){var y=t.mgc;y?m=!0:y=g.color;var w=\"g\"+l._fullLayout._uid+\"-\"+r.uid;m&&(w+=\"-\"+t.i),e.call(_.gradient,l,w,v,u,y)}else e.call(h.fill,u);p&&e.call(h.stroke,d)}}(t,e,r,i,a,s,s.line,o)},_.pointStyle=function(t,e,r){if(t.size()){var n=e.marker,i=_.tryColorscale(n,\"\"),a=_.tryColorscale(n,\"line\");t.each(function(t){_.singlePointStyle(t,l.select(this),e,i,a,r)})}},_.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=e.selected||{},i=e.unselected||{},a=e.marker||{},o=r.marker||{},s=i.marker||{},c=a.opacity,u=o.opacity,d=s.opacity,p=void 0!==u,m=void 0!==d;t.each(function(t){var e,r=l.select(this),n=t.mo,i=void 0!==n;(i||p||m)&&(t.selected?p&&(e=u):e=m?d:y*(i?n:c)),void 0!==e&&r.style(\"opacity\",e)});var g=o.color,v=s.color;(g||v)&&t.each(function(t){var e,r=l.select(this);t.selected?g&&(e=g):v&&(e=v),e&&h.fill(r,e)});var x=o.size,b=s.size,w=void 0!==x,M=void 0!==b;f.traceIs(e,\"symbols\")&&(w||M)&&t.each(function(t){var e,r=l.select(this),i=t.mrc,o=t.mx||a.symbol||0;e=t.selected?w?x/2:i:M?b/2:i,r.attr(\"d\",n(_.symbolNumber(o),e)),t.mrc2=e})}},_.tryColorscale=function(t,e){var r=e?p.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?d.makeColorScaleFunc(d.extractScale(n,r.cmin,r.cmax)):p.identity};var S={start:1,end:-1,middle:0,bottom:1,top:-1};_.textPointStyle=function(t,e,r){t.each(function(t){var n=l.select(this),o=p.extractOption(t,e,\"tx\",\"text\");if(o){var s=t.tp||e.textposition,c=a(t,e);n.call(_.font,t.tf||e.textfont.family,c,t.tc||e.textfont.color).text(o).call(m.convertToTspans,r).call(i,s,c,t.mrc)}else n.remove()})},_.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=e.selected||{},n=e.unselected||{};t.each(function(t){var o,s=l.select(this),c=t.tc||e.textfont.color,u=t.tp||e.textposition,f=a(t,e),d=(r.textfont||{}).color,p=(n.textfont||{}).color;t.selected?d&&(o=d):p?o=p:d||(o=h.addOpacity(c,y)),o&&h.fill(s,o),i(s,u,f,t.mrc2||t.mrc)})}};var E=.5;_.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(o(t[r-1],t[r],t[r+1],e));for(n+=\"Q\"+i[0][0]+\" \"+t[1],r=2;r<t.length-1;r++)n+=\"C\"+i[r-2][1]+\" \"+i[r-1][0]+\" \"+t[r];return n+=\"Q\"+i[t.length-3][1]+\" \"+t[t.length-1]},_.smoothclosed=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\")+\"Z\";var r,n=\"M\"+t[0],i=t.length-1,a=[o(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(o(t[r-1],t[r],t[r+1],e));for(a.push(o(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+=\"C\"+a[r-1][1]+\" \"+a[r][0]+\" \"+t[r];return n+=\"C\"+a[i][1]+\" \"+a[0][0]+\" \"+t[0]+\"Z\"};var L={hv:function(t,e){return\"H\"+l.round(e[0],2)+\"V\"+l.round(e[1],2)},vh:function(t,e){return\"V\"+l.round(e[1],2)+\"H\"+l.round(e[0],2)},hvh:function(t,e){return\"H\"+l.round((t[0]+e[0])/2,2)+\"V\"+l.round(e[1],2)+\"H\"+l.round(e[0],2)},vhv:function(t,e){return\"V\"+l.round((t[1]+e[1])/2,2)+\"H\"+l.round(e[0],2)+\"V\"+l.round(e[1],2)}};_.steps=function(t){var e=L[t]||function(t,e){return\"L\"+l.round(e[0],2)+\",\"+l.round(e[1],2)};return function(t){for(var r=\"M\"+l.round(t[0][0],2)+\",\"+l.round(t[0][1],2),n=1;n<t.length;n++)r+=e(t[n-1],t[n]);return r}},_.makeTester=function(){var t=l.select(\"body\").selectAll(\"#js-plotly-tester\").data([0]);t.enter().append(\"svg\").attr(\"id\",\"js-plotly-tester\").attr(g.svgAttrs).style({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",width:\"9000px\",height:\"9000px\",\"z-index\":\"1\"});var e=t.selectAll(\".js-reference-point\").data([0]);e.enter().append(\"path\").classed(\"js-reference-point\",!0).attr(\"d\",\"M0,0H1V1H0Z\").style({\"stroke-width\":0,fill:\"black\"}),_.tester=t,_.testref=e},_.savedBBoxes={};var C=0;_.bBox=function(t,e,r){r||(r=s(t));var n;if(r){if(n=_.savedBBoxes[r])return p.extendFlat({},n)}else if(1===t.childNodes.length){var i=t.childNodes[0];if(r=s(i)){var a=+i.getAttribute(\"x\")||0,o=+i.getAttribute(\"y\")||0,c=i.getAttribute(\"transform\");if(!c){var u=_.bBox(i,!1,r);return a&&(u.left+=a,u.right+=a),o&&(u.top+=o,u.bottom+=o),u}if(r+=\"~\"+a+\"~\"+o+\"~\"+c,n=_.savedBBoxes[r])return p.extendFlat({},n)}}var f,h;e?f=t:(h=_.tester.node(),f=t.cloneNode(!0),h.appendChild(f)),l.select(f).attr(\"transform\",null).call(m.positionText,0,0);var d=f.getBoundingClientRect(),g=_.testref.node().getBoundingClientRect();e||h.removeChild(f);var v={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return C>=1e4&&(_.savedBBoxes={},C=0),r&&(_.savedBBoxes[r]=v),C++,p.extendFlat({},v)},_.setClipUrl=function(t,e){if(e){var r=\"#\"+e,n=l.select(\"base\");n.size()&&n.attr(\"href\")&&(r=window.location.href.split(\"#\")[0]+r),t.attr(\"clip-path\",\"url(\"+r+\")\")}else t.attr(\"clip-path\",null)},_.getTranslate=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/,function(t,e,r){return[e,r].join(\" \")}).split(\" \");return{x:+e[0]||0,y:+e[1]||0}},_.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},_.getScale=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/,function(t,e,r){return[e,r].join(\" \")}).split(\" \");return{x:+e[0]||1,y:+e[1]||1}},_.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},_.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=(n+=i).trim(),this.setAttribute(\"transform\",n)}),i};var z=/translate\\([^)]*\\)\\s*$/;_.setTextPointsScale=function(t,e,r){t.each(function(){var t,n=l.select(this),i=n.select(\"text\");if(i.node()){var a=parseFloat(i.attr(\"x\")||0),o=parseFloat(i.attr(\"y\")||0),s=(n.attr(\"transform\")||\"\").match(z);t=1===e&&1===r?[]:[\"translate(\"+a+\",\"+o+\")\",\"scale(\"+e+\",\"+r+\")\",\"translate(\"+-a+\",\"+-o+\")\"],s&&t.push(s),n.attr(\"transform\",t.join(\" \"))}})}},{\"../../constants/alignment\":716,\"../../constants/interactions\":720,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../registry\":873,\"../../traces/scatter/make_bubble_size_func\":1083,\"../../traces/scatter/subtypes\":1088,\"../color\":618,\"../colorscale\":633,\"./symbol_defs\":644,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],644:[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),c=n.round(.118*e,2),u=n.round(.809*e,2);return\"M\"+r+\",\"+l+\"H\"+i+\"L\"+a+\",\"+c+\"L\"+o+\",\"+u+\"L0,\"+n.round(.382*e,2)+\"L-\"+o+\",\"+u+\"L-\"+a+\",\"+c+\"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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!0}}},{d3:128}],645:[function(t,e,r){\"use strict\";e.exports={visible:{valType:\"boolean\",editType:\"calc\"},type:{valType:\"enumerated\",values:[\"percent\",\"constant\",\"sqrt\",\"data\"],editType:\"calc\"},symmetric:{valType:\"boolean\",editType:\"calc\"},array:{valType:\"data_array\",editType:\"calc\"},arrayminus:{valType:\"data_array\",editType:\"calc\"},value:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},valueminus:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},traceref:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},tracerefminus:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},copy_ystyle:{valType:\"boolean\",editType:\"plot\"},copy_zstyle:{valType:\"boolean\",editType:\"style\"},color:{valType:\"color\",editType:\"style\"},thickness:{valType:\"number\",min:0,dflt:2,editType:\"style\"},width:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\",_deprecated:{opacity:{valType:\"number\",editType:\"style\"}}}},{}],646:[function(t,e,r){\"use strict\";function n(t,e,r,n){var a=e[\"error_\"+n]||{},l=[];if(a.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var c=s(a),u=0;u<t.length;u++){var f=t[u],h=f[n];if(i(r.c2l(h))){var d=c(h,u);if(i(d[0])&&i(d[1])){var p=f[n+\"s\"]=h-d[0],m=f[n+\"h\"]=h+d[1];l.push(p,m)}}}o.expand(r,l,{padded:!0})}}var i=t(\"fast-isnumeric\"),a=t(\"../../registry\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"./compute_error\");e.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var i=e[r],s=i[0].trace;if(a.traceIs(s,\"errorBarsOK\")){var l=o.getFromId(t,s.xaxis),c=o.getFromId(t,s.yaxis);n(i,s,l,\"x\"),n(i,s,c,\"y\")}}}},{\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./compute_error\":647,\"fast-isnumeric\":140}],647:[function(t,e,r){\"use strict\";function n(t,e){return\"percent\"===t?function(t){return Math.abs(t*e/100)}:\"constant\"===t?function(){return Math.abs(e)}:\"sqrt\"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(\"data\"===e){var i=t.array,a=t.arrayminus;return r||void 0===a?function(t,e){var r=+i[e];return[r,r]}:function(t,e){return[+a[e],+i[e]]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],648:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(t,e){return a.coerce(f,u,o,t,e)}var c=\"error_\"+s.axis,u=e[c]={},f=t[c]||{};if(!1!==l(\"visible\",void 0!==f.array||void 0!==f.value||\"sqrt\"===f.type)){var h=l(\"type\",\"array\"in f?\"data\":\"percent\"),d=!0;if(\"sqrt\"!==h&&(d=l(\"symmetric\",!((\"data\"===h?\"arrayminus\":\"valueminus\")in f))),\"data\"===h){if(l(\"array\")||(u.array=[]),l(\"traceref\"),!d){l(\"arrayminus\")||(u.arrayminus=[]),l(\"tracerefminus\")}}else\"percent\"!==h&&\"constant\"!==h||(l(\"value\"),d||l(\"valueminus\"));var p=\"copy_\"+s.inherit+\"style\";if(s.inherit){(e[\"error_\"+s.inherit]||{}).visible&&l(p,!(f.color||n(f.thickness)||n(f.width)))}s.inherit&&u[p]||(l(\"color\",r),l(\"thickness\"),l(\"width\",i.traceIs(e,\"gl3d\")?0:4))}}},{\"../../lib\":743,\"../../registry\":873,\"./attributes\":645,\"fast-isnumeric\":140}],649:[function(t,e,r){\"use strict\";var n=e.exports={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.calcFromTrace=function(t,e){for(var r=t.x||[],i=t.y||[],a=r.length||i.length,o=new Array(a),s=0;s<a;s++)o[s]={x:r[s],y:i[s]};return o[0].trace=t,n.calc({calcdata:[o],_fullLayout:e}),o},n.plot=t(\"./plot\"),n.style=t(\"./style\"),n.hoverInfo=function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}},{\"./attributes\":645,\"./calc\":646,\"./defaults\":648,\"./plot\":650,\"./style\":651}],650:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../drawing\"),o=t(\"../../traces/scatter/subtypes\");e.exports=function(t,e,r){var s,l=e.xaxis,c=e.yaxis,u=r&&r.duration>0;t.each(function(t){var f,h=t[0].trace,d=h.error_x||{},p=h.error_y||{};h.ids&&(f=function(t){return t.id});var m=o.hasMarkers(h)&&h.marker.maxdisplayed>0;p.visible||d.visible||(t=[]);var g=n.select(this).selectAll(\"g.errorbar\").data(t,f);if(g.exit().remove(),t.length){d.visible||g.selectAll(\"path.xerror\").remove(),p.visible||g.selectAll(\"path.yerror\").remove(),g.style(\"opacity\",1);var v=g.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(r.duration).style(\"opacity\",1),a.setClipUrl(g,e.layerClipId),g.each(function(t){var e=n.select(this),a=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!m||t.vis){var o;if(p.visible&&i(a.x)&&i(a.yh)&&i(a.ys)){var f=p.width;o=\"M\"+(a.x-f)+\",\"+a.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+a.ys,a.noYS||(o+=\"m-\"+f+\",0h\"+2*f);var h=e.select(\"path.yerror\");(s=!h.size())?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(h=h.transition().duration(r.duration).ease(r.easing)),h.attr(\"d\",o)}if(d.visible&&i(a.y)&&i(a.xh)&&i(a.xs)){var g=(d.copy_ystyle?p:d).width;o=\"M\"+a.xh+\",\"+(a.y-g)+\"v\"+2*g+\"m0,-\"+g+\"H\"+a.xs,a.noXS||(o+=\"m0,-\"+g+\"v\"+2*g);var v=e.select(\"path.xerror\");(s=!v.size())?v=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(v=v.transition().duration(r.duration).ease(r.easing)),v.attr(\"d\",o)}}})}})}},{\"../../traces/scatter/subtypes\":1088,\"../drawing\":643,d3:128,\"fast-isnumeric\":140}],651:[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\":618,d3:128}],652:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\");e.exports={hoverlabel:{bgcolor:{valType:\"color\",arrayOk:!0,editType:\"none\"},bordercolor:{valType:\"color\",arrayOk:!0,editType:\"none\"},font:n({arrayOk:!0,editType:\"none\"}),namelength:{valType:\"integer\",min:-1,arrayOk:!0,editType:\"none\"},editType:\"calc\"}}},{\"../../plots/font_attributes\":816}],653:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\");e.exports=function(t){function e(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},a)}}for(var r=t.calcdata,a=t._fullLayout,o=0;o<r.length;o++){var s=r[o],l=s[0].trace;if(!i.traceIs(l,\"pie\")){var c=i.traceIs(l,\"2dMap\")?function(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}:n.fillArray;c(l.hoverinfo,s,\"hi\",e(l)),l.hoverlabel&&(c(l.hoverlabel.bgcolor,s,\"hbg\"),c(l.hoverlabel.bordercolor,s,\"hbc\"),c(l.hoverlabel.font.size,s,\"hts\"),c(l.hoverlabel.font.color,s,\"htc\"),c(l.hoverlabel.font.family,s,\"htf\"),c(l.hoverlabel.namelength,s,\"hnl\"))}}}},{\"../../lib\":743,\"../../registry\":873}],654:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./hover\").hover;e.exports=function(t,e,r){function a(){t.emit(\"plotly_click\",{points:t._hoverdata,event:e})}var o=n.getComponentMethod(\"annotations\",\"onClick\")(t,t._hoverdata);void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},{\"../../registry\":873,\"./hover\":658}],655:[function(t,e,r){\"use strict\";e.exports={MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\"Arial, sans-serif\",HOVERMINTIME:50,HOVERID:\"-hover\"}},{}],656:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"./hoverlabel_defaults\");e.exports=function(t,e,r,o){a(t,e,function(r,a){return n.coerce(t,e,i,r,a)},o.hoverlabel)}},{\"../../lib\":743,\"./attributes\":652,\"./hoverlabel_defaults\":659}],657:[function(t,e,r){\"use strict\";function n(t){return s[t]||t}function i(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var a=t(\"../../lib\"),o=t(\"./constants\");r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return\"closest\"===t?i||r.quadrature(e,n):\"x\"===t?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},r.inbox=function(t,e){return t*e<0||0===t?o.MAXDIST*(.6-.3/Math.max(3,Math.abs(t-e))):1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=\"index\"in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(\"xVal\"in t?a.x=t.xVal:\"x\"in t&&(a.x=t.x),\"yVal\"in t?a.y=t.yVal:\"y\"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var o=e._arrayAttrs;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=n(l);if(void 0===t[c]){var u=i(a.nestedProperty(e,l).get(),r);void 0!==u&&(t[c]=u)}}},r.appendArrayMultiPointValues=function(t,e,r){var o=e._arrayAttrs;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=n(l);if(void 0===t[c]){for(var u=a.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=i(u,r[h]);t[c]=f}}};var s={ids:\"id\",locations:\"location\",labels:\"label\",values:\"value\",\"marker.colors\":\"color\"}},{\"../../lib\":743,\"./constants\":655}],658:[function(t,e,r){\"use strict\";function n(t,e,r,n){function u(t,e){if(!t.length)return null;var r=t.map(function(t,e){var r=t.xa,n=t.ya,i=r.c2p(q),a=n.c2p(H);return{distance:function(t){var e=t.kink,r=(t.x1+t.x0)/2-i,n=(t.y1+t.y0)/2-a;return Math.max(Math.sqrt(r*r+n*n)-e,1-3/e)}(t),index:e}});return r=r.filter(function(t){return t.distance<=e}).sort(function(t,e){return t.distance-e.distance}),r.length?t[r[0].index]:null}function d(t){return t?{xa:t.xa,ya:t.ya,x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1,distance:t.distance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}r||(r=\"xy\");var m=Array.isArray(r)?r:[r],_=t._fullLayout,w=_._plots||[],M=w[r];if(M){var A=M.overlays.map(function(t){return t.id});m=m.concat(A)}for(var T=m.length,S=new Array(T),E=new Array(T),L=0;L<T;L++){var C=m[L],z=w[C];if(z)S[L]=y.getFromId(t,z.xaxis._id),E[L]=y.getFromId(t,z.yaxis._id);else{var D=_[C]._subplot;S[L]=D.xaxis,E[L]=D.yaxis}}var I=e.hovermode||_.hovermode;if(-1===[\"x\",\"y\",\"closest\"].indexOf(I)||!t.calcdata||t.querySelector(\".zoombox\")||t._dragging)return v.unhoverRaw(t,e);var P,O,F,R,N,j,B,U,V,q,H,G,Y,W=-1===_.hoverdistance?1/0:_.hoverdistance,X=-1===_.spikedistance?1/0:_.spikedistance,Z=[],J=[],K={hLinePoint:null,vLinePoint:null};if(Array.isArray(e))for(I=\"array\",F=0;F<e.length;F++)\"skip\"!==(N=t.calcdata[e[F].curveNumber||0])[0].trace.hoverinfo&&J.push(N);else{for(R=0;R<t.calcdata.length;R++)\"skip\"!==(j=(N=t.calcdata[R])[0].trace).hoverinfo&&-1!==m.indexOf(b.getSubplot(j))&&J.push(N);var Q,$;if(!e.target)Q=\"xpx\"in e?e.xpx:S[0]._length/2,e.pointerX=Q+S[0]._offset,$=\"ypx\"in e?e.ypx:E[0]._length/2,e.pointerY=$+E[0]._offset;else{if(!1===h.triggerHandler(t,\"plotly_beforehover\",e))return;var tt=e.target.getBoundingClientRect();if(Q=e.clientX-tt.left,$=e.clientY-tt.top,Q<0||Q>tt.width||$<0||$>tt.height)return v.unhoverRaw(t,e);e.pointerX=e.offsetX,e.pointerY=e.offsetY}if(P=\"xval\"in e?b.flat(m,e.xval):b.p2c(S,Q),O=\"yval\"in e?b.flat(m,e.yval):b.p2c(E,$),!c(P[0])||!c(O[0]))return f.warn(\"Fx.hover failed\",e,t),v.unhoverRaw(t,e)}var et=1/0;for(R=0;R<J.length;R++)if((N=J[R])&&N[0]&&N[0].trace&&!0===N[0].trace.visible&&(j=N[0].trace,-1===[\"carpet\",\"contourcarpet\"].indexOf(j._module.name))){if(B=b.getSubplot(j),U=m.indexOf(B),V=I,G={cd:N,trace:j,xa:S[U],ya:E[U],index:!1,distance:Math.min(et,W),color:g.defaultLine,name:j.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},_[B]&&(G.subplot=_[B]._subplot),Y=Z.length,\"array\"===V){var rt=e[R];\"pointNumber\"in rt?(G.index=rt.pointNumber,V=\"closest\"):(V=\"\",\"xval\"in rt&&(q=rt.xval,V=\"x\"),\"yval\"in rt&&(H=rt.yval,V=V?\"closest\":\"y\"))}else q=P[U],H=O[U];if(0!==W)if(j._module&&j._module.hoverPoints){var nt=j._module.hoverPoints(G,q,H,V,_._hoverlayer);if(nt)for(var it,at=0;at<nt.length;at++)it=nt[at],c(it.x0)&&c(it.y0)&&Z.push(function(t,e){function r(e,r,n){var i=s(r,n);i&&(t[e]=i)}var n=t.index,i=t.trace||{},a=t.cd[0],o=t.cd[n]||{},s=Array.isArray(n)?function(t,e){return f.castOption(a,n,t)||f.extractOption({},i,\"\",e)}:function(t,e){return f.extractOption(o,i,t,e)};r(\"hoverinfo\",\"hi\",\"hoverinfo\"),r(\"color\",\"hbg\",\"hoverlabel.bgcolor\"),r(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),r(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),r(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),r(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),r(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),t.posref=\"y\"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=f.constrain(t.x0,0,t.xa._length),t.x1=f.constrain(t.x1,0,t.xa._length),t.y0=f.constrain(t.y0,0,t.ya._length),t.y1=f.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel=\"xLabel\"in t?t.xLabel:y.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal));void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:y.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal));void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal));if(!(isNaN(t.xerr)||\"log\"===t.xa.type&&t.xerr<=0)){var l=y.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+l+\" / -\"+y.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+l,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var c=y.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+c+\" / -\"+y.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+c,\"y\"===e&&(t.distance+=1)}var u=t.hoverinfo||t.trace.hoverinfo;\"all\"!==u&&(-1===(u=Array.isArray(u)?u:u.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===u.indexOf(\"y\")&&(t.yLabel=void 0),-1===u.indexOf(\"z\")&&(t.zLabel=void 0),-1===u.indexOf(\"text\")&&(t.text=void 0),-1===u.indexOf(\"name\")&&(t.name=void 0));return t}(it,I))}else f.log(\"Unrecognized trace type in hover:\",j);if(\"closest\"===I&&Z.length>Y&&(Z.splice(0,Y),et=Z[0].distance),_._has(\"cartesian\")&&0!==X&&0===Z.length){G.distance=X,G.index=!1;var ot=j._module.hoverPoints(G,q,H,\"closest\",_._hoverlayer);if(ot){var st,lt=ot.filter(function(t){return t.xa.showspikes});if(lt.length){var ct=lt[0];c(ct.x0)&&c(ct.y0)&&(st=d(ct),(!K.vLinePoint||K.vLinePoint.distance>st.distance)&&(K.vLinePoint=st))}var ut=ot.filter(function(t){return t.ya.showspikes});if(ut.length){var ft=ut[0];c(ft.x0)&&c(ft.y0)&&(st=d(ft),(!K.hLinePoint||K.hLinePoint.distance>st.distance)&&(K.hLinePoint=st))}}}}var ht={fullLayout:_,container:_._hoverlayer,outerContainer:_._paperdiv,event:e},dt=t._spikepoints,pt={vLinePoint:K.vLinePoint,hLinePoint:K.hLinePoint};if(t._spikepoints=pt,_._has(\"cartesian\")&&0!==X&&0!==Z.length){var mt=u(Z.filter(function(t){return t.ya.showspikes}),X);K.hLinePoint=d(mt);var gt=u(Z.filter(function(t){return t.xa.showspikes}),X);K.vLinePoint=d(gt)}if(0===Z.length){var vt=v.unhoverRaw(t,e);return!_._has(\"cartesian\")||null===K.hLinePoint&&null===K.vLinePoint||s(dt)&&o(K,ht),vt}_._has(\"cartesian\")&&s(dt)&&o(K,ht),Z.sort(function(t,e){return t.distance-e.distance});var yt=t._hoverdata,xt=[];for(F=0;F<Z.length;F++){var bt=Z[F];xt.push(b.makeEventData(bt,bt.trace,bt.cd))}t._hoverdata=xt;var _t=\"y\"===I&&J.length>1,wt=i(Z,{hovermode:I,rotateLabels:_t,bgColor:g.combine(_.plot_bgcolor||g.background,_.paper_bgcolor),container:_._hoverlayer,outerContainer:_._paperdiv,commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance},t);if(function(t,e,r){function n(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(c=t[s]).pos+c.dp+c.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((c=t[s]).pos<e.pmin+1)for(c.del=!0,n--,o=2*c.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}var i,a,o,s,l,c,u,f=0,h=t.map(function(t,n){var i=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*(\"x\"===i._id.charAt(0)?k:1)/2,pmin:0,pmax:\"x\"===i._id.charAt(0)?r.width:r.height}]}).sort(function(t,e){return t[0].posref-e[0].posref});for(;!i&&f<=t.length;){for(f++,i=!0,s=0;s<h.length-1;){var d=h[s],p=h[s+1],m=d[d.length-1],g=p[0];if((a=m.pos+m.dp+m.size-g.pos-g.dp+g.size)>.01&&m.pmin===g.pmin&&m.pmax===g.pmax){for(l=p.length-1;l>=0;l--)p[l].dp+=a;for(d.push.apply(d,p),h.splice(s+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;i=!1}else s++}h.forEach(n)}for(s=h.length-1;s>=0;s--){var v=h[s];for(l=v.length-1;l>=0;l--){var y=v[l],x=t[y.i];x.offset=y.dp,x.del=y.del}}}(Z,_t?\"xa\":\"ya\",_),a(wt,_t),e.target&&e.target.tagName){var Mt=x.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,xt);p(l.select(e.target),Mt?\"pointer\":\"\")}e.target&&!n&&function(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}(t,0,yt)&&(yt&&t.emit(\"plotly_unhover\",{event:e,points:yt}),t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:S,yaxes:E,xvals:P,yvals:O}))}function i(t,e,r){var n,i,a=e.hovermode,o=e.rotateLabels,s=e.bgColor,c=e.container,u=e.outerContainer,f=e.commonLabelOpts||{},h=e.fontFamily||_.HOVERFONT,p=e.fontSize||_.HOVERFONTSIZE,v=t[0],y=v.xa,x=v.ya,b=\"y\"===a?\"yLabel\":\"xLabel\",M=v[b],k=(String(M)||\"\").split(\" \")[0],A=u.node().getBoundingClientRect(),T=A.top,L=A.width,C=A.height,z=v.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);for(n=0;n<t.length;n++){i=t[n].hoverinfo||t[n].trace.hoverinfo;var D=Array.isArray(i)?i:i.split(\"+\");if(-1===D.indexOf(\"all\")&&-1===D.indexOf(a)){z=!1;break}}var I=c.selectAll(\"g.axistext\").data(z?[0]:[]);I.enter().append(\"g\").classed(\"axistext\",!0),I.exit().remove(),I.each(function(){var e=l.select(this),n=e.selectAll(\"path\").data([0]),i=e.selectAll(\"text\").data([0]);n.enter().append(\"path\").style({\"stroke-width\":\"1px\"}),n.style({fill:f.bgcolor||g.defaultLine,stroke:f.bordercolor||g.background}),i.enter().append(\"text\").attr(\"data-notex\",1),i.text(M).call(m.font,f.font.family||h,f.font.size||p,f.font.color||g.background).call(d.positionText,0,0).call(d.convertToTspans,r),e.attr(\"transform\",\"\");var o=i.node().getBoundingClientRect();if(\"x\"===a){i.attr(\"text-anchor\",\"middle\").call(d.positionText,0,\"top\"===y.side?T-o.bottom-S-E:T-o.top+S+E);var s=\"top\"===y.side?\"-\":\"\";n.attr(\"d\",\"M0,0L\"+S+\",\"+s+S+\"H\"+(E+o.width/2)+\"v\"+s+(2*E+o.height)+\"H-\"+(E+o.width/2)+\"V\"+s+S+\"H-\"+S+\"Z\"),e.attr(\"transform\",\"translate(\"+(y._offset+(v.x0+v.x1)/2)+\",\"+(x._offset+(\"top\"===y.side?0:x._length))+\")\")}else{i.attr(\"text-anchor\",\"right\"===x.side?\"start\":\"end\").call(d.positionText,(\"right\"===x.side?1:-1)*(E+S),T-o.top-o.height/2);var c=\"right\"===x.side?\"\":\"-\";n.attr(\"d\",\"M0,0L\"+c+S+\",\"+S+\"V\"+(E+o.height/2)+\"h\"+c+(2*E+o.width)+\"V-\"+(E+o.height/2)+\"H\"+c+S+\"V-\"+S+\"Z\"),e.attr(\"transform\",\"translate(\"+(y._offset+(\"right\"===x.side?y._length:0))+\",\"+(x._offset+(v.y0+v.y1)/2)+\")\")}t=t.filter(function(t){return void 0!==t.zLabelVal||(t[b]||\"\").split(\" \")[0]===k})});var P=c.selectAll(\"g.hovertext\").data(t,function(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa,t.ya||\"\"].join(\",\")});return P.enter().append(\"g\").classed(\"hovertext\",!0).each(function(){var t=l.select(this);t.append(\"rect\").call(g.fill,g.addOpacity(s,.8)),t.append(\"text\").classed(\"name\",!0),t.append(\"path\").style(\"stroke-width\",\"1px\"),t.append(\"text\").classed(\"nums\",!0).call(m.font,h,p)}),P.exit().remove(),P.each(function(t){var e=l.select(this).attr(\"transform\",\"\"),n=\"\",i=\"\",c=g.opacity(t.color)?t.color:g.defaultLine,u=g.combine(c,s),f=t.borderColor||g.contrast(u);if(void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name){n=d.plainText(t.name||\"\");var v=Math.round(t.nameLength);v>-1&&n.length>v&&(n=v>3?n.substr(0,v-3)+\"...\":n.substr(0,v))}void 0!==t.extraText&&(i+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(i+=\"x: \"+t.xLabel+\"<br>\"),void 0!==t.yLabel&&(i+=\"y: \"+t.yLabel+\"<br>\"),i+=(i?\"z: \":\"\")+t.zLabel):z&&t[a+\"Label\"]===M?i=t[(\"x\"===a?\"y\":\"x\")+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&(i=t.yLabel):i=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",t.text&&!Array.isArray(t.text)&&(i+=(i?\"<br>\":\"\")+t.text),\"\"===i&&(\"\"===n&&e.remove(),i=n);var y=e.select(\"text.nums\").call(m.font,t.fontFamily||h,t.fontSize||p,t.fontColor||f).text(i).attr(\"data-notex\",1).call(d.positionText,0,0).call(d.convertToTspans,r),x=e.select(\"text.name\"),b=0;n&&n!==i?(x.call(m.font,t.fontFamily||h,t.fontSize||p,u).text(n).attr(\"data-notex\",1).call(d.positionText,0,0).call(d.convertToTspans,r),b=x.node().getBoundingClientRect().width+2*E):(x.remove(),e.select(\"rect\").remove()),e.select(\"path\").style({fill:u,stroke:f});var _,k,A=y.node().getBoundingClientRect(),D=t.xa._offset+(t.x0+t.x1)/2,I=t.ya._offset+(t.y0+t.y1)/2,P=Math.abs(t.x1-t.x0),O=Math.abs(t.y1-t.y0),F=A.width+S+E+b;t.ty0=T-A.top,t.bx=A.width+2*E,t.by=A.height+2*E,t.anchor=\"start\",t.txwidth=A.width,t.tx2width=b,t.offset=0,o?(t.pos=D,_=I+O/2+F<=C,k=I-O/2-F>=0,\"top\"!==t.idealAlign&&_||!k?_?(I+=O/2,t.anchor=\"start\"):t.anchor=\"middle\":(I-=O/2,t.anchor=\"end\")):(t.pos=I,_=D+P/2+F<=L,k=D-P/2-F>=0,\"left\"!==t.idealAlign&&_||!k?_?(D+=P/2,t.anchor=\"start\"):t.anchor=\"middle\":(D-=P/2,t.anchor=\"end\")),y.attr(\"text-anchor\",t.anchor),b&&x.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",\"translate(\"+D+\",\"+I+\")\"+(o?\"rotate(\"+w+\")\":\"\"))}),P}function a(t,e){t.each(function(t){var r=l.select(this);if(t.del)r.remove();else{var n=\"end\"===t.anchor?-1:1,i=r.select(\"text.nums\"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(S+E),s=o+a*(t.txwidth+E),c=0,u=t.offset;\"middle\"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-T,c=t.offset*A),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*S+c)+\",\"+(S+u)+\"v\"+(t.by/2-S)+\"h\"+n*t.bx+\"v-\"+t.by+\"H\"+(n*S+c)+\"V\"+(u-S)+\"Z\"),i.call(d.positionText,o+c,u+t.ty0-t.by/2+E),t.tx2width&&(r.select(\"text.name\").call(d.positionText,s+a*E+c,u+t.ty0-t.by/2+E),r.select(\"rect\").call(m.setRect,s+(a-1)*t.tx2width/2+c,u-t.by/2-1,t.tx2width,t.by+2))}})}function o(t,e){var r,n,i=e.container,a=e.fullLayout,o=e.event,s=!!t.hLinePoint,l=!!t.vLinePoint;if(i.selectAll(\".spikeline\").remove(),l||s){var c=g.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var f,h,d=t.hLinePoint;r=d&&d.xa;\"cursor\"===(n=d&&d.ya).spikesnap?(f=o.pointerX,h=o.pointerY):(f=r._offset+(d.x0+d.x1)/2,h=n._offset+(d.y0+d.y1)/2);var p,v,y=u.readability(d.color,c)<1.5?g.contrast(c):d.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,M=(w.left+w.right)/2<f?w.right:w.left;-1===x.indexOf(\"toaxis\")&&-1===x.indexOf(\"across\")||(-1!==x.indexOf(\"toaxis\")&&(p=M,v=f),-1!==x.indexOf(\"across\")&&(p=n._counterSpan[0],v=n._counterSpan[1]),i.insert(\"line\",\":first-child\").attr({x1:p,x2:v,y1:h,y2:h,\"stroke-width\":b,stroke:_,\"stroke-dasharray\":m.dashStyle(n.spikedash,b)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),i.insert(\"line\",\":first-child\").attr({x1:p,x2:v,y1:h,y2:h,\"stroke-width\":b+2,stroke:c}).classed(\"spikeline\",!0).classed(\"crisp\",!0)),-1!==x.indexOf(\"marker\")&&i.insert(\"circle\",\":first-child\").attr({cx:M+(\"right\"!==n.side?b:-b),cy:h,r:b,fill:_}).classed(\"spikeline\",!0)}if(l){var k,A,T=t.vLinePoint;r=T&&T.xa,n=T&&T.ya;\"cursor\"===r.spikesnap?(k=o.pointerX,A=o.pointerY):(k=r._offset+(T.x0+T.x1)/2,A=n._offset+(T.y0+T.y1)/2);var S,E,L=u.readability(T.color,c)<1.5?g.contrast(c):T.color,C=r.spikemode,z=r.spikethickness,D=r.spikecolor||L,I=r._boundingBox,P=(I.top+I.bottom)/2<A?I.bottom:I.top;-1===C.indexOf(\"toaxis\")&&-1===C.indexOf(\"across\")||(-1!==C.indexOf(\"toaxis\")&&(S=P,E=A),-1!==C.indexOf(\"across\")&&(S=r._counterSpan[0],E=r._counterSpan[1]),i.insert(\"line\",\":first-child\").attr({x1:k,x2:k,y1:S,y2:E,\"stroke-width\":z,stroke:D,\"stroke-dasharray\":m.dashStyle(r.spikedash,z)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),i.insert(\"line\",\":first-child\").attr({x1:k,x2:k,y1:S,y2:E,\"stroke-width\":z+2,stroke:c}).classed(\"spikeline\",!0).classed(\"crisp\",!0)),-1!==C.indexOf(\"marker\")&&i.insert(\"circle\",\":first-child\").attr({cx:k,cy:P-(\"top\"!==r.side?z:-z),r:z,fill:D}).classed(\"spikeline\",!0)}}}function s(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../lib\"),h=t(\"../../lib/events\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib/override_cursor\"),m=t(\"../drawing\"),g=t(\"../color\"),v=t(\"../dragelement\"),y=t(\"../../plots/cartesian/axes\"),x=t(\"../../registry\"),b=t(\"./helpers\"),_=t(\"./constants\"),w=_.YANGLE,M=Math.PI*w/180,k=1/Math.sin(M),A=Math.cos(M),T=Math.sin(M),S=_.HOVERARROWSIZE,E=_.HOVERTEXTPAD;r.hover=function(t,e,r,i){t=f.getGraphDiv(t),f.throttle(t._fullLayout._uid+_.HOVERID,_.HOVERMINTIME,function(){n(t,e,r,i)})},r.loneHover=function(t,e){var r={color:t.color||g.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0},n=l.select(e.container),o=e.outerContainer?l.select(e.outerContainer):n,s={hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||g.background,container:n,outerContainer:o,hoverdistance:_.MAXDIST},c=i([r],s,e.gd);return a(c,s.rotateLabels),c.node()}},{\"../../lib\":743,\"../../lib/events\":731,\"../../lib/override_cursor\":754,\"../../lib/svg_text_utils\":766,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":655,\"./helpers\":657,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],659:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i){r(\"hoverlabel.bgcolor\",(i=i||{}).bgcolor),r(\"hoverlabel.bordercolor\",i.bordercolor),r(\"hoverlabel.namelength\",i.namelength),n.coerceFont(r,\"hoverlabel.font\",i.font)}},{\"../../lib\":743}],660:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../dragelement\"),o=t(\"./helpers\"),s=t(\"./layout_attributes\");e.exports={moduleType:\"component\",name:\"fx\",constants:t(\"./constants\"),schema:{layout:s},attributes:t(\"./attributes\"),layoutAttributes:s,supplyLayoutGlobalDefaults:t(\"./layout_global_defaults\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,\"hoverlabel.\"+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,\"hoverinfo\",function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:t(\"./hover\").hover,unhover:a.unhover,loneHover:t(\"./hover\").loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(\"g.hovertext\").remove(),e.selectAll(\".spikeline\").remove()},click:t(\"./click\")}},{\"../../lib\":743,\"../dragelement\":640,\"./attributes\":652,\"./calc\":653,\"./click\":654,\"./constants\":655,\"./defaults\":656,\"./helpers\":657,\"./hover\":658,\"./layout_attributes\":661,\"./layout_defaults\":662,\"./layout_global_defaults\":663,d3:128}],661:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\")({editType:\"none\"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={dragmode:{valType:\"enumerated\",values:[\"zoom\",\"pan\",\"select\",\"lasso\",\"orbit\",\"turntable\"],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1],editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:i,namelength:{valType:\"integer\",min:-1,dflt:15,editType:\"none\"},editType:\"none\"}}},{\"../../plots/font_attributes\":816,\"./constants\":655}],662:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\"dragmode\");var o;e._has(\"cartesian\")?(e._isHoriz=function(t){for(var e=!0,r=0;r<t.length;r++)if(\"h\"!==t[r].orientation){e=!1;break}return e}(r),o=e._isHoriz?\"y\":\"x\"):o=\"closest\";a(\"hovermode\",o)&&(a(\"hoverdistance\"),a(\"spikedistance\"));var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\")}},{\"../../lib\":743,\"./layout_attributes\":661}],663:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./hoverlabel_defaults\"),a=t(\"./layout_attributes\");e.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},{\"../../lib\":743,\"./hoverlabel_defaults\":659,\"./layout_attributes\":661}],664:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/constants\");e.exports={_isLinkedToArray:\"image\",visible:{valType:\"boolean\",dflt:!0,editType:\"arraydraw\"},source:{valType:\"string\",editType:\"arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},sizex:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizey:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizing:{valType:\"enumerated\",values:[\"fill\",\"contain\",\"stretch\"],dflt:\"contain\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},x:{valType:\"any\",dflt:0,editType:\"arraydraw\"},y:{valType:\"any\",dflt:0,editType:\"arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"top\",editType:\"arraydraw\"},xref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.x.toString()],dflt:\"paper\",editType:\"arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.y.toString()],dflt:\"paper\",editType:\"arraydraw\"},editType:\"arraydraw\"}},{\"../../plots/cartesian/constants\":794}],665:[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,c,u=t._fullLayout.images,f=e._id.charAt(0),h=0;h<u.length;h++)if(l=u[h],c=\"images[\"+h+\"].\",l[f+\"ref\"]===e._id){var d=l[f],p=l[\"size\"+f],m=null,g=null;if(o){m=i(d,e.range);var v=p/Math.pow(10,m)/2;g=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else g=(m=Math.pow(10,d))*(Math.pow(10,p/2)-Math.pow(10,-p/2));n(m)?n(g)||(g=null):(m=null,g=null),a(c+f,m),a(c+\"size\"+f,g)}}},{\"../../lib/to_log_range\":768,\"fast-isnumeric\":140}],666:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,s,r,n)}if(!n(\"visible\",!!n(\"source\")))return e;n(\"layer\"),n(\"xanchor\"),n(\"yanchor\"),n(\"sizex\"),n(\"sizey\"),n(\"sizing\"),n(\"opacity\");for(var o={_fullLayout:r},l=[\"x\",\"y\"],c=0;c<2;c++){var u=l[c],f=a.coerceRef(t,e,o,u,\"paper\");a.coercePosition(e,o,n,f,u,0)}return e}var i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/array_container_defaults\"),s=t(\"./attributes\");e.exports=function(t,e){o(t,e,{name:\"images\",handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"../../plots/cartesian/axes\":789,\"./attributes\":664}],667:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../drawing\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../constants/xmlns_namespaces\");e.exports=function(t){function e(e){var r=n.select(this);if(!this.img||this.img.src!==e.source){r.attr(\"xmlns\",o.svg);var i=new Promise(function(t){function n(){r.remove(),t()}var i=new Image;this.img=i,i.setAttribute(\"crossOrigin\",\"anonymous\"),i.onerror=n,i.onload=function(){var e=document.createElement(\"canvas\");e.width=this.width,e.height=this.height;e.getContext(\"2d\").drawImage(this,0,0);var n=e.toDataURL(\"image/png\");r.attr(\"xlink:href\",n),t()},r.on(\"error\",n),i.src=e.source}.bind(this));t._promises.push(i)}}function r(e){var r=n.select(this),o=a.getFromId(t,e.xref),s=a.getFromId(t,e.yref),l=c._size,u=o?Math.abs(o.l2p(e.sizex)-o.l2p(0)):e.sizex*l.w,f=s?Math.abs(s.l2p(e.sizey)-s.l2p(0)):e.sizey*l.h,h=u*m.x[e.xanchor].offset,d=f*m.y[e.yanchor].offset,p=m.x[e.xanchor].sizing+m.y[e.yanchor].sizing,g=(o?o.r2p(e.x)+o._offset:e.x*l.w+l.l)+h,v=(s?s.r2p(e.y)+s._offset:l.h-e.y*l.h+l.t)+d;switch(e.sizing){case\"fill\":p+=\" slice\";break;case\"stretch\":p=\"none\"}r.attr({x:g,y:v,width:u,height:f,preserveAspectRatio:p,opacity:e.opacity});var y=(o?o._id:\"\")+(s?s._id:\"\");r.call(i.setClipUrl,y?\"clip\"+c._uid+y:null)}var s,l,c=t._fullLayout,u=[],f={},h=[];for(l=0;l<c.images.length;l++){var d=c.images[l];if(d.visible)if(\"below\"===d.layer&&\"paper\"!==d.xref&&\"paper\"!==d.yref){s=d.xref+d.yref;var p=c._plots[s];if(!p){h.push(d);continue}p.mainplot&&(s=p.mainplot.id),f[s]||(f[s]=[]),f[s].push(d)}else\"above\"===d.layer?u.push(d):h.push(d)}var m={x:{left:{sizing:\"xMin\",offset:0},center:{sizing:\"xMid\",offset:-.5},right:{sizing:\"xMax\",offset:-1}},y:{top:{sizing:\"YMin\",offset:0},middle:{sizing:\"YMid\",offset:-.5},bottom:{sizing:\"YMax\",offset:-1}}},g=c._imageLowerLayer.selectAll(\"image\").data(h),v=c._imageUpperLayer.selectAll(\"image\").data(u);g.enter().append(\"image\"),v.enter().append(\"image\"),g.exit().remove(),v.exit().remove(),g.each(function(t){e.bind(this)(t),r.bind(this)(t)}),v.each(function(t){e.bind(this)(t),r.bind(this)(t)});var y=Object.keys(c._plots);for(l=0;l<y.length;l++){s=y[l];var x=c._plots[s];if(x.imagelayer){var b=x.imagelayer.selectAll(\"image\").data(f[s]||[]);b.enter().append(\"image\"),b.exit().remove(),b.each(function(t){e.bind(this)(t),r.bind(this)(t)})}}}},{\"../../constants/xmlns_namespaces\":723,\"../../plots/cartesian/axes\":789,\"../drawing\":643,d3:128}],668:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"images\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"images\"),draw:t(\"./draw\"),convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":664,\"./convert_coords\":665,\"./defaults\":666,\"./draw\":667}],669:[function(t,e,r){\"use strict\";r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=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}},{}],670:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",editType:\"legend\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"legend\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"legend\"},font:n({editType:\"legend\"}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"v\",editType:\"legend\"},traceorder:{valType:\"flaglist\",flags:[\"reversed\",\"grouped\"],extras:[\"normal\"],editType:\"legend\"},tracegroupgap:{valType:\"number\",min:0,dflt:10,editType:\"legend\"},x:{valType:\"number\",min:-2,max:3,dflt:1.02,editType:\"legend\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"legend\"},y:{valType:\"number\",min:-2,max:3,dflt:1,editType:\"legend\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"legend\"},editType:\"legend\"}},{\"../../plots/font_attributes\":816,\"../color/attributes\":617}],671:[function(t,e,r){\"use strict\";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:\"#808BA4\",scrollBarMargin:4}},{}],672:[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 c,u,f,h,d=t.legend||{},p=e.legend={},m=0,g=\"normal\",v=0;v<r.length;v++){var y=r[v];s.legendGetsTrace(y)&&(m++,n.traceIs(y,\"pie\")&&m++),(n.traceIs(y,\"bar\")&&\"stack\"===e.barmode||-1!==[\"tonextx\",\"tonexty\"].indexOf(y.fill))&&(g=s.isGrouped({traceorder:g})?\"grouped+reversed\":\"reversed\"),void 0!==y.legendgroup&&\"\"!==y.legendgroup&&(g=s.isReversed({traceorder:g})?\"reversed+grouped\":\"grouped\")}if(!1!==i.coerce(t,e,o,\"showlegend\",m>1)){if(l(\"bgcolor\",e.paper_bgcolor),l(\"bordercolor\"),l(\"borderwidth\"),i.coerceFont(l,\"font\",e.font),l(\"orientation\"),\"h\"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(c=0,f=\"left\",u=1.1,h=\"bottom\"):(c=0,f=\"left\",u=-.1,h=\"top\")}l(\"traceorder\",g),s.isGrouped(e.legend)&&l(\"tracegroupgap\"),l(\"x\",c),l(\"xanchor\",f),l(\"y\",u),l(\"yanchor\",h),i.noneOrAll(d,p,[\"x\",\"y\"])}}},{\"../../lib\":743,\"../../plots/layout_attributes\":843,\"../../registry\":873,\"./attributes\":670,\"./helpers\":676}],673:[function(t,e,r){\"use strict\";function n(t,e){function r(r){m.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select(\"g[class*=math-group]\"),o=a.node(),s=e._fullLayout.legend.font.size*x;if(o){var l=d.bBox(o);n=l.height,i=l.width,d.setTranslate(a,0,n/4)}else{var c=t.select(\".legendtext\"),u=m.lineCount(c),f=c.node();n=s*u,i=f?d.bBox(f).width:0;var h=s*(.3+(1-u)/2);m.positionText(c,40,h)}n=Math.max(n,16)+3,r.height=n,r.width=i}(t,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,o=f.traceIs(a,\"pie\"),s=a.index,u=o?n.label:a.name,h=t.selectAll(\"text.legendtext\").data([0]);h.enter().append(\"text\").classed(\"legendtext\",!0),h.attr(\"text-anchor\",\"start\").classed(\"user-select-none\",!0).call(d.font,i.legend.font).text(u),e._context.edits.legendText&&!o?h.call(m.makeEditable,{gd:e}).call(r).on(\"edit\",function(t){this.text(t).call(r);var i=t;this.text()||(t=\" \");var a,o=n.trace._fullInput||{},u={};if(-1!==[\"ohlc\",\"candlestick\"].indexOf(o.type))u[(a=n.trace.transforms)[a.length-1].direction+\".name\"]=t;else if(f.hasTransform(o,\"groupby\")){var h=f.getTransformIndices(o,\"groupby\"),d=h[h.length-1],p=c.keyedContainer(o,\"transforms[\"+d+\"].styles\",\"target\",\"value.name\");\"\"===i?p.remove(n.trace._group):p.set(n.trace._group,t),u=p.constructUpdate()}else u.name=t;return l.restyle(e,u,s)}):h.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(p.fill,\"rgba(0,0,0,0)\"),i.on(\"mousedown\",function(){(r=(new Date).getTime())-e._legendMouseDownTime<k?n+=1:(n=1,e._legendMouseDownTime=r)}),i.on(\"mouseup\",function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>k&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){g(t,e,n)},k):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,g(t,e,n))}})}function a(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=w.isGrouped(i),l=0;if(i.width=0,i.height=0,w.isVertical(i))o&&e.each(function(t,e){d.setTranslate(this,0,e*i.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;d.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),l=40;else if(o){for(var c=[i.width],u=e.data(),f=0,h=u.length;f<h;f++){var p=u[f].map(function(t){return t[0].width}),m=40+Math.max.apply(null,p);i.width+=i.tracegroupgap+m,c.push(i.width)}e.each(function(t,e){d.setTranslate(this,c[e],0)}),e.each(function(){var t=0;s.select(this).selectAll(\"g.traces\").each(function(e){var r=e[0].height;d.setTranslate(this,0,5+a+t+r/2),t+=r}),i.height=Math.max(i.height,t)}),i.height+=10+2*a,i.width+=2*a}else{var g,v=0,y=0,x=0,b=0,_=0,M=i.tracegroupgap||5;r.each(function(t){x=Math.max(40+t[0].width,x),_+=40+t[0].width+M}),g=n.width-(n.margin.r+n.margin.l)>a+_-M,r.each(function(t){var e=t[0],r=g?40+t[0].width:x;a+b+M+r>n.width-(n.margin.r+n.margin.l)&&(b=0,v+=y,i.height=i.height+y,y=0),d.setTranslate(this,a+b,5+a+e.height/2+v),i.width+=M+r,i.height=Math.max(i.height,e.height),b+=M+r,y=Math.max(e.height,y)}),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];s.select(this).select(\".legendtoggle\").call(d.setRect,0,-r.height/2,(t._context.edits.legendText?0:i.width)+l,r.height)})}function o(t){var e=t._fullLayout.legend,r=\"left\";M.isRightAnchor(e)?r=\"right\":M.isCenterAnchor(e)&&(r=\"center\");var n=\"top\";M.isBottomAnchor(e)?n=\"bottom\":M.isMiddleAnchor(e)&&(n=\"middle\"),u.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e.width*({right:1,center:.5}[r]||0),r:e.width*({left:1,center:.5}[r]||0),b:e.height*({top:1,middle:.5}[n]||0),t:e.height*({bottom:1,middle:.5}[n]||0)})}var s=t(\"d3\"),l=t(\"../../plotly\"),c=t(\"../../lib\"),u=t(\"../../plots/plots\"),f=t(\"../../registry\"),h=t(\"../dragelement\"),d=t(\"../drawing\"),p=t(\"../color\"),m=t(\"../../lib/svg_text_utils\"),g=t(\"./handle_click\"),v=t(\"./constants\"),y=t(\"../../constants/interactions\"),x=t(\"../../constants/alignment\").LINE_SPACING,b=t(\"./get_legend_data\"),_=t(\"./style\"),w=t(\"./helpers\"),M=t(\"./anchor_utils\"),k=y.DBLCLICKDELAY;e.exports=function(t){function e(t,e){E.attr(\"data-scroll\",e).call(d.setTranslate,0,e),L.call(d.setRect,N,t,v.scrollBarWidth,v.scrollBarHeight),T.select(\"rect\").attr({y:y.borderwidth-e})}var r=t._fullLayout,m=\"legend\"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&b(t.calcdata,y),w=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(\".legend\").remove(),r._topdefs.select(\"#\"+m).remove(),void u.autoMargin(t,\"legend\");var A=r._infolayer.selectAll(\"g.legend\").data([0]);A.enter().append(\"g\").attr({class:\"legend\",\"pointer-events\":\"all\"});var T=r._topdefs.selectAll(\"#\"+m).data([0]);T.enter().append(\"clipPath\").attr(\"id\",m).append(\"rect\");var S=A.selectAll(\"rect.bg\").data([0]);S.enter().append(\"rect\").attr({class:\"bg\",\"shape-rendering\":\"crispEdges\"}),S.call(p.stroke,y.bordercolor),S.call(p.fill,y.bgcolor),S.style(\"stroke-width\",y.borderwidth+\"px\");var E=A.selectAll(\"g.scrollbox\").data([0]);E.enter().append(\"g\").attr(\"class\",\"scrollbox\");var L=A.selectAll(\"rect.scrollbar\").data([0]);L.enter().append(\"rect\").attr({class:\"scrollbar\",rx:20,ry:2,width:0,height:0}).call(p.fill,\"#808BA4\");var C=E.selectAll(\"g.groups\").data(x);C.enter().append(\"g\").attr(\"class\",\"groups\"),C.exit().remove();var z=C.selectAll(\"g.traces\").data(c.identity);z.enter().append(\"g\").attr(\"class\",\"traces\"),z.exit().remove(),z.call(_,t).style(\"opacity\",function(t){var e=t[0].trace;return f.traceIs(e,\"pie\")?-1!==w.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1}).each(function(){s.select(this).call(n,t).call(i,t)});var D=0!==A.enter().size();D&&(a(t,C,z),o(t));var I=r.width,P=r.height;a(t,C,z),y.height>P?function(t){var e=t._fullLayout.legend,r=\"left\";M.isRightAnchor(e)?r=\"right\":M.isCenterAnchor(e)&&(r=\"center\"),u.autoMargin(t,\"legend\",{x:e.x,y:.5,l:e.width*({right:1,center:.5}[r]||0),r:e.width*({left:1,center:.5}[r]||0),b:0,t:0})}(t):o(t);var O=r._size,F=O.l+O.w*y.x,R=O.t+O.h*(1-y.y);M.isRightAnchor(y)?F-=y.width:M.isCenterAnchor(y)&&(F-=y.width/2),M.isBottomAnchor(y)?R-=y.height:M.isMiddleAnchor(y)&&(R-=y.height/2);var N=y.width,j=O.w;N>j?(F=O.l,N=j):(F+N>I&&(F=I-N),F<0&&(F=0),N=Math.min(I-F,y.width));var B=y.height,U=O.h;B>U?(R=O.t,B=U):(R+B>P&&(R=P-B),R<0&&(R=0),B=Math.min(P-R,y.height)),d.setTranslate(A,F,R);var V,q,H=B-v.scrollBarHeight-2*v.scrollBarMargin,G=y.height-B;if(y.height<=B||t._context.staticPlot)S.attr({width:N-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),d.setTranslate(E,0,0),T.select(\"rect\").attr({width:N-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),E.call(d.setClipUrl,m);else{V=v.scrollBarMargin,q=E.attr(\"data-scroll\")||0,S.attr({width:N-2*y.borderwidth+v.scrollBarWidth+v.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),T.select(\"rect\").attr({width:N-2*y.borderwidth+v.scrollBarWidth+v.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),E.call(d.setClipUrl,m),D&&e(V,q),A.on(\"wheel\",null),A.on(\"wheel\",function(){q=c.constrain(E.attr(\"data-scroll\")-s.event.deltaY/H*G,-G,0),e(V=v.scrollBarMargin-q/G*H,q),0!==q&&q!==-G&&s.event.preventDefault()}),L.on(\".drag\",null),E.on(\".drag\",null);var Y=s.behavior.drag().on(\"drag\",function(){V=c.constrain(s.event.y-v.scrollBarHeight/2,v.scrollBarMargin,v.scrollBarMargin+H),q=-(V-v.scrollBarMargin)/H*G,e(V,q)});L.call(Y),E.call(Y)}if(t._context.edits.legendPosition){var W,X,Z,J;A.classed(\"cursor-move\",!0),h.init({element:A.node(),gd:t,prepFn:function(){var t=d.getTranslate(A);Z=t.x,J=t.y},moveFn:function(t,e){var r=Z+t,n=J+e;d.setTranslate(A,r,n),W=h.align(r,0,O.l,O.l+O.w,y.xanchor),X=h.align(n,0,O.t+O.h,O.t,y.yanchor)},doneFn:function(){void 0!==W&&void 0!==X&&l.relayout(t,{\"legend.x\":W,\"legend.y\":X})},clickFn:function(e,n){var i=r._infolayer.selectAll(\"g.traces\").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&(1===e?A._clickTimeout=setTimeout(function(){g(i,t,e)},k):2===e&&(A._clickTimeout&&clearTimeout(A._clickTimeout),g(i,t,e)))}})}}}},{\"../../constants/alignment\":716,\"../../constants/interactions\":720,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/plots\":852,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./anchor_utils\":669,\"./constants\":671,\"./get_legend_data\":674,\"./handle_click\":675,\"./helpers\":676,\"./style\":678,d3:128}],674:[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),c=!0,s[t]=[[r]]):s[t].push([r]);else{var n=\"~~i\"+f;l.push(n),s[n]=[[r]],f++}}var a,o,s={},l=[],c=!1,u={},f=0;for(a=0;a<t.length;a++){var h=t[a],d=h[0],p=d.trace,m=p.legendgroup;if(i.legendGetsTrace(p)&&p.showlegend)if(n.traceIs(p,\"pie\"))for(u[m]||(u[m]={}),o=0;o<h.length;o++){var g=h[o].label;u[m][g]||(r(m,{label:g,color:h[o].color,i:h[o].i,trace:p}),u[m][g]=!0)}else r(m,d)}if(!l.length)return[];var v,y,x=l.length;if(c&&i.isGrouped(e))for(y=new Array(x),a=0;a<x;a++)v=s[l[a]],y[a]=i.isReversed(e)?v.reverse():v;else{for(y=[new Array(x)],a=0;a<x;a++)v=s[l[a]][0],y[0][i.isReversed(e)?x-a-1:a]=v;x=1}return e._lgroupsLength=x,y}},{\"../../registry\":873,\"./helpers\":676}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plotly\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=!0;e.exports=function(t,e,r){function s(t,e,r){var n=b.indexOf(t),i=x[e];return i||(i=x[e]=[]),-1===b.indexOf(t)&&(b.push(t),n=b.length-1),i[n]=r,n}function l(t,e){var r=t._fullInput;if(a.hasTransform(r,\"groupby\")){var n=_[r.index];if(!n){var o=a.getTransformIndices(r,\"groupby\"),l=o[o.length-1];n=i.keyedContainer(r,\"transforms[\"+l+\"].styles\",\"target\",\"value.visible\"),_[r.index]=n}var c=n.get(t._group);void 0===c&&(c=!0),!1!==c&&n.set(t._group,e),w[r.index]=s(r.index,\"visible\",!1!==r.visible)}else{var u=!1!==r.visible&&e;s(r.index,\"visible\",u)}}if(!e._dragged&&!e._editing){var c,u,f,h,d,p=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],m=t.data()[0][0],g=e._fullData,v=m.trace,y=v.legendgroup,x={},b=[],_=[],w=[];if(1===r&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,\"Double-click on legend to isolate one trace\"),\"long\"),o=!1):o=!1,a.traceIs(v,\"pie\")){var M=m.label,k=p.indexOf(M);1===r?-1===k?p.push(M):p.splice(k,1):2===r&&(p=[],e.calcdata[0].forEach(function(t){M!==t.label&&p.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===p.length&&-1===k&&(p=[])),n.relayout(e,\"hiddenlabels\",p)}else{var A,T=y&&y.length,S=[];if(T)for(c=0;c<g.length;c++)(A=g[c]).visible&&A.legendgroup===y&&S.push(c);if(1===r){var E;switch(v.visible){case!0:E=\"legendonly\";break;case!1:E=!1;break;case\"legendonly\":E=!0}if(T)for(c=0;c<g.length;c++)!1!==g[c].visible&&g[c].legendgroup===y&&l(g[c],E);else l(v,E)}else if(2===r){var L,C,z=!0;for(c=0;c<g.length;c++)if(!(g[c]===v)&&!(L=T&&g[c].legendgroup===y)&&!0===g[c].visible&&!a.traceIs(g[c],\"notLegendIsolatable\")){z=!1;break}for(c=0;c<g.length;c++)if(!1!==g[c].visible&&!a.traceIs(g[c],\"notLegendIsolatable\"))switch(v.visible){case\"legendonly\":l(g[c],!0);break;case!0:C=!!z||\"legendonly\",L=g[c]===v||T&&g[c].legendgroup===y,l(g[c],!!L||C)}}for(c=0;c<_.length;c++)if(f=_[c]){var D=f.constructUpdate(),I=Object.keys(D);for(u=0;u<I.length;u++)h=I[u],(x[h]=x[h]||[])[w[c]]=D[h]}for(d=Object.keys(x),c=0;c<d.length;c++)for(h=d[c],u=0;u<b.length;u++)x[h].hasOwnProperty(u)||(x[h][u]=void 0);n.restyle(e,x,b)}}}},{\"../../lib\":743,\"../../plotly\":784,\"../../registry\":873}],676:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");r.legendGetsTrace=function(t){return t.visible&&n.traceIs(t,\"showLegend\")},r.isGrouped=function(t){return-1!==(t.traceorder||\"\").indexOf(\"grouped\")},r.isVertical=function(t){return\"h\"!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||\"\").indexOf(\"reversed\")}},{\"../../registry\":873}],677:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"legend\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\"),style:t(\"./style\")}},{\"./attributes\":670,\"./defaults\":672,\"./draw\":673,\"./style\":678}],678:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../drawing\"),s=t(\"../color\"),l=t(\"../../traces/scatter/subtypes\"),c=t(\"../../traces/pie/style_one\");e.exports=function(t,e){t.each(function(t){var e=n.select(this).selectAll(\"g.layers\").data([0]);e.enter().append(\"g\").classed(\"layers\",!0),e.style(\"opacity\",t[0].trace.opacity);e.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0);e.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var r=e.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(function(t){var e=t[0].trace,r=e.marker||{},a=r.line||{},o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbar\").data(i.traceIs(e,\"bar\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbar\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",\"translate(20,0)\"),o.exit().remove(),o.each(function(t){var e=n.select(this),i=t[0],o=(i.mlw+1||a.width+1)-1;e.style(\"stroke-width\",o+\"px\").call(s.fill,i.mc||r.color),o&&e.call(s.stroke,i.mlc||a.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(i.traceIs(e,\"box-violin\")&&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=n.select(this);r.style(\"stroke-width\",t+\"px\").call(s.fill,e.fillcolor),t&&r.call(s.stroke,e.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendpie\").data(i.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(c,t[0],e)}).each(function(t){var e=t[0].trace,r=e.visible&&e.fill&&\"none\"!==e.fill,i=l.hasLines(e);e&&e._module&&\"contourcarpet\"===e._module.name&&(i=e.contours.showlines,r=\"fill\"===e.contours.coloring);var a=n.select(this).select(\".legendfill\").selectAll(\"path\").data(r?[t]:[]);a.enter().append(\"path\").classed(\"js-fill\",!0),a.exit().remove(),a.attr(\"d\",\"M5,0h30v6h-30z\").call(o.fillGroupStyle);var s=n.select(this).select(\".legendlines\").selectAll(\"path\").data(i?[t]:[]);s.enter().append(\"path\").classed(\"js-line\",!0).attr(\"d\",\"M5,0h30\"),s.exit().remove(),s.call(o.lineGroupStyle)}).each(function(t){function r(t,e,r){var n=a.nestedProperty(f,t).get(),i=Array.isArray(n)&&e?e(n):n;if(r){if(i<r[0])return r[0];if(i>r[1])return r[1]}return i}function i(t){return t[0]}var s,c,u=t[0],f=u.trace,h=l.hasMarkers(f),d=l.hasText(f),p=l.hasLines(f);if(h||d||p){var m={},g={};h&&(m.mc=r(\"marker.color\",i),m.mo=r(\"marker.opacity\",a.mean,[.2,1]),m.ms=r(\"marker.size\",a.mean,[2,16]),m.mlc=r(\"marker.line.color\",i),m.mlw=r(\"marker.line.width\",a.mean,[0,5]),g.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"}),p&&(g.line={width:r(\"line.width\",i,[0,10])}),d&&(m.tx=\"Aa\",m.tp=r(\"textposition\",i),m.ts=10,m.tc=r(\"textfont.color\",i),m.tf=r(\"textfont.family\",i)),s=[a.minExtend(u,m)],c=a.minExtend(f,g)}var v=n.select(this).select(\"g.legendpoints\"),y=v.selectAll(\"path.scatterpts\").data(h?s:[]);y.enter().append(\"path\").classed(\"scatterpts\",!0).attr(\"transform\",\"translate(20,0)\"),y.exit().remove(),y.call(o.pointStyle,c,e),h&&(s[0].mrc=3);var x=v.selectAll(\"g.pointtext\").data(d?s:[]);x.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",\"translate(20,0)\"),x.exit().remove(),x.selectAll(\"text\").call(o.textPointStyle,c,e)})}},{\"../../lib\":743,\"../../registry\":873,\"../../traces/pie/style_one\":1052,\"../../traces/scatter/subtypes\":1088,\"../color\":618,\"../drawing\":643,d3:128}],679:[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={},c=h.list(t,null,!0),f=\"on\";if(\"zoom\"===a){var d,p=\"in\"===o?.5:2,m=(1+p)/2,g=(1-p)/2;for(n=0;n<c.length;n++)if(!(r=c[n]).fixedrange)if(d=r._name,\"auto\"===o)l[d+\".autorange\"]=!0;else if(\"reset\"===o){if(void 0===r._rangeInitial)l[d+\".autorange\"]=!0;else{var v=r._rangeInitial.slice();l[d+\".range[0]\"]=v[0],l[d+\".range[1]\"]=v[1]}void 0!==r._showSpikeInitial&&(l[d+\".showspikes\"]=r._showSpikeInitial,\"on\"!==f||r._showSpikeInitial||(f=\"off\"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[m*y[0]+g*y[1],m*y[1]+g*y[0]];l[d+\".range[0]\"]=r.l2r(x[0]),l[d+\".range[1]\"]=r.l2r(x[1])}s._cartesianSpikesEnabled=f}else{if(\"hovermode\"!==a||\"x\"!==o&&\"y\"!==o){if(\"hovermode\"===a&&\"closest\"===o){for(n=0;n<c.length;n++)r=c[n],\"on\"!==f||r.showspikes||(f=\"off\");s._cartesianSpikesEnabled=f}}else o=s._isHoriz?\"y\":\"x\",i.setAttribute(\"data-val\",o);l[a]=o}u.relayout(t,l)}function i(t,e){for(var r=e.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=t._fullLayout._subplots.gl3d,o={},s=n.split(\".\"),l=0;l<a.length;l++)o[a[l]+\".\"+s[1]]=i;u.relayout(t,o)}function a(t,e){for(var r=e.currentTarget.getAttribute(\"data-attr\"),n=t._fullLayout,i=n._subplots.gl3d,a={},o=0;o<i.length;o++){var s=i[o],l=s+\".camera\",c=n[s]._scene;\"resetDefault\"===r?a[l]=null:\"resetLastSave\"===r&&(a[l]=d.extendDeep({},c.cameraInitial))}u.relayout(t,a)}function o(t,e){var r=e.currentTarget,n=r._previousVal||!1,i=t.layout,a=t._fullLayout,o=a._subplots.gl3d,s=[\"xaxis\",\"yaxis\",\"zaxis\"],l=[\"showspikes\",\"spikesides\",\"spikethickness\",\"spikecolor\"],c={},f={},h={};if(n)h=d.extendDeep(i,n),r._previousVal=null;else{h={\"allaxes.showspikes\":!1};for(var p=0;p<o.length;p++){var m=o[p],g=a[m],v=c[m]={};v.hovermode=g.hovermode,h[m+\".hovermode\"]=!1;for(var y=0;y<3;y++){var x=s[y];f=v[x]={};for(var b=0;b<l.length;b++){var _=l[b];f[_]=g[x][_]}}}r._previousVal=d.extendDeep({},c)}u.relayout(t,h)}function s(t,e){for(var r=e.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=t._fullLayout,o=a._subplots.geo,s=0;s<o.length;s++){var l=o[s],f=a[l];if(\"zoom\"===n){var h=f.projection.scale,d=\"in\"===i?2*h:.5*h;u.relayout(t,l+\".projection.scale\",d)}else\"reset\"===n&&c(t,\"geo\")}}function l(t){var e,r=t._fullLayout;e=r._has(\"cartesian\")?r._isHoriz?\"y\":\"x\":\"closest\";var n=!t._fullLayout.hovermode&&e;u.relayout(t,\"hovermode\",n)}function c(t,e){for(var r=t._fullLayout,n=r._subplots[e],i={},a=0;a<n.length;a++)for(var o=n[a],s=r[o]._subplot.viewInitial,l=Object.keys(s),c=0;c<l.length;c++){var f=l[c];i[o+\".\"+f]=s[f]}u.relayout(t,i)}var u=t(\"../../plotly\"),f=t(\"../../plots/plots\"),h=t(\"../../plots/cartesian/axis_ids\"),d=t(\"../../lib\"),p=t(\"../../snapshot/download\"),m=t(\"../../../build/ploticon\"),g=d._,v=e.exports={};v.toImage={name:\"toImage\",title:function(t){return g(t,\"Download plot as a png\")},icon:m.camera,click:function(t){var e=\"png\";d.notifier(g(t,\"Taking snapshot - this may take a few seconds\"),\"long\"),d.isIE()&&(d.notifier(g(t,\"IE only supports svg. Changing format to svg.\"),\"long\"),e=\"svg\"),p(t,{format:e}).then(function(e){d.notifier(g(t,\"Snapshot succeeded\")+\" - \"+e,\"long\")}).catch(function(){d.notifier(g(t,\"Sorry, there was a problem downloading your snapshot!\"),\"long\")})}},v.sendDataToCloud={name:\"sendDataToCloud\",title:function(t){return g(t,\"Edit in Chart Studio\")},icon:m.disk,click:function(t){f.sendDataToCloud(t)}},v.zoom2d={name:\"zoom2d\",title:function(t){return g(t,\"Zoom\")},attr:\"dragmode\",val:\"zoom\",icon:m.zoombox,click:n},v.pan2d={name:\"pan2d\",title:function(t){return g(t,\"Pan\")},attr:\"dragmode\",val:\"pan\",icon:m.pan,click:n},v.select2d={name:\"select2d\",title:function(t){return g(t,\"Box Select\")},attr:\"dragmode\",val:\"select\",icon:m.selectbox,click:n},v.lasso2d={name:\"lasso2d\",title:function(t){return g(t,\"Lasso Select\")},attr:\"dragmode\",val:\"lasso\",icon:m.lasso,click:n},v.zoomIn2d={name:\"zoomIn2d\",title:function(t){return g(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:m.zoom_plus,click:n},v.zoomOut2d={name:\"zoomOut2d\",title:function(t){return g(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:m.zoom_minus,click:n},v.autoScale2d={name:\"autoScale2d\",title:function(t){return g(t,\"Autoscale\")},attr:\"zoom\",val:\"auto\",icon:m.autoscale,click:n},v.resetScale2d={name:\"resetScale2d\",title:function(t){return g(t,\"Reset axes\")},attr:\"zoom\",val:\"reset\",icon:m.home,click:n},v.hoverClosestCartesian={name:\"hoverClosestCartesian\",title:function(t){return g(t,\"Show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:m.tooltip_basic,gravity:\"ne\",click:n},v.hoverCompareCartesian={name:\"hoverCompareCartesian\",title:function(t){return g(t,\"Compare data on hover\")},attr:\"hovermode\",val:function(t){return t._fullLayout._isHoriz?\"y\":\"x\"},icon:m.tooltip_compare,gravity:\"ne\",click:n},v.zoom3d={name:\"zoom3d\",title:function(t){return g(t,\"Zoom\")},attr:\"scene.dragmode\",val:\"zoom\",icon:m.zoombox,click:i},v.pan3d={name:\"pan3d\",title:function(t){return g(t,\"Pan\")},attr:\"scene.dragmode\",val:\"pan\",icon:m.pan,click:i},v.orbitRotation={name:\"orbitRotation\",title:function(t){return g(t,\"Orbital rotation\")},attr:\"scene.dragmode\",val:\"orbit\",icon:m[\"3d_rotate\"],click:i},v.tableRotation={name:\"tableRotation\",title:function(t){return g(t,\"Turntable rotation\")},attr:\"scene.dragmode\",val:\"turntable\",icon:m[\"z-axis\"],click:i},v.resetCameraDefault3d={name:\"resetCameraDefault3d\",title:function(t){return g(t,\"Reset camera to default\")},attr:\"resetDefault\",icon:m.home,click:a},v.resetCameraLastSave3d={name:\"resetCameraLastSave3d\",title:function(t){return g(t,\"Reset camera to last save\")},attr:\"resetLastSave\",icon:m.movie,click:a},v.hoverClosest3d={name:\"hoverClosest3d\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:o},v.zoomInGeo={name:\"zoomInGeo\",title:function(t){return g(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:m.zoom_plus,click:s},v.zoomOutGeo={name:\"zoomOutGeo\",title:function(t){return g(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:m.zoom_minus,click:s},v.resetGeo={name:\"resetGeo\",title:function(t){return g(t,\"Reset\")},attr:\"reset\",val:null,icon:m.autoscale,click:s},v.hoverClosestGeo={name:\"hoverClosestGeo\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:l},v.hoverClosestGl2d={name:\"hoverClosestGl2d\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:l},v.hoverClosestPie={name:\"hoverClosestPie\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:m.tooltip_basic,gravity:\"ne\",click:l},v.toggleHover={name:\"toggleHover\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:function(t,e){l(t),o(t,e)}},v.resetViews={name:\"resetViews\",title:function(t){return g(t,\"Reset views\")},icon:m.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(\"data-attr\",\"zoom\"),r.setAttribute(\"data-val\",\"reset\"),n(t,e),r.setAttribute(\"data-attr\",\"resetLastSave\"),a(t,e),c(t,\"geo\"),c(t,\"mapbox\")}},v.toggleSpikelines={name:\"toggleSpikelines\",title:function(t){return g(t,\"Toggle Spike Lines\")},icon:m.spikeline,attr:\"_cartesianSpikesEnabled\",val:\"on\",click:function(t){var e=t._fullLayout;e._cartesianSpikesEnabled=\"on\"===e._cartesianSpikesEnabled?\"off\":\"on\";var r=function(t){for(var e,r=t._fullLayout,n=h.list(t,null,!0),i={},a=0;a<n.length;a++)i[(e=n[a])._name+\".showspikes\"]=\"on\"===r._cartesianSpikesEnabled||e._showSpikeInitial;return i}(t);u.relayout(t,r)}},v.resetViewMapbox={name:\"resetViewMapbox\",title:function(t){return g(t,\"Reset view\")},attr:\"reset\",icon:m.home,click:function(t){c(t,\"mapbox\")}}},{\"../../../build/ploticon\":2,\"../../lib\":743,\"../../plotly\":784,\"../../plots/cartesian/axis_ids\":792,\"../../plots/plots\":852,\"../../snapshot/download\":875}],680:[function(t,e,r){\"use strict\";r.manage=t(\"./manage\")},{\"./manage\":681}],681:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];-1===e.indexOf(i)&&r.push(c[i])}x.push(r)}var l=t._fullLayout,u=t._fullData,f=l._has(\"cartesian\"),h=l._has(\"gl3d\"),d=l._has(\"geo\"),p=l._has(\"pie\"),m=l._has(\"gl2d\"),g=l._has(\"ternary\"),v=l._has(\"mapbox\"),y=l._has(\"polar\"),x=[];if(n([\"toImage\",\"sendDataToCloud\"]),(f||m||p||g)+d+h>1)return n([\"resetViews\",\"toggleHover\"]),i(x,r);h&&(n([\"zoom3d\",\"pan3d\",\"orbitRotation\",\"tableRotation\"]),n([\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]),n([\"hoverClosest3d\"]));var b=function(t){for(var e=a.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(l),_=[];return((f||m)&&!b||g)&&(_=[\"zoom2d\",\"pan2d\"]),(v||d)&&(_=[\"pan2d\"]),y&&(_=[\"zoom2d\"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(s.traceIs(n,\"scatter-like\")?(o.hasMarkers(n)||o.hasText(n))&&(e=!0):s.traceIs(n,\"box-violin\")?\"all\"!==n.boxpoints&&\"all\"!==n.points||(e=!0):e=!0)}return e}(u)&&(_.push(\"select2d\"),_.push(\"lasso2d\")),_.length&&n(_),!f&&!m||b||g||n([\"zoomIn2d\",\"zoomOut2d\",\"autoScale2d\",\"resetScale2d\"]),f&&p?n([\"toggleHover\"]):m?n([\"hoverClosestGl2d\"]):f?n([\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]):p?n([\"hoverClosestPie\"]):v?n([\"resetViewMapbox\",\"toggleHover\"]):d&&(n([\"zoomInGeo\",\"zoomOutGeo\",\"resetGeo\"]),n([\"hoverClosestGeo\"])),i(x,r)}function i(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}var a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../traces/scatter/subtypes\"),s=t(\"../../registry\"),l=t(\"./modebar\"),c=t(\"./buttons\");e.exports=function(t){var e=t._fullLayout,r=t._context,i=e._modeBar;if(r.displayModeBar){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([\"*modeBarButtonsToRemove* configuration options\",\"must be an array.\"].join(\" \"));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([\"*modeBarButtonsToAdd* configuration options\",\"must be an array.\"].join(\" \"));var a,o=r.modeBarButtons;a=Array.isArray(o)&&o.length?function(t){for(var e=0;e<t.length;e++)for(var r=t[e],n=0;n<r.length;n++){var i=r[n];if(\"string\"==typeof i){if(void 0===c[i])throw new Error([\"*modeBarButtons* configuration options\",\"invalid button name\"].join(\" \"));t[e][n]=c[i]}}return t}(o):n(t,r.modeBarButtonsToRemove,r.modeBarButtonsToAdd),i?i.update(t,a):e._modeBar=l(t,a)}else i&&(i.destroy(),delete e._modeBar)}},{\"../../plots/cartesian/axis_ids\":792,\"../../registry\":873,\"../../traces/scatter/subtypes\":1088,\"./buttons\":679,\"./modebar\":682}],682:[function(t,e,r){\"use strict\";function n(t){this.container=t.container,this.element=document.createElement(\"div\"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../../build/ploticon\"),s=n.prototype;s.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context;\"hover\"===r.displayModeBar?this.element.className=\"modebar modebar--hover\":this.element.className=\"modebar\";var n=!this.hasButtons(e),i=this.hasLogo!==r.displaylogo;(n||i)&&(this.removeAllButtons(),this.updateButtons(e),r.displaylogo&&(this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},s.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var r=e.createGroup();t.forEach(function(t){var n=t.name;if(!n)throw new Error(\"must provide button 'name' in button config\");if(-1!==e.buttonsNames.indexOf(n))throw new Error(\"button name '\"+n+\"' is taken\");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)}),e.element.appendChild(r)})},s.createGroup=function(){var t=document.createElement(\"div\");return t.className=\"modebar-group\",t},s.createButton=function(t){var e=this,r=document.createElement(\"a\");r.setAttribute(\"rel\",\"tooltip\"),r.className=\"modebar-btn\";var n=t.title;void 0===n?n=t.name:\"function\"==typeof n&&(n=n(this.graphInfo)),(n||0===n)&&r.setAttribute(\"data-title\",n),void 0!==t.attr&&r.setAttribute(\"data-attr\",t.attr);var a=t.val;void 0!==a&&(\"function\"==typeof a&&(a=a(this.graphInfo)),r.setAttribute(\"data-val\",a));if(\"function\"!=typeof t.click)throw new Error(\"must provide button 'click' function in button config\");return r.addEventListener(\"click\",function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)}),r.setAttribute(\"data-toggle\",t.toggle||!1),t.toggle&&i.select(r).classed(\"active\",!0),r.appendChild(this.createIcon(t.icon||o.question,t.name)),r.setAttribute(\"data-gravity\",t.gravity||\"n\"),r},s.createIcon=function(t,e){var r=t.ascent-t.descent,n=\"http://www.w3.org/2000/svg\",i=document.createElementNS(n,\"svg\"),a=document.createElementNS(n,\"path\");i.setAttribute(\"height\",\"1em\"),i.setAttribute(\"width\",t.width/r+\"em\"),i.setAttribute(\"viewBox\",[0,0,t.width,r].join(\" \"));var o=\"toggleSpikelines\"===e?\"matrix(1.5 0 0 -1.5 0 \"+t.ascent+\")\":\"matrix(1 0 0 -1 0 \"+t.ascent+\")\";return a.setAttribute(\"d\",t.path),a.setAttribute(\"transform\",o),i.appendChild(a),i},s.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(\"data-attr\"):null;this.buttonElements.forEach(function(t){var n=t.getAttribute(\"data-val\")||!0,o=t.getAttribute(\"data-attr\"),s=\"true\"===t.getAttribute(\"data-toggle\"),l=i.select(t);if(s)o===r&&l.classed(\"active\",!l.classed(\"active\"));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed(\"active\",c===n)}})},s.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},s.getLogo=function(){var t=this.createGroup(),e=document.createElement(\"a\");return e.href=\"https://plot.ly/\",e.target=\"_blank\",e.setAttribute(\"data-title\",a._(this.graphInfo,\"Produced with Plotly\")),e.className=\"modebar-btn plotlyjsicon modebar-btn--logo\",e.appendChild(this.createIcon(o.plotlylogo)),t.appendChild(e),t},s.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},s.destroy=function(){a.removeElement(this.container.querySelector(\".modebar\"))},e.exports=function(t,e){var r=t._fullLayout,a=new n({graphInfo:t,container:r._paperdiv.node(),buttons:e});return r._privateplot&&i.select(a.element).append(\"span\").classed(\"badge-private float--left\",!0).text(\"PRIVATE\"),a}},{\"../../../build/ploticon\":2,\"../../lib\":743,d3:128}],683:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"./button_attributes\");o=a(o,{_isLinkedToArray:\"button\"}),e.exports={visible:{valType:\"boolean\",editType:\"plot\"},buttons:o,x:{valType:\"number\",min:-2,max:3,editType:\"plot\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"plot\"},y:{valType:\"number\",min:-2,max:3,editType:\"plot\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"bottom\",editType:\"plot\"},font:n({editType:\"plot\"}),bgcolor:{valType:\"color\",dflt:i.lightLine,editType:\"plot\"},activecolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"}},{\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../color/attributes\":617,\"./button_attributes\":684}],684:[function(t,e,r){\"use strict\";e.exports={step:{valType:\"enumerated\",values:[\"month\",\"year\",\"day\",\"hour\",\"minute\",\"second\",\"all\"],dflt:\"month\",editType:\"plot\"},stepmode:{valType:\"enumerated\",values:[\"backward\",\"todate\"],dflt:\"backward\",editType:\"plot\"},count:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},label:{valType:\"string\",editType:\"plot\"},editType:\"plot\"}},{}],685:[function(t,e,r){\"use strict\";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],686:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./attributes\"),o=t(\"./button_attributes\"),s=t(\"./constants\");e.exports=function(t,e,r,l,c){function u(t,e){return n.coerce(f,h,a,t,e)}var f=t.rangeselector||{},h=e.rangeselector={};if(u(\"visible\",function(t,e,r){function i(t,e){return n.coerce(a,s,o,t,e)}for(var a,s,l=t.buttons||[],c=e.buttons=[],u=0;u<l.length;u++)if(a=l[u],s={},n.isPlainObject(a)){var f=i(\"step\");\"all\"!==f&&(!r||\"gregorian\"===r||\"month\"!==f&&\"year\"!==f?i(\"stepmode\"):s.stepmode=\"backward\",i(\"count\")),i(\"label\"),s._index=u,c.push(s)}return c}(f,h,c).length>0)){var d=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+s.yPad]}(e,r,l);u(\"x\",d[0]),u(\"y\",d[1]),n.noneOrAll(t,e,[\"x\",\"y\"]),u(\"xanchor\"),u(\"yanchor\"),n.coerceFont(u,\"font\",r.font);var p=u(\"bgcolor\");u(\"activecolor\",i.contrast(p,s.lightAmount,s.darkAmount)),u(\"bordercolor\"),u(\"borderwidth\")}}},{\"../../lib\":743,\"../color\":618,\"./attributes\":683,\"./button_attributes\":684,\"./constants\":685}],687:[function(t,e,r){\"use strict\";function n(t){return t._id}function i(t,e,r){var n=t.selectAll(\"rect\").data([0]);n.enter().append(\"rect\").classed(\"selector-rect\",!0),n.attr(\"shape-rendering\",\"crispEdges\"),n.attr({rx:m.rx,ry:m.ry}),n.call(c.stroke,e.bordercolor).call(c.fill,function(t,e){return e.isActive||e.isHovered?t.activecolor:t.bgcolor}(e,r)).style(\"stroke-width\",e.borderwidth+\"px\")}function a(t,e,r,n){var i=t.selectAll(\"text\").data([0]);i.enter().append(\"text\").classed(\"selector-text\",!0).classed(\"user-select-none\",!0),i.attr(\"text-anchor\",\"middle\"),i.call(u.font,e.font).text(function(t){return t.label?t.label:\"all\"===t.step?\"all\":t.count+t.step.charAt(0)}(r)).call(function(t){f.convertToTspans(t,n)})}var o=t(\"d3\"),s=t(\"../../plotly\"),l=t(\"../../plots/plots\"),c=t(\"../color\"),u=t(\"../drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"../../plots/cartesian/axis_ids\"),d=t(\"../legend/anchor_utils\"),p=t(\"../../constants/alignment\").LINE_SPACING,m=t(\"./constants\"),g=t(\"./get_update_object\");e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(\".rangeselector\").data(function(t){for(var e=h.list(t,\"x\",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),n);e.enter().append(\"g\").classed(\"rangeselector\",!0),e.exit().remove(),e.style({cursor:\"pointer\",\"pointer-events\":\"all\"}),e.each(function(e){var r=o.select(this),n=e,c=n.rangeselector,h=r.selectAll(\"g.button\").data(c.buttons);h.enter().append(\"g\").classed(\"button\",!0),h.exit().remove(),h.each(function(e){var r=o.select(this),l=g(n,e);e.isActive=function(t,e,r){if(\"all\"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(n,e,l),r.call(i,c,e),r.call(a,c,e,t),r.on(\"click\",function(){t._dragged||s.relayout(t,l)}),r.on(\"mouseover\",function(){e.isHovered=!0,r.call(i,c,e)}),r.on(\"mouseout\",function(){e.isHovered=!1,r.call(i,c,e)})}),function(t,e,r,n){r.width=0,r.height=0;var i=r.borderwidth;e.each(function(){var t=o.select(this).select(\".selector-text\"),e=r.font.size*p,n=Math.max(e*f.lineCount(t),16)+3;r.height=Math.max(r.height,n)}),e.each(function(){var t=o.select(this),e=t.select(\".selector-rect\"),n=t.select(\".selector-text\"),a=n.node()&&u.bBox(n.node()).width,s=r.font.size*p,l=f.lineCount(n),c=Math.max(a+10,m.minButtonWidth);t.attr(\"transform\",\"translate(\"+(i+r.width)+\",\"+i+\")\"),e.attr({x:0,y:0,width:c,height:r.height}),f.positionText(n,c/2,r.height/2-(l-1)*s/2+3),r.width+=c+5}),e.selectAll(\"rect\").attr(\"height\",r.height);var a=t._fullLayout._size;r.lx=a.l+a.w*r.x,r.ly=a.t+a.h*(1-r.y);var s=\"left\";d.isRightAnchor(r)&&(r.lx-=r.width,s=\"right\"),d.isCenterAnchor(r)&&(r.lx-=r.width/2,s=\"center\");var c=\"top\";d.isBottomAnchor(r)&&(r.ly-=r.height,c=\"bottom\"),d.isMiddleAnchor(r)&&(r.ly-=r.height/2,c=\"middle\"),r.width=Math.ceil(r.width),r.height=Math.ceil(r.height),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),l.autoMargin(t,n+\"-range-selector\",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[s]||0),r:r.width*({left:1,center:.5}[s]||0),b:r.height*({top:1,middle:.5}[c]||0),t:r.height*({bottom:1,middle:.5}[c]||0)})}(t,h,c,n._name),r.attr(\"transform\",\"translate(\"+c.lx+\",\"+c.ly+\")\")})}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axis_ids\":792,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":685,\"./get_update_object\":688,d3:128}],688:[function(t,e,r){\"use strict\";var n=t(\"d3\");e.exports=function(t,e){var r=t._name,i={};if(\"all\"===e.step)i[r+\".autorange\"]=!0;else{var a=function(t,e){var r,i=t.range,a=new Date(t.r2l(i[1])),o=e.step,s=e.count;switch(e.stepmode){case\"backward\":r=t.l2r(+n.time[o].utc.offset(a,-s));break;case\"todate\":var l=n.time[o].utc.offset(a,-s);r=t.l2r(+n.time[o].utc.ceil(l))}return[r,i[1]]}(t,e);i[r+\".range[0]\"]=a[0],i[r+\".range[1]\"]=a[1]}return i}},{d3:128}],689:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"rangeselector\",schema:{subplots:{xaxis:{rangeselector:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":683,\"./defaults\":686,\"./draw\":687}],690:[function(t,e,r){\"use strict\";var n=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",dflt:n.background,editType:\"calc\"},bordercolor:{valType:\"color\",dflt:n.defaultLine,editType:\"calc\"},borderwidth:{valType:\"integer\",dflt:0,min:0,editType:\"calc\"},autorange:{valType:\"boolean\",dflt:!0,editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},thickness:{valType:\"number\",dflt:.15,min:0,max:1,editType:\"calc\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"}},{\"../color/attributes\":617}],691:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./constants\");e.exports=function(t){for(var e=n.list(t,\"x\",!0),r=0;r<e.length;r++){var a=e[r],o=a[i.name];o&&o.visible&&o.autorange&&a._min.length&&a._max.length&&(o._input.autorange=!0,o._input.range=o.range=n.getAutoRange(a))}}},{\"../../plots/cartesian/axes\":789,\"./constants\":692}],692:[function(t,e,r){\"use strict\";e.exports={name:\"rangeslider\",containerClassName:\"rangeslider-container\",bgClassName:\"rangeslider-bg\",rangePlotClassName:\"rangeslider-rangeplot\",maskMinClassName:\"rangeslider-mask-min\",maskMaxClassName:\"rangeslider-mask-max\",slideBoxClassName:\"rangeslider-slidebox\",grabberMinClassName:\"rangeslider-grabber-min\",grabAreaMinClassName:\"rangeslider-grabarea-min\",handleMinClassName:\"rangeslider-handle-min\",grabberMaxClassName:\"rangeslider-grabber-max\",grabAreaMaxClassName:\"rangeslider-grabarea-max\",handleMaxClassName:\"rangeslider-handle-max\",maskColor:\"rgba(0,0,0,0.4)\",slideBoxFill:\"transparent\",slideBoxCursor:\"ew-resize\",grabAreaFill:\"transparent\",grabAreaCursor:\"col-resize\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],693:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){function a(t,e){return n.coerce(o,l,i,t,e)}if(t[r].rangeslider){n.isPlainObject(t[r].rangeslider)||(t[r].rangeslider={});var o=t[r].rangeslider,s=e[r],l=s.rangeslider={};if(a(\"visible\")){if(a(\"bgcolor\",e.plot_bgcolor),a(\"bordercolor\"),a(\"borderwidth\"),a(\"thickness\"),a(\"autorange\",!s.isValidRange(o.range)),a(\"range\"),l.range){var c=l.range,u=s.range;c[0]=s.l2r(Math.min(s.r2l(c[0]),s.r2l(u[0]))),c[1]=s.l2r(Math.max(s.r2l(c[1]),s.r2l(u[1])))}s.cleanRange(\"rangeslider.range\"),l._input=o}}}},{\"../../lib\":743,\"./attributes\":690}],694:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t.select(\"rect.\"+b.slideBoxClassName).node(),a=t.select(\"rect.\"+b.grabAreaMinClassName).node(),o=t.select(\"rect.\"+b.grabAreaMaxClassName).node();t.on(\"mousedown\",function(){function s(t){var s,l,c,y=+t.clientX-p;switch(h){case i:c=\"ew-resize\",s=g+y,l=v+y;break;case a:c=\"col-resize\",s=g+y,l=v;break;case o:c=\"col-resize\",s=g,l=v+y;break;default:c=\"ew-resize\",s=m,l=m+y}if(l<s){var _=l;l=s,s=_}n._pixelMin=s,n._pixelMax=l,x(u.select(b),c),function(t,e,r,n){function i(t){return r.l2r(d.constrain(t,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){f.relayout(e,r._name+\".range\",[a,o])})}(0,e,r,n)}function l(){b.removeEventListener(\"mousemove\",s),b.removeEventListener(\"mouseup\",l),d.removeElement(b)}var c=u.event,h=c.target,p=c.clientX,m=p-t.node().getBoundingClientRect().left,g=n.d2p(r._rl[0]),v=n.d2p(r._rl[1]),b=y.coverSlip();b.addEventListener(\"mousemove\",s),b.addEventListener(\"mouseup\",l)})}function i(t,e,r,n){var i=t.selectAll(\"rect.\"+b.bgClassName).data([0]);i.enter().append(\"rect\").classed(b.bgClassName,!0).attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"});var a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=p.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:\"translate(\"+o+\",\"+o+\")\",fill:n.bgcolor,stroke:n.bordercolor,\"stroke-width\":s})}function a(t,e,r,n){var i=e._fullLayout._topdefs.selectAll(\"#\"+n._clipId).data([0]);i.enter().append(\"clipPath\").attr(\"id\",n._clipId).append(\"rect\").attr({x:0,y:0}),i.select(\"rect\").attr({width:n._width,height:n._height})}function o(t,e,r,n){var i=v.getSubplots(e,r),a=e.calcdata,o=t.selectAll(\"g.\"+b.rangePlotClassName).data(i,d.identity);o.enter().append(\"g\").attr(\"class\",function(t){return b.rangePlotClassName+\" \"+t}).call(p.setClipUrl,n._clipId),o.order(),o.exit().remove();var s;o.each(function(t,i){var o=u.select(this),l=0===i,c=v.getFromId(e,t,\"y\"),f=c._name,d={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:n.range.slice(),calendar:r.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};d.layout[f]={type:c.type,domain:[0,1],range:c.range.slice(),calendar:c.calendar},h.supplyDefaults(d);var p={id:t,plotgroup:o,xaxis:d._fullLayout.xaxis,yaxis:d._fullLayout[f]};l?s=p:(p.mainplot=\"xy\",p.mainplotinfo=s),g.rangePlot(e,p,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(a,t))})}function s(t,e,r,n){var i=t.selectAll(\"rect.\"+b.maskMinClassName).data([0]);i.enter().append(\"rect\").classed(b.maskMinClassName,!0).attr({x:0,y:0}).attr(\"shape-rendering\",\"crispEdges\"),i.attr(\"height\",n._height).call(m.fill,b.maskColor);var a=t.selectAll(\"rect.\"+b.maskMaxClassName).data([0]);a.enter().append(\"rect\").classed(b.maskMaxClassName,!0).attr(\"y\",0).attr(\"shape-rendering\",\"crispEdges\"),a.attr(\"height\",n._height).call(m.fill,b.maskColor)}function l(t,e,r,n){if(!e._context.staticPlot){var i=t.selectAll(\"rect.\"+b.slideBoxClassName).data([0]);i.enter().append(\"rect\").classed(b.slideBoxClassName,!0).attr(\"y\",0).attr(\"cursor\",b.slideBoxCursor).attr(\"shape-rendering\",\"crispEdges\"),i.attr({height:n._height,fill:b.slideBoxFill})}}function c(t,e,r,n){var i=t.selectAll(\"g.\"+b.grabberMinClassName).data([0]);i.enter().append(\"g\").classed(b.grabberMinClassName,!0);var a=t.selectAll(\"g.\"+b.grabberMaxClassName).data([0]);a.enter().append(\"g\").classed(b.grabberMaxClassName,!0);var o={x:0,width:b.handleWidth,rx:b.handleRadius,fill:m.background,stroke:m.defaultLine,\"stroke-width\":b.handleStrokeWidth,\"shape-rendering\":\"crispEdges\"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},l=i.selectAll(\"rect.\"+b.handleMinClassName).data([0]);l.enter().append(\"rect\").classed(b.handleMinClassName,!0).attr(o),l.attr(s);var c=a.selectAll(\"rect.\"+b.handleMaxClassName).data([0]);if(c.enter().append(\"rect\").classed(b.handleMaxClassName,!0).attr(o),c.attr(s),!e._context.staticPlot){var u={width:b.grabAreaWidth,x:0,y:0,fill:b.grabAreaFill,cursor:b.grabAreaCursor},f=i.selectAll(\"rect.\"+b.grabAreaMinClassName).data([0]);f.enter().append(\"rect\").classed(b.grabAreaMinClassName,!0).attr(u),f.attr(\"height\",n._height);var h=a.selectAll(\"rect.\"+b.grabAreaMaxClassName).data([0]);h.enter().append(\"rect\").classed(b.grabAreaMaxClassName,!0).attr(u),h.attr(\"height\",n._height)}}var u=t(\"d3\"),f=t(\"../../plotly\"),h=t(\"../../plots/plots\"),d=t(\"../../lib\"),p=t(\"../drawing\"),m=t(\"../color\"),g=t(\"../../plots/cartesian\"),v=t(\"../../plots/cartesian/axes\"),y=t(\"../dragelement\"),x=t(\"../../lib/setcursor\"),b=t(\"./constants\");e.exports=function(t){var e=t._fullLayout,r=function(t){var e=v.list({_fullLayout:t},\"x\",!0),r=b.name,n=[];if(t._has(\"gl2d\"))return n;for(var i=0;i<e.length;i++){var a=e[i];a[r]&&a[r].visible&&n.push(a)}return n}(e),f=e._infolayer.selectAll(\"g.\"+b.containerClassName).data(r,function(t){return t._name});f.enter().append(\"g\").classed(b.containerClassName,!0).attr(\"pointer-events\",\"all\"),f.exit().each(function(t){var r=u.select(this),n=t[b.name];r.remove(),e._topdefs.select(\"#\"+n._clipId).remove()}),f.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(b.name)&&h.autoMargin(t,i)}}(t),0!==r.length&&f.each(function(r){var f=u.select(this),p=r[b.name],m=e[v.id2name(r.anchor)],g=e.margin,y=e._size,x=r.domain,_=m.domain,w=(r._boundingBox||{}).height||0;p._id=b.name+r._id,p._clipId=p._id+\"-\"+e._uid,p._width=y.w*(x[1]-x[0]),p._height=(e.height-g.b-g.t)*p.thickness,p._offsetShift=Math.floor(p.borderwidth/2);var M=Math.round(g.l+y.w*x[0]),k=Math.round(g.t+y.h*(1-_[0])+w+p._offsetShift+b.extraPad);f.attr(\"transform\",\"translate(\"+M+\",\"+k+\")\");var A=r.r2l(p.range[0]),T=r.r2l(p.range[1]),S=T-A;p.p2d=function(t){return t/p._width*S+A},p.d2p=function(t){return(t-A)/S*p._width},p._rl=[A,T],f.call(i,t,r,p).call(a,t,r,p).call(o,t,r,p).call(s,t,r,p).call(l,t,r,p).call(c,t,r,p),n(f,t,r,p),function(t,e,r,n){function i(t){return d.constrain(t,0,n._width)}function a(t){return d.constrain(t,-o,n._width+o)}var o=b.handleWidth/2,s=i(n.d2p(r._rl[0])),l=i(n.d2p(r._rl[1]));t.select(\"rect.\"+b.slideBoxClassName).attr(\"x\",s).attr(\"width\",l-s),t.select(\"rect.\"+b.maskMinClassName).attr(\"width\",s),t.select(\"rect.\"+b.maskMaxClassName).attr(\"x\",l).attr(\"width\",n._width-l);var c=Math.round(a(s-o))-.5,u=Math.round(a(l-o))+.5;t.select(\"g.\"+b.grabberMinClassName).attr(\"transform\",\"translate(\"+c+\",0.5)\"),t.select(\"g.\"+b.grabberMaxClassName).attr(\"transform\",\"translate(\"+u+\",0.5)\")}(f,0,r,p),h.autoMargin(t,p._id,{x:x[0],y:_[0],l:0,r:0,t:0,b:p._height+g.b+w,pad:b.extraPad+2*p._offsetShift})})}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../plots/cartesian\":800,\"../../plots/cartesian/axes\":789,\"../../plots/plots\":852,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":692,d3:128}],695:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"rangeslider\",schema:{subplots:{xaxis:{rangeslider:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),calcAutorange:t(\"./calc_autorange\"),draw:t(\"./draw\")}},{\"./attributes\":690,\"./calc_autorange\":691,\"./defaults\":693,\"./draw\":694}],696:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../traces/scatter/attributes\").line,a=t(\"../drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat;e.exports={_isLinkedToArray:\"shape\",visible:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},type:{valType:\"enumerated\",values:[\"circle\",\"rect\",\"path\",\"line\"],editType:\"calcIfAutorange\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},xref:o({},n.xref,{}),x0:{valType:\"any\",editType:\"calcIfAutorange\"},x1:{valType:\"any\",editType:\"calcIfAutorange\"},yref:o({},n.yref,{}),y0:{valType:\"any\",editType:\"calcIfAutorange\"},y1:{valType:\"any\",editType:\"calcIfAutorange\"},path:{valType:\"string\",editType:\"calcIfAutorange\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},line:{color:o({},i.color,{editType:\"arraydraw\"}),width:o({},i.width,{editType:\"calcIfAutorange\"}),dash:o({},a,{editType:\"arraydraw\"}),editType:\"calcIfAutorange\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},editType:\"arraydraw\"}},{\"../../lib/extend\":732,\"../../traces/scatter/attributes\":1066,\"../annotations/attributes\":601,\"../drawing/attributes\":642}],697:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=\"category\"===t.type?t.r2c:t.d2c;if(void 0!==e)return[a(e),a(r)];if(n){var l,c,u,f,h=1/0,d=-1/0,p=n.match(o.segmentRE);for(\"date\"===t.type&&(a=s.decodeDate(a)),l=0;l<p.length;l++)void 0!==(c=i[p[l].charAt(0)].drawn)&&(!(u=p[l].substr(1).match(o.paramRE))||u.length<c||((f=a(u[c]))<h&&(h=f),f>d&&(d=f)));return d>=h?[h,d]: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;s<r.length;s++){var l,c,u=r[s],f=u.line.width/2;\"paper\"!==u.xref&&(c=n(l=a.getFromId(t,u.xref),u.x0,u.x1,u.path,o.paramIsX))&&a.expand(l,c,{ppad:f}),\"paper\"!==u.yref&&(c=n(l=a.getFromId(t,u.yref),u.y0,u.y1,u.path,o.paramIsY))&&a.expand(l,c,{ppad:f})}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./constants\":698,\"./helpers\":701}],698:[function(t,e,r){\"use strict\";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],699:[function(t,e,r){\"use strict\";var n=t(\"../../plots/array_container_defaults\"),i=t(\"./shape_defaults\");e.exports=function(t,e){n(t,e,{name:\"shapes\",handleItemDefaults:i})}},{\"../../plots/array_container_defaults\":786,\"./shape_defaults\":703}],700:[function(t,e,r){\"use strict\";function n(t,e){function r(r){var n={\"data-index\":e,\"fill-rule\":\"evenodd\",d:i(t,s)},d=s.line.width?s.line.color:\"rgba(0,0,0,0)\",m=r.append(\"path\").attr(n).style(\"opacity\",s.opacity).call(c.stroke,d).call(c.fill,s.fillcolor).call(u.dashLine,s.line.dash,s.line.width),g=(s.xref+s.yref).replace(/paper/g,\"\");m.call(u.setClipUrl,g?\"clip\"+t._fullLayout._uid+g:null),t._context.edits.shapePosition&&function(t,e,r,n){function s(t){var r=G.right-G.left,n=G.bottom-G.top,i=t.clientX-G.left,a=t.clientY-G.top,o=r>V&&n>q&&!t.shiftKey?f.getCursor(i/r,1-a/n):\"move\";h(e,o),U=o.split(\"-\")[0]}var c,u,d,m,g,v,y,x,b,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,F,R,N,j,B,U,V=10,q=10,H={element:e.node(),gd:t,prepFn:function(o){O=l.getFromId(t,r.xref),F=l.getFromId(t,r.yref),R=p.getDataToPixel(t,O),N=p.getDataToPixel(t,F,!0),j=p.getPixelToData(t,O),B=p.getPixelToData(t,F,!0);var f=\"shapes[\"+n+\"]\";\"path\"===r.type?(I=r.path,P=f+\".path\"):(u=R(r.x0),d=N(r.y0),m=R(r.x1),g=N(r.y1),v=f+\".x0\",y=f+\".y0\",x=f+\".x1\",b=f+\".y1\");u<m?(M=u,S=f+\".x0\",z=\"x0\",k=m,E=f+\".x1\",D=\"x1\"):(M=m,S=f+\".x1\",z=\"x1\",k=u,E=f+\".x0\",D=\"x0\");d<g?(_=d,A=f+\".y0\",L=\"y0\",w=g,T=f+\".y1\",C=\"y1\"):(_=g,A=f+\".y1\",L=\"y1\",w=d,T=f+\".y0\",C=\"y0\");c={},s(o),H.moveFn=\"move\"===U?function(n,o){if(\"path\"===r.type){var s=function(t){return j(R(t)+n)};O&&\"date\"===O.type&&(s=p.encodeDate(s));var l=function(t){return B(N(t)+o)};F&&\"date\"===F.type&&(l=p.encodeDate(l)),r.path=a(I,s,l),c[P]=r.path}else c[v]=r.x0=j(u+n),c[y]=r.y0=B(d+o),c[x]=r.x1=j(m+n),c[b]=r.y1=B(g+o);e.attr(\"d\",i(t,r))}:function(n,o){if(\"path\"===r.type){var s=function(t){return j(R(t)+n)};O&&\"date\"===O.type&&(s=p.encodeDate(s));var l=function(t){return B(N(t)+o)};F&&\"date\"===F.type&&(l=p.encodeDate(l)),r.path=a(I,s,l),c[P]=r.path}else{var u=~U.indexOf(\"n\")?_+o:_,f=~U.indexOf(\"s\")?w+o:w,h=~U.indexOf(\"w\")?M+n:M,d=~U.indexOf(\"e\")?k+n:k;f-u>q&&(c[A]=r[L]=B(u),c[T]=r[C]=B(f)),d-h>V&&(c[S]=r[z]=j(h),c[E]=r[D]=j(d))}e.attr(\"d\",i(t,r))}},doneFn:function(){h(e),o.relayout(t,c)}},G=H.element.getBoundingClientRect();f.init(H),e.node().onmousemove=s}(t,m,s,e)}t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\"'+e+'\"]').remove();var n=(t.layout.shapes||[])[e],s=t._fullLayout.shapes[e];if(n&&!1!==s.visible)if(\"below\"!==s.layer)r(t._fullLayout._shapeUpperLayer);else if(\"paper\"===s.xref||\"paper\"===s.yref)r(t._fullLayout._shapeLowerLayer);else{var d=t._fullLayout._plots[s.xref+s.yref];if(d){r((d.mainplotinfo||d).shapelayer)}else r(t._fullLayout._shapeLowerLayer)}}function i(t,e){var r,n,i,a,o=e.type,c=l.getFromId(t,e.xref),u=l.getFromId(t,e.yref),f=t._fullLayout._size;if(c?(r=p.shapePositionToRange(c),n=function(t){return c._offset+c.r2p(r(t,!0))}):n=function(t){return f.l+f.w*t},u?(i=p.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return f.t+f.h*(1-t)},\"path\"===o)return c&&\"date\"===c.type&&(n=p.decodeDate(n)),u&&\"date\"===u.type&&(a=p.decodeDate(a)),function(t,e,r){return t.replace(d.segmentRE,function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],l=d.numParams[i],c=t.substr(1).replace(d.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),++n>l&&(t=\"X\"),t});return n>l&&(c=c.replace(/[\\s,]*X.*/,\"\"),s.log(\"Ignoring extra params in segment \"+t)),i+c})}(e.path,n,a);var h=n(e.x0),m=n(e.x1),g=a(e.y0),v=a(e.y1);if(\"line\"===o)return\"M\"+h+\",\"+g+\"L\"+m+\",\"+v;if(\"rect\"===o)return\"M\"+h+\",\"+g+\"H\"+m+\"V\"+v+\"H\"+h+\"Z\";var y=(h+m)/2,x=(g+v)/2,b=Math.abs(y-h),_=Math.abs(x-g),w=\"A\"+b+\",\"+_,M=y+b+\",\"+x;return\"M\"+M+w+\" 0 1,1 \"+(y+\",\"+(x-_))+w+\" 0 0,1 \"+M+\"Z\"}function a(t,e,r){return t.replace(d.segmentRE,function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var o=t(\"../../plotly\"),s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../color\"),u=t(\"../drawing\"),f=t(\"../dragelement\"),h=t(\"../../lib/setcursor\"),d=t(\"./constants\"),p=t(\"./helpers\");e.exports={draw:function(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll(\"path\").remove(),e._shapeLowerLayer.selectAll(\"path\").remove(),e._shapeSubplotLayers.selectAll(\"path\").remove();for(var r=0;r<e.shapes.length;r++)e.shapes[r].visible&&n(t,r)},drawOne:n}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":698,\"./helpers\":701}],701:[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}},{}],702:[function(t,e,r){\"use strict\";var n=t(\"./draw\");e.exports={moduleType:\"component\",name:\"shapes\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"shapes\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":696,\"./calc_autorange\":697,\"./defaults\":699,\"./draw\":700}],703:[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 c(r,i){return n.coerce(t,e,a,r,i)}s=s||{};if(!c(\"visible\",!(l=l||{}).itemIsNotPlainObject))return e;c(\"layer\"),c(\"opacity\"),c(\"fillcolor\"),c(\"line.color\"),c(\"line.width\"),c(\"line.dash\");for(var u=c(\"type\",t.path?\"path\":\"rect\"),f=[\"x\",\"y\"],h=0;h<2;h++){var d=f[h],p={_fullLayout:r},m=i.coerceRef(t,e,p,d,\"\",\"paper\");if(\"path\"!==u){var g,v,y;\"paper\"!==m?(g=i.getFromId(p,m),y=o.rangeToShapePosition(g),v=o.shapePositionToRange(g)):v=y=n.identity;var x=d+\"0\",b=d+\"1\",_=t[x],w=t[b];t[x]=v(t[x],!0),t[b]=v(t[b],!0),i.coercePosition(e,p,c,m,x,.25),i.coercePosition(e,p,c,m,b,.75),e[x]=y(e[x]),e[b]=y(e[b]),t[x]=_,t[b]=w}}return\"path\"===u?c(\"path\"):n.noneOrAll(t,e,[\"x0\",\"x1\",\"y0\",\"y1\"]),e}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./attributes\":696,\"./helpers\":701}],704:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/pad_attributes\"),a=t(\"../../lib/extend\").extendDeepAll,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/animation_attributes\"),l=t(\"./constants\");e.exports=o({_isLinkedToArray:\"slider\",visible:{valType:\"boolean\",dflt:!0},active:{valType:\"number\",min:0,dflt:0},steps:{_isLinkedToArray:\"step\",method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\"},value:{valType:\"string\"},execute:{valType:\"boolean\",dflt:!0}},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:a({},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:n({})},font: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}},\"arraydraw\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/animation_attributes\":785,\"../../plots/font_attributes\":816,\"../../plots/pad_attributes\":851,\"./constants\":705}],705:[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,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}},{}],706:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,o,r,n)}if(n(\"visible\",function(t,e){function r(t,e){return i.coerce(n,a,l,t,e)}var n,a,o=t.steps||[],s=e.steps=[];for(var c=0;c<o.length;c++)n=o[c],a={},r(\"method\"),i.isPlainObject(n)&&(\"skip\"===a.method||Array.isArray(n.args))&&(r(\"args\"),r(\"label\",\"step-\"+c),r(\"value\",a.label),r(\"execute\"),s.push(a));return s}(t,e).length>0)){n(\"active\"),n(\"x\"),n(\"y\"),i.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\"),i.coerceFont(n,\"font\",r.font);n(\"currentvalue.visible\")&&(n(\"currentvalue.xanchor\"),n(\"currentvalue.prefix\"),n(\"currentvalue.suffix\"),n(\"currentvalue.offset\"),i.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\")}}var i=t(\"../../lib\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"./constants\").name,l=o.steps;e.exports=function(t,e){a(t,e,{name:s,handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"./attributes\":704,\"./constants\":705}],707:[function(t,e,r){\"use strict\";function n(t){return t._index}function i(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-M.currentValueInset-e.currentValueMaxWidth,i=\"left\";break;case\"center\":n=.5*e.inputAreaLength,i=\"middle\";break;default:n=M.currentValueInset,i=\"left\"}a.enter().append(\"text\").classed(M.labelClass,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":i,\"data-notex\":1});var o=e.currentvalue.prefix?e.currentvalue.prefix:\"\";if(\"string\"==typeof r)o+=r;else{o+=e.steps[e.active].label}e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(b.font,e.currentvalue.font).text(o).call(_.convertToTspans,e.gd);var s=_.lineCount(a),l=(e.currentValueMaxLines+1-s)*e.currentvalue.font.size*k;return _.positionText(a,n,l),a}}function a(t,e,r){var n=t.selectAll(\"rect.\"+M.gripRectClass).data([0]);n.enter().append(\"rect\").classed(M.gripRectClass,!0).call(u,e,t,r).style(\"pointer-events\",\"all\"),n.attr({width:M.gripWidth,height:M.gripHeight,rx:M.gripRadius,ry:M.gripRadius}).call(x.stroke,r.bordercolor).call(x.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\")}function o(t,e,r){var n=t.selectAll(\"text\").data([0]);return n.enter().append(\"text\").classed(M.labelClass,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":\"middle\",\"data-notex\":1}),n.call(b.font,r.font).text(e.step.label).call(_.convertToTspans,r.gd),n}function s(t,e){var r=t.selectAll(\"g.\"+M.labelsClass).data([0]);r.enter().append(\"g\").classed(M.labelsClass,!0);var n=r.selectAll(\"g.\"+M.labelGroupClass).data(e.labelSteps);n.enter().append(\"g\").classed(M.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=v.select(this);r.call(o,t,e),b.setTranslate(r,d(e,t.fraction),M.tickOffset+e.ticklen+e.font.size*k+M.labelOffset+e.currentValueTotalHeight)})}function l(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&c(t,e,r,a,!0,i)}function c(t,e,r,n,a,o){var s=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(h,r,r.active/(r.steps.length-1),o),e.call(i,r),t.emit(\"plotly_sliderchange\",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&y.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function u(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=v.select(e);t.on(\"mousedown\",function(){var t=n();e.emit(\"plotly_sliderstart\",{slider:t});var o=r.select(\".\"+M.gripRectClass);v.event.stopPropagation(),v.event.preventDefault(),o.call(x.fill,t.activebgcolor);var s=p(t,v.mouse(i)[0]);l(e,r,t,s,!0),t._dragging=!0,a.on(\"mousemove\",function(){var t=n(),a=p(t,v.mouse(i)[0]);l(e,r,t,a,!1)}),a.on(\"mouseup\",function(){var t=n();t._dragging=!1,o.call(x.fill,t.bgcolor),a.on(\"mouseup\",null),a.on(\"mousemove\",null),e.emit(\"plotly_sliderend\",{slider:t,step:t.steps[t.active]})})})}function f(t,e){var r=t.selectAll(\"rect.\"+M.tickRectClass).data(e.steps);r.enter().append(\"rect\").classed(M.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=v.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(x.fill,e.tickcolor),b.setTranslate(i,d(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?M.tickOffset:M.minorTickOffset)+e.currentValueTotalHeight)})}function h(t,e,r,n){var i=t.select(\"rect.\"+M.gripRectClass),a=d(e,r);if(!e._invokingCommand){var o=i;n&&e.transition.duration>0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr(\"transform\",\"translate(\"+(a-.5*M.gripWidth)+\",\"+e.currentValueTotalHeight+\")\")}}function d(t,e){return t.inputAreaStart+M.stepInset+(t.inputAreaLength-2*M.stepInset)*Math.min(1,Math.max(0,e))}function p(t,e){return Math.min(1,Math.max(0,(e-M.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*M.stepInset-2*t.inputAreaStart)))}function m(t,e,r){var n=t.selectAll(\"rect.\"+M.railTouchRectClass).data([0]);n.enter().append(\"rect\").classed(M.railTouchRectClass,!0).call(u,e,t,r).style(\"pointer-events\",\"all\"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,M.tickOffset+r.ticklen+r.labelHeight)}).call(x.fill,r.bgcolor).attr(\"opacity\",0),b.setTranslate(n,0,r.currentValueTotalHeight)}function g(t,e){var r=t.selectAll(\"rect.\"+M.railRectClass).data([0]);r.enter().append(\"rect\").classed(M.railRectClass,!0);var n=e.inputAreaLength-2*M.railInset;r.attr({width:n,height:M.railWidth,rx:M.railRadius,ry:M.railRadius,\"shape-rendering\":\"crispEdges\"}).call(x.stroke,e.bordercolor).call(x.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\"),b.setTranslate(r,M.railInset,.5*(e.inputAreaWidth-M.railWidth)+e.currentValueTotalHeight)}var v=t(\"d3\"),y=t(\"../../plots/plots\"),x=t(\"../color\"),b=t(\"../drawing\"),_=t(\"../../lib/svg_text_utils\"),w=t(\"../legend/anchor_utils\"),M=t(\"./constants\"),k=t(\"../../constants/alignment\").LINE_SPACING;e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[M.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&a.steps.length&&(a.gd=e,n.push(a))}return n}(e,t),l=e._infolayer.selectAll(\"g.\"+M.containerClassName).data(r.length>0?[0]:[]);if(l.enter().append(\"g\").classed(M.containerClassName,!0).style(\"cursor\",\"ew-resize\"),l.exit().remove(),l.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(M.autoMarginIdRoot)&&y.autoMargin(t,i)}}(t),0!==r.length){var u=l.selectAll(\"g.\"+M.groupClassName).data(r,n);u.enter().append(\"g\").classed(M.groupClassName,!0),u.exit().each(function(e){v.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,y.autoMargin(t,M.autoMarginIdRoot+e._index)});for(var d=0;d<r.length;d++){var p=r[d];!function(t,e){var r=b.tester.selectAll(\"g.\"+M.labelGroupClass).data(e.steps);r.enter().append(\"g\").classed(M.labelGroupClass,!0);var n=0,a=0;r.each(function(t){var r=o(v.select(this),{step:t},e).node();if(r){var i=b.bBox(r);a=Math.max(a,i.height),n=Math.max(n,i.width)}}),r.remove(),e.inputAreaWidth=Math.max(M.railWidth,M.gripHeight);var s=t._fullLayout._size;e.lx=s.l+s.w*e.x,e.ly=s.t+s.h*(1-e.y),\"fraction\"===e.lenmode?e.outerLength=Math.round(s.w*e.len):e.outerLength=e.len,e.lenPad=Math.round(.5*M.gripWidth),e.inputAreaStart=0,e.inputAreaLength=Math.round(e.outerLength-e.pad.l-e.pad.r);var l=(e.inputAreaLength-2*M.stepInset)/(e.steps.length-1),c=n+M.labelPadding;if(e.labelStride=Math.max(1,Math.ceil(c/l)),e.labelHeight=a,e.currentValueMaxWidth=0,e.currentValueHeight=0,e.currentValueTotalHeight=0,e.currentValueMaxLines=1,e.currentvalue.visible){var u=b.tester.append(\"g\");r.each(function(t){var r=i(u,e,t.label),n=r.node()&&b.bBox(r.node())||{width:0,height:0},a=_.lineCount(r);e.currentValueMaxWidth=Math.max(e.currentValueMaxWidth,Math.ceil(n.width)),e.currentValueHeight=Math.max(e.currentValueHeight,Math.ceil(n.height)),e.currentValueMaxLines=Math.max(e.currentValueMaxLines,a)}),e.currentValueTotalHeight=e.currentValueHeight+e.currentvalue.offset,u.remove()}e.height=e.currentValueTotalHeight+M.tickOffset+e.ticklen+M.labelOffset+e.labelHeight+e.pad.t+e.pad.b;var f=\"left\";w.isRightAnchor(e)&&(e.lx-=e.outerLength,f=\"right\"),w.isCenterAnchor(e)&&(e.lx-=e.outerLength/2,f=\"center\");var h=\"top\";w.isBottomAnchor(e)&&(e.ly-=e.height,h=\"bottom\"),w.isMiddleAnchor(e)&&(e.ly-=e.height/2,h=\"middle\"),e.outerLength=Math.ceil(e.outerLength),e.height=Math.ceil(e.height),e.lx=Math.round(e.lx),e.ly=Math.round(e.ly),y.autoMargin(t,M.autoMarginIdRoot+e._index,{x:e.x,y:e.y,l:e.outerLength*({right:1,center:.5}[f]||0),r:e.outerLength*({left:1,center:.5}[f]||0),b:e.height*({top:1,middle:.5}[h]||0),t:e.height*({bottom:1,middle:.5}[h]||0)})}(t,p)}u.each(function(e){if(!(e.steps.length<2)){var r=v.select(this);!function(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r<e;r+=t.labelStride)t.labelSteps.push({fraction:r/(e-1),step:t.steps[r]})}(e),y.manageCommandObserver(t,e,e.steps,function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||c(t,r,n,e.index,!1,!0))}),function(t,e,r){r.active>=r.steps.length&&(r.active=0),e.call(i,r).call(g,r).call(s,r).call(f,r).call(m,t,r).call(a,t,r),b.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(h,r,r.active/(r.steps.length-1),!1),e.call(i,r)}(t,v.select(this),e)}})}}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":705,d3:128}],708:[function(t,e,r){\"use strict\";var n=t(\"./constants\");e.exports={moduleType:\"component\",name:n.name,layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":704,\"./constants\":705,\"./defaults\":706,\"./draw\":707}],709:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plotly\"),o=t(\"../../plots/plots\"),s=t(\"../../lib\"),l=t(\"../drawing\"),c=t(\"../color\"),u=t(\"../../lib/svg_text_utils\"),f=t(\"../../constants/interactions\"),h=/ [XY][0-9]* /;(e.exports={}).draw=function(t,e,r){function d(t){s.syncOrAsync([p,m],t)}function p(e){var r;return M?(r=\"\",M.rotate&&(r+=\"rotate(\"+[M.rotate,w.x,w.y]+\")\"),M.offset&&(r+=\"translate(0, \"+M.offset+\")\")):r=null,e.attr(\"transform\",r),e.style({\"font-family\":S,\"font-size\":n.round(E,2)+\"px\",fill:c.rgb(L),opacity:C*c.opacity(L),\"font-weight\":o.fontWeight}).attr(w).call(u.convertToTspans,t),o.previousPromises(t)}function m(t){var e=n.select(t.node().parentNode);if(_&&_.selection&&_.side&&D){e.attr(\"transform\",null);var r=0,a={left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}[_.side],o=-1!==[\"left\",\"top\"].indexOf(_.side)?-1:1,c=i(_.pad)?_.pad:2,u=l.bBox(e.node()),f={left:0,top:0,right:A.width,bottom:A.height},h=_.maxShift||(f[_.side]-u[_.side])*(\"left\"===_.side||\"top\"===_.side?-1:1);if(h<0)r=h;else{var d=_.offsetLeft||0,p=_.offsetTop||0;u.left-=d,u.right-=d,u.top-=p,u.bottom-=p,_.selection.each(function(){var t=l.bBox(this);s.bBoxIntersect(u,t,c)&&(r=Math.max(r,o*(t[_.side]-u[a])+c))}),r=Math.min(h,r)}if(r>0||h<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[_.side];e.attr(\"transform\",\"translate(\"+m+\")\")}}}var g,v=r.propContainer,y=r.propName,x=r.placeholder,b=r.traceIndex,_=r.avoid||{},w=r.attributes,M=r.transform,k=r.containerGroup,A=t._fullLayout,T=v.titlefont||{},S=T.family,E=T.size,L=T.color,C=1,z=!1,D=(v.title||\"\").trim();\"title\"===y?g=\"titleText\":-1!==y.indexOf(\"axis\")?g=\"axisTitleText\":y.indexOf(!0)&&(g=\"colorbarTitleText\");var I=t._context.edits[g];\"\"===D?C=0:D.replace(h,\" % \")===x.replace(h,\" % \")&&(C=.2,z=!0,I||(D=\"\"));var P=D||I;k||(k=A._infolayer.selectAll(\".g-\"+e).data([0])).enter().append(\"g\").classed(\"g-\"+e,!0);var O=k.selectAll(\"text\").data(P?[0]:[]);return O.enter().append(\"text\"),O.text(D).attr(\"class\",e),O.exit().remove(),P?(O.call(d),I&&(D?O.on(\".opacity\",null):(C=0,z=!0,O.text(x).on(\"mouseover.opacity\",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style(\"opacity\",0)})),O.call(u.makeEditable,{gd:t}).on(\"edit\",function(e){void 0!==b?a.restyle(t,y,e,b):a.relayout(t,y,e)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(d)}).on(\"input\",function(t){this.text(t||\" \").call(u.positionText,w.x,w.y)})),O.classed(\"js-placeholder\",z),k):k}},{\"../../constants/interactions\":720,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,d3:128,\"fast-isnumeric\":140}],710:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/pad_attributes\");e.exports=o({_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:{_isLinkedToArray:\"button\",method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\",dflt:\"\"},execute:{valType:\"boolean\",dflt:!0}},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({},s,{}),font:n({}),bgcolor:{valType:\"color\"},bordercolor:{valType:\"color\",dflt:i.borderLine},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"arraydraw\"}},\"arraydraw\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/font_attributes\":816,\"../../plots/pad_attributes\":851,\"../color/attributes\":617}],711:[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,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\"#F4FAFF\",hoverColor:\"#F4FAFF\",arrowSymbol:{left:\"\\u25c4\",right:\"\\u25ba\",up:\"\\u25b2\",down:\"\\u25bc\"}}},{}],712:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,o,r,n)}n(\"visible\",function(t,e){function r(t,e){return i.coerce(n,a,l,t,e)}var n,a,o=t.buttons||[],s=e.buttons=[];for(var c=0;c<o.length;c++)n=o[c],a={},r(\"method\"),i.isPlainObject(n)&&(\"skip\"===a.method||Array.isArray(n.args))&&(r(\"args\"),r(\"label\"),r(\"execute\"),a._index=c,s.push(a));return s}(t,e).length>0)&&(n(\"active\"),n(\"direction\"),n(\"type\"),n(\"showactive\"),n(\"x\"),n(\"y\"),i.noneOrAll(t,e,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),i.coerceFont(n,\"font\",r.font),n(\"bgcolor\",r.paper_bgcolor),n(\"bordercolor\"),n(\"borderwidth\"))}var i=t(\"../../lib\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"./constants\").name,l=o.buttons;e.exports=function(t,e){a(t,e,{name:s,handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"./attributes\":710,\"./constants\":711}],713:[function(t,e,r){\"use strict\";function n(t){return t._index}function i(t,e){return+t.attr(M.menuIndexAttrName)===e._index}function a(t,e,r,n,i,a,l,c){e._input.active=e.active=l,\"buttons\"===e.type?s(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(M.menuIndexAttrName,\"-1\"),o(t,n,i,a,e),c||s(t,n,i,a,e))}function o(t,e,r,n,a){var o=e.selectAll(\"g.\"+M.headerClassName).data([0]);o.enter().append(\"g\").classed(M.headerClassName,!0).style(\"pointer-events\",\"all\");var c=a.active,u=a.buttons[c]||M.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},g={width:a.headerWidth,height:a.headerHeight};o.call(l,a,u,t).call(p,a,f,g);var v=e.selectAll(\"text.\"+M.headerArrowClassName).data([0]);v.enter().append(\"text\").classed(M.headerArrowClassName,!0).classed(\"user-select-none\",!0).attr(\"text-anchor\",\"end\").call(x.font,a.font).text(M.arrowSymbol[a.direction]),v.attr({x:a.headerWidth-M.arrowOffsetX+a.pad.l,y:a.headerHeight/2+M.textOffsetY+a.pad.t}),o.on(\"click\",function(){r.call(m),r.attr(M.menuIndexAttrName,i(r,a)?-1:String(a._index)),s(t,e,r,n,a)}),o.on(\"mouseover\",function(){o.call(h)}),o.on(\"mouseout\",function(){o.call(d,a)}),x.setTranslate(e,a.lx,a.ly)}function s(t,e,r,n,i){r||(r=e).attr(\"pointer-events\",\"all\");var o=function(t){return-1==+t.attr(M.menuIndexAttrName)}(r)&&\"buttons\"!==i.type?[]:i.buttons,s=\"dropdown\"===i.type?M.dropdownButtonClassName:M.buttonClassName,c=r.selectAll(\"g.\"+s).data(o),u=c.enter().append(\"g\").classed(s,!0),m=c.exit();\"dropdown\"===i.type?(u.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),m.transition().attr(\"opacity\",\"0\").remove()):m.remove();var y=0,x=0,b=-1!==[\"up\",\"down\"].indexOf(i.direction);\"dropdown\"===i.type&&(b?x=i.headerHeight+M.gapButtonHeader:y=i.headerWidth+M.gapButtonHeader),\"dropdown\"===i.type&&\"up\"===i.direction&&(x=-M.gapButtonHeader+M.gapButton-i.openHeight),\"dropdown\"===i.type&&\"left\"===i.direction&&(y=-M.gapButtonHeader+M.gapButton-i.openWidth);var _={x:i.lx+y+i.pad.l,y:i.ly+x+i.pad.t,yPad:M.gapButton,xPad:M.gapButton,index:0},w={l:_.x+i.borderwidth,t:_.y+i.borderwidth};c.each(function(o,s){var u=g.select(this);u.call(l,i,o,t).call(p,i,_),u.on(\"click\",function(){g.event.defaultPrevented||(a(t,i,0,e,r,n,s),o.execute&&v.executeAPICommand(t,o.method,o.args),t.emit(\"plotly_buttonclicked\",{menu:i,button:o,active:i.active}))}),u.on(\"mouseover\",function(){u.call(h)}),u.on(\"mouseout\",function(){u.call(d,i),c.call(f,i)})}),c.call(f,i),b?(w.w=Math.max(i.openWidth,i.headerWidth),w.h=_.y-w.t):(w.w=_.x-w.l,w.h=Math.max(i.openHeight,i.headerHeight)),w.direction=i.direction,n&&(c.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u=\"up\"===c||\"down\"===c,f=i.active;if(u)for(s=0,l=0;l<f;l++)s+=i.heights[l]+M.gapButton;else for(o=0,l=0;l<f;l++)o+=i.widths[l]+M.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\");n.vbar&&n.vbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\")}(0,0,0,n,i,w):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){e=!1,r||t.disable()});r&&t.vbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){r=!1,e||t.disable()})}(n))}function l(t,e,r,n){t.call(c,e).call(u,e,r,n)}function c(t,e){var r=t.selectAll(\"rect\").data([0]);r.enter().append(\"rect\").classed(M.itemRectClassName,!0).attr({rx:M.rx,ry:M.ry,\"shape-rendering\":\"crispEdges\"}),r.call(y.stroke,e.bordercolor).call(y.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\")}function u(t,e,r,n){var i=t.selectAll(\"text\").data([0]);i.enter().append(\"text\").classed(M.itemTextClassName,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":\"start\",\"data-notex\":1}),i.call(x.font,e.font).text(r.label).call(b.convertToTspans,n)}function f(t,e){var r=e.active;t.each(function(t,n){var i=g.select(this);n===r&&e.showactive&&i.select(\"rect.\"+M.itemRectClassName).call(y.fill,M.activeColor)})}function h(t){t.select(\"rect.\"+M.itemRectClassName).call(y.fill,M.hoverColor)}function d(t,e){t.select(\"rect.\"+M.itemRectClassName).call(y.fill,e.bgcolor)}function p(t,e,r,n){n=n||{};var i=t.select(\".\"+M.itemRectClassName),a=t.select(\".\"+M.itemTextClassName),o=e.borderwidth,s=r.index;x.setTranslate(t,o+r.x,o+r.y);var l=-1!==[\"up\",\"down\"].indexOf(e.direction),c=n.height||(l?e.heights[s]:e.height1);i.attr({x:0,y:0,width:n.width||(l?e.width1:e.widths[s]),height:c});var u=e.font.size*w,f=(b.lineCount(a)-1)*u/2;b.positionText(a,M.textOffsetX,c/2-f+M.textOffsetY),l?r.y+=e.heights[s]+r.yPad:r.x+=e.widths[s]+r.xPad,r.index++}function m(t){t.selectAll(\"g.\"+M.dropdownButtonClassName).remove()}var g=t(\"d3\"),v=t(\"../../plots/plots\"),y=t(\"../color\"),x=t(\"../drawing\"),b=t(\"../../lib/svg_text_utils\"),_=t(\"../legend/anchor_utils\"),w=t(\"../../constants/alignment\").LINE_SPACING,M=t(\"./constants\"),k=t(\"./scrollbox\");e.exports=function(t){var e=t._fullLayout,r=function(t){for(var e=t[M.name],r=[],n=0;n<e.length;n++){var i=e[n];i.visible&&r.push(i)}return r}(e),c=e._menulayer.selectAll(\"g.\"+M.containerClassName).data(r.length>0?[0]:[]);if(c.enter().append(\"g\").classed(M.containerClassName,!0).style(\"cursor\",\"pointer\"),c.exit().remove(),c.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(M.autoMarginIdRoot)&&v.autoMargin(t,i)}}(t),0!==r.length){var u=c.selectAll(\"g.\"+M.headerGroupClassName).data(r,n);u.enter().append(\"g\").classed(M.headerGroupClassName,!0);var f=c.selectAll(\"g.\"+M.dropdownButtonGroupClassName).data([0]);f.enter().append(\"g\").classed(M.dropdownButtonGroupClassName,!0).style(\"pointer-events\",\"all\");for(var h=0;h<r.length;h++){var d=r[h];!function(t,e){e.width1=0,e.height1=0,e.heights=[],e.widths=[],e.totalWidth=0,e.totalHeight=0,e.openWidth=0,e.openHeight=0,e.lx=0,e.ly=0;var r=x.tester.selectAll(\"g.\"+M.dropdownButtonClassName).data(e.buttons);r.enter().append(\"g\").classed(M.dropdownButtonClassName,!0);var n=-1!==[\"up\",\"down\"].indexOf(e.direction);r.each(function(r,i){var a=g.select(this);a.call(l,e,r,t);var o=a.select(\".\"+M.itemTextClassName),s=o.node()&&x.bBox(o.node()).width,c=Math.max(s+M.textPadX,M.minWidth),u=e.font.size*w,f=b.lineCount(o),h=Math.max(u*f,M.minHeight)+M.textOffsetY;h=Math.ceil(h),c=Math.ceil(c),e.widths[i]=c,e.heights[i]=h,e.height1=Math.max(e.height1,h),e.width1=Math.max(e.width1,c),n?(e.totalWidth=Math.max(e.totalWidth,c),e.openWidth=e.totalWidth,e.totalHeight+=h+M.gapButton,e.openHeight+=h+M.gapButton):(e.totalWidth+=c+M.gapButton,e.openWidth+=c+M.gapButton,e.totalHeight=Math.max(e.totalHeight,h),e.openHeight=e.totalHeight)}),n?e.totalHeight-=M.gapButton:e.totalWidth-=M.gapButton,e.headerWidth=e.width1+M.arrowPadX,e.headerHeight=e.height1,\"dropdown\"===e.type&&(n?(e.width1+=M.arrowPadX,e.totalHeight=e.height1):e.totalWidth=e.width1,e.totalWidth+=M.arrowPadX),r.remove();var i=e.totalWidth+e.pad.l+e.pad.r,a=e.totalHeight+e.pad.t+e.pad.b,o=t._fullLayout._size;e.lx=o.l+o.w*e.x,e.ly=o.t+o.h*(1-e.y);var s=\"left\";_.isRightAnchor(e)&&(e.lx-=i,s=\"right\"),_.isCenterAnchor(e)&&(e.lx-=i/2,s=\"center\");var c=\"top\";_.isBottomAnchor(e)&&(e.ly-=a,c=\"bottom\"),_.isMiddleAnchor(e)&&(e.ly-=a/2,c=\"middle\"),e.totalWidth=Math.ceil(e.totalWidth),e.totalHeight=Math.ceil(e.totalHeight),e.lx=Math.round(e.lx),e.ly=Math.round(e.ly),v.autoMargin(t,M.autoMarginIdRoot+e._index,{x:e.x,y:e.y,l:i*({right:1,center:.5}[s]||0),r:i*({left:1,center:.5}[s]||0),b:a*({top:1,middle:.5}[c]||0),t:a*({bottom:1,middle:.5}[c]||0)})}(t,d)}var p=\"updatemenus\"+e._uid,y=new k(t,f,p);u.enter().size()&&(f.node().parentNode.appendChild(f.node()),f.call(m).attr(M.menuIndexAttrName,\"-1\")),u.exit().each(function(e){g.select(this).remove(),f.call(m).attr(M.menuIndexAttrName,\"-1\"),v.autoMargin(t,M.autoMarginIdRoot+e._index)}),u.each(function(e){var r=g.select(this),n=\"dropdown\"===e.type?f:null;v.manageCommandObserver(t,e,e.buttons,function(i){a(t,e,e.buttons[i.index],r,n,y,i.index,!0)}),\"dropdown\"===e.type?(o(t,r,f,y,e),i(f,e)&&s(t,r,f,y,e)):s(t,r,null,null,e)})}}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":711,\"./scrollbox\":715,d3:128}],714:[function(t,e,r){arguments[4][708][0].apply(r,arguments)},{\"./attributes\":710,\"./constants\":711,\"./defaults\":712,\"./draw\":713,dup:708}],715:[function(t,e,r){\"use strict\";function n(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\"rect.scrollbox-bg\").data([0]),this.bg.exit().on(\".drag\",null).on(\"wheel\",null).remove(),this.bg.enter().append(\"rect\").classed(\"scrollbox-bg\",!0).style(\"pointer-events\",\"all\").attr({opacity:0,x:0,y:0,width:0,height:0})}e.exports=n;var i=t(\"d3\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\");n.barWidth=2,n.barLength=20,n.barRadius=2,n.barPad=1,n.barColor=\"#808BA4\",n.prototype.enable=function(t,e,r){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=t;var u,f,h,d,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x=\"down\"===y,b=\"left\"===y,_=\"up\"===y,w=m,M=v;x||b||\"right\"===y||_||(this.position.direction=\"down\",x=!0);x||_?(f=(u=p)+w,x?(h=g,M=(d=Math.min(h+M,c))-h):M=(d=g+M)-(h=Math.max(d-M,0))):(d=(h=g)+M,b?w=(f=p+w)-(u=Math.max(f-w,0)):(u=p,w=(f=Math.min(u+w,l))-u)),this._box={l:u,t:h,w:w,h:M};var k=m>w,A=n.barLength+2*n.barPad,T=n.barWidth+2*n.barPad,S=p,E=g+v;E+T>c&&(E=c-T);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(a.fill,n.barColor),k?(this.hbar=L.attr({rx:n.barRadius,ry:n.barRadius,x:S,y:E,width:A,height:T}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>M,z=n.barWidth+2*n.barPad,D=n.barLength+2*n.barPad,I=p+m,P=g;I+z>l&&(I=l-z);var O=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);O.exit().on(\".drag\",null).remove(),O.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(a.fill,n.barColor),C?(this.vbar=O.attr({rx:n.barRadius,ry:n.barRadius,x:I,y:P,width:z,height:D}),this._vbarYMin=P+D/2,this._vbarTranslateMax=M-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,R=u-.5,N=C?f+z+.5:f+.5,j=h-.5,B=k?d+T+.5:d+.5,U=s._topdefs.selectAll(\"#\"+F).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",F).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(R),y:Math.floor(j),width:Math.ceil(N)-Math.floor(R),height:Math.ceil(B)-Math.floor(j)}),this.container.call(o.setClipUrl,F),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||C){var V=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(V);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),C&&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\":743,\"../color\":618,\"../drawing\":643,d3:128}],716:[function(t,e,r){\"use strict\";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],717:[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]}},{}],718:[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]}},{}],719:[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\"}},{}],720:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],721:[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,MINUS_SIGN:\"\\u2212\"}},{}],722:[function(t,e,r){\"use strict\";e.exports={entityToUnicode:{mu:\"\\u03bc\",\"#956\":\"\\u03bc\",amp:\"&\",\"#28\":\"&\",lt:\"<\",\"#60\":\"<\",gt:\">\",\"#62\":\">\",nbsp:\"\\xa0\",\"#160\":\"\\xa0\",times:\"\\xd7\",\"#215\":\"\\xd7\",plusmn:\"\\xb1\",\"#177\":\"\\xb1\",deg:\"\\xb0\",\"#176\":\"\\xb0\"}}},{}],723:[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}},{}],724:[function(t,e,r){\"use strict\";var n=t(\"./plotly\");r.version=\"1.33.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/fx\"),t(\"./components/legend\"),t(\"./components/annotations\"),t(\"./components/annotations3d\"),t(\"./components/shapes\"),t(\"./components/images\"),t(\"./components/updatemenus\"),t(\"./components/sliders\"),t(\"./components/rangeslider\"),t(\"./components/rangeselector\")]),r.register([t(\"./locale-en\"),t(\"./locale-en-us\")]),r.Icons=t(\"../build/ploticon\"),r.Plots=n.Plots,r.Fx=t(\"./components/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\":609,\"./components/annotations3d\":614,\"./components/fx\":660,\"./components/images\":668,\"./components/legend\":677,\"./components/rangeselector\":689,\"./components/rangeslider\":695,\"./components/shapes\":702,\"./components/sliders\":708,\"./components/updatemenus\":714,\"./fonts/mathjax_config\":725,\"./lib/queue\":757,\"./locale-en\":771,\"./locale-en-us\":770,\"./plot_api/plot_schema\":778,\"./plot_api/register\":779,\"./plot_api/set_plot_config\":780,\"./plot_api/to_image\":782,\"./plot_api/validate\":783,\"./plotly\":784,\"./snapshot\":878,\"./snapshot/download\":875,\"./traces/scatter\":1078,d3:128,\"es6-promise\":137}],725:[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},{}],726:[function(t,e,r){\"use strict\";var n=Math.PI;r.deg2rad=function(t){return t/180*n},r.rad2deg=function(t){return t/n*180},r.wrap360=function(t){var e=t%360;return e<0?e+360:e},r.wrap180=function(t){return Math.abs(t)>180&&(t-=360*Math.round(t/360)),t}},{}],727:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../constants/numerical\").BADNUM,a=/^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;e.exports=function(t){return\"string\"==typeof t&&(t=t.replace(a,\"\")),n(t)?Number(t):i}},{\"../constants/numerical\":721,\"fast-isnumeric\":140}],728:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../plots/attributes\"),o=t(\"../components/colorscale/get_scale\"),s=(Object.keys(t(\"../components/colorscale/scales\")),t(\"./nested_property\")),l=t(\"./regex\").counter,c=t(\"../constants/interactions\").DESELECTDIM,u=t(\"./angles\").wrap180;r.valObjectMeta={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)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if(\"/\"===i.charAt(0)&&\"/\"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},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&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.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)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return i(t).isValid()})?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(u(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){\"string\"==typeof t&&l(r).test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\"string\"==typeof t&&!!l(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(\"string\"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(\"+\"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join(\"+\")):e.set(r)}else e.set(t);else e.set(r)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){if(Array.isArray(t)){var a=i.items,o=[];n=Array.isArray(n)?n:[];for(var s=0;s<a.length;s++)r.coerce(t,o,a,\"[\"+s+\"]\",n[s]);e.set(o)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var n=e.items;if(!e.freeLength&&t.length!==n.length)return!1;for(var i=0;i<t.length;i++){if(!r.validate(t[i],e.items[i]))return!1}return!0}}},r.coerce=function(t,e,n,i,a){var o=s(n,i).get(),l=s(t,i),c=s(e,i),u=l.get();return void 0===a&&(a=o.dflt),o.arrayOk&&Array.isArray(u)?(c.set(u),u):(r.valObjectMeta[o.valType].coerceFunction(u,c,a,o),c.get())},r.coerce2=function(t,e,n,i,a){var o=s(t,i),l=r.coerce(t,e,n,i,a),c=o.get();return void 0!==c&&null!==c&&l},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+\".family\",r.family),n.size=t(e+\".size\",r.size),n.color=t(e+\".color\",r.color),n},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?{hoverinfo:o.hoverinfo}:a,l=s.hoverinfo;if(1===n._dataLength){var c=\"all\"===l.dflt?l.flags.slice():l.dflt.split(\"+\");c.splice(c.indexOf(\"name\"),1),i=c.join(\"+\")}return r.coerce(t,e,s,\"hoverinfo\",i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;Array.isArray(i)||t.selected||t.unselected||(r=i,n=c*i),e(\"selected.marker.opacity\",r),e(\"unselected.marker.opacity\",n)}},r.validate=function(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&&Array.isArray(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}},{\"../components/colorscale/get_scale\":631,\"../components/colorscale/scales\":637,\"../constants/interactions\":720,\"../plots/attributes\":787,\"./angles\":726,\"./nested_property\":751,\"./regex\":758,\"fast-isnumeric\":140,tinycolor2:546}],729:[function(t,e,r){\"use strict\";function n(t){return t&&x.componentsRegistry.calendars&&\"string\"==typeof t&&\"gregorian\"!==t}function i(t,e){return String(t+Math.pow(10,e)).substr(1)}function a(t,e,r,n,a){if((e||r||n||a)&&(t+=\" \"+i(e,2)+\":\"+i(r,2),(n||a)&&(t+=\":\"+i(n,2),a))){for(var o=4;a%10==0;)o-=1,a/=10;t+=\".\"+i(a,o)}return t}function o(t,e){var r=f(t+.05,p),n=i(Math.floor(r/m),2)+\":\"+i(f(Math.floor(r/g),60),2);if(\"M\"!==e){c(e)||(e=0);var a=(100+Math.min(f(t/v,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+a}return n}function s(t){return t.formatDate(\"yyyy\")}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"./loggers\"),f=t(\"./mod\"),h=t(\"../constants/numerical\"),d=h.BADNUM,p=h.ONEDAY,m=h.ONEHOUR,g=h.ONEMIN,v=h.ONESEC,y=h.EPOCHJD,x=t(\"../registry\"),b=l.time.format.utc,_=/^\\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,w=/^\\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,M=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?x.getComponentMethod(\"calendars\",\"CANONICAL_SUNDAY\")[t]:x.getComponentMethod(\"calendars\",\"CANONICAL_TICK\")[t]:e?\"2000-01-02\":\"2000-01-01\"},r.dfltRange=function(t){return n(t)?x.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 k,A;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return(t=Number(t)-t.getTimezoneOffset()*g)>=k&&t<=A?t:d;if(\"string\"!=typeof t&&\"number\"!=typeof t)return d;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?w:_);if(!s)return d;var l=s[1],c=s[3]||\"1\",u=Number(s[5]||1),f=Number(s[7]||0),h=Number(s[9]||0),b=Number(s[11]||0);if(i){if(2===l.length)return d;l=Number(l);var T;try{var S=x.getComponentMethod(\"calendars\",\"getCal\")(e);if(o){var E=\"i\"===c.charAt(c.length-1);c=parseInt(c,10),T=S.newDate(l,S.toMonthIndex(l,c,E),u)}else T=S.newDate(l,Number(c),u)}catch(t){return d}return T?(T.toJD()-y)*p+f*m+h*g+b*v:d}l=2===l.length?(Number(l)+2e3-M)%100+M:Number(l),c-=1;var L=new Date(Date.UTC(2e3,c,u,f,h));return L.setUTCFullYear(l),L.getUTCMonth()!==c?d:L.getUTCDate()!==u?d:L.getTime()+b*v},k=r.MIN_MS=r.dateTime2ms(\"-9999\"),A=r.MAX_MS=r.dateTime2ms(\"9999-12-31 23:59:59.9999\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==d};var T=90*p,S=3*m,E=5*g;r.ms2DateTime=function(t,e,r){if(\"number\"!=typeof t||!(t>=k&&t<=A))return d;e||(e=0);var i,o,s,l,c,u,h=Math.floor(10*f(t+.05,1)),_=Math.round(t-h/10);if(n(r)){var w=Math.floor(_/p)+y,M=Math.floor(f(t,p));try{i=x.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(w).formatDate(\"yyyy-mm-dd\")}catch(t){i=b(\"G%Y-%m-%d\")(new Date(_))}if(\"-\"===i.charAt(0))for(;i.length<11;)i=\"-0\"+i.substr(1);else for(;i.length<10;)i=\"0\"+i;o=e<T?Math.floor(M/m):0,s=e<T?Math.floor(M%m/g):0,l=e<S?Math.floor(M%g/v):0,c=e<E?M%v*10+h:0}else u=new Date(_),i=b(\"%Y-%m-%d\")(u),o=e<T?u.getUTCHours():0,s=e<T?u.getUTCMinutes():0,l=e<S?u.getUTCSeconds():0,c=e<E?10*u.getUTCMilliseconds()+h:0;return a(i,o,s,l,c)},r.ms2DateTimeLocal=function(t){if(!(t>=k+p&&t<=A-p))return d;var e=Math.floor(10*f(t+.05,1)),r=new Date(Math.round(t-e/10));return a(l.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 u.error(\"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 u.error(\"unrecognized date\",t),e;return t};var L=/%\\d?f/g,C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,i,a){var l,c;if(a=n(a)&&a,e)return function(t,e,r,i){t=t.replace(L,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\"\")||\"0\"});var a=new Date(Math.floor(e+.05));if(n(i))try{t=x.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,i)}catch(t){return\"Invalid\"}return r(t)(a)}(e,t,i,a);if(a)try{var u=Math.floor((t+.05)/p)+y,f=x.getComponentMethod(\"calendars\",\"getCal\")(a).fromJD(u);\"y\"===r?c=s(f):\"m\"===r?c=function(t){return t.formatDate(\"M yyyy\")}(f):\"d\"===r?(l=s(f),c=function(t){return t.formatDate(\"M d\")}(f)):(l=function(t){return t.formatDate(\"M d, yyyy\")}(f),c=o(t,r))}catch(t){return\"Invalid\"}else{var h=new Date(Math.floor(t+.05));\"y\"===r?c=i(\"%Y\")(h):\"m\"===r?c=i(\"%b %Y\")(h):\"d\"===r?(l=i(\"%Y\")(h),c=i(\"%b %-d\")(h)):(l=i(\"%b %-d, %Y\")(h),c=o(t,r))}return c+(l?\"\\n\"+l:\"\")};var z=3*p;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=f(t,p);if(t=Math.round(t-i),r)try{var a=Math.round(t/p)+y,o=x.getComponentMethod(\"calendars\",\"getCal\")(r),s=o.fromJD(a);return e%12?o.add(s,e,\"m\"):o.add(s,e/12,\"y\"),(s.toJD()-y)*p+i}catch(e){u.error(\"invalid ms \"+t+\" in calendar \"+r)}var l=new Date(t+z);return l.setUTCMonth(l.getUTCMonth()+e)+i-z},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&x.getComponentMethod(\"calendars\",\"getCal\")(e),f=0;f<t.length;f++)if(i=t[f],c(i)){if(!(i%p))if(u)try{1===(r=u.fromJD(i/p+y)).day()?1===r.month()?a++:o++:s++}catch(t){}else 1===(r=new Date(i)).getUTCDate()?0===r.getUTCMonth()?a++:o++:s++}else l++;s+=o+=a;var h=t.length-l;return{exactYears:a/h,exactMonths:o/h,exactDays:s/h}}},{\"../constants/numerical\":721,\"../registry\":873,\"./loggers\":748,\"./mod\":750,d3:128,\"fast-isnumeric\":140}],730:[function(t,e,r){\"use strict\";e.exports=function(t,e){return Array.isArray(t)||(t=[]),t.length=e,t}},{}],731:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){\"undefined\"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;\"undefined\"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o=a._events[e];if(!o)return n;\"function\"==typeof o&&(o=[o]);for(var s=o.pop(),l=0;l<o.length;l++)o[l](r);return i=s(r),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:138}],732:[function(t,e,r){\"use strict\";function n(t,e,r,o){var s,l,c,u,f,h,d=t[0],p=t.length;if(2===p&&a(d)&&a(t[1])&&0===d.length){if(function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&\"object\"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],d))return d;d.splice(0,d.length)}for(var m=1;m<p;m++){s=t[m];for(l in s)c=d[l],u=s[l],o&&a(u)?d[l]=u:e&&u&&(i(u)||(f=a(u)))?(f?(f=!1,h=c&&a(c)?c:[]):h=c&&i(c)?c:{},d[l]=n([h,u],e,r,o)):(void 0!==u||r)&&(d[l]=u)}return d}var i=t(\"./is_plain_object.js\"),a=Array.isArray;r.extendFlat=function(){return n(arguments,!1,!1,!1)},r.extendDeep=function(){return n(arguments,!0,!1,!1)},r.extendDeepAll=function(){return n(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return n(arguments,!0,!1,!0)}},{\"./is_plain_object.js\":745}],733:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},{}],734:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=function(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}(t)?function(t){return!0===t[0].trace.visible}:function(t){return!0===t.visible},r=[],n=0;n<t.length;n++){var i=t[n];e(i)&&r.push(i)}return r}},{}],735:[function(t,e,r){\"use strict\";var n=t(\"country-regex\"),i=t(\"../lib\"),a=Object.keys(n),o={\"ISO-3\":i.identity,\"USA-states\":i.identity,\"country names\":function(t){for(var e=0;e<a.length;e++){var r=a[e];if(new RegExp(n[r]).test(t.trim().toLowerCase()))return r}return i.log(\"Unrecognized country name: \"+t+\".\"),!1}};r.locationToFeature=function(t,e,r){if(!e||\"string\"!=typeof e)return!1;var n=function(t,e){return(0,o[t])(e)}(t,e);if(n){for(var a=0;a<r.length;a++){var s=r[a];if(s.id===n)return s}i.log([\"Location with id\",n,\"does not have a matching topojson feature at this resolution.\"].join(\" \"))}return!1}},{\"../lib\":743,\"country-regex\":113}],736:[function(t,e,r){\"use strict\";var n=t(\"../constants/numerical\").BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\"LineString\",coordinates:t[0]}:{type:\"MultiLineString\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\"Polygon\",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:\"MultiPolygon\",coordinates:e}},r.makeBlank=function(){return{type:\"Point\",coordinates:[]}}},{\"../constants/numerical\":721}],737:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,f=n-e,h=a-e,d=s-a,p=l*d-u*f;if(0===p)return null;var m=(c*d-u*h)/p,g=(c*f-l*h)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+f*m}}function i(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}var a=t(\"./mod\");r.segmentsIntersect=n,r.segmentDistance=function(t,e,r,a,o,s,l,c){if(n(t,e,r,a,o,s,l,c))return 0;var u=r-t,f=a-e,h=l-o,d=c-s,p=u*u+f*f,m=h*h+d*d,g=Math.min(i(u,f,p,o-t,s-e),i(u,f,p,l-t,c-e),i(h,d,m,t-o,e-s),i(h,d,m,r-o,a-s));return Math.sqrt(g)};var o,s,l;r.getTextLocation=function(t,e,r,n){if(t===s&&n===l||(o={},s=t,l=n),o[r])return o[r];var i=t.getPointAtLength(a(r-n/2,e)),c=t.getPointAtLength(a(r+n/2,e)),u=Math.atan((c.y-i.y)/(c.x-i.x)),f=t.getPointAtLength(a(r,e)),h={x:(4*f.x+i.x+c.x)/6,y:(4*f.y+i.y+c.y)/6,theta:u};return o[r]=h,h},r.clearLocationCache=function(){s=null},r.getVisibleSegment=function(t,e,r){function n(e){var r=t.getPointAtLength(e);0===e?i=r:e===f&&(a=r);var n=r.x<o?o-r.x:r.x>s?r.x-s:0,u=r.y<l?l-r.y:r.y>c?r.y-c:0;return Math.sqrt(n*n+u*u)}for(var i,a,o=e.left,s=e.right,l=e.top,c=e.bottom,u=0,f=t.getTotalLength(),h=f,d=n(u);d;){if((u+=d+r)>h)return;d=n(u)}for(d=n(h);d;){if(h-=d+r,u>h)return;d=n(h)}return{min:u,max:h,len:h-u,total:f,isClosed:0===u&&h===f&&Math.abs(i.x-a.x)<.1&&Math.abs(i.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,d=s;f<c;){if(i=(h+d)/2,a=t.getPointAtLength(i),o=a[r]-e,Math.abs(o)<l)return a;u*o>0?d=i:h=i,f++}return a}},{\"./mod\":750}],738:[function(t,e,r){\"use strict\";e.exports=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}},{}],739:[function(t,e,r){\"use strict\";function n(t,e){var r=t;return r[3]*=e,r}function i(t){if(o(t))return u;var e=s(t);return e.length?e:u}function a(t){return o(t)?t:f}var o=t(\"fast-isnumeric\"),s=t(\"color-normalize\"),l=t(\"../components/colorscale\"),c=t(\"../components/color/attributes\").defaultLine,u=s(c),f=1;e.exports=function(t,e,r){var o,c,h,d,p,m=t.color,g=Array.isArray(m),v=Array.isArray(e),y=[];if(o=void 0!==t.colorscale?l.makeColorScaleFunc(l.extractScale(t.colorscale,t.cmin,t.cmax)):i,c=g?function(t,e){return void 0===t[e]?u:s(o(t[e]))}:i,h=v?function(t,e){return void 0===t[e]?f:a(t[e])}:a,g||v)for(var x=0;x<r;x++)d=c(m,x),p=h(e,x),y[x]=n(d,p);else y=n(s(m),e);return y}},{\"../components/color/attributes\":617,\"../components/colorscale\":633,\"color-normalize\":99,\"fast-isnumeric\":140}],740:[function(t,e,r){\"use strict\";function n(t){return[t]}var i=t(\"./identity\");e.exports={keyFun:function(t){return t.key},repeat:n,descend:i,wrap:n,unwrap:function(t){return t[0]}}},{\"./identity\":742}],741:[function(t,e,r){\"use strict\";var n=t(\"superscript-text\"),i=t(\"../constants/string_mappings\");e.exports=function(t){return\"\"+function(t){for(var e=i.entityToUnicode,r=0;(r=t.indexOf(\"&\",r))>=0;){var n=t.indexOf(\";\",r);if(n<r)r+=1;else{var a=e[t.slice(r+1,n)];t=a?t.slice(0,r)+a+t.slice(n+1):t.slice(0,r)+t.slice(n+1)}}return t}(function(t){return t.replace(/\\<.*\\>/g,\"\")}(function(t){for(var e=0;(e=t.indexOf(\"<sup>\",e))>=0;){var r=t.indexOf(\"</sup>\",e);if(r<e)break;t=t.slice(0,e)+n(t.slice(e+5,r))+t.slice(r+6)}return t}(function(t){return t.replace(/\\<br\\>/g,\"\\n\")}(t))))}},{\"../constants/string_mappings\":722,\"superscript-text\":539}],742:[function(t,e,r){\"use strict\";e.exports=function(t){return t}},{}],743:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../constants/numerical\"),o=a.FP_SAFE,s=a.BADNUM,l=e.exports={};l.nestedProperty=t(\"./nested_property\"),l.keyedContainer=t(\"./keyed_container\"),l.relativeAttr=t(\"./relative_attr\"),l.isPlainObject=t(\"./is_plain_object\"),l.isArray=t(\"./is_array\"),l.mod=t(\"./mod\"),l.toLogRange=t(\"./to_log_range\"),l.relinkPrivateKeys=t(\"./relink_private\"),l.ensureArray=t(\"./ensure_array\");var c=t(\"./coerce\");l.valObjectMeta=c.valObjectMeta,l.coerce=c.coerce,l.coerce2=c.coerce2,l.coerceFont=c.coerceFont,l.coerceHoverinfo=c.coerceHoverinfo,l.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,l.validate=c.validate;var u=t(\"./dates\");l.dateTime2ms=u.dateTime2ms,l.isDateTime=u.isDateTime,l.ms2DateTime=u.ms2DateTime,l.ms2DateTimeLocal=u.ms2DateTimeLocal,l.cleanDate=u.cleanDate,l.isJSDate=u.isJSDate,l.formatDate=u.formatDate,l.incrementMonth=u.incrementMonth,l.dateTick0=u.dateTick0,l.dfltRange=u.dfltRange,l.findExactDates=u.findExactDates,l.MIN_MS=u.MIN_MS,l.MAX_MS=u.MAX_MS;var f=t(\"./search\");l.findBin=f.findBin,l.sorterAsc=f.sorterAsc,l.sorterDes=f.sorterDes,l.distinctVals=f.distinctVals,l.roundUp=f.roundUp;var h=t(\"./stats\");l.aggNums=h.aggNums,l.len=h.len,l.mean=h.mean,l.variance=h.variance,l.stdev=h.stdev,l.interp=h.interp;var d=t(\"./matrix\");l.init2dArray=d.init2dArray,l.transposeRagged=d.transposeRagged,l.dot=d.dot,l.translationMatrix=d.translationMatrix,l.rotationMatrix=d.rotationMatrix,l.rotationXYMatrix=d.rotationXYMatrix,l.apply2DTransform=d.apply2DTransform,l.apply2DTransform2=d.apply2DTransform2;var p=t(\"./angles\");l.deg2rad=p.deg2rad,l.rad2deg=p.rad2deg,l.wrap360=p.wrap360,l.wrap180=p.wrap180;var m=t(\"./geometry2d\");l.segmentsIntersect=m.segmentsIntersect,l.segmentDistance=m.segmentDistance,l.getTextLocation=m.getTextLocation,l.clearLocationCache=m.clearLocationCache,l.getVisibleSegment=m.getVisibleSegment,l.findPointOnPath=m.findPointOnPath;var g=t(\"./extend\");l.extendFlat=g.extendFlat,l.extendDeep=g.extendDeep,l.extendDeepAll=g.extendDeepAll,l.extendDeepNoArrays=g.extendDeepNoArrays;var v=t(\"./loggers\");l.log=v.log,l.warn=v.warn,l.error=v.error;var y=t(\"./regex\");l.counterRegex=y.counter;var x=t(\"./throttle\");l.throttle=x.throttle,l.throttleDone=x.done,l.clearThrottle=x.clear,l.getGraphDiv=t(\"./get_graph_div\"),l._=t(\"./localize\"),l.notifier=t(\"./notifier\"),l.filterUnique=t(\"./filter_unique\"),l.filterVisible=t(\"./filter_visible\"),l.pushUnique=t(\"./push_unique\"),l.cleanNumber=t(\"./clean_number\"),l.ensureNumber=function(t){return i(t)?(t=Number(t))<-o||t>o?s:i(t)?Number(t):s:s},l.noop=t(\"./noop\"),l.identity=t(\"./identity\"),l.swapAttrs=function(t,e,r,n){r||(r=\"x\"),n||(n=\"y\");for(var i=0;i<e.length;i++){var a=e[i],o=l.nestedProperty(t,a.replace(\"?\",r)),s=l.nestedProperty(t,a.replace(\"?\",n)),c=o.get();o.set(s.get()),s.set(c)}},l.pauseEvent=function(t){return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1},l.raiseToTop=function(t){t.parentNode.appendChild(t)},l.cancelTransition=function(t){return t.transition().duration(0)},l.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.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},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o<i;o++)a[o]=e(t[o],r,n);return a},l.randstr=function t(e,r,n){if(n||(n=16),void 0===r&&(r=24),r<=0)return\"0\";var i,a,o=Math.log(Math.pow(2,r))/Math.log(n),s=\"\";for(i=2;o===1/0;i*=2)o=Math.log(Math.pow(2,r/i))/Math.log(n)*i;var l=o-Math.floor(o);for(i=0;i<Math.floor(o);i++)s=Math.floor(Math.random()*n).toString(n)+s;l&&(a=Math.pow(n,l),s=Math.floor(Math.random()*a).toString(n)+s);var c=parseInt(s,n);return e&&e.indexOf(s)>-1||c!==1/0&&c>=Math.pow(2,r)?t(e,r,n):s},l.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},l.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,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){function n(){return l.syncOrAsync(t,e,r)}for(var i,a;t.length;)if(a=t.splice(0,1)[0],(i=a(e))&&i.then)return i.then(n).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n<r.length;n++)void 0!==(i=t[r[n]])&&null!==i?a=!0:o=!1;if(a&&!o)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},l.mergeArray=function(t,e,r){if(Array.isArray(t))for(var n=Math.min(t.length,e.length),i=0;i<n;i++)e[i][r]=t[i]},l.fillArray=function(t,e,r,n){if(n=n||l.identity,Array.isArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},l.castOption=function(t,e,r,n){n=n||l.identity;var i=l.nestedProperty(t,r).get();return Array.isArray(i)?n(Array.isArray(e)&&Array.isArray(i[e[0]])?i[e[0]][e[1]]:i[e]):i},l.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=l.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},l.tagSelected=function(t,e,r){function n(t){return i(t)&&t>=0&&t%1==0}function a(e){return void 0!==e&&e<t.length}var o,s=e.selectedpoints,l=e._indexToPoints;if(l){o={};for(var c in l)for(var u=l[c],f=0;f<u.length;f++)o[u[f]]=c}for(var h=0;h<s.length;h++){var d=s[h];if(n(d)){var p=o?o[d]:d,m=r?r[p]:p;a(m)&&(t[m].selected=1)}}},l.getTargetArray=function(t,e){var r=e.target;if(\"string\"==typeof r&&r){var n=l.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},l.minExtend=function(t,e){var r={};\"object\"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],\"_\"!==i.charAt(0)&&\"function\"!=typeof a&&(\"module\"===i?r[i]=a:Array.isArray(a)?r[i]=a.slice(0,3):r[i]=a&&\"object\"==typeof a?l.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)\"object\"==typeof(a=e[i=o[n]])&&i in r&&\"object\"==typeof r[i]||(r[i]=a);return r},l.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},l.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},l.isPlotDiv=function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed(\"js-plotly-plot\")},l.removeElement=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)},l.addStyleRule=function(t,e){if(!l.styleSheet){var r=document.createElement(\"style\");r.appendChild(document.createTextNode(\"\")),document.head.appendChild(r),l.styleSheet=r.sheet}var n=l.styleSheet;n.insertRule?n.insertRule(t+\"{\"+e+\"}\",0):n.addRule?n.addRule(t,e,0):l.warn(\"addStyleRule failed\")},l.isIE=function(){return void 0!==window.navigator.msSaveBlob},l.isD3Selection=function(t){return t&&\"function\"==typeof t.classed},l.objectFromPath=function(t,e){for(var r,n=t.split(\".\"),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\\[([0-9]+)\\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var b=/^([^\\[\\.]+)\\.(.+)?/,_=/^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;l.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(\"object\"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(b))?(i=t[r],n=e[1],delete t[r],t[n]=l.extendDeepNoArrays(t[n]||{},l.objectFromPath(r,l.expandObjectPaths(i))[n])):(e=r.match(_))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],\".\"===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(i)))):t[n][a]=l.expandObjectPaths(i)):t[r]=l.expandObjectPaths(t[r]));return t},l.numSeparate=function(t,e,r){if(r||(r=!1),\"string\"!=typeof e||0===e.length)throw new Error(\"Separator string required for formatting!\");\"number\"==typeof t&&(t=String(t));var n=/(\\d+)(\\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(\".\"),s=o[0],l=o.length>1?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};var w=/%{([^\\s%{}]*)}/g,M=/^\\w*$/;l.templateString=function(t,e){var r={};return t.replace(w,function(t,n){return M.test(n)?e[n]||\"\":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||\"\")})};l.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n},l.eventListenerOptionsSupported=function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e),window.removeEventListener(\"test\",null,e)}catch(e){t=!1}return t}},{\"../constants/numerical\":721,\"./angles\":726,\"./clean_number\":727,\"./coerce\":728,\"./dates\":729,\"./ensure_array\":730,\"./extend\":732,\"./filter_unique\":733,\"./filter_visible\":734,\"./geometry2d\":737,\"./get_graph_div\":738,\"./identity\":742,\"./is_array\":744,\"./is_plain_object\":745,\"./keyed_container\":746,\"./localize\":747,\"./loggers\":748,\"./matrix\":749,\"./mod\":750,\"./nested_property\":751,\"./noop\":752,\"./notifier\":753,\"./push_unique\":756,\"./regex\":758,\"./relative_attr\":759,\"./relink_private\":760,\"./search\":761,\"./stats\":764,\"./throttle\":767,\"./to_log_range\":768,d3:128,\"fast-isnumeric\":140}],744:[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)}},{}],745:[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}},{}],746:[function(t,e,r){\"use strict\";var n=t(\"./nested_property\"),i=/^\\w*$/;e.exports=function(t,e,r,a){r=r||\"name\",a=a||\"value\";var o,s,l={};s=e&&e.length?n(t,e).get():t,e=e||\"\",s=s||[];var c={};for(o=0;o<s.length;o++)c[s[o][r]]=o;var u=i.test(a),f={set:function(t,e){var i=null===e?4:0,o=c[t];void 0===o?(i|=3,o=s.length,c[t]=o):e!==(u?s[o][a]:n(s[o],a).get())&&(i|=2);var h=s[o]=s[o]||{};return h[r]=t,u?h[a]=e:n(h,a).set(e),null!==e&&(i&=-5),l[o]=l[o]|i,f},get:function(t){var e=c[t];return void 0===e?void 0:u?s[e][a]:n(s[e],a).get()},rename:function(t,e){var n=c[t];return void 0===n?f:(l[n]=1|l[n],c[e]=n,delete c[t],s[n][r]=e,f)},remove:function(t){var e=c[t];if(void 0===e)return f;var i=s[e];if(Object.keys(i).length>2)return l[e]=2|l[e],f.set(t,null);if(u){for(o=e;o<s.length;o++)l[o]=3|l[o];for(o=e;o<s.length;o++)c[s[o][r]]--;s.splice(e,1),delete c[t]}else n(i,a).set(null),l[e]=6|l[e];return f},constructUpdate:function(){for(var t,i,o={},c=Object.keys(l),f=0;f<c.length;f++)i=c[f],t=e+\"[\"+i+\"]\",s[i]?(1&l[i]&&(o[t+\".\"+r]=s[i][r]),2&l[i]&&(o[t+\".\"+a]=u?4&l[i]?null:s[i][a]:4&l[i]?null:n(s[i],a).get())):o[t]=null;return o}};return f}},{\"./nested_property\":751}],747:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split(\"-\")[0];if(c===r)break;r=c}return e}},{\"../registry\":873}],748:[function(t,e,r){\"use strict\";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r<e.length;r++)t(e[r])}var i=t(\"../plot_api/plot_config\"),a=e.exports={};a.log=function(){if(i.logging>1){for(var t=[\"LOG:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.trace||console.log,t)}},a.warn=function(){if(i.logging>0){for(var t=[\"WARN:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.trace||console.log,t)}},a.error=function(){if(i.logging>0){for(var t=[\"ERROR:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.error,t)}}},{\"../plot_api/plot_config\":777}],749:[function(t,e,r){\"use strict\";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&&(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}}},{}],750:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t%e;return r<0?r+e:r}},{}],751:[function(t,e,r){\"use strict\";function n(t,e){return function(){var r,i,a,o,s,l=t;for(o=0;o<e.length-1;o++){if(-1===(r=e[o])){for(i=!0,a=[],s=0;s<l.length;s++)a[s]=n(l[s],e.slice(o+1))(),a[s]!==a[0]&&(i=!1);return i?a[0]:a}if(\"number\"==typeof r&&!c(l))return;if(\"object\"!=typeof(l=l[r])||null===l)return}if(\"object\"==typeof l&&null!==l&&null!==(a=l[e[o]]))return a}}function i(t,e){if(!function(t){return void 0===t||null===t||\"object\"==typeof t&&(c(t)?!t.length:!Object.keys(t).length)}(t)||u(t)&&\"]\"===e.charAt(e.length-1)||e.match(d)&&void 0!==t)return!1;if(!c(t))return!0;if(e.match(h))return!0;var r=f(e);return r&&\"\"===r.index}function a(t,e,r){return function(n){var l,u,f=t,h=\"\",d=[[t,h]],p=i(n,r);for(u=0;u<e.length-1;u++){if(\"number\"==typeof(l=e[u])&&!c(f))throw\"array index but container is not an array\";if(-1===l){if(p=!function(t,e,r,n){var o,l=c(r),u=!0,f=r,h=n.replace(\"-1\",0),d=!l&&i(r,h),p=e[0];for(o=0;o<t.length;o++)h=n.replace(\"-1\",o),l&&(f=r[o%r.length],d=i(f,h)),d&&(u=!1),s(t,o,p,d)&&a(t[o],e,n.replace(\"-1\",o))(f);return u}(f,e.slice(u+1),n,r))break;return}if(!s(f,l,e[u+1],p))break;if(\"object\"!=typeof(f=f[l])||null===f)throw\"container is not an object\";h=o(h,l),d.push([f,h])}p?(u===e.length-1&&delete f[e[u]],function(t){var e,r,n,a,s,l;for(e=t.length-1;e>=0;e--){if(n=t[e][0],a=t[e][1],l=!1,c(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}}(d)):f[e[u]]=n}}function o(t,e){var r=e;return l(e)?r=\"[\"+e+\"]\":t&&(r=\".\"+e),t+r}function s(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=\"number\"==typeof r?[]:{}}return!0}var l=t(\"fast-isnumeric\"),c=t(\"./is_array\"),u=t(\"./is_plain_object\"),f=t(\"../plot_api/container_array_match\");e.exports=function(t,e){if(l(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,c=e.split(\".\");s<c.length;){if(r=String(c[s]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/)){if(r[1])c[s]=r[1];else{if(0!==s)throw\"bad property string\";c.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split(\"][\"),o=0;o<i.length;o++)s++,c.splice(s,0,Number(i[o]))}s++}return\"object\"!=typeof t?function(t,e,r){return{set:function(){throw\"bad container\"},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:a(t,c,e),get:n(t,c),astr:e,parts:c,obj:t}};var h=/(^|\\.)((domain|range)(\\.[xy])?|args|parallels)$/,d=/(^|\\.)args\\[/},{\"../plot_api/container_array_match\":772,\"./is_array\":744,\"./is_plain_object\":745,\"fast-isnumeric\":140}],752:[function(t,e,r){\"use strict\";e.exports=function(){}},{}],753:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=[];e.exports=function(t,e){function r(t){t.duration(700).style(\"opacity\",0).each(\"end\",function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()})}if(-1===a.indexOf(t)){a.push(t);var o=1e3;i(e)?o=e:\"long\"===e&&(o=3e3);var s=n.select(\"body\").selectAll(\".plotly-notifier\").data([0]);s.enter().append(\"div\").classed(\"plotly-notifier\",!0);s.selectAll(\".notifier-note\").data(a).enter().append(\"div\").classed(\"notifier-note\",!0).style(\"opacity\",0).each(function(t){var e=n.select(this);e.append(\"button\").classed(\"notifier-close\",!0).html(\"×\").on(\"click\",function(){e.transition().call(r)});for(var i=e.append(\"p\"),a=t.split(/<br\\s*\\/?>/g),s=0;s<a.length;s++)s&&i.append(\"br\"),i.append(\"span\").text(a[s]);e.transition().duration(700).style(\"opacity\",1).transition().delay(o).call(r)})}}},{d3:128,\"fast-isnumeric\":140}],754:[function(t,e,r){\"use strict\";var n=t(\"./setcursor\"),i=\"data-savedcursor\";e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(\"class\")||\"\").split(\" \"),o=0;o<a.length;o++){var s=a[o];0===s.indexOf(\"cursor-\")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,\"!!\")}n(t,e)}else r&&(t.attr(i,null),\"!!\"===r?n(t):n(t,r))}},{\"./setcursor\":762}],755:[function(t,e,r){\"use strict\";var n=t(\"./matrix\").dot,i=t(\"../constants/numerical\").BADNUM,a=e.exports={};a.tester=function(t){if(Array.isArray(t[0][0]))return a.multitester(t);var e,r=t.slice(),n=r[0][0],o=n,s=r[0][1],l=s;for(r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),o=Math.max(o,r[e][0]),s=Math.min(s,r[e][1]),l=Math.max(l,r[e][1]);var c,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,c=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,c=function(t){return t[1]===r[0][1]}));var f=!0,h=r[0];for(e=1;e<r.length;e++)if(h[0]!==r[e][0]||h[1]!==r[e][1]){f=!1;break}return{xmin:n,xmax:o,ymin:s,ymax:l,pts:r,contains:u?function(t,e){var r=t[0],a=t[1];return!(r===i||r<n||r>o||a===i||a<s||a>l||e&&c(t))}:function(t,e){var a=t[0],c=t[1];if(a===i||a<n||a>o||c===i||c<s||c>l)return!1;var u,f,h,d,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;u<m;u++)if(f=g,h=v,g=r[u][0],v=r[u][1],d=Math.min(f,g),!(a<d||a>Math.max(f,g)||c>Math.max(h,v)))if(c<Math.min(h,v))a!==d&&y++;else{if(p=g===f?c:h+(a-f)*(v-h)/(g-f),c===p)return 1!==u||!e;c<=p&&a!==d&&y++}return y%2==1},isRect:u,degenerate:f}},a.multitester=function(t){for(var e=[],r=t[0][0][0],n=r,i=t[0][0][1],o=i,s=0;s<t.length;s++){var l=a.tester(t[s]);l.subtract=t[s].subtract,e.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),i=Math.min(i,l.ymin),o=Math.max(o,l.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:o,pts:[],contains:function(t,r){for(var n=!1,i=0;i<e.length;i++)e[i].contains(t,r)&&(n=!1===e[i].subtract);return n},isRect:!1,degenerate:!1}};var o=a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),f=Math.sqrt(u),h=[-c[1]/f,c[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,h))>i)return!0;return!1};a.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(a+1);for(var c=l+1;c<t.length;c++)(c===t.length-1||o(t,l,c+1,e))&&(n.push(t[c]),n.length<s-2&&(i=c,a=n.length-1),l=c)}var n=[t[0]],i=0,a=0;if(t.length>1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{\"../constants/numerical\":721,\"./matrix\":749}],756:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;r<t.length;r++)if(t[r]instanceof RegExp&&t[r].toString()===n)return t;t.push(e)}else e&&-1===t.indexOf(e)&&t.push(e);return t}},{}],757:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_config\"),a={};a.add=function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},a.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},a.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},a.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else 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<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},a.redo=function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.redo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},a.plotDo=function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:\"object\"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)},e.exports=a},{\"../lib\":743,\"../plot_api/plot_config\":777}],758:[function(t,e,r){\"use strict\";r.counter=function(t,e,r){return new RegExp(\"^\"+t+\"([2-9]|[1-9][0-9]+)?\"+(e||\"\")+(r?\"\":\"$\"))}},{}],759:[function(t,e,r){\"use strict\";var n=/^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/,i=/^[^\\.\\[\\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(\"bad relativeAttr call:\"+[t,e]);t=\"\"}if(\"^\"!==e.charAt(0))break;e=e.slice(1)}return t&&\"[\"!==e.charAt(0)?t+\".\"+e:t+e}},{}],760:[function(t,e,r){\"use strict\";var n=t(\"./is_array\"),i=t(\"./is_plain_object\");e.exports=function t(e,r){for(var a=Object.keys(r||{}),o=0;o<a.length;o++){var s=a[o],l=r[s],c=e[s];if(\"_\"===s.charAt(0)||\"function\"==typeof l){if(s in e)continue;e[s]=l}else if(n(l)&&n(c)&&i(l[0]))for(var u=0;u<l.length;u++)i(l[u])&&i(c[u])&&t(c[u],l[u]);else i(l)&&i(c)&&(t(c,l),Object.keys(c).length||delete e[s])}}},{\"./is_array\":744,\"./is_plain_object\":745}],761:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./loggers\");r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,s=0,l=e.length,c=0,u=l>1?(e[l-1]-e[0])/(l-1):1;for(o=u>=0?r?function(t,e){return t<e}:function(t,e){return t<=e}:r?function(t,e){return t>=e}:function(t,e){return t>e},t+=1e-9*u*(r?-1:1)*(u>=0?1:-1);s<l&&c++<100;)o(e[a=Math.floor((s+l)/2)],t)?s=a+1:l=a;return c>90&&i.log(\"Long binary search...\"),s-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;s<n;s++)e[s+1]>e[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,c=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=c((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]}},{\"./loggers\":748,\"fast-isnumeric\":140}],762:[function(t,e,r){\"use strict\";e.exports=function(t,e){(t.attr(\"class\")||\"\").split(\" \").forEach(function(e){0===e.indexOf(\"cursor-\")&&t.classed(e,!1)}),e&&t.classed(\"cursor-\"+e,!0)}},{}],763:[function(t,e,r){\"use strict\";var n=t(\"../components/color\"),i=function(){};e.exports=function(t){for(var e in t)\"function\"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(\"div\");return r.textContent=\"Webgl is not supported by your browser - visit http://get.webgl.org for more info\",r.style.cursor=\"pointer\",r.style.fontSize=\"24px\",r.style.color=n.defaults[0],t.container.appendChild(r),t.container.style.background=\"#FFFFFF\",t.container.onclick=function(){window.open(\"http://get.webgl.org\")},!1}},{\"../components/color\":618}],764:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");r.aggNums=function(t,e,i,a){var o,s;if(a||(a=i.length),n(e)||(e=!1),Array.isArray(i[0])){for(s=new Array(a),o=0;o<a;o++)s[o]=r.aggNums(t,e,i[o]);i=s}for(o=0;o<a;o++)n(e)?n(i[o])&&(e=t(+e,+i[o])):e=i[o];return e},r.len=function(t){return r.aggNums(function(t){return t+1},0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums(function(t,e){return t+e},0,t)/e},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums(function(t,e){return t+Math.pow(e-i,2)},0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.interp=function(t,e){if(!n(e))throw\"n should be a finite number\";if((e=e*t.length-.5)<0)return t[0];if(e>t.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\":140}],765:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\"color-normalize\":99}],766:[function(t,e,r){\"use strict\";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t,e,r){var n=\"math-output-\"+c.randstr([],64),i=l.select(\"body\").append(\"div\").attr({id:n}).style({visibility:\"hidden\",position:\"absolute\"}).style({\"font-size\":e.fontSize+\"px\"}).text(function(t){return t.replace(p,\"\\\\lt \").replace(m,\"\\\\gt \")}(t));MathJax.Hub.Queue([\"Typeset\",MathJax.Hub,i.node()],function(){var e=l.select(\"body\").select(\"#MathJax_SVG_glyphs\");if(i.select(\".MathJax_SVG\").empty()||!i.select(\"svg\").node())c.log(\"There was an error in the tex syntax.\",t),r();else{var n=i.select(\"svg\").node().getBoundingClientRect();r(i.select(\".MathJax_SVG\"),e,n)}i.remove()})}function a(t,e){if(!t)return null;var r=t.match(e);return r&&(r[3]||r[4])}function o(t,e){function r(){p++;var e=document.createElementNS(u.svg,\"tspan\");l.select(e).attr({class:\"line\",dy:p*h+\"em\"}),t.appendChild(e),s=e;var r=d;if(d=[{node:e}],r.length>1)for(var i=1;i<r.length;i++)n(r[i])}function n(t){var e,r=t.type,n={};if(\"a\"===r){e=\"a\";var a=t.target,o=t.href,c=t.popup;o&&(n={\"xlink:xlink:show\":\"_blank\"===a||\"_\"!==a.charAt(0)?\"new\":\"replace\",target:a,\"xlink:xlink:href\":o},c&&(n.onclick='window.open(this.href.baseVal,this.target.baseVal,\"'+c+'\");return false;'))}else e=\"tspan\";t.style&&(n.style=t.style);var f=document.createElementNS(u.svg,e);if(\"sup\"===r||\"sub\"===r){i(s,x),s.appendChild(f);var h=document.createElementNS(u.svg,\"tspan\");i(h,x),l.select(h).attr(\"dy\",y[r]),n.dy=v[r],s.appendChild(f),s.appendChild(h)}else s.appendChild(f);l.select(f).attr(n),s=t.node=f,d.push(t)}function i(t,e){t.appendChild(document.createTextNode(e))}function o(t){if(1!==d.length){var r=d.pop();t!==r.type&&c.log(\"Start tag <\"+r.type+\"> doesnt match end tag <\"+t+\">. Pretending it did match.\",e),s=d[d.length-1].node}else c.log(\"Ignoring unexpected end tag </\"+t+\">.\",e)}e=function(t){return function(t,e){if(!t)return\"\";for(var r=0;r<e.length;r++){var n=e[r];t=t.replace(n.regExp,n.sub)}return t}(t,w)}(e).replace(M,\" \");var s,f=!1,d=[],p=-1;T.test(e)?r():(s=t,d=[{node:t}]);for(var m=e.split(k),_=0;_<m.length;_++){var D=m[_],I=D.match(A),P=I&&I[2].toLowerCase(),O=g[P];if(\"br\"===P)r();else if(void 0===O)i(s,D);else if(I[1])o(P);else{var F=I[4],R={type:P},N=a(F,S);if(N?(N=N.replace(z,\"$1 fill:\"),O&&(N+=\";\"+O)):O&&(N=O),N&&(R.style=N),\"a\"===P){f=!0;var j=a(F,E);if(j){var B=document.createElement(\"a\");B.href=j,-1!==b.indexOf(B.protocol)&&(R.href=encodeURI(j),R.target=a(F,L)||\"_blank\",R.popup=a(F,C))}}n(R)}}return f}function s(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||\"top\",l=t.node().getBoundingClientRect(),c=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()-c.top+\"px\",left:a()-c.left+\"px\",\"z-index\":1e3}),this}}var l=t(\"d3\"),c=t(\"../lib\"),u=t(\"../constants/xmlns_namespaces\"),f=t(\"../constants/string_mappings\"),h=t(\"../constants/alignment\").LINE_SPACING,d=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,a){function s(){f.empty()||(h=t.attr(\"class\")+\"-math\",f.select(\"svg.\"+h).remove()),t.text(\"\").style(\"white-space\",\"pre\");o(t.node(),c)&&t.style(\"pointer-events\",\"all\"),r.positionText(t),a&&a.call(t)}var c=t.text(),u=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&c.match(d),f=l.select(t.node().parentNode);if(!f.empty()){var h=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return h+=\"-math\",f.selectAll(\"svg.\"+h).remove(),f.selectAll(\"g.\"+h+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":c,\"data-math\":\"N\"}),u?(e&&e._promises||[]).push(new Promise(function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10);i(u[2],{fontSize:r},function(i,o,l){f.selectAll(\"svg.\"+h).remove(),f.selectAll(\"g.\"+h+\"-group\").remove();var u=i&&i.select(\"svg\");if(!u||!u.node())return s(),void e();var d=f.append(\"g\").classed(h+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":c,\"data-math\":\"Y\"});d.node().appendChild(u.node()),o&&o.node()&&u.node().insertBefore(o.node().cloneNode(!0),u.node().firstChild),u.attr({class:h,height:l.height,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var p=t.node().style.fill||\"black\";u.select(\"g\").attr({fill:p,stroke:p});var m=n(u,\"width\"),g=n(u,\"height\"),v=+t.attr(\"x\")-m*{start:0,middle:.5,end:1}[t.attr(\"text-anchor\")||\"start\"],y=-(r||n(t,\"height\"))/4;\"y\"===h[0]?(d.attr({transform:\"rotate(\"+[-90,+t.attr(\"x\"),+t.attr(\"y\")]+\") translate(\"+[-m/2,y-g/2]+\")\"}),u.attr({x:+t.attr(\"x\"),y:+t.attr(\"y\")})):\"l\"===h[0]?u.attr({x:t.attr(\"x\"),y:y-g/2}):\"a\"===h[0]?u.attr({x:0,y:y}):u.attr({x:v,y:+t.attr(\"y\")+y-g/2}),a&&a.call(t,d),e(d)})})):s(),t}};var p=/(<|<|<)/g,m=/(>|>|>)/g,g={sup:\"font-size:70%\",sub:\"font-size:70%\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},v={sub:\"0.3em\",sup:\"-0.6em\"},y={sub:\"-0.21em\",sup:\"0.42em\"},x=\"\\u200b\",b=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],_=new RegExp(\"</?(\"+Object.keys(g).join(\"|\")+\")( [^>]*)?/?>\",\"g\"),w=Object.keys(f.entityToUnicode).map(function(t){return{regExp:new RegExp(\"&\"+t+\";\",\"g\"),sub:f.entityToUnicode[t]}}),M=/(\\r\\n?|\\n)/g,k=/(<[^<>]*>)/,A=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,T=/<br(\\s+.*)?>/i,S=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,E=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,L=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,C=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i,z=/(^|;)\\s*color:/;r.plainText=function(t){return(t||\"\").replace(_,\" \")},r.lineCount=function(t){return t.selectAll(\"tspan.line\").size()||1},r.positionText=function(t,e,r){return t.each(function(){function t(t,e){return void 0===e?null===(e=n.attr(t))&&(n.attr(t,0),e=0):n.attr(t,e),e}var n=l.select(this),i=t(\"x\",e),a=t(\"y\",r);\"text\"===this.nodeName&&n.selectAll(\"tspan.line\").attr({x:i,y:a})})},r.makeEditable=function(t,e){function r(){!function(){var r=l.select(i).select(\".svg-container\"),a=r.append(\"div\"),c=t.node().style,u=parseFloat(c.fontSize||12);a.classed(\"plugin-editable editable\",!0).style({position:\"absolute\",\"font-family\":c.fontFamily||\"Arial\",\"font-size\":u,color:e.fill||c.fill||\"black\",opacity:1,\"background-color\":e.background||\"transparent\",outline:\"#ffffff33 1px solid\",margin:[-u/8+1,0,0,-1].join(\"px \")+\"px\",padding:\"0\",\"box-sizing\":\"border-box\"}).attr({contenteditable:!0}).text(e.text||t.attr(\"data-unformatted\")).call(s(t,r,e)).on(\"blur\",function(){i._editing=!1,t.text(this.textContent).style({opacity:1});var e,r=l.select(this).attr(\"class\");(e=r?\".\"+r.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&l.select(t.node().parentNode).select(e).style({opacity:0});var n=this.textContent;l.select(this).transition().duration(0).remove(),l.select(document).on(\"mouseup\",null),o.edit.call(t,n)}).on(\"focus\",function(){var t=this;i._editing=!0,l.select(document).on(\"mouseup\",function(){if(l.event.target===t)return!1;document.activeElement===a.node()&&a.node().blur()})}).on(\"keyup\",function(){27===l.event.which?(i._editing=!1,t.style({opacity:1}),l.select(this).style({opacity:0}).on(\"blur\",function(){return!1}).transition().remove(),o.cancel.call(t,this.textContent)):(o.input.call(t,this.textContent),l.select(this).call(s(t,r,e)))}).on(\"keydown\",function(){13===l.event.which&&this.blur()}).call(n)}(),t.style({opacity:0});var r,a=c.attr(\"class\");(r=a?\".\"+a.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&l.select(t.node().parentNode).select(r).style({opacity:0})}function n(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}var i=e.gd,a=e.delegate,o=l.dispatch(\"edit\",\"input\",\"cancel\"),c=a||t;if(t.style({\"pointer-events\":a?\"none\":\"all\"}),1!==t.size())throw new Error(\"boo\");return e.immediate?r():c.on(\"click\",r),l.rebind(t,o,\"on\")}},{\"../constants/alignment\":716,\"../constants/string_mappings\":722,\"../constants/xmlns_namespaces\":723,\"../lib\":743,d3:128}],767:[function(t,e,r){\"use strict\";function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}var i={};r.throttle=function(t,e,r){function a(){r(),o.ts=Date.now(),o.onDone&&(o.onDone(),o.onDone=null)}var o=i[t],s=Date.now();if(!o){for(var l in i)i[l].ts<s-6e4&&delete i[l];o=i[t]={ts:0,timer:null}}n(o),s>o.ts+e?a():o.timer=setTimeout(function(){a(),o.timer=null},e)},r.done=function(t){var e=i[t];return e&&e.timer?new Promise(function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}}):Promise.resolve()},r.clear=function(t){if(t)n(i[t]),delete i[t];else for(var e in i)r.clear(e)}},{}],768:[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\":140}],769:[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\":818,\"topojson-client\":549}],770:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}},{}],771:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],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\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"]}}},{}],772:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\"[\")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||\"\"}:{array:e,index:\"\",property:\"\"}}},{\"../registry\":873}],773:[function(t,e,r){\"use strict\";function n(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function i(t,e,r){var n=s({},t);for(var i in n){var o=n[i];l(o)&&(n[i]=a(o,e,r,i))}return\"from-root\"===r&&(n.editType=e),n}function a(t,e,r,n){if(t.valType){var o=s({},t);if(o.editType=e,Array.isArray(t.items)){o.items=new Array(t.items.length);for(var l=0;l<t.items.length;l++)o.items[l]=a(t.items[l],e,\"from-root\")}return o}return i(t,e,\"_\"===n.charAt(0)?\"nested\":\"from-root\")}var o=t(\"../lib\"),s=o.extendFlat,l=o.isPlainObject,c={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"calcIfAutorange\",\"clearAxisTypes\",\"plot\",\"style\",\"colorbars\"]},u={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"calcIfAutorange\",\"plot\",\"legend\",\"ticks\",\"layoutstyle\",\"modebar\",\"camera\",\"arraydraw\"]},f=c.flags.slice().concat([\"clearCalc\",\"fullReplot\"]),h=u.flags.slice().concat(\"layoutReplot\");e.exports={traces:c,layout:u,traceFlags:function(){return n(f)},layoutFlags:function(){return n(h)},update:function(t,e){var r=e.editType;if(r&&\"none\"!==r)for(var n=r.split(\"+\"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:i}},{\"../lib\":743}],774:[function(t,e,r){\"use strict\";function n(t,e){var r=t[e],n=e.charAt(0);r&&\"paper\"!==r&&(t[e]=d(r,n))}function i(t){var e=\"middle\",r=\"center\";return-1!==t.indexOf(\"top\")?e=\"top\":-1!==t.indexOf(\"bottom\")&&(e=\"bottom\"),-1!==t.indexOf(\"left\")?r=\"left\":-1!==t.indexOf(\"right\")&&(r=\"right\"),e+\" \"+r}function a(t,e){return e in t&&\"object\"==typeof t[e]&&0===Object.keys(t[e]).length}function o(t){var e=t.search(g);if(e>0)return t.substr(0,e)}var s=t(\"fast-isnumeric\"),l=t(\"gl-mat4/fromQuat\"),c=t(\"../registry\"),u=t(\"../lib\"),f=t(\"../plots/plots\"),h=t(\"../plots/cartesian/axis_ids\"),d=h.cleanId,p=h.getFromTrace,m=t(\"../components/color\");r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&u.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),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var i=(f.subplotsRegistry.cartesian||{}).attrRegex,o=(f.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(t);for(e=0;e<s.length;e++){var c=s[e];if(i&&i.test(c)){var h=t[c];h.anchor&&\"free\"!==h.anchor&&(h.anchor=d(h.anchor)),h.overlaying&&(h.overlaying=d(h.overlaying)),h.type||(h.isdate?h.type=\"date\":h.islog?h.type=\"log\":!1===h.isdate&&!1===h.islog&&(h.type=\"linear\")),\"withzero\"!==h.autorange&&\"tozero\"!==h.autorange||(h.autorange=!0,h.rangemode=\"tozero\"),delete h.islog,delete h.isdate,delete h.categories,a(h,\"domain\")&&delete h.domain,void 0!==h.autotick&&(void 0===h.tickmode&&(h.tickmode=h.autotick?\"auto\":\"linear\"),delete h.autotick)}else if(o&&o.test(c)){var p=t[c],g=p.cameraposition;if(Array.isArray(g)&&4===g[0].length){var v=g[0],y=g[1],x=g[2],b=l([],v),_=[];for(r=0;r<3;++r)_[r]=y[r]+x*b[2+4*r];p.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:y[0],y:y[1],z:y[2]},up:{x:b[1],y:b[5],z:b[9]}},delete p.cameraposition}}}var w=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e<w;e++){var M=t.annotations[e];u.isPlainObject(M)&&(M.ref&&(\"paper\"===M.ref?(M.xref=\"paper\",M.yref=\"paper\"):\"data\"===M.ref&&(M.xref=\"x\",M.yref=\"y\"),delete M.ref),n(M,\"xref\"),n(M,\"yref\"))}var k=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e<k;e++){var A=t.shapes[e];u.isPlainObject(A)&&(n(A,\"xref\"),n(A,\"yref\"))}var T=t.legend;return T&&(T.x>3?(T.x=1.02,T.xanchor=\"left\"):T.x<-2&&(T.x=-.02,T.xanchor=\"right\"),T.y>3?(T.y=1.02,T.yanchor=\"bottom\"):T.y<-2&&(T.y=-.02,T.yanchor=\"top\")),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),m.clean(t),t},r.cleanData=function(t,e){for(var n=[],o=t.concat(Array.isArray(e)?e:[]).filter(function(t){return\"uid\"in t}).map(function(t){return t.uid}),s=0;s<t.length;s++){var l,h=t[s];if(!(\"uid\"in h)||-1!==n.indexOf(h.uid)){var p;for(l=0;l<100&&(p=u.randstr(o),-1!==n.indexOf(p));l++);h.uid=u.randstr(o),o.push(h.uid)}if(n.push(h.uid),\"histogramy\"===h.type&&\"xbins\"in h&&!(\"ybins\"in h)&&(h.ybins=h.xbins,delete h.xbins),h.error_y&&\"opacity\"in h.error_y){var g=m.defaults,v=h.error_y.color||(c.traceIs(h,\"bar\")?m.defaultLine:g[s%g.length]);h.error_y.color=m.addOpacity(m.rgb(v),m.opacity(v)*h.error_y.opacity),delete h.error_y.opacity}if(\"bardir\"in h&&(\"h\"!==h.bardir||!c.traceIs(h,\"bar\")&&\"histogram\"!==h.type.substr(0,9)||(h.orientation=\"h\",r.swapXYData(h)),delete h.bardir),\"histogramy\"===h.type&&r.swapXYData(h),\"histogramx\"!==h.type&&\"histogramy\"!==h.type||(h.type=\"histogram\"),\"scl\"in h&&(h.colorscale=h.scl,delete h.scl),\"reversescl\"in h&&(h.reversescale=h.reversescl,delete h.reversescl),h.xaxis&&(h.xaxis=d(h.xaxis,\"x\")),h.yaxis&&(h.yaxis=d(h.yaxis,\"y\")),c.traceIs(h,\"gl3d\")&&h.scene&&(h.scene=f.subplotsRegistry.gl3d.cleanId(h.scene)),c.traceIs(h,\"pie\")||c.traceIs(h,\"bar\")||(Array.isArray(h.textposition)?h.textposition=h.textposition.map(i):h.textposition&&(h.textposition=i(h.textposition))),c.traceIs(h,\"2dMap\")&&(\"YIGnBu\"===h.colorscale&&(h.colorscale=\"YlGnBu\"),\"YIOrRd\"===h.colorscale&&(h.colorscale=\"YlOrRd\")),c.traceIs(h,\"markerColorscale\")&&h.marker){var y=h.marker;\"YIGnBu\"===y.colorscale&&(y.colorscale=\"YlGnBu\"),\"YIOrRd\"===y.colorscale&&(y.colorscale=\"YlOrRd\")}if(\"surface\"===h.type&&u.isPlainObject(h.contours)){var x=[\"x\",\"y\",\"z\"];for(l=0;l<x.length;l++){var b=h.contours[x[l]];u.isPlainObject(b)&&(b.highlightColor&&(b.highlightcolor=b.highlightColor,delete b.highlightColor),b.highlightWidth&&(b.highlightwidth=b.highlightWidth,delete b.highlightWidth))}}if(Array.isArray(h.transforms)){var _=h.transforms;for(l=0;l<_.length;l++){var w=_[l];if(u.isPlainObject(w))switch(w.type){case\"filter\":w.filtersrc&&(w.target=w.filtersrc,delete w.filtersrc),w.calendar&&(w.valuecalendar||(w.valuecalendar=w.calendar),delete w.calendar);break;case\"groupby\":if(w.styles=w.styles||w.style,w.styles&&!Array.isArray(w.styles)){var M=w.styles,k=Object.keys(M);w.styles=[];for(var A=0;A<k.length;A++)w.styles.push({target:k[A],value:M[k[A]]})}}}}a(h,\"line\")&&delete h.line,\"marker\"in h&&(a(h.marker,\"line\")&&delete h.marker.line,a(h,\"marker\")&&delete h.marker),m.clean(h)}},r.swapXYData=function(t){var e;if(u.swapAttrs(t,[\"?\",\"?0\",\"d?\",\"?bins\",\"nbins?\",\"autobin?\",\"?src\",\"error_?\"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n=\"copy_ystyle\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);u.swapAttrs(t,[\"error_?.copy_ystyle\"]),n&&u.swapAttrs(t,[\"error_?.color\",\"error_?.thickness\",\"error_?.width\"])}if(\"string\"==typeof t.hoverinfo){var i=t.hoverinfo.split(\"+\");for(e=0;e<i.length;e++)\"x\"===i[e]?i[e]=\"y\":\"y\"===i[e]&&(i[e]=\"x\");t.hoverinfo=i.join(\"+\")}},r.coerceTraceIndices=function(t,e){return s(e)?[e]:Array.isArray(e)&&e.length?e:t.data.map(function(t,e){return e})},r.manageArrayContainers=function(t,e,r){var n=t.obj,i=t.parts,a=i.length,o=i[a-1],l=s(o);if(l&&null===e){var c=i.slice(0,a-1).join(\".\");u.nestedProperty(n,c).get().splice(o,1)}else l&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var g=/(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;r.hasParent=function(t,e){for(var r=o(e);r;){if(r in t)return!0;r=o(r)}return!1};var v=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var o=p(t,i,v[a]);if(o&&\"log\"!==o.type){var s=o._name,l=o._id.substr(1);if(\"scene\"===l.substr(0,5)){if(void 0!==r[l])continue;s=l+\".\"+s}var c=s+\".type\";void 0===r[s]&&void 0===r[c]&&u.nestedProperty(t.layout,c).set(null)}}}},{\"../components/color\":618,\"../lib\":743,\"../plots/cartesian/axis_ids\":792,\"../plots/plots\":852,\"../registry\":873,\"fast-isnumeric\":140,\"gl-mat4/fromQuat\":183}],775:[function(t,e,r){\"use strict\";var n=t(\"../lib/nested_property\"),i=t(\"../lib/is_plain_object\"),a=t(\"../lib/noop\"),o=t(\"../lib/loggers\"),s=t(\"../lib/search\").sorterAsc,l=t(\"../registry\");r.containerArrayMatch=t(\"./container_array_match\");var c=r.isAddVal=function(t){return\"add\"===t||i(t)},u=r.isRemoveVal=function(t){return null===t||\"remove\"===t};r.applyContainerArrayChanges=function(t,e,r,i){var f=e.astr,h=l.getComponentMethod(f,\"supplyLayoutDefaults\"),d=l.getComponentMethod(f,\"draw\"),p=l.getComponentMethod(f,\"drawOne\"),m=i.replot||i.recalc||h===a||d===a,g=t.layout,v=t._fullLayout;if(r[\"\"]){Object.keys(r).length>1&&o.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(u(y))e.set(null);else{if(!Array.isArray(y))return o.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!m&&(h(g,v),d(t),!0)}var x,b,_,w,M,k,A,T=Object.keys(r).map(Number).sort(s),S=e.get(),E=S||[],L=n(v,f).get(),C=[],z=-1,D=E.length;for(x=0;x<T.length;x++)if(_=T[x],w=r[_],M=Object.keys(w),k=w[\"\"],A=c(k),_<0||_>E.length-(A?0:1))o.warn(\"index out of range\",f,_);else if(void 0!==k)M.length>1&&o.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),u(k)?C.push(_):A?(\"add\"===k&&(k={}),E.splice(_,0,k),L&&L.splice(_,0,{})):o.warn(\"Unrecognized full object edit value\",f,_,k),-1===z&&(z=_);else for(b=0;b<M.length;b++)n(E[_],M[b]).set(w[M[b]]);for(x=C.length-1;x>=0;x--)E.splice(C[x],1),L&&L.splice(C[x],1);if(E.length?S||e.set(E):e.set(null),m)return!1;if(h(g,v),p!==a){var I;if(-1===z)I=T;else{for(D=Math.max(E.length,D),I=[],x=0;x<T.length&&!((_=T[x])>=z);x++)I.push(_);for(x=z;x<D;x++)I.push(x)}for(x=0;x<I.length;x++)p(t,I[x])}else d(t);return!0}},{\"../lib/is_plain_object\":745,\"../lib/loggers\":748,\"../lib/nested_property\":751,\"../lib/noop\":752,\"../lib/search\":761,\"../registry\":873,\"./container_array_match\":772}],776:[function(t,e,r){\"use strict\";function n(t,e){try{t._fullLayout._paper.style(\"background\",e)}catch(t){v.error(t)}}function i(t,e){n(t,T.combine(e,\"white\"))}function a(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function o(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(\"all values in \"+r+\" must be integers\");if(i>=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 s(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]),o(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&o(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function l(t,e,r,n,i,s){!function(t,e,r,n){var i=v.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array\");if(!v.isPlainObject(e))throw new Error(\"update must be a key:value object\");if(void 0===r)throw new Error(\"indices must be an integer or array of integers\");o(t,r,\"indices\");for(var a in e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l,c,u,f=function(t,e,r,n){var i,o,s,l,c,u=v.isPlainObject(n),f=[];Array.isArray(r)||(r=[r]),r=a(r,t.data.length-1);for(var h in e)for(var d=0;d<r.length;d++){if(i=t.data[r[d]],s=v.nestedProperty(i,h),o=s.get(),l=e[h][d],!Array.isArray(l))throw new Error(\"attribute: \"+h+\" index: \"+d+\" must be an array\");if(!Array.isArray(o))throw new Error(\"cannot extend missing or non-array attribute: \"+h);c=u?n[h][d]:n,p(c)||(c=-1),f.push({prop:s,target:o,insert:l,maxp:Math.floor(c)})}return f}(t,e,r,n),h=[],d={},m={},g=0;g<f.length;g++)c=f[g].prop,u=f[g].maxp,l=i(f[g].target,f[g].insert),u>=0&&u<l.length&&(h=s(l,u)),u=f[g].target.length,c.set(l),Array.isArray(d[c.astr])||(d[c.astr]=[]),Array.isArray(m[c.astr])||(m[c.astr]=[]),d[c.astr].push(h),m[c.astr].push(u);return{update:d,maxPoints:m}}function c(t){return void 0===t?null:t}function u(t,e,r){function n(){return r.map(function(){})}function i(t){var e=g.Axes.id2name(t);-1===u.indexOf(e)&&u.push(e)}function a(t){return\"LAYOUT\"+t+\".autorange\"}function o(t){return\"LAYOUT\"+t+\".range\"}function s(i,a,o){if(Array.isArray(i))i.forEach(function(t){s(t,a,o)});else if(!(i in e||z.hasParent(e,i))){var l;l=\"LAYOUT\"===i.substr(0,6)?v.nestedProperty(t.layout,i.replace(\"LAYOUT\",\"\")):v.nestedProperty(d[r[o]],i),i in y||(y[i]=n()),void 0===y[i][o]&&(y[i][o]=c(l.get())),void 0!==a&&l.set(a)}}var l,u,f=t._fullLayout,h=t._fullData,d=t.data,p=I.traceFlags(),m={},y={},x={};for(var M in e){if(z.hasParent(e,M))throw new Error(\"cannot set \"+M+\"and a parent attribute simultaneously\");var k,A,T,S,E,L,C=e[M];if(m[M]=C,\"LAYOUT\"!==M.substr(0,6)){for(y[M]=n(),l=0;l<r.length;l++)if(k=d[r[l]],A=h[r[l]],T=v.nestedProperty(k,M),S=T.get(),void 0!==(E=Array.isArray(C)?C[l%C.length]:C)){if((L=_.getTraceValObject(A,T.parts))&&L.impliedEdits&&null!==E)for(var D in L.impliedEdits)s(v.relativeAttr(M,D),L.impliedEdits[D],l);else if(\"colorbar.thicknessmode\"===M&&T.get()!==E&&-1!==[\"fraction\",\"pixels\"].indexOf(E)&&A.colorbar){var P=-1!==[\"top\",\"bottom\"].indexOf(A.colorbar.orient)?f.height-f.margin.t-f.margin.b:f.width-f.margin.l-f.margin.r;s(\"colorbar.thickness\",A.colorbar.thickness*(\"fraction\"===E?1/P:P),l)}else if(\"colorbar.lenmode\"===M&&T.get()!==E&&-1!==[\"fraction\",\"pixels\"].indexOf(E)&&A.colorbar){var O=-1!==[\"top\",\"bottom\"].indexOf(A.colorbar.orient)?f.width-f.margin.l-f.margin.r:f.height-f.margin.t-f.margin.b;s(\"colorbar.len\",A.colorbar.len*(\"fraction\"===E?1/O:O),l)}else\"colorbar.tick0\"!==M&&\"colorbar.dtick\"!==M||s(\"colorbar.tickmode\",\"linear\",l);if(\"type\"===M&&\"pie\"===E!=(\"pie\"===S)){var F=\"x\",R=\"y\";\"bar\"!==E&&\"bar\"!==S||\"h\"!==k.orientation||(F=\"y\",R=\"x\"),v.swapAttrs(k,[\"?\",\"?src\"],\"labels\",F),v.swapAttrs(k,[\"d?\",\"?0\"],\"label\",F),v.swapAttrs(k,[\"?\",\"?src\"],\"values\",R),\"pie\"===S?(v.nestedProperty(k,\"marker.color\").set(v.nestedProperty(k,\"marker.colors\").get()),f._pielayer.selectAll(\"g.trace\").remove()):b.traceIs(k,\"cartesian\")&&(v.nestedProperty(k,\"marker.colors\").set(v.nestedProperty(k,\"marker.color\").get()),x[k.xaxis||\"x\"]=!0,x[k.yaxis||\"y\"]=!0)}y[M][l]=c(S);if(-1!==[\"swapxy\",\"swapxyaxes\",\"orientation\",\"orientationaxes\"].indexOf(M)){if(\"orientation\"===M){T.set(E);var N=k.x&&!k.y?\"h\":\"v\";if((T.get()||N)===A.orientation)continue}else\"orientationaxes\"===M&&(k.orientation={v:\"h\",h:\"v\"}[A.orientation]);z.swapXYData(k),p.calc=p.clearAxisTypes=!0}else-1!==w.dataArrayContainers.indexOf(T.parts[0])?(z.manageArrayContainers(T,E,y),p.calc=!0):(L?L.arrayOk&&(Array.isArray(E)||Array.isArray(S))?p.calc=!0:I.update(p,L):p.calc=!0,T.set(E))}if(-1!==[\"swapxyaxes\",\"orientationaxes\"].indexOf(M)&&g.Axes.swap(t,r),\"orientationaxes\"===M){var j=v.nestedProperty(t.layout,\"hovermode\");\"x\"===j.get()?j.set(\"y\"):\"y\"===j.get()&&j.set(\"x\")}if(-1!==[\"orientation\",\"type\"].indexOf(M)){for(u=[],l=0;l<r.length;l++){var B=d[r[l]];b.traceIs(B,\"cartesian\")&&(i(B.xaxis||\"x\"),i(B.yaxis||\"y\"),\"type\"===M&&s([\"autobinx\",\"autobiny\"],!0,l))}s(u.map(a),!0,0),s(u.map(o),[0,1],0)}}else T=v.nestedProperty(t.layout,M.replace(\"LAYOUT\",\"\")),y[M]=[c(T.get())],T.set(Array.isArray(C)?C[0]:C),p.calc=!0}var U=!1,V=g.Axes.list(t);for(l=0;l<V.length;l++)if(V[l].autorange){U=!0;break}var q=Object.keys(x);t:for(l=0;l<q.length;l++){for(var H=q[l],G=H.charAt(0),Y=G+\"axis\",W=0;W<d.length;W++)if(b.traceIs(d[W],\"cartesian\")&&(d[W][Y]||G)===H)continue t;s(\"LAYOUT\"+g.Axes.id2name(H),null,0)}return(p.calc||p.calcIfAutorange&&U)&&(p.clearCalc=!0),(p.calc||p.plot||p.calcIfAutorange)&&(p.fullReplot=!0),{flags:p,undoit:y,redoit:m,traces:r,eventData:v.extendDeepNoArrays([],[m,r])}}function f(t,e){function r(t,n){if(Array.isArray(t))t.forEach(function(t){r(t,n)});else if(!(t in e||z.hasParent(e,t))){var i=v.nestedProperty(l,t);t in A||(A[t]=c(i.get())),void 0!==n&&i.set(n)}}function n(e,r){if(!v.isPlainObject(e))return!1;var n=e[r+\"ref\"]||r,i=g.Axes.getFromId(t,n);return i||n.charAt(0)!==r||(i=g.Axes.getFromId(t,r)),(i||{}).autorange}function i(t){var e=N.name2id(t.split(\".\")[0]);return T[e]=1,e}var a,o,s,l=t.layout,u=t._fullLayout,f=Object.keys(e),h=g.Axes.list(t),d={};for(o=0;o<f.length;o++)if(0===f[o].indexOf(\"allaxes\")){for(s=0;s<h.length;s++){var p=h[s]._id.substr(1),m=-1!==p.indexOf(\"scene\")?p+\".\":\"\",y=f[o].replace(\"allaxes\",m+h[s]._name);e[y]||(e[y]=e[f[o]])}delete e[f[o]]}var x,M=I.layoutFlags(),k={},A={},T={};for(var S in e){if(z.hasParent(e,S))throw new Error(\"cannot set \"+S+\"and a parent attribute simultaneously\");var E=v.nestedProperty(l,S),L=e[S],D=E.parts.length,O=\"string\"==typeof E.parts[D-1]?D-1:D-2,F=E.parts[O],R=E.parts[O-1]+\".\"+F,j=E.parts.slice(0,O).join(\".\"),B=v.nestedProperty(t.layout,j).get(),U=v.nestedProperty(u,j).get(),V=E.get();if(void 0!==L){k[S]=L,A[S]=\"reverse\"===F?L:c(V);var q=_.getLayoutValObject(u,E.parts);if(q&&q.impliedEdits&&null!==L)for(var H in q.impliedEdits)r(v.relativeAttr(S,H),q.impliedEdits[H]);if(-1!==[\"width\",\"height\"].indexOf(S)&&null===L)u[S]=t._initialAutoSize[S];else if(R.match(/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/))i(R),v.nestedProperty(u,j+\"._inputRange\").set(null);else if(R.match(/^[xyz]axis[0-9]*\\.autorange$/)){i(R),v.nestedProperty(u,j+\"._inputRange\").set(null);var G=v.nestedProperty(u,j).get();G._inputDomain&&(G._input.domain=G._inputDomain.slice())}else R.match(/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/)&&v.nestedProperty(u,j+\"._inputDomain\").set(null);if(\"type\"===F){var Y=B,W=\"linear\"===U.type&&\"log\"===L,X=\"log\"===U.type&&\"linear\"===L;if(W||X){if(Y&&Y.range)if(U.autorange)W&&(Y.range=Y.range[1]>Y.range[0]?[1,2]:[2,1]);else{var Z=Y.range[0],J=Y.range[1];W?(Z<=0&&J<=0&&r(j+\".autorange\",!0),Z<=0?Z=J/1e6:J<=0&&(J=Z/1e6),r(j+\".range[0]\",Math.log(Z)/Math.LN10),r(j+\".range[1]\",Math.log(J)/Math.LN10)):(r(j+\".range[0]\",Math.pow(10,Z)),r(j+\".range[1]\",Math.pow(10,J)))}else r(j+\".autorange\",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[E.parts[0]]&&\"radialaxis\"===E.parts[1]&&delete u[E.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],b.getComponentMethod(\"annotations\",\"convertCoords\")(t,U,L,r),b.getComponentMethod(\"images\",\"convertCoords\")(t,U,L,r)}else r(j+\".autorange\",!0),r(j+\".range\",null);v.nestedProperty(u,j+\"._inputRange\").set(null)}else if(F.match(P.AX_NAME_PATTERN)){var K=v.nestedProperty(u,S).get(),Q=(L||{}).type;Q&&\"-\"!==Q||(Q=\"linear\"),b.getComponentMethod(\"annotations\",\"convertCoords\")(t,K,Q,r),b.getComponentMethod(\"images\",\"convertCoords\")(t,K,Q,r)}var $=C.containerArrayMatch(S);if($){a=$.array,o=$.index;var tt=$.property,et=(v.nestedProperty(l,a)||[])[o]||{},rt=et,nt=q||{editType:\"calc\"},it=-1!==nt.editType.indexOf(\"calcIfAutorange\");\"\"===o?(it?M.calc=!0:I.update(M,nt),it=!1):\"\"===tt&&(rt=L,C.isAddVal(L)?A[S]=null:C.isRemoveVal(L)?(A[S]=et,rt=et):v.warn(\"unrecognized full object value\",e)),it&&(n(rt,\"x\")||n(rt,\"y\"))?M.calc=!0:I.update(M,nt),d[a]||(d[a]={});var at=d[a][o];at||(at=d[a][o]={}),at[tt]=L,delete e[S]}else\"reverse\"===F?(B.range?B.range.reverse():(r(j+\".autorange\",!0),B.range=[1,0]),U.autorange?M.calc=!0:M.plot=!0):((!u._has(\"gl2d\")&&!u._has(\"regl\")||\"dragmode\"!==S||\"lasso\"!==L&&\"select\"!==L||\"lasso\"===V||\"select\"===V)&&q?I.update(M,q):M.calc=!0,E.set(L))}}for(a in d){C.applyContainerArrayChanges(t,v.nestedProperty(l,a),d[a],M)||(M.plot=!0)}var ot=u._axisConstraintGroups||[];for(x in T)for(o=0;o<ot.length;o++){var st=ot[o];if(st[x]){M.calc=!0;for(var lt in st)T[lt]||(N.getFromId(t,lt)._constraintShrinkable=!0)}}var ct=u.width,ut=u.height;t.layout.autosize&&w.plotAutoSize(t,t.layout,u);return(e.height||e.width||u.width!==ct||u.height!==ut)&&(M.calc=!0),(M.plot||M.calc)&&(M.layoutReplot=!0),{flags:M,undoit:A,redoit:k,eventData:v.extendDeep({},k)}}function h(t){var e=d.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([{}]),r._glcontainer.enter().append(\"div\").classed(\"gl-container\",!0),r._glcanvas=null,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=[];d.selectAll(\"defs\").each(function(){this.id&&n.push(this.id.split(\"-\")[1])}),r._uid=v.randstr(n)}r._paperdiv.selectAll(\".main-svg\").attr(E.svgAttrs),r._defs=r._paper.append(\"defs\").attr(\"id\",\"defs-\"+r._uid),r._clips=r._defs.append(\"g\").classed(\"clips\",!0),r._topdefs=r._toppaper.append(\"defs\").attr(\"id\",\"topdefs-\"+r._uid),r._topclips=r._topdefs.append(\"g\").classed(\"clips\",!0),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._polarlayer=r._paper.append(\"g\").classed(\"polarlayer\",!0),r._ternarylayer=r._paper.append(\"g\").classed(\"ternarylayer\",!0),r._geolayer=r._paper.append(\"g\").classed(\"geolayer\",!0),r._pielayer=r._paper.append(\"g\").classed(\"pielayer\",!0),r._glimages=r._paper.append(\"g\").classed(\"glimages\",!0);var a=r._toppaper.append(\"g\").classed(\"layer-above\",!0);r._imageUpperLayer=a.append(\"g\").classed(\"imagelayer\",!0),r._shapeUpperLayer=a.append(\"g\").classed(\"shapelayer\",!0),r._infolayer=r._toppaper.append(\"g\").classed(\"infolayer\",!0),r._menulayer=r._toppaper.append(\"g\").classed(\"menulayer\",!0),r._zoomlayer=r._toppaper.append(\"g\").classed(\"zoomlayer\",!0),r._hoverlayer=r._toppaper.append(\"g\").classed(\"hoverlayer\",!0),t.emit(\"plotly_framework\")}var d=t(\"d3\"),p=t(\"fast-isnumeric\"),m=t(\"has-hover\"),g=t(\"../plotly\"),v=t(\"../lib\"),y=t(\"../lib/events\"),x=t(\"../lib/queue\"),b=t(\"../registry\"),_=t(\"./plot_schema\"),w=t(\"../plots/plots\"),M=t(\"../plots/polar/legacy\"),k=t(\"../plots/cartesian/graph_interact\"),A=t(\"../components/drawing\"),T=t(\"../components/color\"),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(\"./edit_types\"),P=t(\"../plots/cartesian/constants\"),O=t(\"../plots/cartesian/constraints\"),F=O.enforce,R=O.clean,N=t(\"../plots/cartesian/axis_ids\");g.plot=function(t,e,r,a){function o(){var e,r,n,i=t.calcdata;for(b.getComponentMethod(\"legend\",\"draw\")(t),b.getComponentMethod(\"rangeselector\",\"draw\")(t),b.getComponentMethod(\"sliders\",\"draw\")(t),b.getComponentMethod(\"updatemenus\",\"draw\")(t),e=0;e<i.length;e++)!0===(n=(r=i[e])[0].trace).visible&&n._module.colorbar?n._module.colorbar(t,r):w.autoMargin(t,\"cb\"+n.uid);return w.doAutoMargin(t),w.previousPromises(t)}function s(){if(!t._transitioning){for(var e=g.Axes.list(t,\"\",!0),r=0;r<e.length;r++){var n=e[r];R(t,n),g.Axes.doAutoRange(n)}F(t),u&&g.Axes.saveRangeInitial(t)}}var l;if(t=v.getGraphDiv(t),y.init(t),v.isPlainObject(e)){var c=e;e=c.data,r=c.layout,a=c.config,l=c.frames}if(!1===y.triggerHandler(t,\"plotly_beforeplot\",[e,r,a]))return Promise.reject();e||r||v.isPlotDiv(t)||v.warn(\"Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.\",t),function(t,e){t._context||(t._context=v.extendDeep({},g.defaultConfig));var r,a,o,s=t._context;if(e){for(a=Object.keys(e),r=0;r<a.length;r++)\"editable\"!==(o=a[r])&&\"edits\"!==o&&o in s&&(\"setBackground\"===o&&\"opaque\"===e[o]?s[o]=i:s[o]=e[o]);e.plot3dPixelRatio&&!s.plotGlPixelRatio&&(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=e.editable;if(void 0!==l)for(s.editable=l,a=Object.keys(s.edits),r=0;r<a.length;r++)s.edits[a[r]]=l;if(e.edits)for(a=Object.keys(e.edits),r=0;r<a.length;r++)(o=a[r])in s.edits&&(s.edits[o]=e.edits[o])}s.staticPlot&&(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),\"hover\"!==s.displayModeBar||m||(s.displayModeBar=!0),\"transparent\"!==s.setBackground&&\"function\"==typeof s.setBackground||(s.setBackground=n)}(t,a),r||(r={}),d.select(t).classed(\"js-plotly-plot\",!0),A.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var u=0===(t.data||[]).length&&Array.isArray(e);if(Array.isArray(e)&&(z.cleanData(e,t.data),u?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&&!u||(t.layout=z.cleanLayout(r)),t._dragging&&!t._transitioning)return t._replotPending=!0,Promise.reject();t._replotPending=!1,w.supplyDefaults(t);var f=t._fullLayout;if(!f._has(\"polar\")&&e&&e[0]&&e[0].r)return v.log(\"Legacy polar charts are deprecated!\"),function(t,e,r){var n=d.select(t).selectAll(\".plot-container\").data([0]);n.enter().insert(\"div\",\":first-child\").classed(\"plot-container plotly\",!0);var i=n.selectAll(\".svg-container\").data([0]);i.enter().append(\"div\").classed(\"svg-container\",!0).style(\"position\",\"relative\"),i.html(\"\"),e&&(t.data=e),r&&(t.layout=r),M.manager.fillLayout(t),i.style({width:t._fullLayout.width+\"px\",height:t._fullLayout.height+\"px\"}),t.framework=M.manager.framework(t),t.framework({data:t.data,layout:t.layout},i.node()),t.framework.setUndoPoint();var a=t.framework.svg(),o=1,s=t._fullLayout.title;\"\"!==s&&s||(o=0);var l=function(){this.call(L.convertToTspans,t)},c=a.select(\".title-group text\").call(l);if(t._context.edits.titleText){var u=v._(t,\"Click to enter Plot title\");s&&s!==u||(o=.2,c.attr({\"data-unformatted\":u}).text(u).style({opacity:o}).on(\"mouseover.opacity\",function(){d.select(this).transition().duration(100).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){d.select(this).transition().duration(1e3).style(\"opacity\",0)}));var f=function(){this.call(L.makeEditable,{gd:t}).on(\"edit\",function(e){t.framework({layout:{title:e}}),this.text(e).call(l),this.call(f)}).on(\"cancel\",function(){var t=this.attr(\"data-unformatted\");this.text(t).call(l)})};c.call(f)}return t._context.setBackground(t,t._fullLayout.paper_bgcolor),w.addLinks(t),Promise.resolve()}(t,e,r);f._replotting=!0,u&&h(t),t.framework!==h&&(t.framework=h,h(t)),A.initGradients(t),u&&g.Axes.saveShowSpikeInitial(t);var p=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;p&&w.doCalcdata(t);for(var x=0;x<t.calcdata.length;x++)t.calcdata[x][0].trace=t._fullData[x];var _=JSON.stringify(f._size),T=[w.previousPromises,function(){if(l)return g.addFrames(t,l)},function(){for(var e=f._basePlotModules,r=0;r<e.length;r++)e[r].drawFramework&&e[r].drawFramework(t);return!f._glcanvas&&f._has(\"gl\")&&(f._glcanvas=f._glcontainer.selectAll(\".gl-canvas\").data([{key:\"contextLayer\",context:!0,pick:!1},{key:\"focusLayer\",context:!1,pick:!1},{key:\"pickLayer\",context:!1,pick:!0}],function(t){return t.key}),f._glcanvas.enter().append(\"canvas\").attr(\"class\",function(t){return\"gl-canvas gl-canvas-\"+t.key.replace(\"Layer\",\"\")}).style({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"visible\",\"pointer-events\":\"none\"})),f._glcanvas&&f._glcanvas.attr(\"width\",f.width).attr(\"height\",f.height),v.syncOrAsync([D.layoutStyles],t)},o,function(){if(JSON.stringify(f._size)!==_)return v.syncOrAsync([o,D.layoutStyles],t)},function(){if(p){var e,r,n,i=f._subplots.cartesian,a=f._modules,o=[];for(n=0;n<a.length;n++)v.pushUnique(o,a[n].setPositions);if(o.length)for(r=0;r<i.length;r++)for(e=f._plots[i[r]],n=0;n<o.length;n++)o[n](t,e);return S.calc(t),v.syncOrAsync([b.getComponentMethod(\"shapes\",\"calcAutorange\"),b.getComponentMethod(\"annotations\",\"calcAutorange\"),s,b.getComponentMethod(\"rangeslider\",\"calcAutorange\")],t)}F(t)},D.layoutStyles,function(){return g.Axes.doTicks(t,\"redraw\")},function(){var e,r=t.calcdata,n=f._infolayer.selectAll(\"g.rangeslider-container\");for(e=0;e<r.length;e++){var i=r[e][0].trace,a=!0===i.visible,o=i.uid;if(!a||!b.traceIs(i,\"2dMap\")){var s=\".hm\"+o+\",.contour\"+o+\",#clip\"+o;f._paper.selectAll(s).remove(),n.selectAll(s).remove()}a&&i._module.colorbar||f._infolayer.selectAll(\".cb\"+o).remove()}var l=f._basePlotModules;for(e=0;e<l.length;e++)l[e].plot(t);var c=f._paper.selectAll(\".layer-subplot\");return f._shapeSubplotLayers=c.selectAll(\".shapelayer\"),w.style(t),b.getComponentMethod(\"shapes\",\"draw\")(t),b.getComponentMethod(\"annotations\",\"draw\")(t),w.addLinks(t),f._replotting=!1,w.previousPromises(t)},function(){b.getComponentMethod(\"shapes\",\"draw\")(t),b.getComponentMethod(\"images\",\"draw\")(t),b.getComponentMethod(\"annotations\",\"draw\")(t),b.getComponentMethod(\"legend\",\"draw\")(t),b.getComponentMethod(\"rangeslider\",\"draw\")(t),b.getComponentMethod(\"rangeselector\",\"draw\")(t),b.getComponentMethod(\"sliders\",\"draw\")(t),b.getComponentMethod(\"updatemenus\",\"draw\")(t)},k,w.rehover,w.previousPromises],E=v.syncOrAsync(T,t);return E&&E.then||(E=Promise.resolve()),E.then(function(){return t.emit(\"plotly_afterplot\"),t})},g.redraw=function(t){if(t=v.getGraphDiv(t),!v.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);return z.cleanData(t.data,t.data),z.cleanLayout(t.layout),t.calcdata=void 0,g.plot(t).then(function(){return t.emit(\"plotly_redraw\"),t})},g.newPlot=function(t,e,r,n){return t=v.getGraphDiv(t),w.cleanPlot([],{},t._fullData||{},t._fullLayout||{}),w.purge(t),g.plot(t,e,r,n)},g.extendTraces=function t(e,r,n,i){var a=l(e=v.getGraphDiv(e),r,n,i,function(t,e){return t.concat(e)},function(t,e){return t.splice(0,t.length-e)}),o=g.redraw(e),s=[e,a.update,n,a.maxPoints];return x.add(e,g.prependTraces,s,t,arguments),o},g.prependTraces=function t(e,r,n,i){var a=l(e=v.getGraphDiv(e),r,n,i,function(t,e){return e.concat(t)},function(t,e){return t.splice(e,t.length)}),o=g.redraw(e),s=[e,a.update,n,a.maxPoints];return x.add(e,g.extendTraces,s,t,arguments),o},g.addTraces=function t(e,r,n){e=v.getGraphDiv(e);var i,a,o=[],l=g.deleteTraces,c=t,u=[e,o],f=[e,r];for(function(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<e.length;n++)if(\"object\"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(\"all values in traces array must be non-array objects\");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error(\"if indices is specified, traces.length must equal indices.length\")}(e,r,n),Array.isArray(r)||(r=[r]),r=r.map(function(t){return v.extendFlat({},t)}),z.cleanData(r,e.data),i=0;i<r.length;i++)e.data.push(r[i]);for(i=0;i<r.length;i++)o.push(-r.length+i);if(void 0===n)return a=g.redraw(e),x.add(e,l,u,c,f),a;Array.isArray(n)||(n=[n]);try{s(e,o,n)}catch(t){throw e.data.splice(e.data.length-r.length,r.length),t}return x.startSequence(e),x.add(e,l,u,c,f),a=g.moveTraces(e,o,n),x.stopSequence(e),a},g.deleteTraces=function t(e,r){e=v.getGraphDiv(e);var n,i,s=[],l=g.addTraces,c=t,u=[e,s,r],f=[e,r];if(void 0===r)throw new Error(\"indices must be an integer or array of integers.\");for(Array.isArray(r)||(r=[r]),o(e,r,\"indices\"),(r=a(r,e.data.length-1)).sort(v.sorterDes),n=0;n<r.length;n+=1)i=e.data.splice(r[n],1)[0],s.push(i);var h=g.redraw(e);return x.add(e,l,u,c,f),h},g.moveTraces=function t(e,r,n){var i,o=[],l=[],c=t,u=t,f=[e=v.getGraphDiv(e),n,r],h=[e,r,n];if(s(e,r,n),r=Array.isArray(r)?r:[r],void 0===n)for(n=[],i=0;i<r.length;i++)n.push(-r.length+i);for(n=Array.isArray(n)?n:[n],r=a(r,e.data.length-1),n=a(n,e.data.length-1),i=0;i<e.data.length;i++)-1===r.indexOf(i)&&o.push(e.data[i]);for(i=0;i<r.length;i++)l.push({newIndex:n[i],trace:e.data[r[i]]});for(l.sort(function(t,e){return t.newIndex-e.newIndex}),i=0;i<l.length;i+=1)o.splice(l[i].newIndex,0,l[i].trace);e.data=o;var d=g.redraw(e);return x.add(e,c,f,u,h),d},g.restyle=function t(e,r,n,i){e=v.getGraphDiv(e),z.clearPromiseQueue(e);var a={};if(\"string\"==typeof r)a[r]=n;else{if(!v.isPlainObject(r))return v.warn(\"Restyle fail.\",r,n,i),Promise.reject();a=v.extendFlat({},r),void 0===i&&(i=n)}Object.keys(a).length&&(e.changed=!0);var o=z.coerceTraceIndices(e,i),s=u(e,a,o),l=s.flags;l.clearCalc&&(e.calcdata=void 0),l.clearAxisTypes&&z.clearAxisTypes(e,o,{});var c=[];l.fullReplot?c.push(g.plot):(c.push(w.previousPromises),w.supplyDefaults(e),l.style&&c.push(D.doTraceStyle),l.colorbars&&c.push(D.doColorBars)),c.push(w.rehover),x.add(e,t,[e,s.undoit,s.traces],t,[e,s.redoit,s.traces]);var f=v.syncOrAsync(c,e);return f&&f.then||(f=Promise.resolve()),f.then(function(){return e.emit(\"plotly_restyle\",s.eventData),e})},g.relayout=function t(e,r,n){if(e=v.getGraphDiv(e),z.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var i={};if(\"string\"==typeof r)i[r]=n;else{if(!v.isPlainObject(r))return v.warn(\"Relayout fail.\",r,n),Promise.reject();i=v.extendFlat({},r)}Object.keys(i).length&&(e.changed=!0);var a=f(e,i),o=a.flags;o.calc&&(e.calcdata=void 0);var s=[w.previousPromises];o.layoutReplot?s.push(D.layoutReplot):Object.keys(i).length&&(w.supplyDefaults(e),o.legend&&s.push(D.doLegend),o.layoutstyle&&s.push(D.layoutStyles),o.ticks&&s.push(D.doTicksRelayout),o.modebar&&s.push(D.doModeBar),o.camera&&s.push(D.doCamera)),s.push(w.rehover),x.add(e,t,[e,a.undoit],t,[e,a.redoit]);var l=v.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then(function(){return e.emit(\"plotly_relayout\",a.eventData),e})},g.update=function t(e,r,n,i){if(e=v.getGraphDiv(e),z.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);v.isPlainObject(r)||(r={}),v.isPlainObject(n)||(n={}),Object.keys(r).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var a=z.coerceTraceIndices(e,i),o=u(e,v.extendFlat({},r),a),s=o.flags,l=f(e,v.extendFlat({},n)),c=l.flags;(s.clearCalc||c.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&z.clearAxisTypes(e,a,n);var h=[];if(s.fullReplot&&c.layoutReplot){var d=e.data,p=e.layout;e.data=void 0,e.layout=void 0,h.push(function(){return g.plot(e,d,p)})}else s.fullReplot?h.push(g.plot):c.layoutReplot?h.push(D.layoutReplot):(h.push(w.previousPromises),w.supplyDefaults(e),s.style&&h.push(D.doTraceStyle),s.colorbars&&h.push(D.doColorBars),c.legend&&h.push(D.doLegend),c.layoutstyle&&h.push(D.layoutStyles),c.ticks&&h.push(D.doTicksRelayout),c.modebar&&h.push(D.doModeBar),c.camera&&h.push(D.doCamera));h.push(w.rehover),x.add(e,t,[e,o.undoit,l.undoit,o.traces],t,[e,o.redoit,l.redoit,o.traces]);var m=v.syncOrAsync(h,e);return m&&m.then||(m=Promise.resolve(e)),m.then(function(){return e.emit(\"plotly_update\",{data:o.eventData,layout:l.eventData}),e})},g.animate=function(t,e,r){function n(t){return Array.isArray(s)?t>=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=v.getGraphDiv(t),!v.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=[]);var s=(r=w.supplyAnimationDefaults(r)).transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,c){function u(e){if(0!==e.length){for(var s=0;s<e.length;s++){var u;u=\"byname\"===e[s].type?w.computeFrame(t,e[s].name):e[s].data;var f=i(s),h=n(s);h.duration=Math.min(h.duration,f.duration);var d={frame:u,name:e[s].name,frameOpts:f,transitionOpts:h};s===e.length-1&&(d.onComplete=a(l,2),d.onInterrupt=c),o._frameQueue.push(d)}\"immediate\"===r.mode&&(o._lastFrameAt=-1/0),o._animationRaf||function(){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&&function(){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,w.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 t.emit(\"plotly_animated\"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}()};e()}()}}function f(t){return Array.isArray(s)?p>=s.length?t.transitionOpts=s[p]:t.transitionOpts=s[0]:t.transitionOpts=s,p++,t}var h,d,p=0,m=[],g=void 0===e||null===e,y=Array.isArray(e);if(!g&&!y&&v.isPlainObject(e))m.push({type:\"object\",data:f(v.extendFlat({},e))});else if(g||-1!==[\"string\",\"number\"].indexOf(typeof e))for(h=0;h<o._frames.length;h++)(d=o._frames[h])&&(g||String(d.group)===String(e))&&m.push({type:\"byname\",name:String(d.name),data:f({name:d.name})});else if(y)for(h=0;h<e.length;h++){var x=e[h];-1!==[\"number\",\"string\"].indexOf(typeof x)?(x=String(x),m.push({type:\"byname\",name:x,data:f({name:x})})):v.isPlainObject(x)&&m.push({type:\"object\",data:f(v.extendFlat({},x))})}for(h=0;h<m.length;h++)if(\"byname\"===(d=m[h]).type&&!o._frameHash[d.data.name])return v.warn('animate failure: frame not found: \"'+d.data.name+'\"'),void c();-1!==[\"next\",\"immediate\"].indexOf(r.mode)&&function(){if(0!==o._frameQueue.length){for(;o._frameQueue.length;){var e=o._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit(\"plotly_animationinterrupted\",[])}}(),\"reverse\"===r.direction&&m.reverse();var b=t._fullLayout._currentFrame;if(b&&r.fromcurrent){var _=-1;for(h=0;h<m.length;h++)if(\"byname\"===(d=m[h]).type&&d.name===b){_=h;break}if(_>0&&_<m.length-1){var M=[];for(h=0;h<m.length;h++)d=m[h],(\"byname\"!==m[h].type||h>_)&&M.push(d);m=M}}m.length>0?u(m):(t.emit(\"plotly_animated\"),l())})},g.addFrames=function(t,e,r){t=v.getGraphDiv(t);var n=0;if(null===e||void 0===e)return Promise.resolve();if(!v.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 adding frames. For more details, see https://plot.ly/javascript/animations/\");var i,a,o,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(\"addFrames failure: frameList must be an Array of frame definitions\"+e);var u=l.length+2*e.length,f=[];for(i=e.length-1;i>=0;i--)if(v.isPlainObject(e[i])){var h=(c[e[i].name]||{}).name,d=e[i].name;h&&d&&\"number\"==typeof d&&c[h]&&(n++,v.warn('addFrames: overwriting frame \"'+c[h].name+'\" with a frame whose name of type \"number\" also equates to \"'+h+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&v.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:w.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:u+i})}f.sort(function(t,e){return t.index>e.index?-1:t.index<e.index?1:0});var p=[],m=[],g=l.length;for(i=f.length-1;i>=0;i--){if(\"number\"==typeof(a=f[i].frame).name&&v.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!a.name)for(;c[a.name=\"frame \"+t._transitionData._counter++];);if(c[a.name]){for(o=0;o<l.length&&(l[o]||{}).name!==a.name;o++);p.push({type:\"replace\",index:o,value:a}),m.unshift({type:\"replace\",index:o,value:l[o]})}else s=Math.max(0,Math.min(f[i].index,g)),p.push({type:\"insert\",index:s,value:a}),m.unshift({type:\"delete\",index:s}),g++}var y=w.modifyFrames,b=w.modifyFrames,_=[t,m],M=[t,p];return x&&x.add(t,y,_,b,M),w.modifyFrames(t,p)},g.deleteFrames=function(t,e){if(t=v.getGraphDiv(t),!v.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);var r,n,i=t._transitionData._frames,a=[],o=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice(0)).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:\"delete\",index:n}),o.unshift({type:\"insert\",index:n,value:i[n]});var s=w.modifyFrames,l=w.modifyFrames,c=[t,o],u=[t,a];return x&&x.add(t,s,c,l,u),w.modifyFrames(t,a)},g.purge=function(t){var e=(t=v.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return w.cleanPlot([],{},r,e),w.purge(t),y.purge(t),e._container&&e._container.remove(),delete t._context,t}},{\"../components/color\":618,\"../components/drawing\":643,\"../components/errorbars\":649,\"../constants/xmlns_namespaces\":723,\"../lib\":743,\"../lib/events\":731,\"../lib/queue\":757,\"../lib/svg_text_utils\":766,\"../plotly\":784,\"../plots/cartesian/axis_ids\":792,\"../plots/cartesian/constants\":794,\"../plots/cartesian/constraints\":796,\"../plots/cartesian/graph_interact\":798,\"../plots/plots\":852,\"../plots/polar/legacy\":860,\"../registry\":873,\"./edit_types\":773,\"./helpers\":774,\"./manage_arrays\":775,\"./plot_schema\":778,\"./subroutines\":781,d3:128,\"fast-isnumeric\":140,\"has-hover\":276}],777:[function(t,e,r){\"use strict\";e.exports={staticPlot:!1,editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!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:\"transparent\",topojsonURL:\"https://cdn.plot.ly/\",mapboxAccessToken:null,logging:1,globalTransforms:[],locale:\"en-US\",locales:{}}},{}],778:[function(t,e,r){\"use strict\";function n(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(i(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!u.isPlainObject(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(r++,!i(e[r]))return!1}else if(\"info_array\"===t.valType){var a=e[++r];if(!i(a)||a>=t.items.length)return!1;t=t.items[a]}}return t}function i(t){return t===Math.round(t)&&t>=0}function a(){var t,e,r={};x(r,h);for(t in c.subplotsRegistry)if((e=c.subplotsRegistry[t]).layoutAttributes)if(\"cartesian\"===e.name)s(r,e,\"xaxis\"),s(r,e,\"yaxis\");else{s(r,e,\"subplot\"===e.attr?e.name:e.attr)}r=function(t){return y(t,{radialaxis:g.radialaxis,angularaxis:g.angularaxis}),y(t,g.layout),t}(r);for(t in c.componentsRegistry){var n=(e=c.componentsRegistry[t]).schema;if(n&&(n.subplots||n.layout)){var i=n.subplots;if(i&&i.xaxis&&!i.yaxis)for(var a in i.xaxis)delete r.yaxis[a]}else e.layoutAttributes&&l(r,e.layoutAttributes,e.name)}return{layoutAttributes:o(r)}}function o(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?\"data_array\"===t.valType?(t.role=\"data\",n[e+\"src\"]={valType:\"string\",editType:\"none\"}):!0===t.arrayOk&&(n[e+\"src\"]={valType:\"string\",editType:\"none\"}):u.isPlainObject(t)&&(t.role=\"object\")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[_];if(!n)return;delete t[_],r[e]={items:{}},r[e].items[n]=t,r[e].role=\"object\"})}(t),t}function s(t,e,r){var n=u.nestedProperty(t,r),i=x({},e.layoutAttributes);i[b]=!0,n.set(i)}function l(t,e,r){var n=u.nestedProperty(t,r);n.set(x(n.get()||{},e))}var c=t(\"../registry\"),u=t(\"../lib\"),f=t(\"../plots/attributes\"),h=t(\"../plots/layout_attributes\"),d=t(\"../plots/frame_attributes\"),p=t(\"../plots/animation_attributes\"),m=t(\"../plots/polar/legacy/area_attributes\"),g=t(\"../plots/polar/legacy/axis_attributes\"),v=t(\"./edit_types\"),y=u.extendFlat,x=u.extendDeepAll,b=\"_isSubplotObj\",_=\"_isLinkedToArray\",w=[b,_,\"_arrayAttrRegexps\",\"_deprecated\"];r.IS_SUBPLOT_OBJ=b,r.IS_LINKED_TO_ARRAY=_,r.DEPRECATED=\"_deprecated\",r.UNDERSCORE_ATTRS=w,r.get=function(){var t={};c.allTypes.concat(\"area\").forEach(function(e){t[e]=function(t){var e,r;\"area\"===t?(e={attributes:m},r={}):r=(e=c.modules[t]._module).basePlotModule;var n={};n.type=null,x(n,f),x(n,e.attributes),r.attributes&&x(n,r.attributes),n.type=t;var i={meta:e.meta||{},attributes:o(n)};if(e.layoutAttributes){var a={};x(a,e.layoutAttributes),i.layoutAttributes=o(a)}return i}(e)});var e={};return Object.keys(c.transformsRegistry).forEach(function(t){e[t]=function(t){var e=c.transformsRegistry[t],r=x({},e.attributes);return Object.keys(c.componentsRegistry).forEach(function(e){var n=c.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){l(r,n.schema.transforms[t][e],e)})}),{attributes:o(r)}}(t)}),{defs:{valObjects:u.valObjectMeta,metaKeys:w.concat([\"description\",\"role\",\"editType\",\"impliedEdits\"]),editType:{traces:v.traces,layout:v.layout},impliedEdits:{}},traces:t,layout:a(),transforms:e,frames:function(){var t={frames:u.extendDeepAll({},d)};return o(t),t.frames}(),animation:o(p)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||\"\",Object.keys(t).forEach(function(n){var o=t[n];if(-1===w.indexOf(n)){var s=(i?i+\".\":\"\")+n;e(o,n,t,a,s),r.isValObject(o)||u.isPlainObject(o)&&\"impliedEdits\"!==n&&r.crawl(o,e,a+1,s)}})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,a,o){i=i.slice(0,o).concat([r]);if(e&&(\"data_array\"===e.valType||!0===e.arrayOk)&&!(\"colorbar\"===i[o-1]&&(\"ticktext\"===r||\"tickvals\"===r))){var s=function(t){return t.join(\".\")}(i),l=u.nestedProperty(t,s).get();Array.isArray(l)&&n.push(s)}}var n=[],i=[];if(r.crawl(f,e),t._module&&t._module.attributes&&r.crawl(t._module.attributes,e),t.transforms)for(var a=t.transforms,o=0;o<a.length;o++){var s=a[o]._module;s&&(i=[\"transforms[\"+o+\"]\"],r.crawl(s.attributes,e,1))}return t._fullInput&&t._fullInput._module&&t._fullInput._module.attributes&&(r.crawl(t._fullInput._module.attributes,e),n=u.filterUnique(n)),n},r.getTraceValObject=function(t,e){var r,a,o=e[0],s=1;if(\"transforms\"===o){if(!Array.isArray(t.transforms))return!1;var l=e[1];if(!i(l)||l>=t.transforms.length)return!1;a=(r=(c.transformsRegistry[t.transforms[l].type]||{}).attributes)&&r[e[2]],s=3}else if(\"area\"===t.type)a=m[o];else{var u=t._module;if(u||(u=(c.modules[t.type||f.type.dflt]||{})._module),!u)return!1;if(r=u.attributes,!(a=r&&r[o])){var h=u.basePlotModule;h&&h.attributes&&(a=h.attributes[o])}a||(a=f[o])}return n(a,e,s)},r.getLayoutValObject=function(t,e){return n(function(t,e){var r,n,i,a,o=t._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if((i=o[r]).attrRegex&&i.attrRegex.test(e)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!s&&i.layoutAttributes&&(s=i.layoutAttributes)}var l=i.baseLayoutAttrOverrides;if(l&&e in l)return l[e]}if(s)return s}var u=t._modules;if(u)for(r=0;r<u.length;r++)if((a=u[r].layoutAttributes)&&e in a)return a[e];for(n in c.componentsRegistry)if(!(i=c.componentsRegistry[n]).schema&&e===i.name)return i.layoutAttributes;return e in h?h[e]:\"radialaxis\"===e||\"angularaxis\"===e?g[e]:g.layout[e]||!1}(t,e[0]),e,1)}},{\"../lib\":743,\"../plots/animation_attributes\":785,\"../plots/attributes\":787,\"../plots/frame_attributes\":817,\"../plots/layout_attributes\":843,\"../plots/polar/legacy/area_attributes\":858,\"../plots/polar/legacy/axis_attributes\":859,\"../registry\":873,\"./edit_types\":773}],779:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"../lib\");e.exports=function(t){if(!t)throw new Error(\"No argument passed to Plotly.register.\");t&&!Array.isArray(t)&&(t=[t]);for(var e=0;e<t.length;e++){var r=t[e];if(!r)throw new Error(\"Invalid module was attempted to be registered!\");switch(r.moduleType){case\"trace\":!function(t){n.register(t,t.name,t.categories,t.meta),n.subplotsRegistry[t.basePlotModule.name]||n.registerSubplot(t.basePlotModule)}(r);break;case\"transform\":!function(t){if(\"string\"!=typeof t.name)throw new Error(\"Transform module *name* must be a string.\");var e=\"Transform module \"+t.name,r=\"function\"==typeof t.transform,a=\"function\"==typeof t.calcTransform;if(!r&&!a)throw new Error(e+\" is missing a *transform* or *calcTransform* method.\");r&&a&&i.log([e+\" has both a *transform* and *calcTransform* methods.\",\"Please note that all *transform* methods are executed\",\"before all *calcTransform* methods.\"].join(\" \")),i.isPlainObject(t.attributes)||i.log(e+\" registered without an *attributes* object.\"),\"function\"!=typeof t.supplyDefaults&&i.log(e+\" registered without a *supplyDefaults* method.\"),n.registerTransform(t)}(r);break;case\"component\":!function(t){if(\"string\"!=typeof t.name)throw new Error(\"Component module *name* must be a string.\");n.registerComponent(t)}(r);break;case\"locale\":n.registerLocale(r);break;default:throw new Error(\"Invalid module was attempted to be registered!\")}}}},{\"../lib\":743,\"../registry\":873}],780:[function(t,e,r){\"use strict\";var n=t(\"../plotly\"),i=t(\"../lib\");e.exports=function(t){return i.extendFlat(n.defaultConfig,t)}},{\"../lib\":743,\"../plotly\":784}],781:[function(t,e,r){\"use strict\";function n(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||\"all\"===t.mirror||\"allticks\"===t.mirror)}function i(t,e,r){if(!r.showline||!r._lw)return!1;if(\"all\"===r.mirror||\"allticks\"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=v.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function a(t,e,r,n){if(i(t,e,r))return r._lw;for(var a=0;a<n.length;a++){var o=n[a];if(o._mainAxis===r._mainAxis&&i(t,e,o))return o._lw}return 0}var o=t(\"d3\"),s=t(\"../plotly\"),l=t(\"../registry\"),c=t(\"../plots/plots\"),u=t(\"../lib\"),f=t(\"../components/color\"),h=t(\"../components/drawing\"),d=t(\"../components/titles\"),p=t(\"../components/modebar\"),m=t(\"../plots/cartesian/graph_interact\"),g=t(\"../plots/cartesian/constants\"),v=t(\"../constants/alignment\");r.layoutStyles=function(t){return u.syncOrAsync([c.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){function e(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-u-n:e._offset+e._length+u+n:c.t+c.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+u+n:e._offset-u-n:c.l+c.w*(t.position||0)+n%1}var i,l=t._fullLayout,c=l._size,u=c.p,d=s.Axes.list(t),m=l._has(\"cartesian\");for(i=0;i<d.length;i++){var y=d[i];y.setScale();var x=y._anchorAxis;y._linepositions={},y._lw=h.crispRound(t,y.linewidth,1),y._mainLinePosition=e(y,x,y.side),y._mainMirrorPosition=y.mirror&&x?e(y,x,v.OPPOSITE_SIDE[y.side]):null}l._paperdiv.style({width:l.width+\"px\",height:l.height+\"px\"}).selectAll(\".main-svg\").call(h.setSize,l.width,l.height),t._context.setBackground(t,l.paper_bgcolor);var b=l._paper.selectAll(\"g.subplot\"),_=[],w=[];b.each(function(t){var e=l._plots[t];if(e.mainplot)return e.bg&&e.bg.remove(),void(e.bg=void 0);var r=e.xaxis.domain,n=e.yaxis.domain,i=[];!function(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}(r,n,w)?(_.push(t),w.push([r,n])):i=[0];var a=e.plotgroup.selectAll(\".bg\").data(i);a.enter().append(\"rect\").classed(\"bg\",!0),a.exit().remove(),a.each(function(){e.bg=a;var t=e.plotgroup.node();t.insertBefore(this,t.childNodes[0])})});var M=l._bgLayer.selectAll(\".bg\").data(_);return M.enter().append(\"rect\").classed(\"bg\",!0),M.exit().remove(),M.each(function(t){l._plots[t].bg=o.select(this)}),b.each(function(t){function r(t){return\"M\"+k+\",\"+t+\"H\"+A}function o(t){return\"M\"+y._offset+\",\"+t+\"h\"+y._length}function s(t){return\"M\"+t+\",\"+z+\"V\"+C}function c(t){return\"M\"+t+\",\"+x._offset+\"v\"+x._length}function p(e,r,n){if(!e.showline||t!==e._mainSubplot)return\"\";if(!e._anchorAxis)return n(e._mainLinePosition);var i=r(e._mainLinePosition);return e.mirror&&(i+=r(e._mainMirrorPosition)),i}var v=l._plots[t],y=v.xaxis,x=v.yaxis;v.bg&&m&&v.bg.call(h.setRect,y._offset-u,x._offset-u,y._length+2*u,x._length+2*u).call(f.fill,l.plot_bgcolor).style(\"stroke-width\",0),v.clipId=\"clip\"+l._uid+t+\"plot\";var b=l._clips.selectAll(\"#\"+v.clipId).data([0]);b.enter().append(\"clipPath\").attr({class:\"plotclip\",id:v.clipId}).append(\"rect\"),b.selectAll(\"rect\").attr({width:y._length,height:x._length}),h.setTranslate(v.plot,y._offset,x._offset);var _,w;for(v._hasClipOnAxisFalse?(_=null,w=v.clipId):(_=v.clipId,w=null),h.setClipUrl(v.plot,_),i=0;i<g.traceLayerClasses.length;i++){var M=g.traceLayerClasses[i];\"scatterlayer\"!==M&&v.plot.selectAll(\"g.\"+M).call(h.setClipUrl,w)}if(v.layerClipId=w,m){var k,A,T,S,E,L,C,z,D,I,P,O,F;if(n(y,t)){E=a(y,\"left\",x,d),k=y._offset-(E?u+E:0),L=a(y,\"right\",x,d),A=y._offset+y._length+(L?u+L:0),T=e(y,x,\"bottom\"),S=e(y,x,\"top\"),(F=!y._anchorAxis||t!==y._mainSubplot)&&y.ticks&&\"allticks\"===y.mirror&&(y._linepositions[t]=[T,S]);var R=p(y,r,o);F&&y.showline&&(\"all\"===y.mirror||\"allticks\"===y.mirror)&&(R+=r(T)+r(S)),v.xlines.attr(\"d\",R||\"M0,0\").style(\"stroke-width\",y._lw+\"px\").call(f.stroke,y.showline?y.linecolor:\"rgba(0,0,0,0)\")}if(n(x,t)){P=a(x,\"bottom\",y,d),C=x._offset+x._length+(P?u:0),O=a(x,\"top\",y,d),z=x._offset-(O?u:0),D=e(x,y,\"left\"),I=e(x,y,\"right\"),(F=!x._anchorAxis||t!==y._mainSubplot)&&x.ticks&&\"allticks\"===x.mirror&&(x._linepositions[t]=[D,I]);var N=p(x,s,c);F&&x.showline&&(\"all\"===x.mirror||\"allticks\"===x.mirror)&&(N+=s(D)+s(I)),v.ylines.attr(\"d\",N||\"M0,0\").style(\"stroke-width\",x._lw+\"px\").call(f.stroke,x.showline?x.linecolor:\"rgba(0,0,0,0)\")}}}),s.Axes.makeClipPaths(t),r.drawMainTitle(t),p.manage(t),t._promises.length&&Promise.all(t._promises)},r.drawMainTitle=function(t){var e=t._fullLayout;d.draw(t,\"gtitle\",{propContainer:e,propName:\"title\",placeholder:e._dfltTitle.plot,attributes:{x:e.width/2,y:e._size.t/2,\"text-anchor\":\"middle\"}})},r.doTraceStyle=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e],n=(((r[0]||{}).trace||{})._module||{}).arraysToCalcdata;n&&n(r,r[0].trace)}return c.style(t),l.getComponentMethod(\"legend\",\"draw\")(t),c.previousPromises(t)},r.doColorBars=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e][0];if((r.t||{}).cb){var n=r.trace,i=r.t.cb;l.traceIs(n,\"contour\")&&i.line({width:!1!==n.contours.showlines?n.line.width:0,dash:n.line.dash,color:\"line\"===n.contours.coloring?i._opts.line.color:n.line.color}),l.traceIs(n,\"markerColorscale\")?i.options(n.marker.colorbar)():i.options(n.colorbar)()}}return c.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,s.plot(t,\"\",e)},r.doLegend=function(t){return l.getComponentMethod(\"legend\",\"draw\")(t),c.previousPromises(t)},r.doTicksRelayout=function(t){return s.Axes.doTicks(t,\"redraw\"),r.drawMainTitle(t),c.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;p.manage(t),m(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(e)}return c.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setCamera(i.camera)}}},{\"../components/color\":618,\"../components/drawing\":643,\"../components/modebar\":680,\"../components/titles\":709,\"../constants/alignment\":716,\"../lib\":743,\"../plotly\":784,\"../plots/cartesian/constants\":794,\"../plots/cartesian/graph_interact\":798,\"../plots/plots\":852,\"../registry\":873,d3:128}],782:[function(t,e,r){\"use strict\";var n=t(\"../plotly\"),i=t(\"../lib\"),a=t(\"../snapshot/helpers\"),o=t(\"../snapshot/tosvg\"),s=t(\"../snapshot/svgtoimg\"),l={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}},c=/^data:image\\/\\w+;base64,/;e.exports=function(t,e){function r(t){return!(t in e)||i.validate(e[t],l[t])}function u(t,r){return i.coerce(e,g,l,t,r)}function f(){return new Promise(function(t){setTimeout(t,a.getDelay(M._fullLayout))})}function h(){return new Promise(function(t,e){var r=o(M,v,b),a=M._fullLayout.width,l=M._fullLayout.height;if(n.purge(M),document.body.removeChild(M),\"svg\"===v)return t(w?r:\"data:image/svg+xml,\"+encodeURIComponent(r));var c=document.createElement(\"canvas\");c.id=i.randstr(),s({format:v,width:a,height:l,scale:b,canvas:c,svg:r,promise:!0}).then(t).catch(e)})}e=e||{};var d,p,m;if(i.isPlainObject(t)?(d=t.data||[],p=t.layout||{},m=t.config||{}):(t=i.getGraphDiv(t),d=i.extendDeep([],t.data),p=i.extendDeep({},t.layout),m=t._context),!r(\"width\")||!r(\"height\"))throw new Error(\"Height and width should be pixel values.\");if(!r(\"format\"))throw new Error(\"Image format is not jpeg, png, svg or webp.\");var g={},v=u(\"format\"),y=u(\"width\"),x=u(\"height\"),b=u(\"scale\"),_=u(\"setBackground\"),w=u(\"imageDataOnly\"),M=document.createElement(\"div\");M.style.position=\"absolute\",M.style.left=\"-5000px\",document.body.appendChild(M);var k=i.extendFlat({},p);y&&(k.width=y),x&&(k.height=x);var A=i.extendFlat({},m,{staticPlot:!0,setBackground:_}),T=a.getRedrawFunc(M);return new Promise(function(t,e){n.plot(M,d,k,A).then(T).then(f).then(h).then(function(e){t(function(t){return w?t.replace(c,\"\"):t}(e))}).catch(function(t){e(t)})})}},{\"../lib\":743,\"../plotly\":784,\"../snapshot/helpers\":877,\"../snapshot/svgtoimg\":879,\"../snapshot/tosvg\":881}],783:[function(t,e,r){\"use strict\";function n(t,e,r,i,l,c){c=c||[];for(var u=Object.keys(t),d=0;d<u.length;d++){var p=u[d];if(\"transforms\"!==p){var m=c.slice();m.push(p);var g=t[p],v=e[p],y=function(t,e){var r=o(e);return t[r.keyMinusId]}(r,p),x=\"info_array\"===(y||{}).valType,b=\"colorscale\"===(y||{}).valType;if(function(t,e){var r=o(e),n=r.keyMinusId,i=r.id;if(n in t&&t[n]._isSubplotObj&&i)return!0;return e in t}(r,p))if(f(g)&&f(v))n(g,v,y,i,l,m);else if(y.items&&!x&&h(g)){var _,w,M=y.items,k=M[Object.keys(M)[0]],A=[];for(_=0;_<v.length;_++){var T=v[_]._index||_;(w=m.slice()).push(T),f(g[T])&&f(v[_])&&(A.push(T),n(g[T],v[_],k,i,l,w))}for(_=0;_<g.length;_++)(w=m.slice()).push(_),f(g[_])?-1===A.indexOf(_)&&i.push(a(\"unused\",l,w)):i.push(a(\"object\",l,w,g[_]))}else!f(g)&&f(v)?i.push(a(\"object\",l,m,g)):h(g)||!h(v)||x||b?p in e?s.validate(g,y)?\"enumerated\"===y.valType&&(y.coerceNumber&&g!==+v||g!==v)&&i.push(a(\"dynamic\",l,m,g,v)):i.push(a(\"value\",l,m,g)):i.push(a(\"unused\",l,m,g)):i.push(a(\"array\",l,m,g));else i.push(a(\"schema\",l,m))}}return i}function i(t){return h(t)?\"In data trace \"+t[1]+\", \":\"In \"+t+\", \"}function a(t,e,r,n,i){r=r||\"\";var a,o;h(e)?(a=e[0],o=e[1]):(a=e,o=null);var l=function(t){if(!h(t))return String(t);for(var e=\"\",r=0;r<t.length;r++){var n=t[r];\"number\"==typeof n?e=e.substr(0,e.length-1)+\"[\"+n+\"]\":e+=n,r<t.length-1&&(e+=\".\")}return e}(r),c=d[t](e,l,n,i);return s.log(c),{code:t,container:a,trace:o,path:r,astr:l,msg:c}}function o(t){var e=t.match(p);return{keyMinusId:e&&e[1],id:e&&e[2]}}var s=t(\"../lib\"),l=t(\"../plots/plots\"),c=t(\"./plot_schema\"),u=t(\"./plot_config\"),f=s.isPlainObject,h=Array.isArray;e.exports=function(t,e){var r,i,o=c.get(),d=[],p={_context:s.extendFlat({},u)};h(t)?(p.data=s.extendDeep([],t),r=t):(p.data=[],r=[],d.push(a(\"array\",\"data\"))),f(e)?(p.layout=s.extendDeep({},e),i=e):(p.layout={},i={},arguments.length>1&&d.push(a(\"object\",\"layout\"))),l.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v<g;v++){var y=r[v],x=[\"data\",v];if(f(y)){var b=m[v],_=b.type,w=o.traces[_].attributes;w.type={valType:\"enumerated\",values:[_]},!1===b.visible&&!1!==y.visible&&d.push(a(\"invisible\",x)),n(y,b,w,d,x);var M=y.transforms,k=b.transforms;if(M){h(M)||d.push(a(\"array\",x,[\"transforms\"])),x.push(\"transforms\");for(var A=0;A<M.length;A++){var T=[\"transforms\",A],S=M[A].type;if(f(M[A])){var E=o.transforms[S]?o.transforms[S].attributes:{};E.type={valType:\"enumerated\",values:Object.keys(o.transforms)},n(M[A],k[A],E,d,x,T)}else d.push(a(\"object\",x,T))}}}else d.push(a(\"object\",x))}return n(i,p._fullLayout,function(t,e){for(var r=0;r<e.length;r++){var n=e[r].type,i=t.traces[n].layoutAttributes;i&&s.extendFlat(t.layout.layoutAttributes,i)}return t.layout.layoutAttributes}(o,m),d,\"layout\"),0===d.length?void 0:d};var d={object:function(t,e){return(\"layout\"===t&&\"\"===e?\"The layout argument\":\"data\"===t[0]&&\"\"===e?\"Trace \"+t[1]+\" in the data argument\":i(t)+\"key \"+e)+\" must be linked to an object container\"},array:function(t,e){return(\"data\"===t?\"The data argument\":i(t)+\"key \"+e)+\" must be linked to an array container\"},schema:function(t,e){return i(t)+\"key \"+e+\" is not part of the schema\"},unused:function(t,e,r){var n=f(r)?\"container\":\"key\";return i(t)+n+\" \"+e+\" did not get coerced\"},dynamic:function(t,e,r,n){return[i(t)+\"key\",e,\"(set to '\"+r+\"')\",\"got reset to\",\"'\"+n+\"'\",\"during defaults.\"].join(\" \")},invisible:function(t){return\"Trace \"+t[1]+\" got defaulted to be not visible\"},value:function(t,e,r){return[i(t)+\"key \"+e,\"is set to an invalid value (\"+r+\")\"].join(\" \")}},p=s.counterRegex(\"([a-z]+)\")},{\"../lib\":743,\"../plots/plots\":852,\"./plot_config\":777,\"./plot_schema\":778}],784:[function(t,e,r){\"use strict\";r.defaultConfig=t(\"./plot_api/plot_config\"),r.Plots=t(\"./plots/plots\"),r.Axes=t(\"./plots/cartesian/axes\"),r.ModeBar=t(\"./components/modebar\"),t(\"./plot_api/plot_api\")},{\"./components/modebar\":680,\"./plot_api/plot_api\":776,\"./plot_api/plot_config\":777,\"./plots/cartesian/axes\":789,\"./plots/plots\":852}],785:[function(t,e,r){\"use strict\";e.exports={mode:{valType:\"enumerated\",dflt:\"afterall\",values:[\"immediate\",\"next\",\"afterall\"]},direction:{valType:\"enumerated\",values:[\"forward\",\"reverse\"],dflt:\"forward\"},fromcurrent:{valType:\"boolean\",dflt:!1},frame:{duration:{valType:\"number\",min:0,dflt:500},redraw:{valType:\"boolean\",dflt:!0}},transition:{duration:{valType:\"number\",min:0,dflt:500},easing:{valType:\"enumerated\",dflt:\"cubic-in-out\",values:[\"linear\",\"quad\",\"cubic\",\"sin\",\"exp\",\"circle\",\"elastic\",\"back\",\"bounce\",\"linear-in\",\"quad-in\",\"cubic-in\",\"sin-in\",\"exp-in\",\"circle-in\",\"elastic-in\",\"back-in\",\"bounce-in\",\"linear-out\",\"quad-out\",\"cubic-out\",\"sin-out\",\"exp-out\",\"circle-out\",\"elastic-out\",\"back-out\",\"bounce-out\",\"linear-in-out\",\"quad-in-out\",\"cubic-in-out\",\"sin-in-out\",\"exp-in-out\",\"circle-in-out\",\"elastic-in-out\",\"back-in-out\",\"bounce-in-out\"]}}}},{}],786:[function(t,e,r){\"use strict\";var n=t(\"../lib\");e.exports=function(t,e,r){var i,a=r.name,o=e[a],s=n.isArray(t[a])?t[a]:[],l=e[a]=[];for(i=0;i<s.length;i++){var c=s[i],u={},f={};n.isPlainObject(c)||(f.itemIsNotPlainObject=!0,c={}),r.handleItemDefaults(c,u,e,r,f),u._input=c,u._index=i,l.push(u)}if(n.isArray(o)){var h=Math.min(o.length,l.length);for(i=0;i<h;i++)n.relinkPrivateKeys(l[i],o[i])}}},{\"../lib\":743}],787:[function(t,e,r){\"use strict\";var n=t(\"../components/fx/attributes\");e.exports={type:{valType:\"enumerated\",values:[],dflt:\"scatter\",editType:\"calc+clearAxisTypes\"},visible:{valType:\"enumerated\",values:[!0,!1,\"legendonly\"],dflt:!0,editType:\"calc\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},legendgroup:{valType:\"string\",dflt:\"\",editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"style\"},name:{valType:\"string\",editType:\"style\"},uid:{valType:\"string\",dflt:\"\",editType:\"calc\"},ids:{valType:\"data_array\",editType:\"calc\"},customdata:{valType:\"data_array\",editType:\"calc\"},selectedpoints:{valType:\"any\",editType:\"calc\"},hoverinfo:{valType:\"flaglist\",flags:[\"x\",\"y\",\"z\",\"text\",\"name\"],extras:[\"all\",\"none\",\"skip\"],arrayOk:!0,dflt:\"all\",editType:\"none\"},hoverlabel:n.hoverlabel,stream:{token:{valType:\"string\",noBlank:!0,strict:!0,editType:\"calc\"},maxpoints:{valType:\"number\",min:0,max:1e4,dflt:500,editType:\"calc\"},editType:\"calc\"}}},{\"../components/fx/attributes\":652}],788:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],789:[function(t,e,r){\"use strict\";function n(t){return+t}function i(t){return String(t)}function a(t,e,r){return e*v.roundUp(t/e,r)}function o(t){var e=t.dtick;if(t._tickexponent=0,m(e)||\"string\"==typeof e||(e=1),\"category\"===t.type&&(t._tickround=null),\"date\"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,\"\"),i=n.length;if(\"M\"===String(e).charAt(0))i>10||\"01-01\"!==n.substr(5)?t._tickround=\"d\":t._tickround=+e.substr(1)%12==0?\"y\":\"m\";else if(e>=T&&i<=10||e>=15*T)t._tickround=\"d\";else if(e>=E&&i<=16||e>=S)t._tickround=\"M\";else if(e>=L&&i<=19||e>=E)t._tickround=\"S\";else{var a=t.l2r(r+e).replace(/^-/,\"\").length;t._tickround=Math.max(i,a)-20}}else if(m(e)||\"L\"===e.charAt(0)){var o=t.range.map(t.r2d||Number);m(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&&(c(t.exponentformat)&&!u(l)?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function s(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 l(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=f(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\"0\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}function r(t,n){return e(n,0)?t:r(n,t%n)}var n=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),i=t*n,a=Math.abs(r(i,n));return[Math.round(i/a),Math.round(n/a)]}(a);if(o[1]>=100)e.text=f(v.deg2rad(e.x),t,i,n);else{var s=e.x<0;1===o[1]?1===o[0]?e.text=\"\\u03c0\":e.text=o[0]+\"\\u03c0\":e.text=[\"<sup>\",o[0],\"</sup>\",\"\\u2044\",\"<sub>\",o[1],\"</sub>\",\"\\u03c0\"].join(\"\"),s&&(e.text=C+e.text)}}}}function c(t){return\"SI\"===t||\"B\"===t}function u(t){return t>14||t<-15}function f(t,e,r,n){var i=t<0,a=e._tickround,s=r||e.exponentformat||\"B\",l=e._tickexponent,f=I.getTickFormat(e),h=e.separatethousands;if(n){var d={exponentformat:e.exponentformat,dtick:\"none\"===e.showexponent?e.dtick:m(t)?Math.abs(t)||1:1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};o(d),a=(Number(d._tickround)||0)+4,l=d._tickexponent,e.hoverformat&&(f=e.hoverformat)}if(f)return e._numFormat(f)(t).replace(/-/g,C);var p=Math.pow(10,-a)/2;if(\"none\"===s&&(l=0),(t=Math.abs(t))<p)t=\"0\",i=!1;else{if(t+=p,l&&(t*=Math.pow(10,-l),a+=l),0===a)t=String(Math.floor(t));else if(a<0){t=(t=String(Math.round(t))).substr(0,t.length+a);for(var g=a;g<0;g++)t+=\"0\"}else{var y=(t=String(t)).indexOf(\".\")+1;y&&(t=t.substr(0,y+a).replace(/\\.?0+$/,\"\"))}t=v.numSeparate(t,e._separators,h)}if(l&&\"hide\"!==s){c(s)&&u(l)&&(s=\"power\");var x;x=l<0?C+-l:\"power\"!==s?\"+\"+l:String(l),\"e\"===s?t+=\"e\"+x:\"E\"===s?t+=\"E\"+x:\"power\"===s?t+=\"\\xd710<sup>\"+x+\"</sup>\":\"B\"===s&&9===l?t+=\"B\":c(s)&&(t+=H[l/3+5])}return i?C+t:t}function h(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function d(t,e,r){var n,i,a=[],o=[],s=t.layout;for(n=0;n<e.length;n++)a.push(I.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(I.getFromId(t,r[n]));var l=Object.keys(a[0]),c=[\"anchor\",\"domain\",\"overlaying\",\"position\",\"side\",\"tickangle\"],u=[\"linear\",\"log\"];for(n=0;n<l.length;n++){var f=l[n],h=a[0][f],d=o[0][f],p=!0,m=!1,g=!1;if(\"_\"!==f.charAt(0)&&\"function\"!=typeof h&&-1===c.indexOf(f)){for(i=1;i<a.length&&p;i++){var y=a[i][f];\"type\"===f&&-1!==u.indexOf(h)&&-1!==u.indexOf(y)&&h!==y?m=!0:y!==h&&(p=!1)}for(i=1;i<o.length&&p;i++){var x=o[i][f];\"type\"===f&&-1!==u.indexOf(d)&&-1!==u.indexOf(x)&&d!==x?g=!0:o[i][f]!==d&&(p=!1)}p&&(m&&(s[a[0]._name].type=\"linear\"),g&&(s[o[0]._name].type=\"linear\"),function(t,e,r,n,i){var a,o=v.nestedProperty,s=o(t[r[0]._name],e).get(),l=o(t[n[0]._name],e).get();\"title\"===e&&(s===i.x&&(s=i.y),l===i.y&&(l=i.x));for(a=0;a<r.length;a++)o(t,r[a]._name+\".\"+e).set(l);for(a=0;a<n.length;a++)o(t,n[a]._name+\".\"+e).set(s)}(s,f,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var b=t._fullLayout.annotations[n];-1!==e.indexOf(b.xref)&&-1!==r.indexOf(b.yref)&&v.swapAttrs(s.annotations[n],[\"?\"])}}var p=t(\"d3\"),m=t(\"fast-isnumeric\"),g=t(\"../../registry\"),v=t(\"../../lib\"),y=t(\"../../lib/svg_text_utils\"),x=t(\"../../components/titles\"),b=t(\"../../components/color\"),_=t(\"../../components/drawing\"),w=t(\"../../constants/numerical\"),M=w.FP_SAFE,k=w.ONEAVGYEAR,A=w.ONEAVGMONTH,T=w.ONEDAY,S=w.ONEHOUR,E=w.ONEMIN,L=w.ONESEC,C=w.MINUS_SIGN,z=w.BADNUM,D=t(\"../../constants/alignment\").MID_SHIFT,I=e.exports={};I.setConvert=t(\"./set_convert\");var P=t(\"./axis_autotype\"),O=t(\"./axis_ids\");I.id2name=O.id2name,I.cleanId=O.cleanId,I.list=O.list,I.listIds=O.listIds,I.getFromId=O.getFromId,I.getFromTrace=O.getFromTrace,I.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+\"axis\"],l=n+\"ref\",c={};return i||(i=s[0]||a),a||(a=i),c[l]={valType:\"enumerated\",values:s.concat(a?[a]:[]),dflt:i},v.coerce(t,e,c,l)},I.coercePosition=function(t,e,r,n,i,a){var o,s;if(\"paper\"===n||\"pixel\"===n)o=v.ensureNumber,s=r(i,a);else{var l=I.getFromId(e,n);s=r(i,a=l.fraction2r(a)),o=l.cleanPos}t[i]=o(s)},I.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?v.ensureNumber:I.getFromId(e,r).cleanPos)(t)};var F=I.getDataConversions=function(t,e,r,a){var o,s=\"x\"===r||\"y\"===r||\"z\"===r?r:a;if(Array.isArray(s)){if(o={type:P(a),_categories:[]},I.setConvert(o),\"category\"===o.type)for(var l=0;l<a.length;l++)o.d2c(a[l])}else o=I.getFromTrace(t,e,s);return o?{d2c:o.d2c,c2d:o.c2d}:\"ids\"===s?{d2c:i,c2d:i}:{d2c:n,c2d:n}};I.getDataToCoordFunc=function(t,e,r,n){return F(t,e,r,n).d2c},I.counterLetter=function(t){var e=t.charAt(0);return\"x\"===e?\"y\":\"y\"===e?\"x\":void 0},I.minDtick=function(t,e,r,n){-1===[\"log\",\"category\"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},I.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e<t._min.length&&n===i;e++)n=Math.min(n,t._min[e].val);for(e=1;e<t._max.length&&n===i;e++)i=Math.max(i,t._max[e].val);var a,o,s,l,c,u,f,h=0,d=!1;if(t.range){var p=v.simpleMap(t.range,t.r2l);d=p[1]<p[0]}for(\"reversed\"===t.autorange&&(d=!0,t.autorange=!0),e=0;e<t._min.length;e++)for(o=t._min[e],a=0;a<t._max.length;a++)f=(s=t._max[a]).val-o.val,u=t._length-o.pad-s.pad,f>0&&u>0&&f/u>h&&(l=o,c=s,h=f/u);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 h&&(\"linear\"!==t.type&&\"-\"!==t.type||(\"tozero\"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):\"nonnegative\"===t.rangemode&&(l.val-h*l.pad<0&&(l={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),h=(c.val-l.val)/(t._length-l.pad-c.pad)),r=[l.val-h*l.pad,c.val+h*c.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(),v.simpleMap(r,t.l2r||Number)},I.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=I.getAutoRange(t),t._r=t.range.slice(),t._rl=v.simpleMap(t._r,t.r2l);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},I.saveRangeInitial=function(t,e){for(var r=I.list(t,\"\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},I.saveShowSpikeInitial=function(t,e){for(var r=I.list(t,\"\",!0),n=!1,i=\"on\",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),\"on\"!==i||o.showspikes||(i=\"off\")}return t._fullLayout._cartesianSpikesEnabled=i,n},I.expand=function(t,e,r){function n(t){if(Array.isArray(t))return function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}function i(r){function n(t){return m(t)&&Math.abs(t)<M}if(l=e[r],m(l)){if(f=_(r)+x,h=w(r)+x,p=l-A(r),g=l+k(r),\"log\"===t.type&&p<g/10&&(p=g/10),c=t.c2l(p),u=t.c2l(g),b&&(c=Math.min(0,c),u=Math.max(0,u)),n(c)){for(d=!0,o=0;o<t._min.length&&d;o++)(s=t._min[o]).val<=c&&s.pad>=h?d=!1:s.val>=c&&s.pad<=h&&(t._min.splice(o,1),o--);d&&t._min.push({val:c,pad:b&&0===c?0:h})}if(n(u)){for(d=!0,o=0;o<t._max.length&&d;o++)(s=t._max[o]).val>=u&&s.pad>=f?d=!1:s.val<=u&&s.pad<=f&&(t._max.splice(o,1),o--);d&&t._max.push({val:u,pad:b&&0===u?0:f})}}}if((t.autorange||!!v.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,c,u,f,h,d,p,g,y=e.length,x=r.padded?.05*t._length:0,b=r.tozero&&(\"linear\"===t.type||\"-\"===t.type);x&&\"domain\"===t.constrain&&t._inputDomain&&(x*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0]));var _=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),k=n(r.vpadplus||r.vpad),A=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=y-1;a>5;a--)i(a)}},I.autoBin=function(t,e,r,n,i){var a=v.aggNums(Math.min,null,t),o=v.aggNums(Math.max,null,t);if(i||(i=e.calendar),\"category\"===e.type)return{start:a-.5,end:o+.5,size:1,_count:o-a+1};var s;if(r)s=(o-a)/r;else{var l=v.distinctVals(t),c=Math.pow(10,Math.floor(Math.log(l.minDiff)/Math.LN10)),u=c*v.roundUp(l.minDiff/c,[.9,1.9,4.9,9.9],!0);s=Math.max(u,2*v.stdev(t)/Math.pow(t.length,n?.25:.4)),m(s)||(s=1)}var f;f=\"log\"===e.type?{type:\"linear\",range:[a,o]}:{type:e.type,range:v.simpleMap([a,o],e.c2r,0,i),calendar:i},I.setConvert(f),I.autoTicks(f,s);var h,d,p=I.tickIncrement(I.tickFirst(f),f.dtick,\"reverse\",i);if(\"number\"==typeof f.dtick)h=(p=function(t,e,r,n,i){function a(e){return(1+100*(e-t)/r.dtick)%100<2}for(var o=0,s=0,l=0,c=0,u=0;u<e.length;u++)e[u]%1==0?l++:m(e[u])||c++,a(e[u])&&o++,a(e[u]+r.dtick/2)&&s++;var f=e.length-c;if(l===f&&\"date\"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*f&&(o>.3*f||a(n)||a(i))){var h=r.dtick/2;t+=t+h<n?h:-h}return t}(p,t,f,a,o))+(d=1+Math.floor((o-p)/f.dtick))*f.dtick;else for(\"M\"===f.dtick.charAt(0)&&(p=function(t,e,r,n,i){var a=v.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=I.tickIncrement(t,\"M6\",\"reverse\")+1.5*T:a.exactMonths>.8?t=I.tickIncrement(t,\"M1\",\"reverse\")+15.5*T:t-=T/2;var s=I.tickIncrement(t,r);if(s<=n)return s}return t}(p,t,f.dtick,a,i)),h=p,d=0;h<=o;)h=I.tickIncrement(h,f.dtick,!1,i),d++;return{start:e.c2r(p,0,i),end:e.c2r(h,0,i),size:f.dtick,_count:d}},I.calcTicks=function(t){var e=v.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=v.constrain(t._length/r,4,9)+1),\"radialaxis\"===t._name&&(n*=2)),\"array\"===t.tickmode&&(n*=100),I.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),o(t),\"array\"===t.tickmode)return function(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=v.simpleMap(t.range,t.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),f=Math.max(l,c),h=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;r<n.length;r++)(e=d(n[r]))>u&&e<f&&(void 0===i[r]?a[h]=I.tickText(t,e):a[h]=s(t,e,String(i[r])),h++);return h<n.length&&a.splice(h,n.length-h),a}(t);t._tmin=I.tickFirst(t);var i=e[1]<e[0],a=[],l=1.0001*e[1]-1e-4*e[0];\"category\"===t.type&&(l=i?Math.max(-.5,l):Math.min(t._categories.length-.5,l));for(var c=null,u=Math.max(1e3,t._length||0),f=t._tmin;(i?f>=l:f<=l)&&!(a.length>u||f===c);f=I.tickIncrement(f,t.dtick,i,t.calendar))c=f,a.push(f);\"angular\"===t._id&&360===Math.abs(e[1]-e[0])&&a.pop(),t._tmax=a[a.length-1],t._prevDateHead=\"\",t._inCalcTicks=!0;for(var h=new Array(a.length),d=0;d<a.length;d++)h[d]=I.tickText(t,a[d]);return t._inCalcTicks=!1,h};var R=[2,5,10],N=[1,2,3,6,12],j=[1,2,5,10,15,30],B=[1,2,3,7,14],U=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],V=[-.301,0,.301,.699,1],q=[15,30,45,90,180];I.autoTicks=function(t,e){function r(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}var n;if(\"date\"===t.type){t.tick0=v.dateTick0(t.calendar);var i=2*e;i>k?(e/=k,n=r(10),t.dtick=\"M\"+12*a(e,n,R)):i>A?(e/=A,t.dtick=\"M\"+a(e,1,N)):i>T?(t.dtick=a(e,T,B),t.tick0=v.dateTick0(t.calendar,!0)):i>S?t.dtick=a(e,S,N):i>E?t.dtick=a(e,E,j):i>L?t.dtick=a(e,L,j):(n=r(10),t.dtick=a(e,n,R))}else if(\"log\"===t.type){t.tick0=0;var o=v.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var s=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/s,n=r(10),t.dtick=\"L\"+a(e,n,R)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):\"angular\"===t._id?(t.tick0=0,n=1,t.dtick=a(e,n,q)):(t.tick0=0,n=r(10),t.dtick=a(e,n,R));if(0===t.dtick&&(t.dtick=1),!m(t.dtick)&&\"string\"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(l)}},I.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(m(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if(\"M\"===a)return v.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,c=v.roundUp(v.mod(l,1),s,r);return Math.floor(l)+Math.log(p.round(Math.pow(10,c),1))/Math.LN10}throw\"unrecognized dtick \"+String(e)},I.tickFirst=function(t){var e=t.r2l||Number,r=v.simpleMap(t.range,e),n=r[1]<r[0],i=n?Math.floor:Math.ceil,a=1.0001*r[0]-1e-4*r[1],o=t.dtick,s=e(t.tick0);if(m(o)){var l=i((a-s)/o)*o+s;return\"category\"===t.type&&(l=v.constrain(l,0,t._categories.length-1)),l}var c=o.charAt(0),u=Number(o.substr(1));if(\"M\"===c){for(var f,h,d,g=0,y=s;g<10;){if(((f=I.tickIncrement(y,o,n,t.calendar))-a)*(y-a)<=0)return n?Math.min(y,f):Math.max(y,f);h=(a-(y+f)/2)/(f-y),d=c+(Math.abs(Math.round(h))||1)*u,y=I.tickIncrement(y,d,h<0?!n:n,t.calendar),g++}return v.error(\"tickFirst did not converge\",t),y}if(\"L\"===c)return Math.log(i((Math.pow(10,a)-s)/u)*u+s)/Math.LN10;if(\"D\"===c){var x=\"D2\"===o?V:U,b=v.roundUp(v.mod(a,1),x,n);return Math.floor(a)+Math.log(p.round(Math.pow(10,b),1))/Math.LN10}throw\"unrecognized dtick \"+String(o)},I.tickText=function(t,e,r){function n(n){var i;return void 0===n||(r?\"none\"===n:(i={first:t._tmin,last:t._tmax}[n],\"all\"!==n&&e!==i))}var i,a,o=s(t,e),h=\"array\"===t.tickmode,d=r||h,p=\"category\"===t.type?t.d2l_noadd:t.d2l;if(h&&Array.isArray(t.ticktext)){var g=v.simpleMap(t.range,t.r2l),y=Math.abs(g[1]-g[0])/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-p(t.tickvals[a]))<y);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}return i=r?\"never\":\"none\"!==t.exponentformat&&n(t.showexponent)?\"hide\":\"\",\"date\"===t.type?function(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||I.getTickFormat(t);n&&(i=m(i)?4:{y:\"m\",m:\"d\",d:\"M\",M:\"S\",S:4}[i]);var o,s=v.formatDate(e.x,a,i,t._dateFormat,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+=\"<br>\"+o,t._prevDateHead=o)),e.text=s}(t,o,r,d):\"log\"===t.type?function(t,e,r,n,i){var a=t.dtick,o=e.x,s=t.tickformat;if(\"never\"===i&&(i=\"\"),!n||\"string\"==typeof a&&\"L\"===a.charAt(0)||(a=\"L3\"),s||\"string\"==typeof a&&\"L\"===a.charAt(0))e.text=f(Math.pow(10,o),t,i,n);else if(m(a)||\"D\"===a.charAt(0)&&v.mod(o+.01,1)<.1){var l=Math.round(o);-1!==[\"e\",\"E\",\"power\"].indexOf(t.exponentformat)||c(t.exponentformat)&&u(l)?(e.text=0===l?1:1===l?\"10\":l>1?\"10<sup>\"+l+\"</sup>\":\"10<sup>\"+C+-l+\"</sup>\",e.fontSize*=1.25):(e.text=f(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,v.mod(o,1)))),e.fontSize*=.75}if(\"D1\"===t.dtick){var h=String(e.text).charAt(0);\"0\"!==h&&\"1\"!==h||(\"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)))}}(t,o,0,d,i):\"category\"===t.type?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\"),e.text=String(r)}(t,o):\"angular\"===t._id?l(t,o,r,d,i):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\"),e.text=f(e.x,t,i,n)}(t,o,0,d,i),t.tickprefix&&!n(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!n(t.showticksuffix)&&(o.text+=t.ticksuffix),o},I.hoverLabelText=function(t,e,r){if(r!==z&&r!==e)return I.hoverLabelText(t,e)+\" - \"+I.hoverLabelText(t,r);var n=\"log\"===t.type&&e<=0,i=I.tickText(t,t.c2l(n?-e:e),\"hover\").text;return n?0===e?\"0\":C+i:i};var H=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];I.getTickFormat=function(t){function e(t){return\"string\"!=typeof t?t:Number(t.replace(\"M\",\"\"))*A}function r(t,e){var r=[\"L\",\"D\"];if(typeof t==typeof e){if(\"number\"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,\"\"))-Number(e.replace(/(L|D)/g,\"\")):n-i}return\"number\"==typeof t?1:-1}function n(t,e,r){var n=r||function(t){return t},i=e[0],a=e[1];return(!i&&\"number\"!=typeof i||n(i)<=n(t))&&(!a&&\"number\"!=typeof a||n(a)>=n(t))}function i(t,e){var n=null===e[0],i=null===e[1],a=r(t,e[0])>=0,o=r(t,e[1])<=0;return(n||a)&&(i||o)}var a,o;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\"date\":case\"linear\":for(a=0;a<t.tickformatstops.length;a++)if(n(t.dtick,t.tickformatstops[a].dtickrange,e)){o=t.tickformatstops[a];break}break;case\"log\":for(a=0;a<t.tickformatstops.length;a++)if(i(t.dtick,t.tickformatstops[a].dtickrange)){o=t.tickformatstops[a];break}}return o?o.value:t.tickformat},I.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?I.findSubplotsWithAxis(n,e):n;return i.sort(function(t,e){var r=t.substr(1).split(\"y\"),n=e.substr(1).split(\"y\");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]}),i},I.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(\"x\"===e._id.charAt(0)?\"^\"+e._id+\"y\":e._id+\"$\"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},I.makeClipPaths=function(t){var e,r,n=t._fullLayout,i={_offset:0,_length:n.width,_id:\"\"},a={_offset:0,_length:n.height,_id:\"\"},o=I.list(t,\"x\",!0),s=I.list(t,\"y\",!0),l=[];for(e=0;e<o.length;e++)for(l.push({x:o[e],y:a}),r=0;r<s.length;r++)0===e&&l.push({x:i,y:s[r]}),l.push({x:o[e],y:s[r]});var c=n._clips.selectAll(\".axesclip\").data(l,function(t){return t.x._id+t.y._id});c.enter().append(\"clipPath\").classed(\"axesclip\",!0).attr(\"id\",function(t){return\"clip\"+n._uid+t.x._id+t.y._id}).append(\"rect\"),c.exit().remove(),c.each(function(t){p.select(this).select(\"rect\").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})})},I.doTicks=function(t,e,r){function n(t){var e=c.l2p(t.x);return e>1&&e<c._length-1}function i(t,e){var r=t.selectAll(\"path.\"+L).data(\"inside\"===c.ticks?H:S,E);e&&c.ticks?(r.enter().append(\"path\").classed(L,1).classed(\"ticks\",1).classed(\"crisp\",1).call(b.stroke,c.tickcolor).style(\"stroke-width\",B+\"px\").attr(\"d\",e),r.attr(\"transform\",d),r.exit().remove()):r.remove()}function a(r,n){function i(t,e){t.each(function(t){var r=h(e,t),n=p.select(this),i=n.select(\".text-math-group\"),a=d(t)+(m(e)&&0!=+e?\" rotate(\"+e+\",\"+l(t)+\",\"+(f(t)-t.fontSize/2)+\")\":\"\");if(i.empty())n.select(\"text\").attr({transform:a,\"text-anchor\":r});else{var o=_.bBox(i.node()).width*{end:-.5,start:.5}[r];i.attr(\"transform\",a+(o?\"translate(\"+o+\",0)\":\"\"))}})}function a(){function e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}if(c.showticklabels){var n=t.getBoundingClientRect(),i=r.node().getBoundingClientRect();c._boundingBox={width:i.width,height:i.height,left:i.left-n.left,right:i.right-n.left,top:i.top-n.top,bottom:i.bottom-n.top}}else{var a,o=u._size;\"x\"===A?(a=\"free\"===c.anchor?o.t+o.h*(1-c.position):o.t+o.h*(1-c._anchorAxis.domain[{bottom:0,top:1}[c.side]]),c._boundingBox={top:a,bottom:a,left:c._offset,right:c._offset+c._length,width:c._length,height:0}):(a=\"free\"===c.anchor?o.l+o.w*c.position:o.l+o.w*c._anchorAxis.domain[{left:0,right:1}[c.side]],c._boundingBox={left:a,right:a,bottom:c._offset+c._length,top:c._offset,height:c._length,width:0})}if(M){var s=c._counterSpan=[1/0,-1/0];for(k=0;k<M.length;k++){var l=u._plots[M[k]][\"x\"===A?\"yaxis\":\"xaxis\"];e(s,[l._offset,l._offset+l._length])}\"free\"===c.anchor&&e(s,\"x\"===A?[c._boundingBox.bottom,c._boundingBox.top]:[c._boundingBox.right,c._boundingBox.left])}}var s=r.selectAll(\"g.\"+L).data(S,E);if(!m(n))return s.remove(),void o();if(!c.showticklabels)return s.remove(),o(),void a();var l,f,h,g,x;\"x\"===A?(l=function(t){return t.dx+R*x},g=n+(F+P)*(x=\"bottom\"===V?1:-1),f=function(t){return t.dy+g+t.fontSize*(\"bottom\"===V?1:-.2)},h=function(t){return m(t)&&0!==t&&180!==t?t*x<0?\"end\":\"start\":\"middle\"}):\"y\"===A?(x=\"right\"===V?1:-1,f=function(t){return t.dy+t.fontSize*D-R*x},l=function(t){return t.dx+n+(F+P+(90===Math.abs(c.tickangle)?t.fontSize/2:0))*x},h=function(t){return m(t)&&90===Math.abs(t)?\"middle\":\"right\"===V?\"start\":\"end\"}):\"angular\"===e&&(c._labelShift=R,c._labelStandoff=F,c._pad=P,l=c._labelx,f=c._labely,h=c._labelanchor);var b=0,w=0,T=[];s.enter().append(\"g\").classed(L,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(e){var r=p.select(this),n=t._promises.length;r.call(y.positionText,l(e),f(e)).call(_.font,e.font,e.fontSize,e.fontColor).text(e.text).call(y.convertToTspans,t),(n=t._promises[n])?T.push(t._promises.pop().then(function(){i(r,c.tickangle)})):i(r,c.tickangle)}),s.exit().remove(),s.each(function(t){b=Math.max(b,t.fontSize)}),\"angular\"===e&&s.each(function(t){p.select(this).select(\"text\").call(y.positionText,l(t),f(t))}),i(s,c._lastangle||c.tickangle);var C=v.syncOrAsync([function(){return T.length&&Promise.all(T)},function(){if(i(s,c.tickangle),\"x\"===A&&!m(c.tickangle)&&(\"log\"!==c.type||\"D\"!==String(c.dtick).charAt(0))){var t=[];for(s.each(function(e){var r=p.select(this),n=r.select(\".text-math-group\"),i=c.l2p(e.x);n.empty()&&(n=r.select(\"text\"));var a=_.bBox(n.node());t.push({top:0,bottom:10,height:10,left:i-a.width/2,right:i+a.width/2+2,width:a.width+2})}),k=0;k<t.length-1;k++)if(v.bBoxIntersect(t[k],t[k+1])){w=30;break}w&&(Math.abs((S[S.length-1].x-S[0].x)*c._m)/(S.length-1)<2.5*b&&(w=90),i(s,w)),c._lastangle=w}return o(),e+\" done\"},a]);return C&&C.then&&t._promises.push(C),C}function o(){if(!r){var n,i,a,o,s=O.getFromId(t,e),l=p.select(t).selectAll(\"g.\"+e+\"tick\"),c={selection:l,side:s.side},f=e.charAt(0),h=t._fullLayout._size,d=s.titlefont.size;if(l.size()){var m=_.getTranslate(l.node().parentNode);c.offsetLeft=m.x,c.offsetTop=m.y}var g=10+1.5*d+(s.linewidth?s.linewidth-1:0);\"x\"===f?(i=\"free\"===s.anchor?{_offset:h.t+(1-(s.position||0))*h.h,_length:0}:O.getFromId(t,s.anchor),a=s._offset+s._length/2,o=\"top\"===s.side?-g-d*(s.showticklabels?1:0):i._length+g+d*(s.showticklabels?1.5:.5),o+=i._offset,s.rangeslider&&s.rangeslider.visible&&s._boundingBox&&(o+=(u.height-u.margin.b-u.margin.t)*s.rangeslider.thickness+s._boundingBox.height),c.side||(c.side=\"bottom\")):(i=\"free\"===s.anchor?{_offset:h.l+(s.position||0)*h.w,_length:0}:O.getFromId(t,s.anchor),o=s._offset+s._length/2,a=\"right\"===s.side?i._length+g+d*(s.showticklabels?1:.5):-g-d*(s.showticklabels?.5:0),a+=i._offset,n={rotate:\"-90\",offset:0},c.side||(c.side=\"left\")),x.draw(t,e+\"title\",{propContainer:s,propName:s._name+\".title\",placeholder:u._dfltTitle[f],avoid:c,transform:n,attributes:{x:a,y:o,\"text-anchor\":\"middle\"}})}}function s(t,e){return!0===t.visible&&t.xaxis+t.yaxis===e&&(!(!g.traceIs(t,\"bar\")||t.orientation!=={x:\"h\",y:\"v\"}[A])||t.fill&&t.fill.charAt(t.fill.length-1)===A)}function l(r,i,a){var o=r.gridlayer.selectAll(\".\"+e),l=r.zerolinelayer,u=r[\"hidegrid\"+A]?[]:H,f=c._gridpath||(\"x\"===A?\"M0,\"+i._offset+\"v\":\"M\"+i._offset+\",0h\")+i._length,h=o.selectAll(\"path.\"+C).data(!1===c.showgrid?[]:u,E);if(h.enter().append(\"path\").classed(C,1).classed(\"crisp\",1).attr(\"d\",f).each(function(t){c.zeroline&&(\"linear\"===c.type||\"-\"===c.type)&&Math.abs(t.x)<c.dtick/100&&p.select(this).remove()}),h.attr(\"transform\",d).call(b.stroke,c.gridcolor||\"#ddd\").style(\"stroke-width\",N+\"px\"),\"function\"==typeof f&&h.attr(\"d\",f),h.exit().remove(),l){for(var m=!1,g=0;g<t._fullData.length;g++)if(s(t._fullData[g],a)){m=!0;break}var y=v.simpleMap(c.range,c.r2l),x=y[0]*y[1]<=0&&c.zeroline&&(\"linear\"===c.type||\"-\"===c.type)&&u.length&&(m||n({x:0})||!c.showline),_=l.selectAll(\"path.\"+z).data(x?[{x:0,id:e}]:[]);_.enter().append(\"path\").classed(z,1).classed(\"zl\",1).classed(\"crisp\",1).attr(\"d\",f).each(function(){l.selectAll(\"path\").sort(function(t,e){return O.idSort(t.id,e.id)})}),_.attr(\"transform\",d).call(b.stroke,c.zerolinecolor||b.defaultLine).style(\"stroke-width\",j+\"px\"),_.exit().remove()}}var c,u=t._fullLayout,f=!1;if(\"object\"==typeof e)e=(c=e)._id,f=!0;else if(c=I.getFromId(t,e),\"redraw\"===e&&u._paper.selectAll(\"g.subplot\").each(function(t){var e=u._plots[t],r=e.xaxis,n=e.yaxis;e.xaxislayer.selectAll(\".\"+r._id+\"tick\").remove(),e.yaxislayer.selectAll(\".\"+n._id+\"tick\").remove(),e.gridlayer.selectAll(\"path\").remove(),e.zerolinelayer.selectAll(\"path\").remove(),u._infolayer.select(\".g-\"+r._id+\"title\").remove(),u._infolayer.select(\".g-\"+n._id+\"title\").remove()}),!e||\"redraw\"===e)return v.syncOrAsync(I.list(t,\"\",!0).map(function(r){return function(){if(r._id){var n=I.doTicks(t,r._id);return\"redraw\"===e&&(r._r=r.range.slice(),r._rl=v.simpleMap(r._r,r.r2l)),n}}}));c.tickformat||(-1===[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"].indexOf(c.exponentformat)&&(c.exponentformat=\"e\"),-1===[\"all\",\"first\",\"last\",\"none\"].indexOf(c.showexponent)&&(c.showexponent=\"all\")),c.setScale();var h,d,w,M,k,A=e.charAt(0),T=I.counterLetter(e),S=I.calcTicks(c),E=function(t){return[t.text,t.x,c.mirror,t.font,t.fontSize,t.fontColor].join(\"_\")},L=e+\"tick\",C=e+\"grid\",z=e+\"zl\",P=(c.linewidth||1)/2,F=\"outside\"===c.ticks?c.ticklen:0,R=0,N=_.crispRound(t,c.gridwidth,1),j=_.crispRound(t,c.zerolinewidth,N),B=_.crispRound(t,c.tickwidth,1);if(c._counterangle&&\"outside\"===c.ticks){var U=c._counterangle*Math.PI/180;F=c.ticklen*Math.cos(U)+1,R=c.ticklen*Math.sin(U)}if(c.showticklabels&&(\"outside\"===c.ticks||c.showline)&&(F+=.2*c.tickfont.size),\"x\"===A)h=[\"bottom\",\"top\"],d=c._transfn||function(t){return\"translate(\"+(c._offset+c.l2p(t.x))+\",0)\"},w=function(t,e){if(c._counterangle){var r=c._counterangle*Math.PI/180;return\"M0,\"+t+\"l\"+Math.sin(r)*e+\",\"+Math.cos(r)*e}return\"M0,\"+t+\"v\"+e};else if(\"y\"===A)h=[\"left\",\"right\"],d=c._transfn||function(t){return\"translate(0,\"+(c._offset+c.l2p(t.x))+\")\"},w=function(t,e){if(c._counterangle){var r=c._counterangle*Math.PI/180;return\"M\"+t+\",0l\"+Math.cos(r)*e+\",\"+-Math.sin(r)*e}return\"M\"+t+\",0h\"+e};else{if(\"angular\"!==e)return void v.warn(\"Unrecognized doTicks axis:\",e);h=[\"left\",\"right\"],d=c._transfn,w=function(t,e){return\"M\"+t+\",0h\"+e}}var V=c.side||h[0],q=[-1,1,V===h[1]?1:-1];if(\"inside\"!==c.ticks==(\"x\"===A)&&(q=q.map(function(t){return-t})),c.visible){c._tickFilter&&(S=S.filter(c._tickFilter));var H=S.filter(n);if(\"angular\"===c._id&&(H=S),f){if(i(c._axislayer,w(c._pos+P*q[2],q[2]*c.ticklen)),c._counteraxis){l({gridlayer:c._gridlayer,zerolinelayer:c._zerolinelayer},c._counteraxis)}return a(c._axislayer,c._pos)}if(u._has(\"cartesian\")){var G={};(M=I.getSubplots(t,c)).map(function(t){var e=u._plots[t],r=e[T+\"axis\"],n=r._mainAxis._id;G[n]||(G[n]=1,l(e,r,t))});var Y=c._mainSubplot,W=u._plots[Y],X=[];if(c.ticks){var Z=q[2],J=w(c._mainLinePosition+P*Z,Z*c.ticklen);c._anchorAxis&&c.mirror&&!0!==c.mirror&&(J+=w(c._mainMirrorPosition-P*Z,-Z*c.ticklen)),i(W[A+\"axislayer\"],J),X=Object.keys(c._linepositions)}X.map(function(t){function e(t){var e=q[t];return w(n[t]+P*e,e*c.ticklen)}var r=u._plots[t][A+\"axislayer\"],n=c._linepositions[t]||[];i(r,e(0)+e(1))});return a(W[A+\"axislayer\"],c._mainLinePosition)}}},I.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],h(c.x,l.x),h(c.y,l.y);h(c.x,[o]),h(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)d(t,r[n].x,r[n].y)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/titles\":709,\"../../constants/alignment\":716,\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../registry\":873,\"./axis_autotype\":790,\"./axis_ids\":792,\"./set_convert\":808,d3:128,\"fast-isnumeric\":140}],790:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){return function(t,e){for(var r,a=0,o=0,s=Math.max(1,(t.length-1)/1e3),l=0;l<t.length;l+=s)r=t[Math.round(l)],i.isDateTime(r,e)&&(a+=1),n(r)&&(o+=1);return a>2*o}(t,e)?\"date\":function(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,o=0,s=0;s<t.length;s+=r)e=t[Math.round(s)],i.cleanNumber(e)!==a?n++:\"string\"==typeof e&&\"\"!==e&&\"None\"!==e&&o++;return o>2*n}(t)?\"category\":function(t){if(!t)return!1;for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}(t)?\"linear\":\"-\"}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],791:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"./layout_attributes\"),o=t(\"./tick_value_defaults\"),s=t(\"./tick_mark_defaults\"),l=t(\"./tick_label_defaults\"),c=t(\"./category_order_defaults\"),u=t(\"./line_grid_defaults\"),f=t(\"./set_convert\"),h=t(\"./ordered_categories\");e.exports=function(t,e,r,d,p){var m=d.letter,g=d.font||{},v=r(\"visible\",!d.cheateronly),y=e.type;if(\"date\"===y){n.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",d.calendar)}f(e,p);if(r(\"autorange\",!e.isValidRange(t.range))&&r(\"rangemode\"),r(\"range\"),e.cleanRange(),c(t,e,r),e._initialCategories=\"category\"===y?h(m,e.categoryorder,e.categoryarray,d.data):[],!v)return e;var x=r(\"color\"),b=x===t.color?x:g.color;return r(\"title\",p._dfltTitle[m]),i.coerceFont(r,\"titlefont\",{family:g.family,size:Math.round(1.2*g.size),color:b}),o(t,e,r,y),l(t,e,r,y,d),s(t,e,r,d),u(t,e,r,{dfltColor:x,bgColor:d.bgColor,showGrid:d.showGrid,attributes:a}),(e.showline||e.ticks)&&r(\"mirror\"),e}},{\"../../lib\":743,\"../../registry\":873,\"./category_order_defaults\":793,\"./layout_attributes\":801,\"./line_grid_defaults\":803,\"./ordered_categories\":804,\"./set_convert\":808,\"./tick_label_defaults\":809,\"./tick_mark_defaults\":810,\"./tick_value_defaults\":811}],792:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./constants\");r.id2name=function(t){if(\"string\"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.substr(1);return\"1\"===e&&(e=\"\"),t.charAt(0)+\"axis\"+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),t.charAt(0)+e}},r.cleanId=function(t,e){if(t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)){var r=t.substr(1).replace(/^0+/,\"\");return\"1\"===r&&(r=\"\"),t.charAt(0)+r}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+\"axis\"+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a<c.length;a++){var u=i[c[a]];e?s.push(u[e+\"axis\"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+\"axis\"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return\"x\"===n?e=e.replace(/y[0-9]*/,\"\"):\"y\"===n&&(e=e.replace(/x[0-9]*/,\"\")),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,\"gl3d\")){var s=e.scene;\"scene\"===s.substr(0,5)&&(o=a[s][i+\"axis\"])}else o=r.getFromId(t,e[i+\"axis\"]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)}},{\"../../registry\":873,\"./constants\":794}],793:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(\"category\"===e.type){var n,i=t.categoryarray,a=Array.isArray(i)&&i.length>0;a&&(n=\"array\");var o=r(\"categoryorder\",n);\"array\"===o&&r(\"categoryarray\"),a||\"array\"!==o||(e.categoryorder=\"trace\")}}},{}],794:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").counterRegex;e.exports={idRegex:{x:n(\"x\"),y:n(\"y\")},attrRegex:n(\"[xy]axis\"),xAxisMatch:n(\"xaxis\"),yAxisMatch:n(\"yaxis\"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:\"-select\",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\"imagelayer\",\"maplayer\",\"barlayer\",\"carpetlayer\",\"violinlayer\",\"boxlayer\",\"scatterlayer\"],layerValue2layerClass:{\"above traces\":\"above\",\"below traces\":\"below\"}}},{\"../../lib\":743}],795:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./axis_ids\").id2name;e.exports=function(t,e,r,a,o){var s=o._axisConstraintGroups,l=e._id,c=l.charAt(0);if(!e.fixedrange&&(r(\"constrain\"),n.coerce(t,e,{constraintoward:{valType:\"enumerated\",values:\"x\"===c?[\"left\",\"center\",\"right\"]:[\"bottom\",\"middle\",\"top\"],dflt:\"x\"===c?\"center\":\"middle\"}},\"constraintoward\"),t.scaleanchor)){var u=function(t,e,r,n){var a,o,s,l,c=n[i(e)].type,u=[];for(o=0;o<r.length;o++)(s=r[o])!==e&&((l=n[i(s)]).type!==c||l.fixedrange||u.push(s));for(a=0;a<t.length;a++)if(t[a][e]){var f=t[a],h=[];for(o=0;o<u.length;o++)f[s=u[o]]||h.push(s);return{linkableAxes:h,thisGroup:f}}return{linkableAxes:u,thisGroup:null}}(s,l,a,o),f=n.coerce(t,e,{scaleanchor:{valType:\"enumerated\",values:u.linkableAxes}},\"scaleanchor\");if(f){var h=r(\"scaleratio\");h||(h=e.scaleratio=1),function(t,e,r,n,i){var a,o,s,l,c;null===e?((e={})[r]=1,c=t.length,t.push(e)):c=t.indexOf(e);var u=Object.keys(e);for(a=0;a<t.length;a++)if(s=t[a],a!==c&&s[n]){var f=s[n];for(o=0;o<u.length;o++)s[l=u[o]]=f*i*e[l];return void t.splice(c,1)}if(1!==i)for(o=0;o<u.length;o++)e[u[o]]*=i;e[n]=1}(s,u.thisGroup,l,f,h)}else-1!==a.indexOf(t.scaleanchor)&&n.warn(\"ignored \"+e._name+'.scaleanchor: \"'+t.scaleanchor+'\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{\"../../lib\":743,\"./axis_ids\":792}],796:[function(t,e,r){\"use strict\";function n(t,e){var r=t._inputDomain,n=s[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e]}var i=t(\"./axis_ids\").id2name,a=t(\"./scale_zoom\"),o=t(\"../../constants/numerical\").ALMOST_EQUAL,s=t(\"../../constants/alignment\").FROM_BL;r.enforce=function(t){var e,r,s,l,c,u,f,h=t._fullLayout,d=h._axisConstraintGroups||[];for(e=0;e<d.length;e++){var p=d[e],m=Object.keys(p),g=1/0,v=0,y=1/0,x={},b={},_=!1;for(r=0;r<m.length;r++)b[s=m[r]]=l=h[i(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),x[s]=c=Math.abs(l._m)/p[s],g=Math.min(g,c),\"domain\"!==l.constrain&&l._constraintShrinkable||(y=Math.min(y,c)),delete l._constraintShrinkable,v=Math.max(v,c),\"domain\"===l.constrain&&(_=!0);if(!(g>o*v)||_)for(r=0;r<m.length;r++)if(s=m[r],c=x[s],l=b[s],u=l.constrain,c!==y||\"domain\"===u)if(f=c/y,\"range\"===u)a(l,f);else{var w=l._inputDomain,M=(l.domain[1]-l.domain[0])/(w[1]-w[0]),k=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((f/=M)*k<1){l.domain=l._input.domain=w.slice(),a(l,f);continue}if(k<1&&(l.range=l._input.range=l._inputRange.slice(),f*=k),l.autorange&&l._min.length&&l._max.length){var A=l.r2l(l.range[0]),T=l.r2l(l.range[1]),S=(A+T)/2,E=S,L=S,C=Math.abs(T-S),z=S-C*f*1.0001,D=S+C*f*1.0001;n(l,f),l.setScale();var I,P,O=Math.abs(l._m);for(P=0;P<l._min.length;P++)(I=l._min[P].val-l._min[P].pad/O)>z&&I<E&&(E=I);for(P=0;P<l._max.length;P++)(I=l._max[P].val+l._max[P].pad/O)<D&&I>L&&(L=I);f/=(L-E)/(2*C),E=l.l2r(E),L=l.l2r(L),l.range=l._input.range=A<T?[E,L]:[L,E]}n(l,f)}}},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&\"domain\"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{\"../../constants/alignment\":716,\"../../constants/numerical\":721,\"./axis_ids\":792,\"./scale_zoom\":806}],797:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t.draglayer.selectAll(\".\"+r).data([0]);return i.enter().append(e).classed(\"drag\",!0).classed(r,!0).style({fill:\"transparent\",\"stroke-width\":0}).attr(\"data-subplot\",t.id),i.call(S,n),i.node()}function i(t,e,r,i,a,o,s){var l=n(t,\"rect\",e,r);return y.select(l).call(A.setRect,i,a,o,s),l}function a(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return\"\"}function o(t,e,r,n,i){var a,s,l,c;for(a=0;a<t.length;a++)(s=t[a]).fixedrange||(l=s._rl[0],c=s._rl[1]-l,s.range=[s.l2r(l+c*e),s.l2r(l+c*r)],n[s._name+\".range[0]\"]=s.range[0],n[s._name+\".range[1]\"]=s.range[1]);if(i&&i.length){var u=(e+(1-r))/2;o(i,u,1-u,n)}}function s(t,e){for(var r=0;r<t.length;r++){var n=t[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)])}}function l(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 c(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:k.background,stroke:k.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",\"translate(\"+e+\", \"+r+\")\").attr(\"d\",\"M0,0Z\")}function u(t){t.selectAll(\".select-outline\").remove()}function f(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\"),h(t,e,i,a)}function h(t,e,r,n){r||(t.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),e.transition().style(\"opacity\",1).duration(200))}function d(t){y.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function p(t){j&&t.data&&t._context.showTips&&(w.notifier(w._(t,\"Double-click to zoom back out\"),\"long\"),j=!1)}function m(t){return\"lasso\"===t||\"select\"===t}function g(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 v(t,e){if(N){var r=void 0!==t.onwheel?\"wheel\":\"mousewheel\";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel&&(t.onmousewheel=e)}var y=t(\"d3\"),x=t(\"tinycolor2\"),b=t(\"../../plotly\"),_=t(\"../../registry\"),w=t(\"../../lib\"),M=t(\"../../lib/svg_text_utils\"),k=t(\"../../components/color\"),A=t(\"../../components/drawing\"),T=t(\"../../components/fx\"),S=t(\"../../lib/setcursor\"),E=t(\"../../components/dragelement\"),L=t(\"../../constants/alignment\").FROM_TL,C=t(\"../plots\"),z=t(\"./axes\").doTicks,D=t(\"./axis_ids\").getFromId,I=t(\"./select\"),P=t(\"./scale_zoom\"),O=t(\"./constants\"),F=O.MINDRAG,R=O.MINZOOM,N=w.eventListenerOptionsSupported(),j=!0;e.exports={makeDragBox:function(t,e,r,n,h,k,S,N){function j(){X=[e.xaxis],Z=[e.yaxis];var r=X[0],n=Z[0];Q=r._length,$=n._length;var i=ot._axisConstraintGroups,o=[r._id],s=[n._id];W=[e].concat(S&&N?e.overlays:[]);for(var l=1;l<W.length;l++){var c=W[l].xaxis,u=W[l].yaxis;-1===X.indexOf(c)&&(X.push(c),o.push(c._id)),-1===Z.indexOf(u)&&(Z.push(u),s.push(u._id))}tt=a(X,N),et=a(Z,S),rt=function(t,e){return t?\"nsew\"===t?\"pan\"===e?\"move\":\"crosshair\":t.toLowerCase()+\"-resize\":\"pointer\"}(et+tt,ot.dragmode),J=r._offset,K=n._offset;var f=function(t,e,r){var n,i,a,o,s,l,c=!1,u={},f={};for(n=0;n<t.length;n++){for(o=t[n],i=0;i<e.length;i++)if(o[e[i]]){for(s in o)-1===(\"x\"===s.charAt(0)?e:r).indexOf(s)&&(u[s]=1);for(a=0;a<r.length;a++)o[r[a]]&&(c=!0)}for(i=0;i<r.length;i++)if(o[r[i]])for(l in o)-1===(\"x\"===l.charAt(0)?e:r).indexOf(l)&&(f[l]=1)}return c&&(w.extendFlat(u,f),f={}),{x:u,y:f,xy:c}}(i,o,s);nt=f.xy,it=[];for(var h in f.x)it.push(D(t,h));at=[];for(var d in f.y)at.push(D(t,d))}function B(e,r){function n(){xt=\"\",mt.r=mt.l,mt.t=mt.b,_t.attr(\"d\",\"M0,0Z\")}if(t._transitioningWithDuration)return!1;var i=Math.max(0,Math.min(Q,e+dt)),a=Math.max(0,Math.min($,r+pt)),o=Math.abs(i-dt),s=Math.abs(a-pt);mt.l=Math.min(dt,i),mt.r=Math.max(dt,i),mt.t=Math.min(pt,a),mt.b=Math.max(pt,a),nt?o>R||s>R?(xt=\"xy\",o/Q>s/$?(s=o*$/Q,pt>a?mt.t=pt-s:mt.b=pt+s):(o=s*Q/$,dt>i?mt.l=dt-o:mt.r=dt+o),_t.attr(\"d\",g(mt))):n():!et||s<Math.min(Math.max(.6*o,F),R)?o<F?n():(mt.t=0,mt.b=$,xt=\"x\",_t.attr(\"d\",function(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\"}(mt,pt))):!tt||o<Math.min(.6*s,R)?(mt.l=0,mt.r=Q,xt=\"y\",_t.attr(\"d\",function(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\"}(mt,dt))):(xt=\"xy\",_t.attr(\"d\",g(mt))),mt.w=mt.r-mt.l,mt.h=mt.b-mt.t,f(bt,_t,mt,vt,yt,gt),yt=!0}function U(){if(Math.min(mt.h,mt.w)<2*F)return d(t);\"xy\"!==xt&&\"x\"!==xt||o(X,mt.l/Q,mt.r/Q,wt,it),\"xy\"!==xt&&\"y\"!==xt||o(Z,($-mt.b)/$,($-mt.t)/$,wt,at),d(t),G(),p(t)}function V(e){function r(t,e,r){if(!t.fixedrange){var n=w.simpleMap(t.range,t.r2l),i=n[0]+(n[1]-n[0])*e;t.range=n.map(function(e){return t.l2r(i+(e-i)*r)})}}if(t._context.scrollZoom||ot._enablescrollzoom){if(t._transitioningWithDuration)return w.pauseEvent(e);var n=t.querySelector(\".plotly\");if(j(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(kt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),isFinite(i)){var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/200),s=Tt.draglayer.select(\".nsewdrag\").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,c=(s.bottom-e.clientY)/s.height;if(N||nt){for(N||(l=.5),a=0;a<X.length;a++)r(X[a],l,o);Mt[2]*=o,Mt[0]+=Mt[2]*l*(1/o-1)}if(S||nt){for(S||(c=.5),a=0;a<Z.length;a++)r(Z[a],c,o);Mt[3]*=o,Mt[1]+=Mt[3]*(1-c)*(1/o-1)}return Y(Mt),H(S,N),kt=setTimeout(function(){Mt=[0,0,Q,$],G()},At),w.pauseEvent(e)}w.log(\"Did not find wheel motion attributes: \",e)}}}function q(e,r){function n(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/function(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}if(!t._transitioningWithDuration){if(j(),\"ew\"===tt||\"ns\"===et)return tt&&s(X,e),et&&s(Z,r),Y([tt?-e:0,et?-r:0,Q,$]),void H(et,tt);if(nt&&tt&&et){var i=\"w\"===tt==(\"n\"===et)?1:-1,a=(e/Q+i*r/$)/2;e=a*Q,r=i*a*$}\"w\"===tt?e=n(X,0,e):\"e\"===tt?e=n(X,1,-e):tt||(e=0),\"n\"===et?r=n(Z,1,r):\"s\"===et?r=n(Z,0,-r):et||(r=0);var o=\"w\"===tt?e:0,l=\"n\"===et?r:0;if(nt){var c;if(!tt&&1===et.length){for(c=0;c<X.length;c++)X[c].range=X[c]._r.slice(),P(X[c],1-r/$);o=(e=r*Q/$)/2}if(!et&&1===tt.length){for(c=0;c<Z.length;c++)Z[c].range=Z[c]._r.slice(),P(Z[c],1-e/Q);l=(r=e*$/Q)/2}}Y([o,l,Q-e,$-r]),H(et,tt)}}function H(e,r){function n(t){for(a=0;a<t.length;a++)t[a].fixedrange||o.push(t[a]._id)}function i(n,i,s){for(a=0;a<n.length;a++){var l=n[a];if((r&&-1!==o.indexOf(l.xref)||e&&-1!==o.indexOf(l.yref))&&(i(t,a),s))return}}var a,o=[];for((r||nt)&&(n(X),n(it)),(e||nt)&&(n(Z),n(at)),wt={},a=0;a<o.length;a++){var s=o[a];z(t,s,!0);var l=D(t,s);wt[l._name+\".range[0]\"]=l.range[0],wt[l._name+\".range[1]\"]=l.range[1]}i(ot.annotations||[],_.getComponentMethod(\"annotations\",\"drawOne\")),i(ot.shapes||[],_.getComponentMethod(\"shapes\",\"drawOne\")),i(ot.images||[],_.getComponentMethod(\"images\",\"draw\"),!0)}function G(){Y([0,0,Q,$]),w.syncOrAsync([C.previousPromises,function(){b.relayout(t,wt)}],t)}function Y(t){function e(t){return t.fixedrange?0:d&&-1!==it.indexOf(t)?f:p&&-1!==(nt?it:at).indexOf(t)?h:0}function r(t,e){return e?(t.range=t._r.slice(),P(t,e),n(t,e)):0}function n(t,e){return t._length*(1-e)*L[t.constraintoward||\"middle\"]}var i,a,o,s,l,c=ot._plots,u=Object.keys(c),f=t[2]/X[0]._length,h=t[3]/Z[0]._length,d=N||nt,p=S||nt;for(ot._glcanvas&&ot._glcanvas.size()&&ot._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0})}),i=0;i<u.length;i++){var m=c[u[i]],g=m.xaxis,v=m.yaxis,y=d&&!g.fixedrange&&-1!==X.indexOf(g),x=p&&!v.fixedrange&&-1!==Z.indexOf(v);if(m._scene&&m._scene.update){var b=w.simpleMap(g.range,g.r2l),_=w.simpleMap(v.range,v.r2l);m._scene.update({range:[b[0],_[0],b[1],_[1]]})}if(y?(a=f,s=N?t[0]:n(g,a)):s=r(g,a=e(g)),x?(o=h,l=S?t[1]:n(v,o)):l=r(v,o=e(v)),a||o){a||(a=1),o||(o=1);var M=g._offset-s/a,k=v._offset-l/o;ot._defs.select(\"#\"+m.clipId+\"> rect\").call(A.setTranslate,s,l).call(A.setScale,a,o);var T=m.plot.selectAll(\".scatterlayer .trace, .boxlayer .trace, .violinlayer .trace\");m.plot.call(A.setTranslate,M,k).call(A.setScale,1/a,1/o),T.selectAll(\".point\").call(A.setPointGroupScale,a,o),T.selectAll(\".textpoint\").call(A.setTextPointsScale,a,o),T.call(A.hideOutsideRangePoints,m)}}}var W,X,Z,J,K,Q,$,tt,et,rt,nt,it,at,ot=t._fullLayout,st=t._fullLayout._zoomlayer,lt=S+N===\"nsew\",ct=1===(S+N).length;j();var ut=i(e,S+N+\"drag\",rt,r,n,h,k),ft=!et&&!tt;if(ft&&!lt)return ut.onmousedown=null,ut.style.pointerEvents=\"none\",ut;var ht={element:ut,gd:t,plotinfo:e,prepFn:function(e,r,n){var i=t._fullLayout.dragmode;ft||(lt?e.shiftKey?\"pan\"===i?i=\"zoom\":m(i)||(i=\"pan\"):e.ctrlKey&&(i=\"pan\"):i=\"pan\"),ht.minDrag=\"lasso\"===i?1:void 0,m(i)?(ht.xaxes=X,ht.yaxes=Z,I(e,r,n,ht,i)):ft?u(st):\"zoom\"===i?(ht.moveFn=B,ht.doneFn=U,ht.minDrag=1,function(e,r,n){var i=ut.getBoundingClientRect();dt=r-i.left,pt=n-i.top,mt={l:dt,r:dt,w:0,t:pt,b:pt,h:0},gt=t._hmpixcount?t._hmlumcount/t._hmpixcount:x(t._fullLayout.plot_bgcolor).getLuminance(),yt=!1,xt=\"xy\",bt=l(st,gt,J,K,vt=\"M0,0H\"+Q+\"V\"+$+\"H0V0\"),_t=c(st,J,K),u(st)}(0,r,n)):\"pan\"===i&&(ht.moveFn=q,ht.doneFn=G,u(st))},clickFn:function(r,n){if(d(t),2!==r||ct||function(){if(!t._transitioningWithDuration){var e,r,n,i=t._context.doubleClick,a=(tt?X:[]).concat(et?Z:[]),o={};if(\"reset+autosize\"===i)for(i=\"autosize\",r=0;r<a.length;r++)if((e=a[r])._rangeInitial&&(e.range[0]!==e._rangeInitial[0]||e.range[1]!==e._rangeInitial[1])||!e._rangeInitial&&!e.autorange){i=\"reset\";break}if(\"autosize\"===i)for(r=0;r<a.length;r++)(e=a[r]).fixedrange||(o[e._name+\".autorange\"]=!0);else if(\"reset\"===i)for((tt||nt)&&(a=a.concat(it)),et&&!nt&&(a=a.concat(at)),nt&&(tt?et||(a=a.concat(Z)):a=a.concat(X)),r=0;r<a.length;r++)(e=a[r])._rangeInitial?(n=e._rangeInitial,o[e._name+\".range[0]\"]=n[0],o[e._name+\".range[1]\"]=n[1]):o[e._name+\".autorange\"]=!0;t.emit(\"plotly_doubleclick\",null),b.relayout(t,o)}}(),lt)T.click(t,n,e.id);else if(1===r&&ct){var i=S?Z[0]:X[0],a=\"s\"===S||\"w\"===N?0:1,o=i._name+\".range[\"+a+\"]\",s=function(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,y.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,y.format(\".\"+String(r)+\"g\")(n))}(i,a),l=\"left\",c=\"middle\";if(i.fixedrange)return;S?(c=\"n\"===S?\"top\":\"bottom\",\"right\"===i.side&&(l=\"right\")):\"e\"===N&&(l=\"right\"),t._context.showAxisRangeEntryBoxes&&y.select(ut).call(M.makeEditable,{gd:t,immediate:!0,background:ot.paper_bgcolor,text:String(s),fill:i.tickfont?i.tickfont.color:\"#444\",horizontalAlign:l,verticalAlign:c}).on(\"edit\",function(e){var r=i.d2r(e);void 0!==r&&b.relayout(t,o,r)})}}};E.init(ht);var dt,pt,mt,gt,vt,yt,xt,bt,_t,wt={},Mt=[0,0,Q,$],kt=null,At=O.REDRAWDELAY,Tt=e.mainplot?ot._plots[e.mainplot]:e;return S.length*N.length!=1&&v(ut,V),ut},makeDragger:n,makeRectDragger:i,makeZoombox:l,makeCorners:c,updateZoombox:f,xyCorners:g,transitionZoombox:h,removeZoombox:d,clearSelect:u,showDoubleClickNotifier:p,attachWheelEventHandler:v}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../registry\":873,\"../plots\":852,\"./axes\":789,\"./axis_ids\":792,\"./constants\":794,\"./scale_zoom\":806,\"./select\":807,d3:128,tinycolor2:546}],798:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../components/dragelement\"),a=t(\"./constants\"),o=t(\"./dragbox\").makeDragBox;e.exports=function(t){var e=t._fullLayout;if((e._has(\"cartesian\")||e._has(\"gl2d\"))&&!t._context.staticPlot){Object.keys(e._plots||{}).sort(function(t,r){if((e._plots[t].mainplot&&!0)===(e._plots[r].mainplot&&!0)){var n=t.split(\"y\"),i=r.split(\"y\");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1}).forEach(function(r){var s=e._plots[r],l=s.xaxis,c=s.yaxis,u=a.DRAGGERSIZE;if(!s.mainplot){var f=o(t,s,l._offset,c._offset,l._length,c._length,\"ns\",\"ew\");f.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&&n.hover(t,e,r)},n.hover(t,e,r),t._fullLayout._lasthover=f,t._fullLayout._hoversubplot=r},f.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,i.unhover(t,e))},t._context.showAxisDragHandles&&(o(t,s,l._offset-u,c._offset-u,u,u,\"n\",\"w\"),o(t,s,l._offset+l._length,c._offset-u,u,u,\"n\",\"e\"),o(t,s,l._offset-u,c._offset+c._length,u,u,\"s\",\"w\"),o(t,s,l._offset+l._length,c._offset+c._length,u,u,\"s\",\"e\"))}if(t._context.showAxisDragHandles){if(r===l._mainSubplot){var h=l._mainLinePosition;\"top\"===l.side&&(h-=u),o(t,s,l._offset+.1*l._length,h,.8*l._length,u,\"\",\"ew\"),o(t,s,l._offset,h,.1*l._length,u,\"\",\"w\"),o(t,s,l._offset+.9*l._length,h,.1*l._length,u,\"\",\"e\")}if(r===c._mainSubplot){var d=c._mainLinePosition;\"right\"!==c.side&&(d-=u),o(t,s,d,c._offset+.1*c._length,u,.8*c._length,\"ns\",\"\"),o(t,s,d,c._offset+.9*c._length,u,.1*c._length,\"s\",\"\"),o(t,s,d,c._offset,u,.1*c._length,\"n\",\"\")}}});var r=e._hoverlayer.node();r.onmousemove=function(r){r.target=e._lasthover,n.hover(t,r,e._hoversubplot)},r.onclick=function(r){r.target=e._lasthover,n.click(t,r)},r.onmousedown=function(t){e._lasthover.onmousedown(t)}}}},{\"../../components/dragelement\":640,\"../../components/fx\":660,\"./constants\":794,\"./dragbox\":797}],799:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,f=l.cartesian,h=r._has(\"cartesian\")||r._has(\"gl2d\"),d=0;d<a.length;d++){var p=a[d];if(i.isPlainObject(p)){var m=p.xref,g=p.yref,v=s.x.test(m),y=s.y.test(g);if(v||y){h||i.pushUnique(r._basePlotModules,o);var x=!1;v&&-1===c.indexOf(m)&&(c.push(m),x=!0),y&&-1===u.indexOf(g)&&(u.push(g),x=!0),x&&v&&y&&f.push(m+g)}}}}}},{\"../../lib\":743,\"../../registry\":873}],800:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=t._fullLayout._modules;e.plot&&e.plot.selectAll(\"g:not(.scatterlayer)\").selectAll(\"g.trace\").remove();for(var o=0;o<a.length;o++){var s=a[o];if(\"cartesian\"===s.basePlotModule.name){var l=u(r,s);s.plot&&s.plot(t,e,l,n,i)}}}function i(t){var e=t.plotgroup,r=t.id,n=h.layerValue2layerClass[t.xaxis.layer],i=h.layerValue2layerClass[t.yaxis.layer];if(t.mainplot){var a=t.mainplotinfo,s=a.plotgroup,l=r+\"-x\",c=r+\"-y\";t.gridlayer=a.gridlayer,t.zerolinelayer=a.zerolinelayer,o(a.overlinesBelow,\"path\",l),o(a.overlinesBelow,\"path\",c),o(a.overaxesBelow,\"g\",l),o(a.overaxesBelow,\"g\",c),t.plot=o(a.overplot,\"g\",r),o(a.overlinesAbove,\"path\",l),o(a.overlinesAbove,\"path\",c),o(a.overaxesAbove,\"g\",l),o(a.overaxesAbove,\"g\",c),t.xlines=s.select(\".overlines-\"+n).select(\".\"+l),t.ylines=s.select(\".overlines-\"+i).select(\".\"+c),t.xaxislayer=s.select(\".overaxes-\"+n).select(\".\"+l),t.yaxislayer=s.select(\".overaxes-\"+i).select(\".\"+c)}else{var u=o(e,\"g\",\"layer-subplot\");t.shapelayer=o(u,\"g\",\"shapelayer\"),t.imagelayer=o(u,\"g\",\"imagelayer\"),t.gridlayer=o(e,\"g\",\"gridlayer\"),t.zerolinelayer=o(e,\"g\",\"zerolinelayer\"),o(e,\"path\",\"xlines-below\"),o(e,\"path\",\"ylines-below\"),t.overlinesBelow=o(e,\"g\",\"overlines-below\"),o(e,\"g\",\"xaxislayer-below\"),o(e,\"g\",\"yaxislayer-below\"),t.overaxesBelow=o(e,\"g\",\"overaxes-below\"),t.plot=o(e,\"g\",\"plot\"),t.overplot=o(e,\"g\",\"overplot\"),o(e,\"path\",\"xlines-above\"),o(e,\"path\",\"ylines-above\"),t.overlinesAbove=o(e,\"g\",\"overlines-above\"),o(e,\"g\",\"xaxislayer-above\"),o(e,\"g\",\"yaxislayer-above\"),t.overaxesAbove=o(e,\"g\",\"overaxes-above\"),t.xlines=e.select(\".xlines-\"+n),t.ylines=e.select(\".ylines-\"+i),t.xaxislayer=e.select(\".xaxislayer-\"+n),t.yaxislayer=e.select(\".yaxislayer-\"+i)}o(t.gridlayer,\"g\",t.xaxis._id,t.xaxis._id),o(t.gridlayer,\"g\",t.yaxis._id,t.yaxis._id),t.gridlayer.selectAll(\"g\").sort(f.idSort);for(var d=0;d<h.traceLayerClasses.length;d++)o(t.plot,\"g\",h.traceLayerClasses[d]);t.xlines.style(\"fill\",\"none\").classed(\"crisp\",!0),t.ylines.style(\"fill\",\"none\").classed(\"crisp\",!0)}function a(t,e){if(t){var r={};t.each(function(t){var n=s.select(this),i=\"clip\"+e._uid+t+\"plot\";n.remove(),e._draggers.selectAll(\"g.\"+t).remove(),e._defs.select(\"#\"+i).remove(),r[t]=!0});for(var n=e._plots,i=Object.keys(n),a=0;a<i.length;a++)for(var o=n[i[a]].overlays||[],l=0;l<o.length;l++){var c=o[l];r[c.id]&&c.plot.selectAll(\".trace\").remove()}}}function o(t,e,r,n){var i=t.selectAll(\".\"+r).data([n||0]);return i.enter().append(e).classed(r,!0),i}var s=t(\"d3\"),l=t(\"../../lib\"),c=t(\"../plots\"),u=t(\"../get_data\").getModuleCalcData,f=t(\"./axis_ids\"),h=t(\"./constants\"),d=t(\"../../constants/xmlns_namespaces\");r.name=\"cartesian\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=h.idRegex,r.attrRegex=h.attrRegex,r.attributes=t(\"./attributes\"),r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.transitionAxes=t(\"./transition_axes\"),r.finalizeSubplots=function(t,e){var r,n,i,a=e._subplots,o=a.xaxis,s=a.yaxis,c=a.cartesian,u=c.concat(a.gl2d||[]),d={},p={};for(r=0;r<u.length;r++){var m=u[r].split(\"y\");d[m[0]]=1,p[\"y\"+m[1]]=1}for(r=0;r<o.length;r++)d[n=o[r]]||(i=(t[f.id2name(n)]||{}).anchor,h.idRegex.y.test(i)||(i=\"y\"),c.push(n+i),u.push(n+i),p[i]||(p[i]=1,l.pushUnique(s,i)));for(r=0;r<s.length;r++)p[i=s[r]]||(n=(t[f.id2name(i)]||{}).anchor,h.idRegex.x.test(n)||(n=\"x\"),c.push(n+i),u.push(n+i),d[n]||(d[n]=1,l.pushUnique(o,n)));if(!u.length){var g=Object.keys(t);for(n=\"\",i=\"\",r=0;r<g.length;r++){var v=g[r];if(h.attrRegex.test(v)){\"x\"===v.charAt(0)?(!n||+v.substr(5)<+n.substr(5))&&(n=v):(!i||+v.substr(5)<+i.substr(5))&&(i=v)}}n=n?f.name2id(n):\"x\",i=i?f.name2id(i):\"y\",o.push(n),s.push(i),c.push(n+i)}},r.plot=function(t,e,r,i){var a,o=t._fullLayout,s=o._subplots.cartesian,l=t.calcdata;if(!Array.isArray(e))for(e=[],a=0;a<l.length;a++)e.push(a);for(o._glcanvas&&o._glcanvas.size()&&o._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0})}),a=0;a<s.length;a++){for(var c,u=s[a],f=o._plots[u],h=[],d=0;d<l.length;d++){var p=l[d],m=p[0].trace;m.xaxis+m.yaxis===u&&((-1!==e.indexOf(m.index)||m.carpet)&&(c&&c[0].trace.xaxis+c[0].trace.yaxis===u&&-1!==[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(m.fill)&&-1===h.indexOf(c)&&h.push(c),h.push(p)),c=p)}n(t,f,h,r,i)}},r.clean=function(t,e,r,n){var i,o,s,l,c,u,f,h,d=n._modules||[],p=e._modules||[];for(c=0;c<d.length;c++){\"scatter\"===d[c].name&&(i=!0);break}for(c=0;c<p.length;c++)if(\"scatter\"===p[c].name){o=!0;break}for(c=0;c<d.length;c++){\"scattergl\"===d[c].name&&(s=!0);break}for(c=0;c<p.length;c++)if(\"scattergl\"===p[c].name){l=!0;break}if(i&&!o){for(u=n._plots,f=Object.keys(u||{}),c=0;c<f.length;c++)(h=u[f[c]]).plot&&h.plot.select(\"g.scatterlayer\").selectAll(\"g.trace\").remove();n._infolayer.selectAll(\"g.rangeslider-container\").select(\"g.scatterlayer\").selectAll(\"g.trace\").remove()}if(s&&!l)for(u=n._plots,f=Object.keys(u||{}),c=0;c<f.length;c++)(h=u[f[c]])._scene&&h._scene.destroy();var m=n._subplots||{},g=e._subplots||{xaxis:[],yaxis:[]};if(m.xaxis&&m.yaxis){var v=m.xaxis.concat(m.yaxis),y=g.xaxis.concat(g.yaxis);for(c=0;c<v.length;c++)-1===y.indexOf(v[c])&&n._infolayer.selectAll(\".g-\"+v[c]+\"title\").remove()}var x=n._has&&n._has(\"cartesian\"),b=e._has&&e._has(\"cartesian\");x&&!b&&(a(n._cartesianlayer.selectAll(\".subplot\"),n),n._defs.selectAll(\".axesclip\").remove())},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){for(var e=t._fullLayout,r=Object.keys(e._plots),n=[],i=[],a=0;a<r.length;a++){var o=r[a],s=e._plots[o],l=s.xaxis,c=s.yaxis,u=l._mainAxis,f=c._mainAxis,h=u._id+f._id;h!==o&&-1!==r.indexOf(h)?(s.mainplot=h,s.mainplotinfo=e._plots[h],i.push(o)):n.push(o)}return n=n.concat(i)}(t),n=e._cartesianlayer.selectAll(\".subplot\").data(r,l.identity);n.enter().append(\"g\").attr(\"class\",function(t){return\"subplot \"+t}),n.order(),n.exit().call(a,e),n.each(function(t){var r=e._plots[t];if(r.plotgroup=s.select(this),r.overlays=[],i(r),r.mainplot){e._plots[r.mainplot].overlays.push(r)}r.draglayer=o(e._draggers,\"g\",t)})},r.rangePlot=function(t,e,r){i(e),n(t,e,r),c.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=s.select(t).selectAll(\".svg-container\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each(function(){var t=this.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:d.svg,\"xlink:href\":t,preserveAspectRatio:\"none\",x:0,y:0,width:this.width,height:this.height})})}},{\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../get_data\":826,\"../plots\":852,\"./attributes\":788,\"./axis_ids\":792,\"./constants\":794,\"./layout_attributes\":801,\"./layout_defaults\":802,\"./transition_axes\":812,d3:128}],801:[function(t,e,r){\"use strict\";var n=t(\"../font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../components/drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat,s=t(\"./constants\");e.exports={visible:{valType:\"boolean\",editType:\"plot\"},color:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},title:{valType:\"string\",editType:\"ticks\"},titlefont:n({editType:\"ticks\"}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"log\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],editType:\"plot\",impliedEdits:{autorange:!1}},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},scaleanchor:{valType:\"enumerated\",values:[s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"calc\"},scaleratio:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},constrain:{valType:\"enumerated\",values:[\"range\",\"domain\"],dflt:\"range\",editType:\"calc\"},constraintoward:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\",\"top\",\"middle\",\"bottom\"],editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"auto\",\"linear\",\"array\"],editType:\"ticks\",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"ticks\"},tick0:{valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},dtick:{valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},tickvals:{valType:\"data_array\",editType:\"ticks\"},ticktext:{valType:\"data_array\",editType:\"ticks\"},ticks:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"\"],editType:\"ticks\"},mirror:{valType:\"enumerated\",values:[!0,\"ticks\",!1,\"all\",\"allticks\"],dflt:!1,editType:\"ticks+layoutstyle\"},ticklen:{valType:\"number\",min:0,dflt:5,editType:\"ticks\"},tickwidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks\"},tickcolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},showticklabels:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},showspikes:{valType:\"boolean\",dflt:!1,editType:\"modebar\"},spikecolor:{valType:\"color\",dflt:null,editType:\"none\"},spikethickness:{valType:\"number\",dflt:3,editType:\"none\"},spikedash:o({},a,{dflt:\"dash\",editType:\"none\"}),spikemode:{valType:\"flaglist\",flags:[\"toaxis\",\"across\",\"marker\"],dflt:\"toaxis\",editType:\"none\"},spikesnap:{valType:\"enumerated\",values:[\"data\",\"cursor\"],dflt:\"data\",editType:\"none\"},tickfont:n({editType:\"ticks\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"ticks\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"ticks\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"ticks\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"ticks\"},tickformatstops:{_isLinkedToArray:\"tickformatstop\",dtickrange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"ticks\"},{valType:\"any\",editType:\"ticks\"}],editType:\"ticks\"},value:{valType:\"string\",dflt:\"\",editType:\"ticks\"},editType:\"ticks\"},hoverformat:{valType:\"string\",dflt:\"\",editType:\"none\"},showline:{valType:\"boolean\",dflt:!1,editType:\"layoutstyle\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"layoutstyle\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks+layoutstyle\"},showgrid:{valType:\"boolean\",editType:\"ticks\"},gridcolor:{valType:\"color\",dflt:i.lightLine,editType:\"ticks\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks\"},zeroline:{valType:\"boolean\",editType:\"ticks\"},zerolinecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},zerolinewidth:{valType:\"number\",dflt:1,editType:\"ticks\"},anchor:{valType:\"enumerated\",values:[\"free\",s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],editType:\"plot\"},overlaying:{valType:\"enumerated\",values:[\"free\",s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"calc\"},layer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"above traces\",editType:\"plot\"},domain:{valType:\"info_array\",items:[{valType:\"number\",min:0,max:1,editType:\"calc\"},{valType:\"number\",min:0,max:1,editType:\"calc\"}],dflt:[0,1],editType:\"calc\"},position:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\",_deprecated:{autotick:{valType:\"boolean\",editType:\"ticks\"}}}},{\"../../components/color/attributes\":617,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../font_attributes\":816,\"./constants\":794}],802:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../layout_attributes\"),s=t(\"./layout_attributes\"),l=t(\"./type_defaults\"),c=t(\"./axis_defaults\"),u=t(\"./constraint_defaults\"),f=t(\"./position_defaults\"),h=t(\"./axis_ids\");e.exports=function(t,e,r){function d(t,e){return i.coerce(P,O,s,t,e)}function p(t,e){return i.coerce2(P,O,s,t,e)}function m(t){return\"x\"===t?S:T}function g(e,r){for(var n=\"x\"===e?E:L,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(h.name2id(o))}return i}var v,y={},x={},b={},_={};for(v=0;v<r.length;v++){var w=r[v];if(n.traceIs(w,\"cartesian\")||n.traceIs(w,\"gl2d\")){var M=h.id2name(w.xaxis),k=h.id2name(w.yaxis);if(n.traceIs(w,\"carpet\")&&(\"carpet\"!==w.type||w._cheater)||M&&(x[M]=1),\"carpet\"===w.type&&w._cheater&&M&&(y[M]=1),n.traceIs(w,\"2dMap\")&&(b[M]=!0,b[k]=!0),n.traceIs(w,\"oriented\")){_[\"h\"===w.orientation?k:M]=!0}}}var A=e._subplots,T=A.xaxis,S=A.yaxis,E=i.simpleMap(T,h.id2name),L=i.simpleMap(S,h.id2name),C=E.concat(L),z=a.background;T.length&&S.length&&(z=i.coerce(t,e,o,\"plot_bgcolor\"));var D,I,P,O,F=a.combine(z,e.paper_bgcolor),R={x:m(\"x\"),y:m(\"y\")};for(v=0;v<C.length;v++){D=C[v],i.isPlainObject(t[D])||(t[D]={}),P=t[D],O=e[D]={},l(P,O,d,r,D);var N=g(I=D.charAt(0),D),j={letter:I,font:e.font,outerTicks:b[D],showGrid:!_[D],data:r,bgColor:F,calendar:e.calendar,cheateronly:\"x\"===I&&y[D]&&!x[D]};c(P,O,d,j,e);var B=p(\"spikecolor\"),U=p(\"spikethickness\"),V=p(\"spikedash\"),q=p(\"spikemode\"),H=p(\"spikesnap\");d(\"showspikes\",!!(B||U||V||q||H))||(delete O.spikecolor,delete O.spikethickness,delete O.spikedash,delete O.spikemode,delete O.spikesnap);var G={letter:I,counterAxes:R[I],overlayableAxes:N};f(P,O,d,G),O._input=P}var Y=n.getComponentMethod(\"rangeslider\",\"handleDefaults\"),W=n.getComponentMethod(\"rangeselector\",\"handleDefaults\");for(v=0;v<E.length;v++)D=E[v],P=t[D],O=e[D],Y(t,e,D),\"date\"===O.type&&W(P,O,e,L,O.calendar),d(\"fixedrange\");for(v=0;v<L.length;v++){D=L[v],P=t[D],O=e[D];var X=e[h.id2name(O.anchor)];d(\"fixedrange\",X&&X.rangeslider&&X.rangeslider.visible)}e._axisConstraintGroups=[];var Z=R.x.concat(R.y);for(v=0;v<C.length;v++)I=(D=C[v]).charAt(0),P=t[D],O=e[D],u(P,O,d,Z,e)}},{\"../../components/color\":618,\"../../lib\":743,\"../../registry\":873,\"../layout_attributes\":843,\"./axis_defaults\":791,\"./axis_ids\":792,\"./constraint_defaults\":795,\"./layout_attributes\":801,\"./position_defaults\":805,\"./type_defaults\":813}],803:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../components/color/attributes\").lightFraction,a=t(\"../../lib\");e.exports=function(t,e,r,o){function s(r,n){return a.coerce2(t,e,o.attributes,r,n)}var l=(o=o||{}).dfltColor,c=s(\"linecolor\",l),u=s(\"linewidth\");r(\"showline\",o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var f=s(\"gridcolor\",n(l,o.bgColor,o.blend||i).toRgbString()),h=s(\"gridwidth\");if(r(\"showgrid\",o.showGrid||!!f||!!h)||(delete e.gridcolor,delete e.gridwidth),!o.noZeroLine){var d=s(\"zerolinecolor\",l),p=s(\"zerolinewidth\");r(\"zeroline\",o.showGrid||!!d||!!p)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{\"../../components/color/attributes\":617,\"../../lib\":743,tinycolor2:546}],804:[function(t,e,r){\"use strict\";function n(t,e,r){var n,a,o,s,l,c=[],u=r.map(function(e){return e[t]}),f=i.bisector(e).left;for(n=0;n<u.length;n++)for(o=u[n],a=0;a<o.length;a++)null!==(s=o[a])&&void 0!==s&&((l=f(c,s))<c.length&&c[l]===s||c.splice(l,0,s));return c}var i=t(\"d3\");e.exports=function(t,e,r,a){switch(e){case\"array\":return Array.isArray(r)?r.slice():[];case\"category ascending\":return n(t,i.ascending,a);case\"category descending\":return n(t,i.descending,a);case\"trace\":default:return[]}}},{d3:128}],805:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=a.counterAxes||[],s=a.overlayableAxes||[],l=a.letter;\"free\"===i.coerce(t,e,{anchor:{valType:\"enumerated\",values:[\"free\"].concat(o),dflt:n(t.position)?\"free\":o[0]||\"free\"}},\"anchor\")&&r(\"position\"),i.coerce(t,e,{side:{valType:\"enumerated\",values:\"x\"===l?[\"bottom\",\"top\"]:[\"left\",\"right\"],dflt:\"x\"===l?\"bottom\":\"left\"}},\"side\");var c=!1;if(s.length&&(c=i.coerce(t,e,{overlaying:{valType:\"enumerated\",values:[!1].concat(s),dflt:!1}},\"overlaying\")),!c){var u=r(\"domain\");u[0]>u[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return r(\"layer\"),e}},{\"../../lib\":743,\"fast-isnumeric\":140}],806:[function(t,e,r){\"use strict\";var n=t(\"../../constants/alignment\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{\"../../constants/alignment\":716}],807:[function(t,e,r){\"use strict\";function n(t){return t._id}function i(t,e,r){var n,i,a;if(r){var o=r.points||[];for(n=0;n<e.length;n++)(a=e[n].cd[0].trace).selectedpoints=[],a._input.selectedpoints=[];for(n=0;n<o.length;n++){var s=o[n],l=s.data,c=s.fullData;s.pointIndices?([].push.apply(l.selectedpoints,s.pointIndices),[].push.apply(c.selectedpoints,s.pointIndices)):(l.selectedpoints.push(s.pointIndex),c.selectedpoints.push(s.pointIndex))}}else for(n=0;n<e.length;n++)delete(a=e[n].cd[0].trace).selectedpoints,delete a._input.selectedpoints,e[n].cd[0].t&&e[n].cd[0].t.scene&&e[n].cd[0].t.scene.clearSelect();for(n=0;n<e.length;n++)(i=e[n]).style&&i.style(t,i.cd)}var a=t(\"polybooljs\"),o=t(\"../../lib/polygon\"),s=t(\"../../lib/throttle\"),l=t(\"../../components/color\"),c=t(\"../../components/fx/helpers\").makeEventData,u=t(\"../../components/fx\"),f=t(\"./axes\"),h=t(\"./constants\"),d=o.filter,p=o.tester,m=o.multitester,g=h.MINSELECT;e.exports=function(t,e,r,o,v){function y(t){var e=\"y\"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function x(t,e){return t-e}var b,_,w,M,k=o.gd,A=k._fullLayout,T=A._zoomlayer,S=o.element.getBoundingClientRect(),E=o.plotinfo,L=E.xaxis._offset,C=E.yaxis._offset,z=e-S.left,D=r-S.top,I=z,P=D,O=\"M\"+z+\",\"+D,F=o.xaxes[0]._length,R=o.yaxes[0]._length,N=o.xaxes.map(n),j=o.yaxes.map(n),B=o.xaxes.concat(o.yaxes),U=t.altKey;(t.shiftKey||t.altKey)&&E.selection&&E.selection.polygons&&!o.polygons?(o.polygons=E.selection.polygons,o.mergedPolygons=E.selection.mergedPolygons):(!t.shiftKey&&!t.altKey||(t.shiftKey||t.altKey)&&!E.selection)&&(E.selection={},E.selection.polygons=o.polygons=[],E.selection.mergedPolygons=o.mergedPolygons=[]),\"lasso\"===v&&(b=d([[z,D]],h.BENDPX));var V=T.selectAll(\"path.select-outline-\"+E.id).data([1,2]);V.enter().append(\"path\").attr(\"class\",function(t){return\"select-outline select-outline-\"+t+\" select-outline-\"+E.id}).attr(\"transform\",\"translate(\"+L+\", \"+C+\")\").attr(\"d\",O+\"Z\");var q,H,G,Y,W,X=T.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:l.background,stroke:l.defaultLine,\"stroke-width\":1}).attr(\"transform\",\"translate(\"+L+\", \"+C+\")\").attr(\"d\",\"M0,0Z\"),Z=[],J=A._uid+h.SELECTID,K=[];for(q=0;q<k.calcdata.length;q++)if(H=k.calcdata[q],!0===(G=H[0].trace).visible&&G._module&&G._module.selectPoints)if(o.subplot)G.subplot!==o.subplot&&G.geo!==o.subplot||Z.push({selectPoints:G._module.selectPoints,style:G._module.style,cd:H,xaxis:o.xaxes[0],yaxis:o.yaxes[0]});else{if(-1===N.indexOf(G.xaxis))continue;if(-1===j.indexOf(G.yaxis))continue;Z.push({selectPoints:G._module.selectPoints,style:G._module.style,cd:H,xaxis:f.getFromId(k,G.xaxis),yaxis:f.getFromId(k,G.yaxis)})}var Q;Q=E.fillRangeItems?E.fillRangeItems:\"select\"===v?function(t,e){var r=t.range={};for(q=0;q<B.length;q++){var n=B[q],i=n._id.charAt(0);r[n._id]=[n.p2d(e[i+\"min\"]),n.p2d(e[i+\"max\"])].sort(x)}}:function(t,e,r){var n=t.lassoPoints={};for(q=0;q<B.length;q++){var i=B[q];n[i._id]=r.filtered.map(y(i))}},o.moveFn=function(t,e){I=Math.max(0,Math.min(F,t+z)),P=Math.max(0,Math.min(R,e+D));var r=Math.abs(I-z),n=Math.abs(P-D);\"select\"===v?n<Math.min(.6*r,g)?((M=[[z,0],[z,R],[I,R],[I,0]]).xmin=Math.min(z,I),M.xmax=Math.max(z,I),M.ymin=Math.min(0,R),M.ymax=Math.max(0,R),X.attr(\"d\",\"M\"+M.xmin+\",\"+(D-g)+\"h-4v\"+2*g+\"h4ZM\"+(M.xmax-1)+\",\"+(D-g)+\"h4v\"+2*g+\"h-4Z\")):r<Math.min(.6*n,g)?((M=[[0,D],[0,P],[F,P],[F,D]]).xmin=Math.min(0,F),M.xmax=Math.max(0,F),M.ymin=Math.min(D,P),M.ymax=Math.max(D,P),X.attr(\"d\",\"M\"+(z-g)+\",\"+M.ymin+\"v-4h\"+2*g+\"v4ZM\"+(z-g)+\",\"+(M.ymax-1)+\"v4h\"+2*g+\"v-4Z\")):((M=[[z,D],[z,P],[I,P],[I,D]]).xmin=Math.min(z,I),M.xmax=Math.max(z,I),M.ymin=Math.min(D,P),M.ymax=Math.max(D,P),X.attr(\"d\",\"M0,0Z\")):\"lasso\"===v&&(b.addPt([I,P]),M=b.filtered),o.polygons&&o.polygons.length?(w=function(t,e,r){return r?a.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions:a.union({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions}(o.mergedPolygons,M,U),M.subtract=U,_=m(o.polygons.concat([M]))):(w=[M],_=p(M));var l=[];for(q=0;q<w.length;q++){var u=w[q];l.push(u.join(\"L\")+\"L\"+u[0])}V.attr(\"d\",\"M\"+l.join(\"M\")+\"Z\"),s.throttle(J,h.SELECTDELAY,function(){K=[];var t,e,r=[];for(q=0;q<Z.length;q++)if(Y=Z[q],e=Y.selectPoints(Y,_),r.push(e),t=function(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=c(t[i],n,r);return t}(e,Y),K.length)for(var n=0;n<t.length;n++)K.push(t[n]);else K=t;i(k,Z,W={points:K}),Q(W,M,b),o.gd.emit(\"plotly_selecting\",W)})},o.clickFn=function(t,e){X.remove(),s.done(J).then(function(){if(s.clear(J),2===t){for(V.remove(),q=0;q<Z.length;q++)(Y=Z[q]).selectPoints(Y,!1);i(k,Z),k.emit(\"plotly_deselect\",null)}else k.emit(\"plotly_selected\",void 0);u.click(k,e)})},o.doneFn=function(){X.remove(),s.done(J).then(function(){s.clear(J),o.gd.emit(\"plotly_selected\",W),M&&o.polygons&&(M.subtract=U,o.polygons.push(M),o.mergedPolygons.length=0,[].push.apply(o.mergedPolygons,w))})}}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../components/fx/helpers\":657,\"../../lib/polygon\":755,\"../../lib/throttle\":767,\"./axes\":789,\"./constants\":794,polybooljs:479}],808:[function(t,e,r){\"use strict\";function n(t){return Math.pow(10,t)}var i=t(\"d3\"),a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=o.cleanNumber,l=o.ms2DateTime,c=o.dateTime2ms,u=o.ensureNumber,f=t(\"../../constants/numerical\"),h=f.FP_SAFE,d=f.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*M*Math.abs(n-i))}return d}function f(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!a(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return l(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 x(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(a(e))return+e}function b(e){return a(e)?i.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=(t._id||\"x\").charAt(0),M=10;t.c2l=\"log\"===t.type?r:u,t.l2c=\"log\"===t.type?n:u,t.l2p=b,t.p2l=_,t.c2p=\"log\"===t.type?function(t,e){return b(r(t,e))}:b,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=s,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(s(e))},t.p2d=t.p2r=_,t.cleanPos=u):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return r(s(t),e)},t.r2d=t.r2c=function(t){return n(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=u,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(e){return t.l2p(s(e))},t.p2r=_,t.cleanPos=u):\"date\"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(e,r,n){return t.l2p(f(e,0,n))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,d,t.calendar)}):\"category\"===t.type&&(t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2r=t.d2l_noadd=x,t.r2c=function(e){var r=x(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=x,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return v(_(t))},t.r2p=t.d2p,t.p2r=_,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:u(t)}),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,r){r||(r={}),e||(e=\"range\");var n,i,s=o.nestedProperty(t,e).get();if(i=\"date\"===t.type?o.dfltRange(t.calendar):\"y\"===w?p.DFLTRANGEY:r.dfltRange||p.DFLTRANGEX,i=i.slice(),s&&2===s.length)for(\"date\"===t.type&&(s[0]=o.cleanDate(s[0],d,t.calendar),s[1]=o.cleanDate(s[1],d,t.calendar)),n=0;n<2;n++)if(\"date\"===t.type){if(!o.isDateTime(s[n],t.calendar)){t[e]=i;break}if(t.r2l(s[0])===t.r2l(s[1])){var l=o.constrain(t.r2l(s[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);s[0]=t.l2r(l-1e3),s[1]=t.l2r(l+1e3);break}}else{if(!a(s[n])){if(!a(s[1-n])){t[e]=i;break}s[n]=s[1-n]*(n?10:.1)}if(s[n]<-h?s[n]=-h:s[n]>h&&(s[n]=h),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var i=m.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s=t.r2l(t[a][0],o),l=t.r2l(t[a][1],o);if(\"y\"===w?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b))throw e._replotting=!1,new Error(\"Something went wrong with 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;a<n.length;a++)i[a]=t.d2c(n[a],0,o);else{var s=r+\"0\"in e?t.d2c(e[r+\"0\"],0,o):0,l=e[\"d\"+r]?Number(e[\"d\"+r]):1;for(n=e[{x:\"y\",y:\"x\"}[r]],i=new Array(n.length),a=0;a<n.length;a++)i[a]=s+a*l}return i},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&a(t.r2l(e[0]))&&a(t.r2l(e[1]))},t.isPtWithinRange=function(e,r){var n=t.c2l(e[w],null,r);return n>=t.r2l(t.range[0])&&n<=t.r2l(t.range[1])},t._min=[],t._max=[];var k=e._d3locale;\"date\"===t.type&&(t._dateFormat=k?k.timeFormat.utc:i.time.format.utc),t._separators=e.separators,t._numFormat=k?k.numberFormat:i.format,delete t._minDtick,delete t._forceTick0}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./axis_ids\":792,\"./constants\":794,d3:128,\"fast-isnumeric\":140}],809:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r,a,o){var s=function(t){var e=[\"showexponent\",\"showtickprefix\",\"showticksuffix\"].filter(function(e){return void 0!==t[e]});if(e.every(function(r){return t[r]===t[e[0]]})||1===e.length)return t[e[0]]}(t);r(\"tickprefix\")&&r(\"showtickprefix\",s);r(\"ticksuffix\",o.tickSuffixDflt)&&r(\"showticksuffix\",s);if(r(\"showticklabels\")){var l=o.font||{},c=e.color===t.color?e.color:l.color;if(n.coerceFont(r,\"tickfont\",{family:l.family,size:l.size,color:c}),r(\"tickangle\"),\"category\"!==a){var u=r(\"tickformat\");!function(t,e){function r(t,e){return n.coerce(s,l,i.tickformatstops,t,e)}var a=t.tickformatstops,o=e.tickformatstops=[];if(Array.isArray(a))for(var s,l,c=0;c<a.length;c++)s=a[c],l={},r(\"dtickrange\"),r(\"value\"),o.push(l)}(t,e),u||\"date\"===a||(r(\"showexponent\",s),r(\"exponentformat\"),r(\"separatethousands\"))}}\"category\"===a||o.noHover||r(\"hoverformat\")}},{\"../../lib\":743,\"./layout_attributes\":801}],810:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r,a){var o=n.coerce2(t,e,i,\"ticklen\"),s=n.coerce2(t,e,i,\"tickwidth\"),l=n.coerce2(t,e,i,\"tickcolor\",e.color);r(\"ticks\",a.outerTicks||o||s||l?\"outside\":\"\")||(delete e.ticklen,delete e.tickwidth,delete e.tickcolor)}},{\"../../lib\":743,\"./layout_attributes\":801}],811:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").ONEDAY;e.exports=function(t,e,r,o){var s=\"auto\";\"array\"!==t.tickmode||\"log\"!==o&&\"date\"!==o||(t.tickmode=\"auto\"),Array.isArray(t.tickvals)?s=\"array\":t.dtick&&(s=\"linear\");var l=r(\"tickmode\",s);if(\"auto\"===l)r(\"nticks\");else if(\"linear\"===l){var c=\"date\"===o?a:1,u=r(\"dtick\",c);if(n(u))e.dtick=u>0?Number(u):c;else if(\"string\"!=typeof u)e.dtick=c;else{var f=u.charAt(0),h=u.substr(1);((h=n(h)?Number(h):0)<=0||!(\"date\"===o&&\"M\"===f&&h===Math.round(h)||\"log\"===o&&\"L\"===f||\"log\"===o&&\"D\"===f&&(1===h||2===h)))&&(e.dtick=c)}var d=\"date\"===o?i.dateTick0(e.calendar):0,p=r(\"tick0\",d);\"date\"===o?e.tick0=i.cleanDate(p,d):n(p)&&\"D1\"!==u&&\"D2\"!==u?e.tick0=Number(p):e.tick0=d}else{void 0===r(\"tickvals\")?e.tickmode=\"auto\":r(\"ticktext\")}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],812:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plotly\"),a=t(\"../../registry\"),o=t(\"../../components/drawing\"),s=t(\"./axes\"),l=t(\"./constants\").attrRegex;e.exports=function(t,e,r,c){function u(t){var e=t.xaxis,r=t.yaxis;d._defs.select(\"#\"+t.clipId+\"> rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function f(e,r){var n,i,l,c=m[e.xaxis._id],u=m[e.yaxis._id],f=[];if(c){i=(n=t._fullLayout[c.axisName])._r,l=c.to,f[0]=(i[0]*(1-r)+r*l[0]-i[0])/(i[1]-i[0])*e.xaxis._length;var h=i[1]-i[0],p=l[1]-l[0];n.range[0]=i[0]*(1-r)+r*l[0],n.range[1]=i[1]*(1-r)+r*l[1],f[2]=e.xaxis._length*(1-r+r*p/h)}else f[0]=0,f[2]=e.xaxis._length;if(u){i=(n=t._fullLayout[u.axisName])._r,l=u.to,f[1]=(i[1]*(1-r)+r*l[1]-i[1])/(i[0]-i[1])*e.yaxis._length;var g=i[1]-i[0],v=l[1]-l[0];n.range[0]=i[0]*(1-r)+r*l[0],n.range[1]=i[1]*(1-r)+r*l[1],f[3]=e.yaxis._length*(1-r+r*v/g)}else f[1]=0,f[3]=e.yaxis._length;!function(e,r){function n(e,r,n){for(i=0;i<e.length;i++){var a=e[i];if(-1===o.indexOf(a.xref)&&-1===o.indexOf(a.yref)||r(t,i),n)return}}var i,o=[];for(o=[e._id,r._id],i=0;i<o.length;i++)s.doTicks(t,o[i],!0);n(d.annotations||[],a.getComponentMethod(\"annotations\",\"drawOne\")),n(d.shapes||[],a.getComponentMethod(\"shapes\",\"drawOne\")),n(d.images||[],a.getComponentMethod(\"images\",\"draw\"),!0)}(e.xaxis,e.yaxis);var y=e.xaxis,x=e.yaxis,b=!!c,_=!!u,w=b?y._length/f[2]:1,M=_?x._length/f[3]:1,k=b?f[0]:0,A=_?f[1]:0,T=b?f[0]/f[2]*y._length:0,S=_?f[1]/f[3]*x._length:0,E=y._offset-T,L=x._offset-S;d._defs.select(\"#\"+e.clipId+\"> rect\").call(o.setTranslate,k,A).call(o.setScale,1/w,1/M),e.plot.call(o.setTranslate,E,L).call(o.setScale,w,M).selectAll(\".points\").selectAll(\".point\").call(o.setPointGroupScale,1/w,1/M),e.plot.selectAll(\".points\").selectAll(\".textpoint\").call(o.setTextPointsScale,1/w,1/M)}function h(){b=Date.now();for(var e=Math.min(1,(b-x)/r.duration),n=w(e),a=0;a<v.length;a++)f(v[a],n);b-x>r.duration?(!function(){for(var e={},r=0;r<g.length;r++){var n=t._fullLayout[m[g[r]].axisName],a=m[g[r]].to;e[n._name+\".range[0]\"]=a[0],e[n._name+\".range[1]\"]=a[1],n.range=a.slice()}y&&y(),i.relayout(t,e).then(function(){for(var t=0;t<v.length;t++)u(v[t])})}(),_=window.cancelAnimationFrame(h)):_=window.requestAnimationFrame(h)}var d=t._fullLayout,p=[],m=function(t){var e,r,n,i,a={};for(e in t)if((r=e.split(\".\"))[0].match(l)){var o=e.charAt(0),s=r[0];if(n=d[s],i={},Array.isArray(t[e])?i.to=t[e].slice(0):Array.isArray(t[e].range)&&(i.to=t[e].range.slice(0)),!i.to)continue;i.axisName=s,i.length=n._length,p.push(o),a[o]=i}return a}(e),g=Object.keys(m),v=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 c=l.xaxis._id,u=l.yaxis._id,f=l.xaxis.range,h=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[c]?r[c].to:f,a=r[u]?r[u].to:h,f[0]===i[0]&&f[1]===i[1]&&h[0]===a[0]&&h[1]===a[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||s.push(l)}}return s}(d,g,m);if(!v.length)return function(){function e(e,r,n){for(var i=0;i<e.length;i++)if(r(t,i),n)return}e(d.annotations||[],a.getComponentMethod(\"annotations\",\"drawOne\")),e(d.shapes||[],a.getComponentMethod(\"shapes\",\"drawOne\")),e(d.images||[],a.getComponentMethod(\"images\",\"draw\"),!0)}(),!1;var y;c&&(y=c());var x,b,_,w=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,function(){for(var e={},r=0;r<g.length;r++){var n=t._fullLayout[g[r]+\"axis\"];e[n._name+\".range[0]\"]=n.range[0],e[n._name+\".range[1]\"]=n.range[1],n.range=n._r.slice()}return i.relayout(t,e).then(function(){for(var t=0;t<v.length;t++)u(v[t])})}()}),x=Date.now(),_=window.requestAnimationFrame(h),Promise.resolve()}},{\"../../components/drawing\":643,\"../../plotly\":784,\"../../registry\":873,\"./axes\":789,\"./constants\":794,d3:128}],813:[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 l=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if((i[r+\"axis\"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}(e,r,n);if(l)if(\"histogram\"!==l.type||n!=={v:\"y\",h:\"x\"}[l.orientation||\"v\"]){var c=n+\"calendar\",u=l[c];if(a(l,n)){for(var f,h=i(l),d=[],p=0;p<e.length;p++)f=e[p],o.traceIs(f,\"box-violin\")&&(f[n+\"axis\"]||n)===r&&(void 0!==f[h]?d.push(f[h][0]):void 0!==f.name?d.push(f.name):d.push(\"text\"),f[c]!==u&&(u=void 0));t.type=s(d,u)}else t.type=s(l[n]||[l[n+\"0\"]],u)}else t.type=\"linear\"}}function i(t){return{v:\"x\",h:\"y\"}[t.orientation||\"v\"]}function a(t,e){var r=i(t),n=o.traceIs(t,\"box-violin\"),a=o.traceIs(t._fullInput||{},\"candlestick\");return n&&!a&&e===r&&void 0===t[r]&&void 0===t[r+\"0\"]}var o=t(\"../../registry\"),s=t(\"./axis_autotype\"),l=t(\"./axis_ids\").name2id;e.exports=function(t,e,r,i,a){a&&(e._name=a,e._id=l(a));\"-\"===r(\"type\")&&(n(e,i),\"-\"===e.type?e.type=\"linear\":t.type=e.type)}},{\"../../registry\":873,\"./axis_autotype\":790,\"./axis_ids\":792}],814:[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=l.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==i&&(o=!0),a[e.prop]=i,{changed:o,value:i}}function i(t,e){var r=[],n=e[0],i={};if(\"string\"==typeof n)i[n]=e[1];else{if(!l.isPlainObject(n))return r;i=n}return o(i,function(t,e,n){r.push({type:\"layout\",prop:t,value:n})},\"\",0),r}function a(t,e){var r,n,i,a,s=[];if(n=e[0],i=e[1],r=e[2],a={},\"string\"==typeof n)a[n]=i;else{if(!l.isPlainObject(n))return s;a=n,void 0===r&&(r=i)}return void 0===r&&(r=null),o(a,function(e,n,i){var a;if(Array.isArray(i)){var o=Math.min(i.length,t.data.length);r&&(o=Math.min(o,r.length)),a=[];for(var l=0;l<o;l++)a[l]=r?r[l]:l}else a=r?r.slice(0):null;if(null===a)Array.isArray(i)&&(i=i[0]);else if(Array.isArray(a)){if(!Array.isArray(i)){var c=i;i=[];for(var u=0;u<a.length;u++)i[u]=c}i.length=Math.min(a.length,i.length)}s.push({type:\"data\",prop:e,traces:a,value:i})},\"\",0),s}function o(t,e,r,n){Object.keys(t).forEach(function(i){var a=t[i];if(\"_\"!==i[0]){var s=r+(n>0?\".\":\"\")+i;l.isPlainObject(a)?o(a,e,s,n+1):e(s,i,a)}})}var s=t(\"../plotly\"),l=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 c=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(c)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(c){n(t,c,o.cache),o.check=function(){if(s){var e=n(t,c,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var u=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],f=0;f<u.length;f++)t._internalOn(u[f],o.check);o.remove=function(){for(var e=0;e<u.length;e++)t._removeInternalListener(u[e],o.check)}}else l.log(\"Unable to automatically bind plot updates to API command\"),o.lookupTable={},o.remove=function(){};return o.disable=function(){s=!1},o.enable=function(){s=!0},e&&(e._commandObserver=o),o},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i<o;i++){var s,l=e[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=r.computeAPICommandBindings(t,c,u);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var d=(s=f[0]).value;if(Array.isArray(d)){if(1!==d.length)return!1;d=d[0]}n&&(n[d]=i)}return a},r.executeAPICommand=function(t,e,r){if(\"skip\"===e)return Promise.resolve();var n=s[e],i=[t];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)i.push(r[a]);return n.apply(null,i).catch(function(t){return l.warn(\"API call to Plotly.\"+e+\" rejected.\",t),Promise.reject(t)})},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case\"restyle\":n=a(t,r);break;case\"relayout\":n=i(0,r);break;case\"update\":n=a(t,[r[0],r[2]]).concat(i(0,[r[1]]));break;case\"animate\":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==[\"string\",\"number\"].indexOf(typeof e[0][0])?[{type:\"layout\",prop:\"_currentFrame\",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{\"../lib\":743,\"../plotly\":784}],815:[function(t,e,r){\"use strict\";var n=t(\"../lib/extend\").extendFlat;e.exports=function(t,e){t=t||{},e=e||{};var r={valType:\"info_array\",editType:t.editType,items:[{valType:\"number\",min:0,max:1},{valType:\"number\",min:0,max:1}],dflt:[0,1]};t.name&&t.name,t.trace,e.description&&e.description;return{x:n({},r,{}),y:n({},r,{}),editType:t.editType}}},{\"../lib/extend\":732}],816:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:\"string\",noBlank:!0,strict:!0,editType:e},size:{valType:\"number\",min:1,editType:e},color:{valType:\"color\",editType:r},editType:e};return t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],817:[function(t,e,r){\"use strict\";e.exports={_isLinkedToArray:\"frames_entry\",group:{valType:\"string\"},name:{valType:\"string\"},traces:{valType:\"any\"},baseframe:{valType:\"string\"},data:{valType:\"any\"},layout:{valType:\"any\"}}},{}],818:[function(t,e,r){\"use strict\";r.projNames={equirectangular:\"equirectangular\",mercator:\"mercator\",orthographic:\"orthographic\",\"natural earth\":\"naturalEarth\",kavrayskiy7:\"kavrayskiy7\",miller:\"miller\",robinson:\"robinson\",eckert4:\"eckert4\",\"azimuthal equal area\":\"azimuthalEqualArea\",\"azimuthal equidistant\":\"azimuthalEquidistant\",\"conic equal area\":\"conicEqualArea\",\"conic conformal\":\"conicConformal\",\"conic equidistant\":\"conicEquidistant\",gnomonic:\"gnomonic\",stereographic:\"stereographic\",mollweide:\"mollweide\",hammer:\"hammer\",\"transverse mercator\":\"transverseMercator\",\"albers usa\":\"albersUsa\",\"winkel tripel\":\"winkel3\",aitoff:\"aitoff\",sinusoidal:\"sinusoidal\"},r.axesNames=[\"lonaxis\",\"lataxis\"],r.lonaxisSpan={orthographic:180,\"azimuthal equal area\":360,\"azimuthal equidistant\":360,\"conic conformal\":180,gnomonic:160,stereographic:180,\"transverse mercator\":180,\"*\":360},r.lataxisSpan={\"conic conformal\":150,stereographic:179.5,\"*\":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\"equirectangular\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\"albers usa\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\"conic conformal\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\"mercator\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\"mercator\",projRotate:[0,0,0]},\"north america\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\"conic conformal\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\"south america\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\"mercator\",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=\"#F0DC82\",r.waterColor=\"#3399FF\",r.locationmodeToLayer={\"ISO-3\":\"countries\",\"USA-states\":\"subunits\",\"country names\":\"countries\"},r.sphereSVG={type:\"Sphere\"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[\"bg\",\"ocean\",\"land\",\"lakes\",\"subunits\",\"countries\",\"coastlines\",\"rivers\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"frontplot\"],r.layersForChoropleth=[\"bg\",\"ocean\",\"land\",\"subunits\",\"countries\",\"coastlines\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"rivers\",\"lakes\",\"frontplot\"],r.layerNameToAdjective={ocean:\"ocean\",land:\"land\",lakes:\"lake\",subunits:\"subunit\",countries:\"country\",coastlines:\"coastline\",rivers:\"river\",frame:\"frame\"}},{}],819:[function(t,e,r){\"use strict\";function n(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var i=t(\"d3\"),a=t(\"../../plotly\"),o=t(\"../../lib\"),s=t(\"../../components/color\"),l=t(\"../../components/drawing\"),c=t(\"../../components/fx\"),u=t(\"../plots\"),f=t(\"../cartesian/axes\"),h=t(\"../../components/dragelement\"),d=t(\"../cartesian/select\"),p=t(\"./zoom\"),m=t(\"./constants\"),g=t(\"../../lib/topojson_utils\"),v=t(\"topojson-client\").feature;t(\"./projections\")(i);var y=n.prototype;e.exports=function(t){return new n(t)},y.plot=function(t,e,r){var n=this,i=e[this.id],a=g.getTopojsonName(i);null===n.topojson||a!==n.topojsonName?(n.topojsonName=a,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then(function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(t,e)})):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(t,e))):n.update(t,e)},y.fetchTopojson=function(){var t=g.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise(function(e,r){i.json(t,function(n,i){if(n)return r(404===n.status?new Error([\"plotly.js could not find topojson file at\",t,\".\",\"Make sure the *topojsonURL* plot config option\",\"is set properly.\"].join(\" \")):new Error([\"unexpected error while fetching topojson file at\",t].join(\" \")));e(i)})})},y.update=function(t,e){var r=e[this.id];if(!this.updateProjection(e,r)){this.hasChoropleth=!1;for(var n=0;n<t.length;n++)if(\"choropleth\"===t[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial||this.saveViewInitial(r),this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),u.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var i=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=i.selectAll(\".point\"),this.dataPoints.text=i.selectAll(\"text\"),this.dataPaths.line=i.selectAll(\".js-line\");var a=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=a.selectAll(\"path\"),this.render()}},y.updateProjection=function(t,e){var r=t._size,n=e.domain,s=e.projection,l=s.rotation||{},c=e.center||{},u=this.projection=function(t){for(var e=t.projection.type,r=i.geo[m.projNames[e]](),n=t._isClipped?m.lonaxisSpan[e]/2:null,a=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],o=function(t){return t?r:[]},s=0;s<a.length;s++){var l=a[s];\"function\"!=typeof r[l]&&(r[l]=o)}return r.isLonLatOverEdges=function(t){if(null===r(t))return!0;if(n){var e=r.rotate();return i.geo.distance(t,[-e[0],-e[1]])>n*Math.PI/180}return!1},r.getPath=function(){return i.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(m.precision),n&&r.clipAngle(n-m.clipPad),r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var f=[[r.l+r.w*n.x[0],r.t+r.h*(1-n.y[1])],[r.l+r.w*n.x[1],r.t+r.h*(1-n.y[0])]],h=e.lonaxis,d=e.lataxis,p=function(t,e){var r=m.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(h.range,d.range);u.fitExtent(f,p);var g=this.bounds=u.getBounds(p),v=this.fitScale=u.scale(),y=u.translate();if(!isFinite(g[0][0])||!isFinite(g[0][1])||!isFinite(g[1][0])||!isFinite(g[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=[\"projection.rotation\",\"center\",\"lonaxis.range\",\"lataxis.range\"],_=\"Invalid geo settings, relayout'ing to default view.\",w={},M=0;M<b.length;M++)w[this.id+\".\"+b[M]]=null;return this.viewInitial=null,o.warn(_),x._promises.push(a.relayout(x,w)),_}var k=this.midPt=[(g[0][0]+g[1][0])/2,(g[0][1]+g[1][1])/2];if(u.scale(s.scale*v).translate([y[0]+(k[0]-y[0]),y[1]+(k[1]-y[1])]).clipExtent(g),e._isAlbersUsa){var A=u([c.lon,c.lat]),T=u.translate();u.translate([T[0]-(A[0]-T[0]),T[1]-(A[1]-T[1])])}},y.updateBaseLayers=function(t,e){function r(t){return\"lonaxis\"===t||\"lataxis\"===t}function n(t){return Boolean(m.lineLayers[t])}function a(t){return Boolean(m.fillLayers[t])}var o=this,c=o.topojson,u=o.layers,f=o.basePaths,h=(this.hasChoropleth?m.layersForChoropleth:m.layers).filter(function(t){return n(t)||a(t)?e[\"show\"+t]:!r(t)||e[t].showgrid}),d=o.framework.selectAll(\".layer\").data(h,String);d.exit().each(function(t){delete u[t],delete f[t],i.select(this).remove()}),d.enter().append(\"g\").attr(\"class\",function(t){return\"layer \"+t}).each(function(t){var e=u[t]=i.select(this);\"bg\"===t?o.bgRect=e.append(\"rect\").style(\"pointer-events\",\"all\"):r(t)?f[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):n(t)?f[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):a(t)&&(f[t]=e.append(\"path\").style(\"stroke\",\"none\"))}),d.order(),d.each(function(t){var o=f[t],u=m.layerNameToAdjective[t];\"frame\"===t?o.datum(m.sphereSVG):n(t)||a(t)?o.datum(v(c,c.objects[t])):r(t)&&o.datum(function(t,e){var r=e[t].dtick,n=m.scopeDefaults[e.scope],a=n.lonaxisRange,o=n.lataxisRange,s=\"lonaxis\"===t?[r]:[0,r];return i.geo.graticule().extent([[a[0],o[0]],[a[1],o[1]]]).step(s)}(t,e)).call(s.stroke,e[t].gridcolor).call(l.dashLine,\"\",e[t].gridwidth),n(t)?o.call(s.stroke,e[u+\"color\"]).call(l.dashLine,\"\",e[u+\"width\"]):a(t)&&o.call(s.fill,e[u+\"color\"])})},y.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,c=r[1][1]-a+n;l.setRect(this.clipRect,i,a,o,c),this.bgRect.call(l.setRect,i,a,o,c).call(s.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=c},y.updateFx=function(t,e){function r(){var t=o.viewInitial,e={};for(var r in t)e[o.id+\".\"+r]=t[r];a.relayout(s,e),s.emit(\"plotly_doubleclick\",null)}function n(t){return o.projection.invert([t[0]+o.xaxis._offset,t[1]+o.yaxis._offset])}var o=this,s=o.graphDiv,l=o.bgRect,u=t.dragmode;if(!o.isStatic){if(\"pan\"===u)l.node().onmousedown=null,l.call(p(o,e)),l.on(\"dblclick.zoom\",r);else if(\"select\"===u||\"lasso\"===u){l.on(\".zoom\",null);var f;\"select\"===u?f=function(t,e){(t.range={})[o.id]=[n([e.xmin,e.ymin]),n([e.xmax,e.ymax])]}:\"lasso\"===u&&(f=function(t,e,r){(t.lassoPoints={})[o.id]=r.filtered.map(n)});var m={element:o.bgRect.node(),gd:s,plotinfo:{xaxis:o.xaxis,yaxis:o.yaxis,fillRangeItems:f},xaxes:[o.xaxis],yaxes:[o.yaxis],subplot:o.id,clickFn:function(e){2===e&&t._zoomlayer.selectAll(\".select-outline\").remove()}};m.prepFn=function(t,e,r){d(t,e,r,m,u)},h.init(m)}l.on(\"mousemove\",function(){var t=o.projection.invert(i.mouse(this));if(!t||isNaN(t[0])||isNaN(t[1]))return h.unhover(s,i.event);o.xaxis.p2c=function(){return t[0]},o.yaxis.p2c=function(){return t[1]},c.hover(s,i.event,o.id)}),l.on(\"mouseout\",function(){h.unhover(s,i.event)}),l.on(\"click\",function(){c.click(s,i.event)})}},y.makeFramework=function(){var t=this,e=t.graphDiv._fullLayout,r=\"clip\"+e._uid+t.id;t.clipDef=e._clips.append(\"clipPath\").attr(\"id\",r),t.clipRect=t.clipDef.append(\"rect\"),t.framework=i.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(l.setClipUrl,r),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\"x\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\"y\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},f.setConvert(t.mockAxis,e)},y.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={\"center.lon\":e.lon,\"center.lat\":e.lat,\"projection.scale\":r.scale}:t._isClipped?this.viewInitial={\"projection.scale\":r.scale,\"projection.rotation.lon\":n.lon,\"projection.rotation.lat\":n.lat}:this.viewInitial={\"center.lon\":e.lon,\"center.lat\":e.lat,\"projection.scale\":r.scale,\"projection.rotation.lon\":n.lon}},y.render=function(){function t(t){var e=n(t.lonlat);return e?\"translate(\"+e[0]+\",\"+e[1]+\")\":null}function e(t){return n.isLonLatOverEdges(t.lonlat)?\"none\":null}var r,n=this.projection,i=n.getPath();for(r in this.basePaths)this.basePaths[r].attr(\"d\",i);for(r in this.dataPaths)this.dataPaths[r].attr(\"d\",function(t){return i(t.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr(\"display\",e).attr(\"transform\",t)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../lib\":743,\"../../lib/topojson_utils\":769,\"../../plotly\":784,\"../cartesian/axes\":789,\"../cartesian/select\":807,\"../plots\":852,\"./constants\":818,\"./projections\":824,\"./zoom\":825,d3:128,\"topojson-client\":549}],820:[function(t,e,r){\"use strict\";var n=t(\"./geo\"),i=t(\"../../plots/get_data\").getSubplotCalcData,a=t(\"../../lib\").counterRegex;r.name=\"geo\",r.attr=\"geo\",r.idRoot=\"geo\",r.idRegex=r.attrRegex=a(\"geo\"),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=e._subplots.geo;void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;o<a.length;o++){var s=a[o],l=i(r,\"geo\",s),c=e[s]._subplot;c||(c=n({id:s,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}},r.updateFx=function(t){for(var e=t._subplots.geo,r=0;r<e.length;r++){var n=t[e[r]];n._subplot.updateFx(t,n)}}},{\"../../lib\":743,\"../../plots/get_data\":826,\"./geo\":819,\"./layout/attributes\":821,\"./layout/defaults\":822,\"./layout/layout_attributes\":823}],821:[function(t,e,r){\"use strict\";e.exports={geo:{valType:\"subplotid\",dflt:\"geo\",editType:\"calc\"}}},{}],822:[function(t,e,r){\"use strict\";function n(t,e,r){var n=r(\"resolution\"),i=r(\"scope\"),o=a.scopeDefaults[i],l=r(\"projection.type\",o.projType),c=e._isAlbersUsa=\"albers usa\"===l;c&&(i=e.scope=\"usa\");var u=e._isScoped=\"world\"!==i,f=e._isConic=-1!==l.indexOf(\"conic\");e._isClipped=!!a.lonaxisSpan[l];for(var h=0;h<s.length;h++){var d,p=s[h],m=[30,10][h];if(u)d=o[p+\"Range\"];else{var g=a[p+\"Span\"],v=(g[l]||g[\"*\"])/2,y=r(\"projection.rotation.\"+p.substr(0,3),o.projRotate[h]);d=[y-v,y+v]}r(p+\".tick0\",r(p+\".range\",d)[0]),r(p+\".dtick\",m),r(p+\".showgrid\")&&(r(p+\".gridcolor\"),r(p+\".gridwidth\"))}var x=e.lonaxis.range,b=e.lataxis.range,_=x[0],w=x[1];_>0&&w<0&&(w+=360);var M,k=(_+w)/2;if(!c){var A=u?o.projRotate:[k,0,0];M=r(\"projection.rotation.lon\",A[0]),r(\"projection.rotation.lat\",A[1]),r(\"projection.rotation.roll\",A[2]),r(\"showcoastlines\",!u)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\")&&r(\"oceancolor\")}var T,S;if(c?(T=-96.6,S=38.7):(T=u?k:M,S=(b[0]+b[1])/2),r(\"center.lon\",T),r(\"center.lat\",S),f){r(\"projection.parallels\",o.projParallels||[0,60])}r(\"projection.scale\"),r(\"showland\")&&r(\"landcolor\"),r(\"showlakes\")&&r(\"lakecolor\"),r(\"showrivers\")&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",u&&\"usa\"!==i)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===i||\"north america\"===i&&50===n)&&(r(\"showsubunits\",!0),r(\"subunitcolor\"),r(\"subunitwidth\")),u||r(\"showframe\",!0)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\")}var i=t(\"../../subplot_defaults\"),a=t(\"../constants\"),o=t(\"./layout_attributes\"),s=a.axesNames;e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:o,handleDefaults:n,partition:\"y\"})}},{\"../../subplot_defaults\":865,\"../constants\":818,\"./layout_attributes\":823}],823:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color/attributes\"),i=t(\"../../domain_attributes\"),a=t(\"../constants\"),o=t(\"../../../plot_api/edit_types\").overrideAll,s={range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},showgrid:{valType:\"boolean\",dflt:!1},tick0:{valType:\"number\"},dtick:{valType:\"number\"},gridcolor:{valType:\"color\",dflt:n.lightLine},gridwidth:{valType:\"number\",min:0,dflt:1}};e.exports=o({domain:i({name:\"geo\"},{}),resolution:{valType:\"enumerated\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\"enumerated\",values:Object.keys(a.scopeDefaults),dflt:\"world\"},projection:{type:{valType:\"enumerated\",values:Object.keys(a.projNames)},rotation:{lon:{valType:\"number\"},lat:{valType:\"number\"},roll:{valType:\"number\"}},parallels:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},scale:{valType:\"number\",min:0,dflt:1}},center:{lon:{valType:\"number\"},lat:{valType:\"number\"}},showcoastlines:{valType:\"boolean\"},coastlinecolor:{valType:\"color\",dflt:n.defaultLine},coastlinewidth:{valType:\"number\",min:0,dflt:1},showland:{valType:\"boolean\",dflt:!1},landcolor:{valType:\"color\",dflt:a.landColor},showocean:{valType:\"boolean\",dflt:!1},oceancolor:{valType:\"color\",dflt:a.waterColor},showlakes:{valType:\"boolean\",dflt:!1},lakecolor:{valType:\"color\",dflt:a.waterColor},showrivers:{valType:\"boolean\",dflt:!1},rivercolor:{valType:\"color\",dflt:a.waterColor},riverwidth:{valType:\"number\",min:0,dflt:1},showcountries:{valType:\"boolean\"},countrycolor:{valType:\"color\",dflt:n.defaultLine},countrywidth:{valType:\"number\",min:0,dflt:1},showsubunits:{valType:\"boolean\"},subunitcolor:{valType:\"color\",dflt:n.defaultLine},subunitwidth:{valType:\"number\",min:0,dflt:1},showframe:{valType:\"boolean\"},framecolor:{valType:\"color\",dflt:n.defaultLine},framewidth:{valType:\"number\",min:0,dflt:1},bgcolor:{valType:\"color\",dflt:n.background},lonaxis:s,lataxis:s},\"plot\",\"from-root\")},{\"../../../components/color/attributes\":617,\"../../../plot_api/edit_types\":773,\"../../domain_attributes\":815,\"../constants\":818}],824:[function(t,e,r){\"use strict\";e.exports=function(t){function e(t,e){return{type:\"Feature\",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(\"GeometryCollection\"===e.type)return{type:\"GeometryCollection\",geometries:object.geometries.map(function(t){return r(t,n)})};if(!M.hasOwnProperty(e.type))return null;var i=M[e.type];return t.geo.stream(e,n(i)),i.result()}function n(){}function i(t){return t>1?S:t<-1?-S:Math.asin(t)}function a(t){return t>1?0:t<-1?T:Math.acos(t)}function o(t,e){var r=(2+S)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>k;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(T*(4+T))*t*(1+Math.cos(e)),2*Math.sqrt(T/(4+T))*Math.sin(e)]}function s(t,e){function r(r,n){var i=D(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?D:e===1/0?l:(r.invert=function(r,n){var i=D.invert(r/t,n);return i[0]*=e,i},r)}function l(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function c(t,e){return[3*t/(2*T)*Math.sqrt(T*T/3-e*e),e]}function u(t,e){return[t,1.25*Math.log(Math.tan(T/4+.4*e))]}function f(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)>k&&--i>0);return e/2}}function h(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 d(t,e){var r,n=Math.min(18,36*Math.abs(e)/T),i=Math.floor(n),a=n-i,o=(r=P[i])[0],s=r[1],l=(r=P[++i])[0],c=r[1],u=(r=P[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?S:-S)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function p(t,e){return[t*Math.cos(e),e]}function m(t,e){var r=Math.cos(e),n=function(t){return t?t/Math.sin(t):1}(a(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function g(t,e){var r=m(t,e);return[(r[0]+t/S)/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&&v.hasOwnProperty(t.type)?v[t.type]:r)(t,n)};var v={Feature:e,FeatureCollection:function(t,r){return{type:\"FeatureCollection\",features:t.features.map(function(t){return e(t,r)})}}},y=[],x=[],b={point:function(t,e){y.push([t,e])},result:function(){var t=y.length?y.length<2?{type:\"Point\",coordinates:y[0]}:{type:\"MultiPoint\",coordinates:y}:null;return y=[],t}},_={lineStart:n,point:function(t,e){y.push([t,e])},lineEnd:function(){y.length&&(x.push(y),y=[])},result:function(){var t=x.length?x.length<2?{type:\"LineString\",coordinates:x[0]}:{type:\"MultiLineString\",coordinates:x}:null;return x=[],t}},w={polygonStart:n,lineStart:n,point:function(t,e){y.push([t,e])},lineEnd:function(){var t=y.length;if(t){do{y.push(y[0].slice())}while(++t<4);x.push(y),y=[]}},polygonEnd:n,result:function(){if(!x.length)return null;var t=[],e=[];return x.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r<e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n<=0}(r)?e.push(r):t.push([r])}),e.forEach(function(e){var r=e[0];t.some(function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],u=l[1],f=t[s],h=f[0],d=f[1];u>n^d>n&&r<(h-c)*(n-u)/(d-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),x=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}},M={Point:b,MultiPoint:b,LineString:_,MultiLineString:_,Polygon:w,MultiPolygon:w,Sphere:w},k=1e-6,A=k*k,T=Math.PI,S=T/2,E=(Math.sqrt(T),T/180),L=180/T,C=t.geo.projection,z=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=a[+(r<0)],o=0,s=i.length-1;o<s&&t>i[o][2][0];++o);var l=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],n*r>n*i[o][0][1]?i[o][0][1]:r)[0],l}function n(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a<o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var c=0;c<e;++c)l.push([s[0]+c*n,s[1]+c*i]);s=r}return l.push(r),l}var i,a=[[[[-T,0],[0,S],[T,0]]],[[[-T,0],[0,-S],[T,0]]]];e.invert&&(r.invert=function(t,n){for(var o=i[+(n<0)],s=a[+(n<0)],l=0,c=o.length;l<c;++l){var u=o[l];if(u[0][0]<=t&&t<u[1][0]&&u[0][1]<=n&&n<u[1][1]){var f=e.invert(t-e(s[l][1][0],0)[0],n);return f[0]+=s[l][1][0],function(t,e){return Math.abs(t[0]-e[0])<k&&Math.abs(t[1]-e[1])<k}(r(f[0],f[1]),[t,n])?f:null}}});var o=t.geo.projection(r),s=o.stream;return o.stream=function(e){var r=o.rotate(),i=s(e),l=(o.rotate([0,0]),s(e));return o.rotate(r),i.sphere=function(){t.geo.stream(function(){for(var e=[],r=0,i=a[0].length;r<i;++r){var o=180*(f=a[0][r])[0][0]/T,s=180*f[0][1]/T,l=180*f[1][1]/T,c=180*f[2][0]/T,u=180*f[2][1]/T;e.push(n([[o+1e-6,s+1e-6],[o+1e-6,l-1e-6],[c-1e-6,l-1e-6],[c-1e-6,u+1e-6]],30))}for(r=a[1].length-1;r>=0;--r){var f;o=180*(f=a[1][r])[0][0]/T,s=180*f[0][1]/T,l=180*f[1][1]/T,c=180*f[2][0]/T,u=180*f[2][1]/T,e.push(n([[c-1e-6,u-1e-6],[c-1e-6,l+1e-6],[o+1e-6,l+1e-6],[o+1e-6,s-1e-6]],30))}return{type:\"Polygon\",coordinates:[t.merge(e)]}}(),l)},i},o.lobes=function(t){return arguments.length?(a=t.map(function(t){return t.map(function(t){return[[t[0][0]*T/180,t[0][1]*T/180],[t[1][0]*T/180,t[1][1]*T/180],[t[2][0]*T/180,t[2][1]*T/180]]})}),i=a.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]]})}),o):a.map(function(t){return t.map(function(t){return[[180*t[0][0]/T,180*t[0][1]/T],[180*t[1][0]/T,180*t[1][1]/T],[180*t[2][0]/T,180*t[2][1]/T]]})})},o},o.invert=function(t,e){var r=.5*e*Math.sqrt((4+T)/T),n=i(r),a=Math.cos(n);return[t/(2/Math.sqrt(T*(4+T))*(1+a)),i((n+r*(a+2))/(2+S))]},(t.geo.eckert4=function(){return C(o)}).raw=o;var D=t.geo.azimuthalEqualArea.raw;l.invert=function(t,e){var r=2*i(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=z(s),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=s,c.invert=function(t,e){return[2/3*T*t/Math.sqrt(T*T/3-e*e),e]},(t.geo.kavrayskiy7=function(){return C(c)}).raw=c,u.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*T]},(t.geo.miller=function(){return C(u)}).raw=u,f(T);var I=function(t,e,r){function n(r,n){return[t*r*Math.cos(n=a(n)),e*Math.sin(n)]}var a=f(r);return n.invert=function(n,a){var o=i(a/e);return[n/(t*Math.cos(o)),i((2*o+Math.sin(2*o))/r)]},n}(Math.SQRT2/S,Math.SQRT2,T);(t.geo.mollweide=function(){return C(I)}).raw=I,h.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>k&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return C(h)}).raw=h;var P=[[.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]];P.forEach(function(t){t[1]*=1.0144}),d.invert=function(t,e){var r=e/S,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=P[a][1],s=P[a+1][1],l=P[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,h=u/c,d=f*(1-h*f*(1-2*h*f));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{d=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=P[a][1],s=P[a+1][1],l=P[Math.min(19,a+2)][1],n-=(p=(e>=0?S:-S)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*L}while(Math.abs(p)>A&&--m>0);break}}while(--a>=0);var g=P[a][0],v=P[a+1][0],y=P[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*E]},(t.geo.robinson=function(){return C(d)}).raw=d,p.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return C(p)}).raw=p,m.invert=function(t,e){if(!(t*t+4*e*e>T*T+k)){var r=t,n=e,i=25;do{var o,s=Math.sin(r),l=Math.sin(r/2),c=Math.cos(r/2),u=Math.sin(n),f=Math.cos(n),h=Math.sin(2*n),d=u*u,p=f*f,m=l*l,g=1-p*c*c,v=g?a(f*c)*Math.sqrt(o=1/g):o=0,y=2*v*f*l-t,x=v*u-e,b=o*(p*m+v*f*c*d),_=o*(.5*s*h-2*v*u*l),w=.25*o*(h*l-v*u*p*s),M=o*(d*c+v*m*f),A=_*w-M*b;if(!A)break;var S=(x*_-y*M)/A,E=(y*w-x*b)/A;r-=S,n-=E}while((Math.abs(S)>k||Math.abs(E)>k)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return C(m)}).raw=m,g.invert=function(t,e){var r=t,n=e,i=25;do{var o,s=Math.cos(n),l=Math.sin(n),c=Math.sin(2*n),u=l*l,f=s*s,h=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-f*d*d,v=g?a(s*d)*Math.sqrt(o=1/g):o=0,y=.5*(2*v*s*p+r/S)-t,x=.5*(v*l+n)-e,b=.5*o*(f*m+v*s*d*u)+.5/S,_=o*(h*c/4-v*l*p),w=.125*o*(c*p-v*l*f*h),M=.5*o*(u*d+v*m*s)+.5,A=_*w-M*b,T=(x*_-y*M)/A,E=(y*w-x*b)/A;r-=T,n-=E}while((Math.abs(T)>k||Math.abs(E)>k)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return C(g)}).raw=g}},{}],825:[function(t,e,r){\"use strict\";function n(t,e){return d.behavior.zoom().translate(e.translate()).scale(e.scale())}function i(t,e,r){function n(t,e){var r=p.nestedProperty(s,t);r.get()!==e&&(r.set(e),p.nestedProperty(o,t).set(e),l[i+\".\"+t]=e)}var i=t.id,a=t.graphDiv,o=a.layout[i],s=a._fullLayout[i],l={};r(n),n(\"projection.scale\",e.scale()/t.fitScale),a.emit(\"plotly_relayout\",l)}function a(t,e){function r(r){var n=e.invert(t.midPt);r(\"center.lon\",n[0]),r(\"center.lat\",n[1])}var a=n(0,e);return a.on(\"zoomstart\",function(){d.select(this).style(v)}).on(\"zoom\",function(){e.scale(d.event.scale).translate(d.event.translate),t.render()}).on(\"zoomend\",function(){d.select(this).style(y),i(t,e,r)}),a}function o(t,e){function r(t){return e.invert(t)}function a(r){var n=e.rotate(),i=e.invert(t.midPt);r(\"projection.rotation.lon\",-n[0]),r(\"center.lon\",i[0]),r(\"center.lat\",i[1])}var o,s,l,c,u,f,h,p,m=n(0,e),g=2;return m.on(\"zoomstart\",function(){d.select(this).style(v),o=d.mouse(this),s=e.rotate(),l=e.translate(),c=s,u=r(o)}).on(\"zoom\",function(){if(f=d.mouse(this),function(t){var n=e(r(t));return Math.abs(n[0]-t[0])>g||Math.abs(n[1]-t[1])>g}(o))return m.scale(e.scale()),void m.translate(e.translate());e.scale(d.event.scale),e.translate([l[0],d.event.translate[1]]),u?r(f)&&(p=r(f),h=[c[0]+(p[0]-u[0]),s[1],s[2]],e.rotate(h),c=h):u=r(o=f),t.render()}).on(\"zoomend\",function(){d.select(this).style(y),i(t,e,a)}),m}function s(t,e){function r(t){var r=e.rotate();t(\"projection.rotation.lon\",-r[0]),t(\"projection.rotation.lat\",-r[1])}var a,o={r:e.rotate(),k:e.scale()},s=n(0,e),u=function(t){var e=0,r=arguments.length,n=[];for(;++e<r;)n.push(arguments[e]);var i=d.dispatch.apply(null,n);return i.of=function(e,r){return function(n){var a;try{a=n.sourceEvent=d.event,n.target=t,d.event=n,i[n.type].apply(e,r)}finally{d.event=a}}},i}(s,\"zoomstart\",\"zoom\",\"zoomend\"),p=0,x=s.on;return s.on(\"zoomstart\",function(){d.select(this).style(v);var t=d.mouse(this),r=e.rotate(),n=r,i=e.translate(),y=function(t){var e=.5*t[0]*m,r=.5*t[1]*m,n=.5*t[2]*m,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),c=Math.cos(n);return[a*s*c+i*o*l,i*s*c-a*o*l,a*o*c+i*s*l,a*s*l-i*o*c]}(r);a=l(e,t),x.call(s,\"zoom\",function(){var s=d.mouse(this);if(e.scale(o.k=d.event.scale),a){if(l(e,s)){e.rotate(r).translate(i);var p=l(e,s),m=function(t,e){if(!t||!e)return;var r=function(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]]}(t,e),n=Math.sqrt(h(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,h(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}(a,p),v=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*g,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*g,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*g]}(function(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],c=e[3];return[r*o-n*s-i*l-a*c,r*s+n*o+i*c-a*l,r*l-n*c+i*o+a*s,r*c+n*l-i*s+a*o]}(y,m)),x=o.r=function(t,e,r){var n=f(e,2,t[0]);n=f(n=f(n,1,t[1]),0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],h=n[1],d=n[2],p=Math.atan2(s,o)*g,m=Math.sqrt(o*o+s*s);Math.abs(h)>m?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/m)*g-p,i=Math.sqrt(m*m-h*h));var v=180-a-2*p,y=(Math.atan2(d,u)-Math.atan2(l,i))*g,x=(Math.atan2(d,u)-Math.atan2(l,-i))*g,b=c(r[0],r[1],a,y),_=c(r[0],r[1],v,x);return b<=_?[a,y,r[2]]:[v,x,r[2]]}(v,a,n);isFinite(x[0])&&isFinite(x[1])&&isFinite(x[2])||(x=n),e.rotate(x),n=x}}else a=l(e,t=s);!function(t){t({type:\"zoom\"})}(u.of(this,arguments))}),function(t){p++||t({type:\"zoomstart\"})}(u.of(this,arguments))}).on(\"zoomend\",function(){d.select(this).style(y),x.call(s,\"zoom\",null),function(t){--p||t({type:\"zoomend\"})}(u.of(this,arguments)),i(t,e,r)}).on(\"zoom.redraw\",function(){t.render()}),d.rebind(s,u,\"on\")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*m,r=t[1]*m,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function c(t,e,r,n){var i=u(r-t),a=u(n-e);return Math.sqrt(i*i+a*a)}function u(t){return(t%360+540)%360-180}function f(t,e,r){var n=r*m,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 h(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}var d=t(\"d3\"),p=t(\"../../lib\"),m=Math.PI/180,g=180/Math.PI,v={cursor:\"pointer\"},y={cursor:\"auto\"};e.exports=function(t,e){var r=t.projection;return(e._isScoped?a:e._isClipped?s:o)(t,r)}},{\"../../lib\":743,d3:128}],826:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"./cartesian/constants\").SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},r.getModuleCalcData=function(t,e){var r=[],i=\"string\"==typeof e?n.getModule(e):e;if(!i)return r;for(var a=0;a<t.length;a++){var o=t[a],s=o[0].trace;s._module===i&&!0===s.visible&&r.push(o)}return r},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if(\"gl2d\"===e){var u=r.match(i);o=\"x\"+u[1],s=\"y\"+u[2]}for(var f=0;f<t.length;f++)a=t[f],\"gl2d\"===e&&n.traceIs(a,\"gl2d\")?a[l[0]]===o&&a[l[1]]===s&&c.push(a):a[l]===r&&c.push(a);return c}},{\"../registry\":873,\"./cartesian/constants\":794}],827:[function(t,e,r){\"use strict\";var n=t(\"mouse-change\"),i=t(\"mouse-wheel\"),a=t(\"mouse-event-offset\"),o=t(\"../cartesian/constants\");e.exports=function(t){function e(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function r(r,n,i){function a(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(f[e]=i,f[e+2]=a,c.dataBox=f,t.setRanges(f)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}var s,u,f=t.calcDataBox(),h=l.viewBox,d=c.lastPos[0],p=c.lastPos[1],m=o.MINDRAG*l.pixelRatio,g=o.MINZOOM*l.pixelRatio;switch(n*=l.pixelRatio,i*=l.pixelRatio,i=h[3]-h[1]-i,t.fullLayout.dragmode){case\"zoom\":if(r){var v=n/(h[2]-h[0])*(f[2]-f[0])+f[0],y=i/(h[3]-h[1])*(f[3]-f[1])+f[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)<g,b=Math.abs(c.dragStart[1]-i)<g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(c.boxEnd[0]=c.boxStart[0]),b&&(c.boxEnd[1]=c.boxStart[1]);else{s=c.boxEnd[0]-c.boxStart[0],u=c.boxEnd[1]-c.boxStart[1];var _=(f[3]-f[1])/(f[2]-f[0]);Math.abs(s*_)>Math.abs(u)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(s)*_*(u>=0?1:-1),c.boxEnd[1]<f[1]?(c.boxEnd[1]=f[1],c.boxEnd[0]=c.boxStart[0]+(f[1]-c.boxStart[1])/Math.abs(_)):c.boxEnd[1]>f[3]&&(c.boxEnd[1]=f[3],c.boxEnd[0]=c.boxStart[0]+(f[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(u)/_*(s>=0?1:-1),c.boxEnd[0]<f[0]?(c.boxEnd[0]=f[0],c.boxEnd[1]=c.boxStart[1]+(f[0]-c.boxStart[0])*Math.abs(_)):c.boxEnd[0]>f[2]&&(c.boxEnd[0]=f[2],c.boxEnd[1]=c.boxStart[1]+(f[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(s=c.boxStart[0]!==c.boxEnd[0],u=c.boxStart[1]!==c.boxEnd[1],s||u?(s&&(a(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),u&&(a(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case\"pan\":c.boxEnabled=!1,c.boxInited=!1,r?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)<m&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<m&&(i=c.dragStart[1]),s=(d-n)*(f[2]-f[0])/(l.viewBox[2]-l.viewBox[0]),u=(p-i)*(f[3]-f[1])/(l.viewBox[3]-l.viewBox[1]),f[0]+=s,f[2]+=s,f[1]+=u,f[3]+=u,t.setRanges(f),c.panning=!0,c.lastInputTime=Date.now(),e(),t.cameraChanged(),t.handleAnnotations()):c.panning&&(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}var s=t.mouseContainer,l=t.glplot,c=new function(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}(s,l);return c.mouseListener=n(s,r),s.addEventListener(\"touchstart\",function(t){var e=a(t.changedTouches[0],s);r(0,e[0],e[1]),r(1,e[0],e[1])}),s.addEventListener(\"touchmove\",function(t){t.preventDefault();var e=a(t.changedTouches[0],s);r(1,e[0],e[1])}),s.addEventListener(\"touchend\",function(){r(0,c.lastPos[0],c.lastPos[1])}),c.wheelListener=i(s,function(r,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=l.viewBox,o=c.lastPos[0],s=c.lastPos[1],u=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*u+f,i[2]=(i[2]-f)*u+f,i[1]=(i[1]-h)*u+h,i[3]=(i[3]-h)*u+h,t.setRanges(i),c.lastInputTime=Date.now(),e(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),c}},{\"../cartesian/constants\":794,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446}],828:[function(t,e,r){\"use strict\";function n(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[\"x\",\"y\"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[\"sans-serif\",\"sans-serif\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=\"\",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=\"sans-serif\",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=!1,this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var i=t(\"../cartesian/axes\"),a=t(\"../../lib/html2unicode\"),o=t(\"../../lib/str2rgbarray\"),s=n.prototype,l=[\"xaxis\",\"yaxis\"];s.merge=function(t){this.titleEnable=!1,this.backgroundColor=o(t.plot_bgcolor);var e,r,n,i,s,c,u,f,h,d,p;for(d=0;d<2;++d){var m=(e=l[d]).charAt(0);for(n=(r=t[this.scene[e]._name]).title===this.scene.fullLayout._dfltTitle[m]?\"\":r.title,p=0;p<=2;p+=2)this.labelEnable[d+p]=!1,this.labels[d+p]=a(n),this.labelColor[d+p]=o(r.titlefont.color),this.labelFont[d+p]=r.titlefont.family,this.labelSize[d+p]=r.titlefont.size,this.labelPad[d+p]=this.getLabelPad(e,r),this.tickEnable[d+p]=!1,this.tickColor[d+p]=o((r.tickfont||{}).color),this.tickAngle[d+p]=\"auto\"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[d+p]=this.getTickPad(r),this.tickMarkLength[d+p]=0,this.tickMarkWidth[d+p]=r.tickwidth||0,this.tickMarkColor[d+p]=o(r.tickcolor),this.borderLineEnable[d+p]=!1,this.borderLineColor[d+p]=o(r.linecolor),this.borderLineWidth[d+p]=r.linewidth||0;u=this.hasSharedAxis(r),s=this.hasAxisInDfltPos(e,r)&&!u,c=this.hasAxisInAltrPos(e,r)&&!u,i=r.mirror||!1,f=u?-1!==String(i).indexOf(\"all\"):!!i,h=u?\"allticks\"===i:-1!==String(i).indexOf(\"ticks\"),s?this.labelEnable[d]=!0:c&&(this.labelEnable[d+2]=!0),s?this.tickEnable[d]=r.showticklabels:c&&(this.tickEnable[d+2]=r.showticklabels),(s||f)&&(this.borderLineEnable[d]=r.showline),(c||f)&&(this.borderLineEnable[d+2]=r.showline),(s||h)&&(this.tickMarkLength[d]=this.getTickMarkLength(r)),(c||h)&&(this.tickMarkLength[d+2]=this.getTickMarkLength(r)),this.gridLineEnable[d]=r.showgrid,this.gridLineColor[d]=o(r.gridcolor),this.gridLineWidth[d]=r.gridwidth,this.zeroLineEnable[d]=r.zeroline,this.zeroLineColor[d]=o(r.zerolinecolor),this.zeroLineWidth[d]=r.zerolinewidth}},s.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==i.findSubplotsWithAxis(r,t).indexOf(e.id)},s.hasAxisInDfltPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"bottom\"===r:\"yaxis\"===t?\"left\"===r:void 0},s.hasAxisInAltrPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"top\"===r:\"yaxis\"===t?\"right\"===r:void 0},s.getLabelPad=function(t,e){var r=e.titlefont.size,n=e.showticklabels;return\"xaxis\"===t?\"top\"===e.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:\"yaxis\"===t?\"right\"===e.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},s.getTickPad=function(t){return\"outside\"===t.ticks?10+t.ticklen:15},s.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return\"inside\"===t.ticks?-e:e},e.exports=function(t){return new n(t)}},{\"../../lib/html2unicode\":741,\"../../lib/str2rgbarray\":765,\"../cartesian/axes\":789}],829:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"./scene2d\"),a=t(\"../layout_attributes\"),o=t(\"../../constants/xmlns_namespaces\"),s=t(\"../cartesian/constants\"),l=t(\"../cartesian\"),c=t(\"../../components/fx/layout_attributes\"),u=t(\"../get_data\").getSubplotData;r.name=\"gl2d\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(\"../cartesian/attributes\"),r.supplyLayoutDefaults=function(t,e,r){e._has(\"cartesian\")||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,\"plot\",\"from-root\"),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=u(r,\"gl2d\",o),c=s._scene2d;void 0===c&&(c=new i({id:o,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];if(s._scene2d){0===u(t,\"gl2d\",o).length&&(s._scene2d.destroy(),delete n._plots[o])}}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":a,x:0,y:0,width:\"100%\",height:\"100%\",preserveAspectRatio:\"none\"}),i.destroy()}},r.updateFx=function(t){for(var e=t._subplots.gl2d,r=0;r<e.length;r++){t._plots[e[r]]._scene2d.updateFx(t.dragmode)}}},{\"../../components/fx/layout_attributes\":661,\"../../constants/xmlns_namespaces\":723,\"../../plot_api/edit_types\":773,\"../cartesian\":800,\"../cartesian/attributes\":788,\"../cartesian/constants\":794,\"../get_data\":826,\"../layout_attributes\":843,\"./scene2d\":830}],830:[function(t,e,r){\"use strict\";function n(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context.scrollZoom,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.glplotOptions=d(this),this.glplotOptions.merge(e),this.glplot=c(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=u(this.glplot),this.selectBox=f(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.bounds=[1/0,1/0,-1/0,-1/0],this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw()}var i,a,o=t(\"../../registry\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../../components/fx\"),c=t(\"gl-plot2d\"),u=t(\"gl-spikes2d\"),f=t(\"gl-select-box\"),h=t(\"webgl-context\"),d=t(\"./convert\"),p=t(\"./camera\"),m=t(\"../../lib/html2unicode\"),g=t(\"../../lib/show_no_webgl_msg\"),v=t(\"../cartesian/constraints\"),y=v.enforce,x=v.clean,b=[\"xaxis\",\"yaxis\"],_=t(\"../cartesian/constants\").SUBPLOT_PATTERN;e.exports=n;var w=n.prototype;w.makeFramework=function(){if(this.staticPlot){if(!(a||(i=document.createElement(\"canvas\"),a=h({canvas:i,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"Error creating static canvas/context for image server\");this.canvas=i,this.gl=a}else{var t=this.container.querySelector(\".gl-canvas-focus\"),e=h({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});e||g(this),this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=\"100%\",r.style.height=\"100%\",r.style.position=\"absolute\",r.style.top=\"0px\",r.style.left=\"0px\",r.style[\"pointer-events\"]=\"none\",this.updateSize(r),r.className+=\" user-select-none\";var n=this.svgContainer=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");n.style.position=\"absolute\",n.style.top=n.style.left=\"0px\",n.style.width=n.style.height=\"100%\",n.style[\"z-index\"]=20,n.style[\"pointer-events\"]=\"none\";var o=this.mouseContainer=document.createElement(\"div\");o.style.position=\"absolute\",o.style[\"pointer-events\"]=\"auto\",this.pickCanvas=this.container.querySelector(\".gl-canvas-pick\");var s=this.container;s.appendChild(n),s.appendChild(o);var l=this;o.addEventListener(\"mouseout\",function(){l.isMouseOver=!1,l.unhover()}),o.addEventListener(\"mouseover\",function(){l.isMouseOver=!0})},w.toImage=function(t){t||(t=\"png\"),this.stopped=!0,this.staticPlot&&this.container.appendChild(i),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=n-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\"canvas\");f.width=r,f.height=n;var h=f.getContext(\"2d\"),d=h.createImageData(r,n);d.data.set(a),h.putImageData(d,0,0);var p;switch(t){case\"jpeg\":p=f.toDataURL(\"image/jpeg\");break;case\"webp\":p=f.toDataURL(\"image/webp\");break;default:p=f.toDataURL(\"image/png\")}return this.staticPlot&&this.container.removeChild(i),p},w.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),this.redraw&&this.redraw(),t},w.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[s.calcTicks(this.xaxis),s.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=m(t[e][r].text+\"\");return t},w.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(_),r=\"xaxis\"+e[1],n=\"yaxis\"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},w.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout;n.xaxis.autorange=e.autorange,n.xaxis.range=e.range.slice(0),n.yaxis.autorange=r.autorange,n.yaxis.range=r.range.slice(0);var i={lastInputTime:this.camera.lastInputTime};i[e._name]=e.range.slice(0),i[r._name]=r.range.slice(0),t.emit(\"plotly_relayout\",i)},w.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},w.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&o.getComponentMethod(\"annotations\",\"drawOne\")(t,r)}},w.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map(function(e){t[e].dispose(),delete t[e]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null}},w.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var l={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};x(l,this.xaxis),x(l,this.yaxis);var c=r._size,u=this.xaxis.domain,f=this.yaxis.domain;o.viewBox=[c.l+u[0]*c.w,c.b+f[0]*c.h,i-c.r-(1-u[1])*c.w,a-c.t-(1-f[1])*c.h],this.mouseContainer.style.width=c.w*(u[1]-u[0])+\"px\",this.mouseContainer.style.height=c.h*(f[1]-f[0])+\"px\",this.mouseContainer.height=c.h*(f[1]-f[0]),this.mouseContainer.style.left=c.l+u[0]*c.w+\"px\",this.mouseContainer.style.top=c.t+(1-f[1])*c.h+\"px\";var h=this.bounds;h[0]=h[1]=1/0,h[2]=h[3]=-1/0;var d,p,m=Object.keys(this.traces);for(p=0;p<m.length;++p)for(var g=this.traces[m[p]],v=0;v<2;++v)h[v]=Math.min(h[v],g.bounds[v]),h[v+2]=Math.max(h[v+2],g.bounds[v+2]);for(p=0;p<2;++p)h[p]>h[p+2]&&(h[p]=-1,h[p+2]=1),(d=this[b[p]])._length=o.viewBox[p+2]-o.viewBox[p],s.doAutoRange(d),d.setScale();y(l),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},w.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])]},w.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])]},w.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort(function(t,e){return t._trace.index-e._trace.index})},w.updateFx=function(t){\"lasso\"===t||\"select\"===t?(this.pickCanvas.style[\"pointer-events\"]=\"none\",this.mouseContainer.style[\"pointer-events\"]=\"none\"):(this.pickCanvas.style[\"pointer-events\"]=\"auto\",this.mouseContainer.style[\"pointer-events\"]=\"auto\"),this.mouseContainer.style.cursor=\"pan\"===t?\"move\":\"zoom\"===t?\"crosshair\":null},w.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};l.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},w.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,s=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&\"zoom\"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u<2;u++)e.boxStart[u]===e.boxEnd[u]&&(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,d=this.yaxis.domain,p=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,s/t.pixelRatio-(f.t+(1-d[1])*f.h)))&&a.object._trace.handlePick(a);if(p&&n&&this.emitPointAction(p,\"plotly_click\"),a&&\"skip\"!==a.object._trace.hoverinfo&&i.hovermode&&p&&(!this.lastPickResult||this.lastPickResult.traceUid!==p.trace.uid||this.lastPickResult.dataCoord[0]!==p.dataCoord[0]||this.lastPickResult.dataCoord[1]!==p.dataCoord[1])){var m=p;this.lastPickResult={traceUid:p.trace?p.trace.uid:null,dataCoord:p.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),m.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(p,\"plotly_hover\");var g=this.fullData[m.trace.index]||{},v=m.pointIndex,y=l.castHoverinfo(g,i,v);if(y&&\"all\"!==y){var x=y.split(\"+\");-1===x.indexOf(\"x\")&&(m.traceCoord[0]=void 0),-1===x.indexOf(\"y\")&&(m.traceCoord[1]=void 0),-1===x.indexOf(\"z\")&&(m.traceCoord[2]=void 0),-1===x.indexOf(\"text\")&&(m.textLabel=void 0),-1===x.indexOf(\"name\")&&(m.name=void 0)}l.loneHover({x:m.screenCoord[0],y:m.screenCoord[1],xLabel:this.hoverFormatter(\"xaxis\",m.traceCoord[0]),yLabel:this.hoverFormatter(\"yaxis\",m.traceCoord[1]),zLabel:m.traceCoord[2],text:m.textLabel,name:m.name,color:l.castHoverOption(g,v,\"bgcolor\")||m.color,borderColor:l.castHoverOption(g,v,\"bordercolor\"),fontFamily:l.castHoverOption(g,v,\"font.family\"),fontSize:l.castHoverOption(g,v,\"font.size\"),fontColor:l.castHoverOption(g,v,\"font.color\")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},w.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(\"plotly_unhover\"),l.loneUnhover(this.svgContainer))},w.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return s.tickText(r,r.c2l(e),\"hover\").text}}},{\"../../components/fx\":660,\"../../lib/html2unicode\":741,\"../../lib/show_no_webgl_msg\":763,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../cartesian/constants\":794,\"../cartesian/constraints\":796,\"./camera\":827,\"./convert\":828,\"gl-plot2d\":224,\"gl-select-box\":241,\"gl-spikes2d\":250,\"webgl-context\":577}],831:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(e,r,i,a){var o=p.keyBindingMode;if(!1!==o){var s=\"rotate\"===o,l=\"pan\"===o,u=\"zoom\"===o,h=!!a.control,d=!!a.alt,y=!!a.shift,x=!!(1&e),b=!!(2&e),_=!!(4&e),w=1/t.clientHeight,M=w*(r-m),k=w*(i-g),A=p.flipX?1:-1,T=p.flipY?1:-1,S=n(),E=Math.PI*p.rotateSpeed;if((s&&x&&!h&&!d&&!y||x&&!h&&!d&&y)&&c.rotate(S,A*E*M,-T*E*k,0),(l&&x&&!h&&!d&&!y||b||x&&h&&!d&&!y)&&c.pan(S,-p.translateSpeed*M*f,p.translateSpeed*k*f,0),u&&x&&!h&&!d&&!y||_||x&&!h&&d&&!y){var L=-p.zoomSpeed*k/window.innerHeight*(S-c.lastT())*100;c.pan(S,0,0,f*(Math.exp(L)-1))}return m=r,g=i,v=a,!0}}t=t||document.body;var l=[.01,1/0];\"distanceLimits\"in(e=e||{})&&(l[0]=e.distanceLimits[0],l[1]=e.distanceLimits[1]),\"zoomMin\"in e&&(l[0]=e.zoomMin),\"zoomMax\"in e&&(l[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\"orbit\",distanceLimits:l}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,d=t.clientHeight,p={keyBindingMode:\"rotate\",view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay,i=e-2*r;c.idle(e-r),c.recalcMatrix(i),c.flush(e-(100+2*r));for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===d;return h=t.clientWidth,d=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(p,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){var e=c.computedUp.slice(),r=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(t),\"turntable\"===t){var a=n();c._active.lookAt(a,r,i,e),c._active.lookAt(a+500,r,i,[0,0,1]),c._active.flush(a)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(l)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\"contextmenu\",function(t){return t.preventDefault(),!1});var m=0,g=0,v={shift:!1,control:!1,alt:!1,meta:!1};return p.mouseListener=a(t,r),t.addEventListener(\"touchstart\",function(e){var n=s(e.changedTouches[0],t);r(0,n[0],n[1],v),r(1,n[0],n[1],v)}),t.addEventListener(\"touchmove\",function(e){var n=s(e.changedTouches[0],t);r(1,n[0],n[1],v)}),t.addEventListener(\"touchend\",function(){r(0,m,g,v)}),p.wheelListener=o(t,function(t,e){if(!1!==p.keyBindingMode){var r=p.flipX?1:-1,i=p.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))c.rotate(a,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else{var o=-p.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}},!0),p};var n=t(\"right-now\"),i=t(\"3d-view\"),a=t(\"mouse-change\"),o=t(\"mouse-wheel\"),s=t(\"mouse-event-offset\")},{\"3d-view\":40,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446,\"right-now\":509}],832:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../components/fx/layout_attributes\"),a=t(\"./scene\"),o=t(\"../get_data\").getSubplotData,s=t(\"../../lib\"),l=t(\"../../constants/xmlns_namespaces\");r.name=\"gl3d\",r.attr=\"scene\",r.idRoot=\"scene\",r.idRegex=r.attrRegex=s.counterRegex(\"scene\"),r.attributes=t(\"./layout/attributes\"),r.layoutAttributes=t(\"./layout/layout_attributes\"),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},\"plot\",\"nested\"),r.supplyLayoutDefaults=t(\"./layout/defaults\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var l=n[i],c=o(r,\"gl3d\",l),u=e[l],f=u._scene;f||(f=new a({id:l,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),u._scene=f),f.cameraInitial||(f.cameraInitial=s.extendDeep({},u.camera)),f.plot(c,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\".annotation-\"+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:l.svg,\"xlink:href\":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),\"scene\"+e}},r.updateFx=function(t){for(var e=t._subplots.gl3d,r=0;r<e.length;r++){t[e[r]]._scene.updateFx(t.dragmode,t.hovermode)}}},{\"../../components/fx/layout_attributes\":661,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../get_data\":826,\"./layout/attributes\":833,\"./layout/defaults\":837,\"./layout/layout_attributes\":838,\"./scene\":842}],833:[function(t,e,r){\"use strict\";e.exports={scene:{valType:\"subplotid\",dflt:\"scene\",editType:\"calc+clearAxisTypes\"}}},{}],834:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color\"),i=t(\"../../cartesian/layout_attributes\"),a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../plot_api/edit_types\").overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:\"boolean\",dflt:!0},spikesides:{valType:\"boolean\",dflt:!0},spikethickness:{valType:\"number\",min:0,dflt:2},spikecolor:{valType:\"color\",dflt:n.defaultLine},showbackground:{valType:\"boolean\",dflt:!1},backgroundcolor:{valType:\"color\",dflt:\"rgba(204, 204, 204, 0.5)\"},showaxeslabels:{valType:\"boolean\",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:i.title,titlefont:i.titlefont,type:i.type,autorange:i.autorange,rangemode:i.rangemode,range:i.range,tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:\"rgb(204, 204, 204)\"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},\"plot\",\"from-root\")},{\"../../../components/color\":618,\"../../../lib/extend\":732,\"../../../plot_api/edit_types\":773,\"../../cartesian/layout_attributes\":801}],835:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../../lib\"),a=t(\"./axis_attributes\"),o=t(\"../../cartesian/type_defaults\"),s=t(\"../../cartesian/axis_defaults\"),l=[\"xaxis\",\"yaxis\",\"zaxis\"];e.exports=function(t,e,r){function c(t,e){return i.coerce(u,f,a,t,e)}for(var u,f,h=0;h<l.length;h++){var d=l[h];u=t[d]||{},f=e[d]={_id:d[0]+r.scene,_name:d},o(u,f,c,r.data),s(u,f,c,{font:r.font,letter:d[0],data:r.data,showGrid:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),c(\"gridcolor\",n(f.color,r.bgColor,13600/187).toRgbString()),c(\"title\",d[0]),f.setScale=i.noop,c(\"showspikes\")&&(c(\"spikesides\"),c(\"spikethickness\"),c(\"spikecolor\",f.color)),c(\"showaxeslabels\"),c(\"showbackground\")&&c(\"backgroundcolor\")}}},{\"../../../lib\":743,\"../../cartesian/axis_defaults\":791,\"../../cartesian/type_defaults\":813,\"./axis_attributes\":834,tinycolor2:546}],836:[function(t,e,r){\"use strict\";function n(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"Open Sans\",\"Open Sans\",\"Open Sans\"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var i=t(\"../../../lib/html2unicode\"),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.labels[e]=i(r.title),\"titlefont\"in r&&(r.titlefont.color&&(this.labelColor[e]=a(r.titlefont.color)),r.titlefont.family&&(this.labelFont[e]=r.titlefont.family),r.titlefont.size&&(this.labelSize[e]=r.titlefont.size)),\"showline\"in r&&(this.lineEnable[e]=r.showline),\"linecolor\"in r&&(this.lineColor[e]=a(r.linecolor)),\"linewidth\"in r&&(this.lineWidth[e]=r.linewidth),\"showgrid\"in r&&(this.gridEnable[e]=r.showgrid),\"gridcolor\"in r&&(this.gridColor[e]=a(r.gridcolor)),\"gridwidth\"in r&&(this.gridWidth[e]=r.gridwidth),\"log\"===r.type?this.zeroEnable[e]=!1:\"zeroline\"in r&&(this.zeroEnable[e]=r.zeroline),\"zerolinecolor\"in r&&(this.zeroLineColor[e]=a(r.zerolinecolor)),\"zerolinewidth\"in r&&(this.zeroLineWidth[e]=r.zerolinewidth),\"ticks\"in r&&r.ticks?this.lineTickEnable[e]=!0:this.lineTickEnable[e]=!1,\"ticklen\"in r&&(this.lineTickLength[e]=this._defaultLineTickLength[e]=r.ticklen),\"tickcolor\"in r&&(this.lineTickColor[e]=a(r.tickcolor)),\"tickwidth\"in r&&(this.lineTickWidth[e]=r.tickwidth),\"tickangle\"in r&&(this.tickAngle[e]=\"auto\"===r.tickangle?0:Math.PI*-r.tickangle/180),\"showticklabels\"in r&&(this.tickEnable[e]=r.showticklabels),\"tickfont\"in r&&(r.tickfont.color&&(this.tickColor[e]=a(r.tickfont.color)),r.tickfont.family&&(this.tickFont[e]=r.tickfont.family),r.tickfont.size&&(this.tickSize[e]=r.tickfont.size)),\"mirror\"in r?-1!==[\"ticks\",\"all\",\"allticks\"].indexOf(r.mirror)?(this.lineTickMirror[e]=!0,this.lineMirror[e]=!0):!0===r.mirror?(this.lineTickMirror[e]=!1,this.lineMirror[e]=!0):(this.lineTickMirror[e]=!1,this.lineMirror[e]=!1):this.lineMirror[e]=!1,\"showbackground\"in r&&!1!==r.showbackground?(this.backgroundEnable[e]=!0,this.backgroundColor[e]=a(r.backgroundcolor)):this.backgroundEnable[e]=!1):(this.tickEnable[e]=!1,this.labelEnable[e]=!1,this.lineEnable[e]=!1,this.lineTickEnable[e]=!1,this.gridEnable[e]=!1,this.zeroEnable[e]=!1,this.backgroundEnable[e]=!1)}},e.exports=function(t){var e=new n;return e.merge(t),e}},{\"../../../lib/html2unicode\":741,\"../../../lib/str2rgbarray\":765}],837:[function(t,e,r){\"use strict\";function n(t,e,r,n){for(var i=r(\"bgcolor\"),s=a.combine(i,n.paper_bgcolor),c=[\"up\",\"center\",\"eye\"],u=0;u<c.length;u++)r(\"camera.\"+c[u]+\".x\"),r(\"camera.\"+c[u]+\".y\"),r(\"camera.\"+c[u]+\".z\");var f=!!r(\"aspectratio.x\")&&!!r(\"aspectratio.y\")&&!!r(\"aspectratio.z\"),h=r(\"aspectmode\",f?\"manual\":\"auto\");f||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},\"manual\"===h&&(e.aspectmode=\"auto\"),t.aspectmode=e.aspectmode),l(t,e,{font:n.font,scene:n.id,data:n.fullData,bgColor:s,calendar:n.calendar,fullLayout:n.fullLayout}),o.getComponentMethod(\"annotations3d\",\"handleDefaults\")(t,e,n),r(\"dragmode\",n.getDfltFromLayout(\"dragmode\")),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}var i=t(\"../../../lib\"),a=t(\"../../../components/color\"),o=t(\"../../../registry\"),s=t(\"../../subplot_defaults\"),l=t(\"./axis_defaults\"),c=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=e._basePlotModules.length>1;s(t,e,r,{type:\"gl3d\",attributes:c,handleDefaults:n,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return i.validate(t[e],c[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":618,\"../../../lib\":743,\"../../../registry\":873,\"../../subplot_defaults\":865,\"./axis_defaults\":835,\"./layout_attributes\":838}],838:[function(t,e,r){\"use strict\";function n(t,e,r){return{x:{valType:\"number\",dflt:t,editType:\"camera\"},y:{valType:\"number\",dflt:e,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}var i=t(\"./axis_attributes\"),a=t(\"../../domain_attributes\"),o=t(\"../../../lib/extend\").extendFlat,s=t(\"../../../lib\").counterRegex;e.exports={_arrayAttrRegexps:[s(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:o(n(0,0,1),{}),center:o(n(0,0,0),{}),eye:o(n(1.25,1.25,1.25),{}),editType:\"camera\"},domain:a({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],dflt:\"turntable\",editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":743,\"../../../lib/extend\":732,\"../../domain_attributes\":815,\"./axis_attributes\":834}],839:[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]}var i=t(\"../../../lib/str2rgbarray\"),a=[\"xaxis\",\"yaxis\",\"zaxis\"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=i(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new n;return e.merge(t),e}},{\"../../../lib/str2rgbarray\":765}],840:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,l=t.fullSceneLayout,c=[[],[],[]],u=0;u<3;++u){var f=l[o[u]];if(f._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(f._length)===1/0)c[u]=[];else{f.range[0]=r[u].lo/t.dataScale[u],f.range[1]=r[u].hi/t.dataScale[u],f._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),f.range[0]===f.range[1]&&(f.range[0]-=1,f.range[1]+=1);var h=f.tickmode;if(\"auto\"===f.tickmode){f.tickmode=\"linear\";var d=f.nticks||i.constrain(f._length/40,4,9);n.autoTicks(f,Math.abs(f.range[1]-f.range[0])/d)}for(var p=n.calcTicks(f),m=0;m<p.length;++m)p[m].x=p[m].x*t.dataScale[u],p[m].text=a(p[m].text);c[u]=p,f.tickmode=h}}for(e.ticks=c,u=0;u<3;++u)for(s[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]),m=0;m<2;++m)e.bounds[m][u]=t.glplot.bounds[m][u];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(c)};var n=t(\"../../cartesian/axes\"),i=t(\"../../../lib\"),a=t(\"../../../lib/html2unicode\"),o=[\"xaxis\",\"yaxis\",\"zaxis\"],s=[0,0,0]},{\"../../../lib\":743,\"../../../lib/html2unicode\":741,\"../../cartesian/axes\":789}],841:[function(t,e,r){\"use strict\";function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],842:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i={canvas:r,gl:n,container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1};if(t.staticMode){if(!(c||(l=document.createElement(\"canvas\"),c=f({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"error creating static canvas/context for image server\");i.pixelRatio=t.pixelRatio,i.gl=c,i.canvas=l}try{t.glplot=u(i)}catch(e){v(t)}var a=function(t){if(!1!==t.fullSceneLayout.dragmode){var e={};e[t.id+\".camera\"]=s(t.camera),t.saveCamera(t.graphDiv.layout),t.graphDiv.emit(\"plotly_relayout\",e)}};if(t.glplot.canvas.addEventListener(\"mouseup\",a.bind(null,t)),t.glplot.canvas.addEventListener(\"wheel\",a.bind(null,t)),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",function(t){d.warn(\"Lost WebGL context.\"),t.preventDefault()}),!t.camera){var o=t.fullSceneLayout.camera;t.camera=y(t.container,{center:[o.center.x,o.center.y,o.center.z],eye:[o.eye.x,o.eye.y,o.eye.z],up:[o.up.x,o.up.y,o.up.z],zoomMin:.1,zoomMax:100,mode:\"orbit\"})}return t.glplot.camera=t.camera,t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(t){function e(e,r){var n=t.fullSceneLayout[e];return p.tickText(n,n.d2l(r),\"hover\").text}var r,n=t.svgContainer,i=t.container.getBoundingClientRect(),a=i.width,o=i.height;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+a+\" \"+o),n.setAttributeNS(null,\"width\",a),n.setAttributeNS(null,\"height\",o),w(t),t.glplot.axes.update(t.axesOptions);for(var s=Object.keys(t.traces),l=null,c=t.glplot.selection,u=0;u<s.length;++u)\"skip\"!==(r=t.traces[s[u]]).data.hoverinfo&&r.handlePick(c)&&(l=r),r.setContourLevels&&r.setContourLevels();var f;if(null!==l){var h=x(t.glplot.cameraParams,c.dataCoordinate);r=l.data;var d=c.index,g=m.castHoverinfo(r,t.fullLayout,d),v=e(\"xaxis\",c.traceCoordinate[0]),y=e(\"yaxis\",c.traceCoordinate[1]),b=e(\"zaxis\",c.traceCoordinate[2]);if(\"all\"!==g){var _=g.split(\"+\");-1===_.indexOf(\"x\")&&(v=void 0),-1===_.indexOf(\"y\")&&(y=void 0),-1===_.indexOf(\"z\")&&(b=void 0),-1===_.indexOf(\"text\")&&(c.textLabel=void 0),-1===_.indexOf(\"name\")&&(l.name=void 0)}t.fullSceneLayout.hovermode&&m.loneHover({x:(.5+.5*h[0]/h[3])*a,y:(.5-.5*h[1]/h[3])*o,xLabel:v,yLabel:y,zLabel:b,text:c.textLabel,name:l.name,color:m.castHoverOption(r,d,\"bgcolor\")||l.color,borderColor:m.castHoverOption(r,d,\"bordercolor\"),fontFamily:m.castHoverOption(r,d,\"font.family\"),fontSize:m.castHoverOption(r,d,\"font.size\"),fontColor:m.castHoverOption(r,d,\"font.color\")},{container:n,gd:t.graphDiv});var M={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:r._input,fullData:r,curveNumber:r.index,pointNumber:d};m.appendArrayPointValue(M,r,d);var k={points:[M]};c.buttons&&c.distance<5?t.graphDiv.emit(\"plotly_click\",k):t.graphDiv.emit(\"plotly_hover\",k),f=k}else m.loneUnhover(n),t.graphDiv.emit(\"plotly_unhover\",f);t.drawAnnotations(t)}.bind(null,t),t.traces={},!0}function i(t,e){var r=document.createElement(\"div\"),i=t.container;this.graphDiv=t.graphDiv;var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");a.style.position=\"absolute\",a.style.top=a.style.left=\"0px\",a.style.width=a.style.height=\"100%\",a.style[\"z-index\"]=20,a.style[\"pointer-events\"]=\"none\",r.appendChild(a),this.svgContainer=a,r.id=t.id,r.style.position=\"absolute\",r.style.top=r.style.left=\"0px\",r.style.width=r.style.height=\"100%\",i.appendChild(r),this.fullLayout=e,this.id=t.id||\"scene\",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e[this.id]),this.spikeOptions=_(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=h.getComponentMethod(\"annotations3d\",\"convert\"),this.drawAnnotations=h.getComponentMethod(\"annotations3d\",\"draw\"),n(this)}function a(t,e,r,n,i){for(var a,o=0;o<e.length;++o)if(Array.isArray(e[o]))for(var s=0;s<e[o].length;++s)a=t.d2l(e[o][s],0,i),!isNaN(a)&&isFinite(a)&&(n[0][r]=Math.min(n[0][r],a),n[1][r]=Math.max(n[1][r],a));else a=t.d2l(e[o],0,i),!isNaN(a)&&isFinite(a)&&(n[0][r]=Math.min(n[0][r],a),n[1][r]=Math.max(n[1][r],a))}function o(t,e,r){var n=t.fullSceneLayout;a(n.xaxis,e.x,0,r,e.xcalendar),a(n.yaxis,e.y,1,r,e.ycalendar),a(n.zaxis,e.z,2,r,e.zcalendar)}function s(t){return{up:{x:t.up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]}}}var l,c,u=t(\"gl-plot3d\"),f=t(\"webgl-context\"),h=t(\"../../registry\"),d=t(\"../../lib\"),p=t(\"../../plots/cartesian/axes\"),m=t(\"../../components/fx\"),g=t(\"../../lib/str2rgbarray\"),v=t(\"../../lib/show_no_webgl_msg\"),y=t(\"./camera\"),x=t(\"./project\"),b=t(\"./layout/convert\"),_=t(\"./layout/spikes\"),w=t(\"./layout/tick_marks\"),M=i.prototype;M.recoverContext=function(){function t(){r.isContextLost()?requestAnimationFrame(t):n(e,e.fullLayout,i,r)?e.plot.apply(e,e.plotArgs):d.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")}var e=this,r=this.glplot.gl,i=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame(t)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];M.plot=function(t,e,r){if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var n,i,a,s,l,c,u=e[this.id],f=r[this.id];u.bgcolor?this.glplot.clearColor=g(u.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=e,this.fullSceneLayout=u,this.glplotLayout=u,this.axesOptions.merge(u),this.spikeOptions.merge(u),this.setCamera(u.camera),this.updateFx(u.dragmode,u.hovermode),this.glplot.update({}),this.setConvert(l),t?Array.isArray(t)||(t=[t]):t=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a<t.length;++a)!0===(n=t[a]).visible&&o(this,n,h);var d=[1,1,1];for(s=0;s<3;++s)h[0][s]>h[1][s]?d[s]=1:h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(this.dataScale=d,this.convertAnnotations(this),a=0;a<t.length;++a)!0===(n=t[a]).visible&&((i=this.traces[n.uid])?i.update(n):(i=n._module.plot(this,n),this.traces[n.uid]=i),i.name=n.name);var p=Object.keys(this.traces);t:for(a=0;a<p.length;++a){for(s=0;s<t.length;++s)if(t[s].uid===p[a]&&!0===t[s].visible)continue t;(i=this.traces[p[a]]).dispose(),delete this.traces[p[a]]}this.glplot.objects.sort(function(t,e){return t._trace.data.index-e._trace.data.index});var m=[[0,0,0],[0,0,0]],v=[],y={};for(a=0;a<3;++a){if(l=u[k[a]],(c=l.type)in y?(y[c].acc*=d[a],y[c].count+=1):y[c]={acc:d[a],count:1},l.autorange){m[0][a]=1/0,m[1][a]=-1/0;var x=this.glplot.objects,b=this.fullSceneLayout.annotations||[],_=l._name.charAt(0);for(s=0;s<x.length;s++){var w=x[s].bounds;m[0][a]=Math.min(m[0][a],w[0][a]/d[a]),m[1][a]=Math.max(m[1][a],w[1][a]/d[a])}for(s=0;s<b.length;s++){var M=b[s];if(M.visible){var A=l.r2l(M[_]);m[0][a]=Math.min(m[0][a],A),m[1][a]=Math.max(m[1][a],A)}}if(\"rangemode\"in l&&\"tozero\"===l.rangemode&&(m[0][a]=Math.min(m[0][a],0),m[1][a]=Math.max(m[1][a],0)),m[0][a]>m[1][a])m[0][a]=-1,m[1][a]=1;else{var T=m[1][a]-m[0][a];m[0][a]-=T/32,m[1][a]+=T/32}}else{var S=l.range;m[0][a]=l.r2l(S[0]),m[1][a]=l.r2l(S[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[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 E=[1,1,1];for(a=0;a<3;++a){var L=y[c=(l=u[k[a]]).type];E[a]=Math.pow(L.acc,1/L.count)/d[a]}var C;if(\"auto\"===u.aspectmode)C=Math.max.apply(null,E)/Math.min.apply(null,E)<=4?E:[1,1,1];else if(\"cube\"===u.aspectmode)C=[1,1,1];else if(\"data\"===u.aspectmode)C=E;else{if(\"manual\"!==u.aspectmode)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=u.aspectratio;C=[z.x,z.y,z.z]}u.aspectratio.x=f.aspectratio.x=C[0],u.aspectratio.y=f.aspectratio.y=C[1],u.aspectratio.z=f.aspectratio.z=C[2],this.glplot.aspect=C;var D=u.domain||null,I=e._size||null;if(D&&I){var P=this.container.style;P.position=\"absolute\",P.left=I.l+D.x[0]*I.w+\"px\",P.top=I.t+(1-D.y[1])*I.h+\"px\",P.width=I.w*(D.x[1]-D.x[0])+\"px\",P.height=I.h*(D.y[1]-D.y[0])+\"px\"}this.glplot.redraw()}},M.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},M.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),s(this.glplot.camera)},M.setCamera=function(t){this.glplot.camera.lookAt.apply(this,function(t){return[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]}(t))},M.saveCamera=function(t){function e(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]]}var r=this.getCamera(),n=d.nestedProperty(t,this.id+\".camera\"),i=n.get(),a=!1;if(void 0===i)a=!0;else for(var o=0;o<3;o++)for(var s=0;s<3;s++)if(!e(r,i,o,s)){a=!0;break}return a&&n.set(r),a},M.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},M.toImage=function(t){t||(t=\"png\"),this.staticMode&&this.container.appendChild(l),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;a<o;++a,--o)for(var s=0;s<r;++s)for(var c=0;c<4;++c){var u=i[4*(r*a+s)+c];i[4*(r*a+s)+c]=i[4*(r*o+s)+c],i[4*(r*o+s)+c]=u}var f=document.createElement(\"canvas\");f.width=r,f.height=n;var h=f.getContext(\"2d\"),d=h.createImageData(r,n);d.data.set(i),h.putImageData(d,0,0);var p;switch(t){case\"jpeg\":p=f.toDataURL(\"image/jpeg\");break;case\"webp\":p=f.toDataURL(\"image/webp\");break;default:p=f.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(l),p},M.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=d.noop}},e.exports=i},{\"../../components/fx\":660,\"../../lib\":743,\"../../lib/show_no_webgl_msg\":763,\"../../lib/str2rgbarray\":765,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./camera\":831,\"./layout/convert\":836,\"./layout/spikes\":839,\"./layout/tick_marks\":840,\"./project\":841,\"gl-plot3d\":226,\"webgl-context\":577}],843:[function(t,e,r){\"use strict\";var n=t(\"./font_attributes\"),i=t(\"../components/color/attributes\"),a=n({editType:\"calc\"});a.family.dflt='\"Open Sans\", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=i.defaultLine,e.exports={font:a,title:{valType:\"string\",editType:\"layoutstyle\"},titlefont:n({editType:\"layoutstyle\"}),autosize:{valType:\"boolean\",dflt:!1,editType:\"none\"},width:{valType:\"number\",min:10,dflt:700,editType:\"none\"},height:{valType:\"number\",min:10,dflt:450,editType:\"none\"},margin:{l:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},r:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},t:{valType:\"number\",min:0,dflt:100,editType:\"calc\"},b:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},pad:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},autoexpand:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},paper_bgcolor:{valType:\"color\",dflt:i.background,editType:\"plot\"},plot_bgcolor:{valType:\"color\",dflt:i.background,editType:\"layoutstyle\"},separators:{valType:\"string\",editType:\"plot\"},hidesources:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:{valType:\"boolean\",editType:\"legend\"},colorway:{valType:\"colorlist\",dflt:i.defaults,editType:\"calc\"}}},{\"../components/color/attributes\":617,\"./font_attributes\":816}],844:[function(t,e,r){\"use strict\";e.exports={styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",controlContainerClassName:\"mapboxgl-control-container\",noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\"}},{}],845:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=t.split(\" \"),i=r[0],a=r[1],o=Array.isArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[\"\",\"\"],u=[0,0];switch(i){case\"top\":c[0]=\"top\",u[1]=-l;break;case\"bottom\":c[0]=\"bottom\",u[1]=l}switch(a){case\"left\":c[1]=\"right\",u[0]=-s;break;case\"right\":c[1]=\"left\",u[0]=s}var f;return f=c[0]&&c[1]?c.join(\"-\"):c[0]?c[0]:c[1]?c[1]:\"center\",{anchor:f,offset:u}}},{\"../../lib\":743}],846:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl\"),i=t(\"../../lib\"),a=t(\"../../plots/get_data\").getSubplotCalcData,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./mapbox\"),l=t(\"./constants\");r.name=\"mapbox\",r.attr=\"subplot\",r.idRoot=\"mapbox\",r.idRegex=r.attrRegex=i.counterRegex(\"mapbox\"),r.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}},r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox,c=function(t,e){var r=t._fullLayout,n=t._context;if(\"\"===n.mapboxAccessToken)return\"\";for(var i=n.mapboxAccessToken,a=0;a<e.length;a++){var o=r[e[a]];if(o.accesstoken){i=o.accesstoken;break}}if(!i)throw new Error(l.noAccessTokenErrorMsg);return i}(t,o);n.accessToken=c;for(var u=0;u<o.length;u++){var f=o[u],h=a(r,\"mapbox\",f),d=e[f],p=d._subplot;d.accesstoken=c,p||(p=s({gd:t,container:e._glcontainer.node(),id:f,fullLayout:e,staticPlot:t._context.staticPlot}),e[f]._subplot=p),p.viewInitial||(p.viewInitial={center:i.extendFlat({},d.center),zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),p.plot(h,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],s=a.domain,l=a._subplot,c=l.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":c,x:n.l+n.w*s.x[0],y:n.t+n.h*(1-s.y[1]),width:n.w*(s.x[1]-s.x[0]),height:n.h*(s.y[1]-s.y[0]),preserveAspectRatio:\"none\"}),l.destroy()}},r.updateFx=function(t){for(var e=t._subplots.mapbox,r=0;r<e.length;r++){t[e[r]]._subplot.updateFx(t)}}},{\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../plots/get_data\":826,\"./constants\":844,\"./layout_attributes\":848,\"./layout_defaults\":849,\"./mapbox\":850,\"mapbox-gl\":334}],847:[function(t,e,r){\"use strict\";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=t.uid+\"-layer\"+e,this.idSource=this.uid+\"-source\",this.idLayer=this.uid+\"-layer\",this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}function i(t){var e=t.source;return a.isPlainObject(e)||\"string\"==typeof e&&e.length>0}var a=t(\"../../lib\"),o=t(\"./convert_text_opts\"),s=n.prototype;s.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)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},s.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=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};return\"geojson\"===r?e=\"data\":\"vector\"===r&&(e=\"string\"==typeof n?\"url\":\"tiles\"),i[e]=n,i}(t);e.addSource(this.idSource,r)}},s.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);this.mapbox.setOptions(this.idLayer,\"setLayoutProperty\",{visibility:\"visible\"})}},s.updateStyle=function(t){var e=function(t){var e={},r={};switch(t.type){case\"circle\":a.extendFlat(r,{\"circle-radius\":t.circle.radius,\"circle-color\":t.color,\"circle-opacity\":t.opacity});break;case\"line\":a.extendFlat(r,{\"line-width\":t.line.width,\"line-color\":t.color,\"line-opacity\":t.opacity});break;case\"fill\":a.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var n=t.symbol,i=o(n.textposition,n.iconsize);a.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}),a.extendFlat(r,{\"icon-color\":t.color,\"text-color\":n.textfont.color,\"text-opacity\":t.opacity})}return{layout:e,paint:r}}(t);i(t)&&(this.mapbox.setOptions(this.idLayer,\"setLayoutProperty\",e.layout),this.mapbox.setOptions(this.idLayer,\"setPaintProperty\",e.paint))},s.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\":743,\"./convert_text_opts\":845}],848:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\").defaultLine,a=t(\"../domain_attributes\"),o=t(\"../font_attributes\"),s=t(\"../../traces/scatter/attributes\").textposition,l=t(\"../../plot_api/edit_types\").overrideAll,c=o({});c.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\",e.exports=l({_arrayAttrRegexps:[n.counterRegex(\"mapbox\",\".layers\",!0)],domain:a({name:\"mapbox\"}),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:c,textposition:n.extendFlat({},s,{arrayOk:!1})}}},\"plot\",\"from-root\")},{\"../../components/color\":618,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../../traces/scatter/attributes\":1066,\"../domain_attributes\":815,\"../font_attributes\":816}],849:[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\"),function(t,e){function r(t,e){return i.coerce(n,a,o.layers,t,e)}var n,a,s=t.layers||[],l=e.layers=[];for(var c=0;c<s.length;c++)if(n=s[c],a={},i.isPlainObject(n)){var u=r(\"sourcetype\");r(\"source\"),\"vector\"===u&&r(\"sourcelayer\");var f=r(\"type\");r(\"below\"),r(\"color\"),r(\"opacity\"),\"circle\"===f&&r(\"circle.radius\"),\"line\"===f&&r(\"line.width\"),\"fill\"===f&&r(\"fill.outlinecolor\"),\"symbol\"===f&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),i.coerceFont(r,\"symbol.textfont\"),r(\"symbol.textposition\")),a._index=c,l.push(a)}}(t,e),e._input=t}var i=t(\"../../lib\"),a=t(\"../subplot_defaults\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){a(t,e,r,{type:\"mapbox\",attributes:o,handleDefaults:n,partition:\"y\"})}},{\"../../lib\":743,\"../subplot_defaults\":865,\"./layout_attributes\":848}],850:[function(t,e,r){\"use strict\";function n(t){this.id=t.id,this.gd=t.gd,this.container=t.container,this.isStatic=t.staticPlot;var e=t.fullLayout;this.uid=e._uid+\"-\"+this.id,this.opts=e[this.id],this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(e),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[]}function i(t){var e=d.style.values,r=d.style.dflt,n={};return c.isPlainObject(t)?(n.id=t.id,n.style=t):\"string\"==typeof t?(n.id=t,n.style=-1!==e.indexOf(t)?a(t):t):(n.id=r,n.style=a(r)),n}function a(t){return h.styleUrlPrefix+t+\"-\"+h.styleUrlSuffix}function o(t){return[t.lon,t.lat]}var s=t(\"mapbox-gl\"),l=t(\"../../components/fx\"),c=t(\"../../lib\"),u=t(\"../../components/dragelement\"),f=t(\"../cartesian/select\"),h=t(\"./constants\"),d=t(\"./layout_attributes\"),p=t(\"./layers\"),m=n.prototype;e.exports=function(t){return new n(t)},m.plot=function(t,e,r){var n=this,i=n.opts=e[this.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash=[],n.layerList={});var a;a=n.map?new Promise(function(r,i){n.updateMap(t,e,r,i)}):new Promise(function(r,i){n.createMap(t,e,r,i)}),r.push(a)},m.createMap=function(t,e,r,n){function a(){l.loneUnhover(e._toppaper)}var u=this,f=u.gd,d=u.opts,p=u.styleObj=i(d.style);u.accessToken=d.accesstoken;var m=u.map=new s.Map({container:u.div,style:p.style,center:o(d.center),zoom:d.zoom,bearing:d.bearing,pitch:d.pitch,interactive:!u.isStatic,preserveDrawingBuffer:u.isStatic,doubleClickZoom:!1,boxZoom:!1}),g=h.controlContainerClassName,v=u.div.getElementsByClassName(g)[0];u.div.removeChild(v),m._canvas.canvas.style.left=\"0px\",m._canvas.canvas.style.top=\"0px\",u.rejectOnError(n),m.once(\"load\",function(){u.updateData(t),u.updateLayout(e),u.resolveOnRender(r)}),u.isStatic||(m.on(\"moveend\",function(t){if(u.map){var e=u.getView();if(d._input.center=d.center=e.center,d._input.zoom=d.zoom=e.zoom,d._input.bearing=d.bearing=e.bearing,d._input.pitch=d.pitch=e.pitch,t.originalEvent){var r={};r[u.id]=c.extendFlat({},e),f.emit(\"plotly_relayout\",r)}}}),m.on(\"mousemove\",function(t){var e=u.div.getBoundingClientRect();t.clientX=t.point.x+e.left,t.clientY=t.point.y+e.top,t.target.getBoundingClientRect=function(){return e},u.xaxis.p2c=function(){return t.lngLat.lng},u.yaxis.p2c=function(){return t.lngLat.lat},l.hover(f,t,u.id)}),m.on(\"click\",function(t){l.click(f,t.originalEvent)}),m.on(\"dragstart\",a),m.on(\"zoomstart\",a),m.on(\"dblclick\",function(){var t=u.viewInitial;m.setCenter(o(t.center)),m.setZoom(t.zoom),m.setBearing(t.bearing),m.setPitch(t.pitch);var e=u.getView();d._input.center=d.center=e.center,d._input.zoom=d.zoom=e.zoom,d._input.bearing=d.bearing=e.bearing,d._input.pitch=d.pitch=e.pitch,f.emit(\"plotly_doubleclick\",null)}))},m.updateMap=function(t,e,r,n){var a=this,o=a.map;a.rejectOnError(n);var s=i(a.opts.style);a.styleObj.id!==s.id?(a.styleObj=s,o.setStyle(s.style),o.style.once(\"load\",function(){a.traceHash={},a.updateData(t),a.updateLayout(e),a.resolveOnRender(r)})):(a.updateData(t),a.updateLayout(e),a.resolveOnRender(r))},m.updateData=function(t){var e,r,n,i,a=this.traceHash;for(n=0;n<t.length;n++){var o=t[n];(e=a[(r=o[0].trace).uid])?e.update(o):r._module&&(a[r.uid]=r._module.plot(this,o))}var s=Object.keys(a);t:for(n=0;n<s.length;n++){var l=s[n];for(i=0;i<t.length;i++)if(r=t[i][0].trace,l===r.uid)continue t;(e=a[l]).dispose(),delete a[l]}},m.updateLayout=function(t){var e=this.map,r=this.opts;e.setCenter(o(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch),this.updateLayers(),this.updateFramework(t),this.updateFx(t),this.map.resize()},m.resolveOnRender=function(t){var e=this.map;e.on(\"render\",function r(){e.loaded()&&(e.off(\"render\",r),t())})},m.rejectOnError=function(t){function e(){t(new Error(h.mapOnErrorMsg))}var r=this.map;r.once(\"error\",e),r.once(\"style.error\",e),r.once(\"source.error\",e),r.once(\"tile.error\",e),r.once(\"layer.error\",e)},m.createFramework=function(t){var e=this,r=e.div=document.createElement(\"div\");r.id=e.uid,r.style.position=\"absolute\",e.container.appendChild(r),e.xaxis={_id:\"x\",c2p:function(t){return e.project(t).x}},e.yaxis={_id:\"y\",c2p:function(t){return e.project(t).y}},e.updateFramework(t)},m.updateFx=function(t){function e(t){var e=r.map.unproject(t);return[e.lng,e.lat]}var r=this,n=r.map,i=r.gd;if(!r.isStatic){var a,o=t.dragmode;if(a=\"select\"===o?function(t,n){(t.range={})[r.id]=[e([n.xmin,n.ymin]),e([n.xmax,n.ymax])]}:function(t,n,i){(t.lassoPoints={})[r.id]=i.filtered.map(e)},\"select\"===o||\"lasso\"===o){n.dragPan.disable();var s={element:r.div,gd:i,plotinfo:{xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:a},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id};s.prepFn=function(t,e,r){f(t,e,r,s,o)},u.init(s)}else n.dragPan.enable(),r.div.onmousedown=null}},m.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\"px\",n.height=r.h*(e.y[1]-e.y[0])+\"px\",n.left=r.l+e.x[0]*r.w+\"px\",n.top=r.t+(1-e.y[1])*r.h+\"px\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},m.updateLayers=function(){var t,e=this.opts.layers,r=this.layerList;if(e.length!==r.length){for(t=0;t<r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t<e.length;t++)r.push(p(this,t,e[t]))}else for(t=0;t<e.length;t++)r[t].update(e[t])},m.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},m.toImage=function(){return this.map.getCanvas().toDataURL()},m.initSource=function(t){return this.map.addSource(t,{type:\"geojson\",data:{type:\"Feature\",geometry:{type:\"Point\",coordinates:[]}}})},m.setSourceData=function(t,e){this.map.getSource(t).setData(e)},m.setOptions=function(t,e,r){for(var n=this.map,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];n[e](t,o,r[o])}},m.project=function(t){return this.map.project(new s.LngLat(t[0],t[1]))},m.getView=function(){var t=this.map,e=t.getCenter();return{center:{lon:e.lng,lat:e.lat},zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch()}}},{\"../../components/dragelement\":640,\"../../components/fx\":660,\"../../lib\":743,\"../cartesian/select\":807,\"./constants\":844,\"./layers\":847,\"./layout_attributes\":848,\"mapbox-gl\":334}],851:[function(t,e,r){\"use strict\";e.exports={t:{valType:\"number\",dflt:0,editType:\"arraydraw\"},r:{valType:\"number\",dflt:0,editType:\"arraydraw\"},b:{valType:\"number\",dflt:0,editType:\"arraydraw\"},l:{valType:\"number\",dflt:0,editType:\"arraydraw\"},editType:\"arraydraw\"}},{}],852:[function(t,e,r){\"use strict\";function n(t){for(var e=0;e<t.length;e++){t[e]._categories=t[e]._initialCategories.slice(),t[e]._categoriesMap={};for(var r=0;r<t[e]._categories.length;r++)t[e]._categoriesMap[t[e]._categories[r]]=r}}var i=t(\"d3\"),a=t(\"fast-isnumeric\"),o=t(\"../plotly\"),s=t(\"../plot_api/plot_schema\"),l=t(\"../registry\"),c=t(\"../plots/cartesian/axis_ids\"),u=t(\"../lib\"),f=u._,h=t(\"../components/color\"),d=t(\"../constants/numerical\").BADNUM,p=e.exports={},m=t(\"./animation_attributes\"),g=t(\"./frame_attributes\"),v=u.relinkPrivateKeys;u.extendFlat(p,l),p.attributes=t(\"./attributes\"),p.attributes.type.values=p.allTypes,p.fontAttrs=t(\"./font_attributes\"),p.layoutAttributes=t(\"./layout_attributes\"),p.fontWeight=\"normal\";var y=p.transformsRegistry,x=t(\"../components/errorbars\"),b=t(\"./command\");p.executeAPICommand=b.executeAPICommand,p.computeAPICommandBindings=b.computeAPICommandBindings,p.manageCommandObserver=b.manageCommandObserver,p.hasSimpleAPICommandBindings=b.hasSimpleAPICommandBindings,p.redrawText=function(t){if(!((t=u.getGraphDiv(t)).data&&t.data[0]&&t.data[0].r))return new Promise(function(e){setTimeout(function(){l.getComponentMethod(\"annotations\",\"draw\")(t),l.getComponentMethod(\"legend\",\"draw\")(t),(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()}),e(p.previousPromises(t))},300)})},p.resize=function(t){return t=u.getGraphDiv(t),new Promise(function(e,r){t&&!function(t){var e=window.getComputedStyle(t).display;return!e||\"none\"===e}(t)||r(new Error(\"Resize must be passed a displayed plot div element.\")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._redrawTimer=setTimeout(function(){if(t.layout.width&&t.layout.height)e(t);else{delete t.layout.width,delete t.layout.height;var r=t.changed;t.autoplay=!0,o.relayout(t,{autosize:!0}).then(function(){t.changed=r,e(t)})}},100)})},p.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})},p.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=e._paper.selectAll(\"text.js-plot-link-container\").data([0]);r.enter().append(\"text\").classed(\"js-plot-link-container\",!0).style({\"font-family\":'\"Open Sans\", Arial, sans-serif',\"font-size\":\"12px\",fill:h.defaultLine,\"pointer-events\":\"all\"}).each(function(){var t=i.select(this);t.append(\"tspan\").classed(\"js-link-to-tool\",!0),t.append(\"tspan\").classed(\"js-link-spacer\",!0),t.append(\"tspan\").classed(\"js-sourcelinks\",!0)});var n=r.node(),a={y:e._paper.attr(\"height\")-9};document.body.contains(n)&&n.getComputedTextLength()>=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\"),s=r.select(\".js-link-spacer\"),l=r.select(\".js-sourcelinks\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\"\");var r=e.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(t._context.linkText+\" \"+String.fromCharCode(187));if(t._context.sendData)r.on(\"click\",function(){p.sendDataToCloud(t)});else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?\" - \":\"\")}},p.sendDataToCloud=function(t){t.emit(\"plotly_beforeexport\");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||\"https://plot.ly\",r=i.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=p.graphJson(t,!1,\"keepdata\"),n.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1},p.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},a=t.layout||{},o=t._fullData||[],s=t._fullData=[],h=t.data||[];t._transitionData||p.createTransitionData(t),n._dfltTitle={plot:f(t,\"Click to enter Plot title\"),x:f(t,\"Click to enter X axis title\"),y:f(t,\"Click to enter Y axis title\"),colorbar:f(t,\"Click to enter Colorscale title\"),annotation:f(t,\"new text\")},n._traceWord=f(t,\"trace\");var d=function(t){function e(t){for(var e=!0,r=0;r<w.length;r++){var a=w[r];i[a]||(t[a]?i[a]=t[a]:e=!1)}e&&(n=!0)}for(var r=t._context.locale,n=!1,i={},a=0;a<2;a++){for(var o=t._context.locales,s=0;s<2;s++){var c=(o[r]||{}).format;if(c&&(e(c),n))break;o=l.localeRegistry}var u=r.split(\"-\")[0];if(n||u===r)break;r=u}return n||e(l.localeRegistry.en.format),i}(t);if(r._initialAutoSizeIsDone){var m=r.width,g=r.height;p.supplyLayoutGlobalDefaults(a,n,d),a.width||(n.width=m),a.height||(n.height=g)}else{p.supplyLayoutGlobalDefaults(a,n,d);var y=!a.width||!a.height,x=n.autosize,b=t._context&&t._context.autosizable;y&&(x||b)?p.plotAutoSize(t,a,n):y&&p.sanitizeMargins(t),!x&&y&&(a.width=n.width,a.height=n.height)}n._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),i.locale(t)}(d,n.separators),n._initialAutoSizeIsDone=!0,n._dataLength=h.length,n._modules=[],n._basePlotModules=[],n._subplots=function(){var t,e,r={};if(!_){_=[];var n=l.subplotsRegistry;for(var i in n){var a=n[i].attr;if(a&&(_.push(i),Array.isArray(a)))for(e=0;e<a.length;e++)u.pushUnique(_,a[e])}}for(t=0;t<_.length;t++)r[_[t]]=[];return r}(),n._globalTransforms=(t._context||{}).globalTransforms,p.supplyDataDefaults(h,s,a,n),n._has=p._hasPlotType.bind(n);var M=n._modules;for(e=0;e<M.length;e++){var k=M[e];k.cleanData&&k.cleanData(s)}if(o.length===h.length)for(e=0;e<s.length;e++)v(s[e],o[e]);p.supplyLayoutModuleDefaults(a,n,s,t._transitionData),n._hasCartesian=n._has(\"cartesian\"),n._hasGeo=n._has(\"geo\"),n._hasGL3D=n._has(\"gl3d\"),n._hasGL2D=n._has(\"gl2d\"),n._hasTernary=n._has(\"ternary\"),n._hasPie=n._has(\"pie\"),p.cleanPlot(s,n,o,r),p.linkSubplots(s,n,o,r),v(n,r),p.doAutoMargin(t);var A=c.list(t);for(e=0;e<A.length;e++){A[e].setScale()}if((t.calcdata||[]).length===s.length)for(e=0;e<s.length;e++){var T=s[e],S=t.calcdata[e][0];S&&S.trace&&(S.trace._hasCalcTransform?function(t,e){var r,n,i=t.trace,a=i._arrayAttrs,o={};for(r=0;r<a.length;r++)o[n=a[r]]=u.nestedProperty(i,n).get().slice();for(t.trace=e,r=0;r<a.length;r++)n=a[r],u.nestedProperty(t.trace,n).set(o[n])}(S,T):S.trace=T)}};var _,w=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"];p.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},p._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++){if(r[e].name===t)return!0}var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e];if(i.categories&&i.categories.indexOf(t)>=0)return!0}return!1},p.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=!!n._paper,c=!!n._infolayer,u=n._has&&n._has(\"gl\"),f=e._has&&e._has(\"gl\");u&&!f&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(\".gl-canvas\").remove(),n._glcanvas=null);t:for(i=0;i<r.length;i++){var h=r[i].uid;for(a=0;a<t.length;a++){if(h===t[a].uid)continue t}var d=\".hm\"+h+\",.contour\"+h+\",.carpet\"+h+\",#clip\"+h+\",.trace\"+h;l&&n._paper.selectAll(d).remove(),c&&(n._infolayer.selectAll(\".cb\"+h).remove(),n._infolayer.selectAll(\"g.rangeslider-container\").selectAll(d).remove())}n._zoomlayer&&n._zoomlayer.selectAll(\".select-outline\").remove()},p.linkSubplots=function(t,e,r,n){var i,a,o,s,l=n._plots||{},f=e._plots={},h=e._subplots,d={_fullData:t,_fullLayout:e},p=h.cartesian.concat(h.gl2d||[]);for(var m in h)h[m].sort(u.subplotSort);for(i=0;i<p.length;i++){var g,v=l[o=p[i]],y=c.getFromId(d,o,\"x\"),x=c.getFromId(d,o,\"y\");for(v?((g=f[o]=v).xaxis.layer!==y.layer&&(g.xlines.attr(\"d\",null),g.xaxislayer.selectAll(\"*\").remove()),g.yaxis.layer!==x.layer&&(g.ylines.attr(\"d\",null),g.yaxislayer.selectAll(\"*\").remove())):(g=f[o]={}).id=o,g.xaxis=y,g.yaxis=x,g._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var b=t[a];if(b.xaxis===g.xaxis._id&&b.yaxis===g.yaxis._id&&!1===b.cliponaxis){g._hasClipOnAxisFalse=!0;break}}}var _=c.list(d,null,!0);for(i=0;i<_.length;i++){var w=null;(s=_[i]).overlaying&&(w=c.getFromId(d,s.overlaying))&&w.overlaying&&(s.overlaying=!1,w=null),s._mainAxis=w||s,w&&(s.domain=w.domain.slice()),s._anchorAxis=\"free\"===s.anchor?null:c.getFromId(d,s.anchor)}for(i=0;i<_.length;i++){var M=\"x\"===(s=_[i])._id.charAt(0),k=s._mainAxis._anchorAxis,A=\"\",T=\"\",S=\"\";if(k&&(S=k._mainAxis._id,A=M?s._id+S:S+s._id),!A||-1===p.indexOf(A))for(A=\"\",a=0;a<p.length;a++){var E=(o=p[a]).indexOf(\"y\"),L=M?o.substr(0,E):o.substr(E),C=M?o.substr(E):o.substr(0,E);if(L===s._id){T||(T=o);var z=c.getFromId(d,C);if(S&&z.overlaying===S){A=o;break}}}s._mainSubplot=A||T}},p.clearExpandedTraceDefaultColors=function(t){function e(t,e,i,a){n[a]=e,n.length=a+1,\"color\"===t.valType&&void 0===t.dflt&&r.push(n.join(\".\"))}var r,n,i;for(n=[],(r=t._module._colorAttrs)||(t._module._colorAttrs=r=[],s.crawl(t._module.attributes,e)),i=0;i<r.length;i++){u.nestedProperty(t,\"_input.\"+r[i]).get()||u.nestedProperty(t,r[i]).set(null)}},p.supplyDataDefaults=function(t,e,r,n){function i(t){e.push(t);var r=t._module;r&&(!0===t.visible&&u.pushUnique(c,r),u.pushUnique(f,t._module.basePlotModule),h++,!1!==t._input.visible&&d++)}var a,o,s,c=n._modules,f=n._basePlotModules,h=0,d=0;n._transformModules=[];var m={},g=[];for(a=0;a<t.length;a++){if(s=t[a],o=p.supplyTraceDefaults(s,d,n,a),o.index=a,o._input=s,o._expandedIndex=h,o.transforms&&o.transforms.length)for(var x=function(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=y[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}(o,e,r,n),b=0;b<x.length;b++){var _=x[b],w=p.supplyTraceDefaults(_,h,n,a);v(w,_),_.uid=w.uid=o.uid+b,w.index=a,w._input=s,w._fullInput=o,w._expandedIndex=h,w._expandedInput=_,i(w)}else o._fullInput=o,o._expandedInput=o,i(o);l.traceIs(o,\"carpetAxis\")&&(m[o.carpet]=o),l.traceIs(o,\"carpetDependent\")&&g.push(a)}for(a=0;a<g.length;a++)if((o=e[g[a]]).visible){var M=m[o.carpet];o._carpet=M,M&&M.visible?(o.xaxis=M.xaxis,o.yaxis=M.yaxis):o.visible=!1}},p.supplyAnimationDefaults=function(t){function e(e,r){return u.coerce(t||{},n,m,e,r)}t=t||{};var r,n={};if(e(\"mode\"),e(\"direction\"),e(\"fromcurrent\"),Array.isArray(t.frame))for(n.frame=[],r=0;r<t.frame.length;r++)n.frame[r]=p.supplyAnimationFrameDefaults(t.frame[r]||{});else n.frame=p.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(n.transition=[],r=0;r<t.transition.length;r++)n.transition[r]=p.supplyAnimationTransitionDefaults(t.transition[r]||{});else n.transition=p.supplyAnimationTransitionDefaults(t.transition||{});return n},p.supplyAnimationFrameDefaults=function(t){function e(e,n){return u.coerce(t||{},r,m.frame,e,n)}var r={};return e(\"duration\"),e(\"redraw\"),r},p.supplyAnimationTransitionDefaults=function(t){function e(e,n){return u.coerce(t||{},r,m.transition,e,n)}var r={};return e(\"duration\"),e(\"easing\"),r},p.supplyFrameDefaults=function(t){function e(e,n){return u.coerce(t,r,g,e,n)}var r={};return e(\"group\"),e(\"name\"),e(\"traces\"),e(\"baseframe\"),e(\"data\"),e(\"layout\"),r},p.supplyTraceDefaults=function(t,e,r,n){function i(e,r){return u.coerce(t,s,p.attributes,e,r)}var a,o=r.colorway||h.defaults,s={},c=o[e%o.length],f=i(\"visible\");i(\"type\"),i(\"uid\"),i(\"name\",r._traceWord+\" \"+n);var d=p.getModule(s);if(s._module=d,d){var m=d.basePlotModule,g=m.attr;if(g){var v=r._subplots,y=m.attributes,x=\"\";if(\"gl2d\"!==m.name||f){if(Array.isArray(g))for(a=0;a<g.length;a++){var b=g[a],_=u.coerce(t,s,y,b);v[b]&&u.pushUnique(v[b],_),x+=_}else x=u.coerce(t,s,y,g);v[m.name]&&u.pushUnique(v[m.name],x)}}}return f&&(i(\"customdata\"),i(\"ids\"),p.traceIs(s,\"showLegend\")&&(i(\"showlegend\"),i(\"legendgroup\")),l.getComponentMethod(\"fx\",\"supplyDefaults\")(t,s,c,r),d&&(d.supplyDefaults(t,s,c,r),u.coerceHoverinfo(t,s,r)),p.traceIs(s,\"noOpacity\")||i(\"opacity\"),p.traceIs(s,\"notLegendIsolatable\")&&(s.visible=!!s.visible),d&&d.selectPoints&&i(\"selectedpoints\"),p.supplyTransformDefaults(t,s,r)),s},p.supplyTransformDefaults=function(t,e,r){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var c,f=o[l],h=f.type,d=y[h],p=!(f._module&&f._module===d),m=d&&\"function\"==typeof d.transform;d||u.warn(\"Unrecognized transform type \"+h+\".\"),d&&d.supplyDefaults&&(p||m)?((c=d.supplyDefaults(f,e,r,t)).type=h,c._module=d,u.pushUnique(i,d)):c=u.extendFlat({},f),s.push(c)}},p.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return u.coerce(t,e,p.layoutAttributes,r,n)}var i=u.coerceFont(n,\"font\");n(\"title\",e._dfltTitle.plot),u.coerceFont(n,\"titlefont\",{family:i.family,size:Math.round(1.4*i.size),color:i.color}),n(\"autosize\",!(t.width&&t.height)),n(\"width\"),n(\"height\"),n(\"margin.l\"),n(\"margin.r\"),n(\"margin.t\"),n(\"margin.b\"),n(\"margin.pad\"),n(\"margin.autoexpand\"),t.width&&t.height&&p.sanitizeMargins(e),n(\"paper_bgcolor\"),n(\"separators\",r.decimal+r.thousands),n(\"hidesources\"),n(\"colorway\"),l.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\"),l.getComponentMethod(\"fx\",\"supplyLayoutGlobalDefaults\")(t,e,n)},p.plotAutoSize=function(t,e,r){var n,i,o=t._context||{},s=o.frameMargins,l=u.isPlotDiv(t);if(l&&t.emit(\"plotly_autosize\"),o.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow=\"hidden\";else if(a(s)&&s>0){var c=function(t){var e,r={left:0,right:0,bottom:0,top:0};if(t)for(e in t)t.hasOwnProperty(e)&&(r.left+=t[e].left||0,r.right+=t[e].right||0,r.bottom+=t[e].bottom||0,r.top+=t[e].top||0);return r}(t._boundingBoxMargins),f=c.left+c.right,h=c.bottom+c.top,d=1-2*s,m=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(d*(m.width-f)),i=Math.round(d*(m.height-h))}else{var g=l?window.getComputedStyle(t):{};n=parseFloat(g.width)||r.width,i=parseFloat(g.height)||r.height}var v=p.layoutAttributes.width.min,y=p.layoutAttributes.height.min;n<v&&(n=v),i<y&&(i=y);var x=!e.width&&Math.abs(r.width-n)>1,b=!e.height&&Math.abs(r.height-i)>1;(b||x)&&(x&&(r.width=n),b&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),p.sanitizeMargins(r)},p.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(c.length||c.push(u),e._has(\"cartesian\")&&u.finalizeSubplots(t,e),a=0;a<c.length;a++)(o=c[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var f=e._modules;for(a=0;a<f.length;a++)(o=f[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var h=e._transformModules;for(a=0;a<h.length;a++)(o=h[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},p.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(\".gl-canvas\").remove(),e._glcontainer.remove(),e._glcanvas=null),void 0!==e._geocontainer&&e._geocontainer.remove(),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),u.clearThrottle(),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.framework,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t.firstscatter,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},p.style=function(t){var e,r=t._fullLayout._modules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&u.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},p.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},p.autoMargin=function(t,e,r){var n=t._fullLayout;if(n._pushmargin||(n._pushmargin={}),!1!==n.margin.autoexpand){if(r){var i=void 0===r.pad?12:r.pad;r.l+r.r>.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||p.doAutoMargin(t)}},p.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),s=Math.max(e.margin.r||0,0),l=Math.max(e.margin.t||0,0),c=Math.max(e.margin.b||0,0),u=e._pushmargin;if(!1!==e.margin.autoexpand){u.base={l:{val:0,size:i},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}};for(var f in u){var h=u[f].l||{},d=u[f].b||{},p=h.val,m=h.size,g=d.val,v=d.size;for(var y in u){if(a(m)&&u[y].r){var x=u[y].r.val,b=u[y].r.size;if(x>p){var _=(m*x+(b-e.width)*p)/(x-p),w=(b*(1-p)+(m-e.width)*(1-x))/(x-p);_>=0&&w>=0&&_+w>i+s&&(i=_,s=w)}}if(a(v)&&u[y].t){var M=u[y].t.val,k=u[y].t.size;if(M>g){var A=(v*M+(k-e.height)*g)/(M-g),T=(k*(1-g)+(v-e.height)*(1-M))/(M-g);A>=0&&T>=0&&A+T>c+l&&(c=A,l=T)}}}}}if(r.l=Math.round(i),r.r=Math.round(s),r.t=Math.round(l),r.b=Math.round(c),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 o.plot(t)},p.graphJson=function(t,e,r,n,i){function a(t){if(\"function\"==typeof t)return null;if(u.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&&!u.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):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&p.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,c={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(c.layout=a(s)),t.framework&&t.framework.isPolar&&(c=t.framework.getConfig()),l&&(c.frames=a(l)),\"object\"===n?c:JSON.stringify(c)},p.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case\"replace\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\"insert\":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case\"delete\":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},p.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(\"computeFrame must be given a string frame name\");var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=p.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)void 0!==(i=n[r])&&null!==i&&(-1===(a=u.traces.indexOf(i))&&(a=u.data.length,u.traces[a]=i),u.data[a]=p.extendTrace(u.data[a],s.data[r]))}return u},p.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},p.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,c,f,h=u.extendDeepNoArrays({},e||{}),d=u.expandObjectPaths(h),m={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=u.nestedProperty(d,r[a])).get())?u.nestedProperty(m,r[a]).set(null):(n.set(null),u.nestedProperty(m,r[a]).set(i));if(t=u.extendDeepNoArrays(t||{},d),r&&r.length)for(a=0;a<r.length;a++)if(s=u.nestedProperty(m,r[a]),c=s.get()){for(f=(l=u.nestedProperty(t,r[a])).get(),Array.isArray(f)||(f=[],l.set(f)),o=0;o<c.length;o++){var g=c[o];f[o]=null===g?null:p.extendObjectWithContainers(f[o],g)}l.set(f)}return t},p.dataArrayContainers=[\"transforms\"],p.layoutArrayContainers=l.layoutArrayContainers,p.extendTrace=function(t,e){return p.extendObjectWithContainers(t,e,p.dataArrayContainers)},p.extendLayout=function(t,e){return p.extendObjectWithContainers(t,e,p.layoutArrayContainers)},p.transition=function(t,e,r,n,i,a){var s,l,c=Array.isArray(e)?e.length:0,f=n.slice(0,c),h=[],d=!1;for(s=0;s<f.length;s++){l=f[s];var m=t._fullData[l]._module;if(m&&!m.animatable){var g={};for(var v in e[s])g[v]=[e[s][v]]}}var y=[p.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},function(){var n;for(n=0;n<f.length;n++){var i=f[n],a=t._fullData[i]._module;a&&(a.animatable&&h.push(i),t.data[f[n]]=p.extendTrace(t.data[f[n]],e[n]))}var o=u.expandObjectPaths(u.extendDeepNoArrays({},r)),s=/^[xy]axis[0-9]*$/;for(var l in o)s.test(l)&&delete o[l].range;return p.extendLayout(t.layout,o),delete t.calcdata,p.supplyDefaults(t),p.doCalcdata(t),x.calc(t),Promise.resolve()},p.rehover,function(){return t.emit(\"plotly_transitioning\",[]),new Promise(function(e){function n(){return c++,function(){f++,d||f!==c||function(e){t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(i.redraw)return o.redraw(t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])}).then(e))}(e)}}t._transitioning=!0,a.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){d=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return o.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit(\"plotly_transitioninterrupted\",[])});var s,l,c=0,f=0,p=t._fullLayout._basePlotModules,m=!1;if(r)for(l=0;l<p.length;l++)if(p[l].transitionAxes){var g=u.expandObjectPaths(r);m=p[l].transitionAxes(t,g,a,n)||m}for(m?(s=u.extendFlat({},a)).duration=0:s=a,l=0;l<p.length;l++)p[l].plot(t,h,s,n);setTimeout(n())})}],b=u.syncOrAsync(y,t);return b&&b.then||(b=Promise.resolve()),b.then(function(){return t})},p.doCalcdata=function(t,e){var r,i,a,o,u=c.list(t),f=t._fullData,h=t._fullLayout,p=new Array(f.length),m=(t.calcdata||[]).slice(0);for(t.calcdata=p,t.firstscatter=!0,h._numBoxes=0,h._numViolins=0,h._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,h._piecolormap={},h._piecolorway=null,h._piedefaultcolorcount=0,a=0;a<f.length;a++)Array.isArray(e)&&-1===e.indexOf(a)&&(p[a]=m[a]);for(a=0;a<f.length;a++)(r=f[a])._arrayAttrs=s.findArrayAttributes(r);var g=h._subplots.polar||[];for(a=0;a<g.length;a++)u.push(h[g[a]].radialaxis,h[g[a]].angularaxis);n(u);var v=!1;for(a=0;a<f.length;a++)if(!0===(r=f[a]).visible&&r.transforms)for((i=r._module)&&i.calc&&i.calc(t,r),o=0;o<r.transforms.length;o++){var x=r.transforms[o];(i=y[x.type])&&i.calcTransform&&(r._hasCalcTransform=!0,v=!0,i.calcTransform(t,r,x))}if(v){for(a=0;a<u.length;a++)u[a]._min=[],u[a]._max=[],u[a]._categories=[],u[a]._categoriesMap={};n(u)}for(a=0;a<f.length;a++){var b=[];if(!0===(r=f[a]).visible){i=r._module;var _=r.transforms||[];for(o=_.length-1;o>=0;o--)if(_[o].enabled){r._indexToPoints=_[o]._indexToPoints;break}i&&i.calc&&(b=i.calc(t,r))}Array.isArray(b)&&b[0]||(b=[{x:d,y:d}]),b[0].t||(b[0].t={}),b[0].trace=r,p[a]=b}l.getComponentMethod(\"fx\",\"calc\")(t)},p.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},p.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var c in a)if(!o[c]){var f=a[c][0];f[0].trace.visible=!1,o[c]=[f]}for(var h in o){var d=o[h];d[0][0].trace._module.plot(t,e,u.filterVisible(d),n)}e.traceHash=o}},{\"../components/color\":618,\"../components/errorbars\":649,\"../constants/numerical\":721,\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plotly\":784,\"../plots/cartesian/axis_ids\":792,\"../registry\":873,\"./animation_attributes\":785,\"./attributes\":787,\"./command\":814,\"./font_attributes\":816,\"./frame_attributes\":817,\"./layout_attributes\":843,d3:128,\"fast-isnumeric\":140}],853:[function(t,e,r){\"use strict\";e.exports={attr:\"subplot\",name:\"polar\",axisNames:[\"angularaxis\",\"radialaxis\"],axisName2dataArray:{angularaxis:\"theta\",radialaxis:\"r\"},layerNames:[\"draglayer\",\"plotbg\",\"backplot\",\"angular-grid\",\"radial-grid\",\"frontplot\",\"angular-axis\",\"radial-axis\",\"angular-line\",\"radial-line\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],854:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");r.setConvertAngular=function(t){function e(){return t.period?Math.max(t.period,t._categories.length):t._categories.length}function r(t){return(t-s)/o}var i,a,o={clockwise:-1,counterclockwise:1}[t.direction],s=n.deg2rad(t.rotation);\"linear\"===t.type?(i=function(t,e){return\"degrees\"===e?n.deg2rad(t):t},a=function(t,e){return\"degrees\"===e?n.rad2deg(t):t}):\"category\"===t.type&&(i=function(t){var r=e();return 2*t*Math.PI/r},a=function(t){return t*e()/Math.PI/2}),t.unTransformRad=r,t._c2rad=i,t.c2rad=function(t,e){return function(t){return o*t+s}(i(t,e))},t.rad2c=function(t,e){return a(r(t),e)},t.c2deg=function(e,r){return n.rad2deg(t.c2rad(e,r))},t.deg2c=function(e,r){return t.rad2c(n.deg2rad(e),r)}}},{\"../../lib\":743}],855:[function(t,e,r){\"use strict\";var n=t(\"../get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./polar\"),o=t(\"./constants\"),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:\"subplotid\",dflt:l,editType:\"calc\"},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!e[o]&&s){s.framework.remove(),s.layers[\"radial-axis-title\"].remove();for(var c in s.clipPaths)s.clipPaths[c].remove()}}},toSVG:t(\"../cartesian\").toSVG}},{\"../../lib\":743,\"../cartesian\":800,\"../get_data\":826,\"./constants\":853,\"./layout_attributes\":856,\"./layout_defaults\":857,\"./polar\":864}],856:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../cartesian/layout_attributes\"),a=t(\"../domain_attributes\"),o=t(\"../../lib\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},\"plot\",\"from-root\"),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},\"plot\",\"from-root\"),u={visible:o({},i.visible,{dflt:!0}),type:i.type,autorange:i.autorange,rangemode:{valType:\"enumerated\",values:[\"tozero\",\"nonnegative\",\"normal\"],dflt:\"tozero\",editType:\"calc\"},range:i.range,categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:\"angle\",editType:\"plot\"},side:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"clockwise\",editType:\"plot\"},title:o({},i.title,{editType:\"plot\",dflt:\"\"}),titlefont:s(i.titlefont,\"plot\",\"from-root\"),hoverformat:i.hoverformat,editType:\"calc\"};o(u,l,c);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"category\"],dflt:\"-\",editType:\"calc\"},categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\"],dflt:\"degrees\",editType:\"calc\"},period:{valType:\"number\",editType:\"calc\",min:0},direction:{valType:\"enumerated\",values:[\"counterclockwise\",\"clockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",editType:\"calc\"},hoverformat:i.hoverformat,editType:\"calc\"};o(f,l,c),e.exports={domain:a({name:\"polar\",editType:\"plot\"}),sector:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],dflt:[0,360],editType:\"plot\"},bgcolor:{valType:\"color\",editType:\"plot\",dflt:n.background},radialaxis:u,angularaxis:f,editType:\"calc\"}},{\"../../components/color/attributes\":617,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../cartesian/layout_attributes\":801,\"../domain_attributes\":815}],857:[function(t,e,r){\"use strict\";function n(t,e,r,n){function o(t,e){return r(_+\".\"+t,e)}var b=r(\"bgcolor\");n.bgColor=a.combine(b,n.paper_bgcolor);for(var _,w=r(\"sector\"),M=s(n.fullData,y.name,n.id),k=n.layoutOut,A=0;A<x.length;A++){_=x[A],i.isPlainObject(t[_])||(t[_]={});var T=t[_],S=e[_]={};S._id=S._name=_;var E=y.axisName2dataArray[_],L=function(t,e,r,n,i){if(\"-\"===r(\"type\")){for(var a,o=0;o<n.length;o++)if(n[o].visible){a=n[o];break}a&&(e.type=d(a[i],\"gregorian\")),\"-\"===e.type?e.type=\"linear\":t.type=e.type}return e.type}(T,S,o,M,E);f(T,S,o),S._initialCategories=\"category\"===L?p(E,S.categoryorder,S.categoryarray,M):[];var C=o(\"visible\");m(S,k);var z,D;switch(C&&(D=(z=o(\"color\"))===T.color?z:n.font.color),S._m=1,_){case\"radialaxis\":var I=o(\"autorange\",!S.isValidRange(T.range));I&&o(\"rangemode\"),\"reversed\"===I&&(S._m=-1),o(\"range\"),S.cleanRange(\"range\",{dfltRange:[0,1]}),C&&(o(\"side\"),o(\"angle\",w[0]),o(\"title\"),i.coerceFont(o,\"titlefont\",{family:n.font.family,size:Math.round(1.2*n.font.size),color:D}));break;case\"angularaxis\":if(\"date\"===L){i.log(\"Polar plots do not support date angular axes yet.\");for(var P=0;P<M.length;P++)M[P].visible=!1;L=T.type=S.type=\"linear\"}o(\"linear\"===L?\"thetaunit\":\"period\");o(\"rotation\",{counterclockwise:0,clockwise:90}[o(\"direction\")]),g(S)}if(C){l(T,S,o,S.type),u(T,S,o,S.type,{noHover:!1,tickSuffixDflt:\"degrees\"===S.thetaunit?\"\\xb0\":void 0}),c(T,S,o,{outerTicks:!0});o(\"showticklabels\")&&(i.coerceFont(o,\"tickfont\",{family:n.font.family,size:n.font.size,color:D}),o(\"tickangle\"),o(\"tickformat\")),h(T,S,o,{dfltColor:z,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v[_]}),o(\"layer\")}o(\"hoverformat\"),S._input=T}}var i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../subplot_defaults\"),s=t(\"../get_data\").getSubplotData,l=t(\"../cartesian/tick_value_defaults\"),c=t(\"../cartesian/tick_mark_defaults\"),u=t(\"../cartesian/tick_label_defaults\"),f=t(\"../cartesian/category_order_defaults\"),h=t(\"../cartesian/line_grid_defaults\"),d=t(\"../cartesian/axis_autotype\"),p=t(\"../cartesian/ordered_categories\"),m=t(\"../cartesian/set_convert\"),g=t(\"./helpers\").setConvertAngular,v=t(\"./layout_attributes\"),y=t(\"./constants\"),x=y.axisNames;e.exports=function(t,e,r){o(t,e,r,{type:y.name,attributes:v,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\"../../components/color\":618,\"../../lib\":743,\"../cartesian/axis_autotype\":790,\"../cartesian/category_order_defaults\":793,\"../cartesian/line_grid_defaults\":803,\"../cartesian/ordered_categories\":804,\"../cartesian/set_convert\":808,\"../cartesian/tick_label_defaults\":809,\"../cartesian/tick_mark_defaults\":810,\"../cartesian/tick_value_defaults\":811,\"../get_data\":826,\"../subplot_defaults\":865,\"./constants\":853,\"./helpers\":854,\"./layout_attributes\":856}],858:[function(t,e,r){\"use strict\";var n=t(\"../../../traces/scatter/attributes\"),i=n.marker;e.exports={r:n.r,t:n.t,marker:{color:i.color,size:i.size,symbol:i.symbol,opacity:i.opacity,editType:\"calc\"}}},{\"../../../traces/scatter/attributes\":1066}],859:[function(t,e,r){\"use strict\";function n(t,e){return a({},e,{showline:{valType:\"boolean\"},showticklabels:{valType:\"boolean\"},tickorientation:{valType:\"enumerated\",values:[\"horizontal\",\"vertical\"]},ticklen:{valType:\"number\",min:0},tickcolor:{valType:\"color\"},ticksuffix:{valType:\"string\"},endpadding:{valType:\"number\"},visible:{valType:\"boolean\"}})}var i=t(\"../../cartesian/layout_attributes\"),a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../plot_api/edit_types\").overrideAll,s=a({},i.domain,{});e.exports=o({radialaxis:n(0,{range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},domain:s,orientation:{valType:\"number\"}}),angularaxis:n(0,{range:{valType:\"info_array\",items:[{valType:\"number\",dflt:0},{valType:\"number\",dflt:360}]},domain:s}),layout:{direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"]},orientation:{valType:\"angle\"}}},\"plot\",\"nested\")},{\"../../../lib/extend\":732,\"../../../plot_api/edit_types\":773,\"../../cartesian/layout_attributes\":801}],860:[function(t,e,r){\"use strict\";(e.exports=t(\"./micropolar\")).manager=t(\"./micropolar_manager\")},{\"./micropolar\":861,\"./micropolar_manager\":862}],861:[function(t,e,r){var n=t(\"d3\"),i=t(\"../../../lib\").extendDeepAll,a=t(\"../../../constants/alignment\").MID_SHIFT,o=e.exports={version:\"0.2.2\"};o.Axis=function(){var t,e,r,s,l={data:[],layout:{}},c={},u={},f=n.dispatch(\"hover\"),h={};return h.render=function(c){return function(c){e=c||e;var f=l.data,h=l.layout;(\"string\"==typeof e||e.nodeName)&&(e=n.select(e)),e.datum(f).each(function(e,l){function c(t,e){return s(t)%360+h.orientation}var f=e.slice();u={data:o.util.cloneJson(f),layout:o.util.cloneJson(h)};var d=0;f.forEach(function(t,e){t.color||(t.color=h.defaultColorRange[d],d=(d+1)%h.defaultColorRange.length),t.strokeColor||(t.strokeColor=\"LinePlot\"===t.geometry?t.color:n.rgb(t.color).darker().toString()),u.data[e].color=t.color,u.data[e].strokeColor=t.strokeColor,u.data[e].strokeDash=t.strokeDash,u.data[e].strokeSize=t.strokeSize});var p=f.filter(function(t,e){var r=t.visible;return void 0===r||!0===r}),m=!1,g=p.map(function(t,e){return m=m||void 0!==t.groupId,t});if(m){var v=[],y=n.nest().key(function(t,e){return void 0!==t.groupId?t.groupId:\"unstacked\"}).entries(g).map(function(t,e){if(\"unstacked\"===t.key)return t.values;var r=t.values[0].r.map(function(t,e){return 0});return t.values.forEach(function(t,e,n){t.yStack=[r],v.push(r),r=o.util.sumArrays(t.r,r)}),t.values});p=n.merge(y)}p.forEach(function(t,e){t.t=Array.isArray(t.t[0])?t.t:[t.t],t.r=Array.isArray(t.r[0])?t.r:[t.r]});var x=Math.min(h.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2;x=Math.max(10,x);var b,_=[h.margin.left+x,h.margin.top+x];b=m?[0,n.max(o.util.sumArrays(o.util.arrayLast(p).r[0],o.util.arrayLast(v)))]:n.extent(o.util.flattenArray(p.map(function(t,e){return t.r}))),h.radialAxis.domain!=o.DATAEXTENT&&(b[0]=0),r=n.scale.linear().domain(h.radialAxis.domain!=o.DATAEXTENT&&h.radialAxis.domain?h.radialAxis.domain:b).range([0,x]),u.layout.radialAxis.domain=r.domain();var w,M=o.util.flattenArray(p.map(function(t,e){return t.t})),k=\"string\"==typeof M[0];k&&(M=o.util.deduplicate(M),w=M.slice(),M=n.range(M.length),p=p.map(function(t,e){var r=t;return t.t=[M],m&&(r.yStack=t.yStack),r}));var A=p.filter(function(t,e){return\"LinePlot\"===t.geometry||\"DotPlot\"===t.geometry}).length===p.length,T=null===h.needsEndSpacing?k||!A:h.needsEndSpacing,S=h.angularAxis.domain&&h.angularAxis.domain!=o.DATAEXTENT&&!k&&h.angularAxis.domain[0]>=0?h.angularAxis.domain:n.extent(M),E=Math.abs(M[1]-M[0]);A&&!k&&(E=0);var L=S.slice();T&&k&&(L[1]+=E);var C=h.angularAxis.ticksCount||4;C>8&&(C=C/(C/8)+C%8),h.angularAxis.ticksStep&&(C=(L[1]-L[0])/C);var z=h.angularAxis.ticksStep||(L[1]-L[0])/(C*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),L[2]||(L[2]=z);var D=n.range.apply(this,L);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(L.slice(0,2)).range(\"clockwise\"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?E:0,void 0===(t=n.select(this).select(\"svg.chart-root\"))||t.empty()){var I=(new DOMParser).parseFromString(\"<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>\",\"application/xml\"),P=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(P)}t.select(\".guides-group\").style({\"pointer-events\":\"none\"}),t.select(\".angular.axis-group\").style({\"pointer-events\":\"none\"}),t.select(\".radial.axis-group\").style({\"pointer-events\":\"none\"});var O,F=t.select(\".chart-group\"),R={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){O=t.select(\".legend-group\").attr({transform:\"translate(\"+[x,h.margin.top]+\")\"}).style({display:\"block\"});var j=p.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:p.map(function(t,e){return t.name||\"Element\"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:O,elements:j,reverseOrder:h.legend.reverseOrder})})();var B=O.node().getBBox();x=Math.min(h.width-B.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),O.attr(\"transform\",\"translate(\"+[_[0]+x,_[1]-x]+\")\")}else O=t.select(\".legend-group\").style({display:\"none\"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),F.attr(\"transform\",\"translate(\"+_+\")\").style({cursor:\"crosshair\"});var U=[(h.width-(h.margin.left+h.margin.right+2*x+(B?B.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(\".outer-group\").attr(\"transform\",\"translate(\"+U+\")\"),h.title){var V=t.select(\"g.title-group text\").style(N).text(h.title),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(\".radial.axis-group\");if(h.radialAxis.gridLinesVisible){var G=H.selectAll(\"circle.grid-circle\").data(r.ticks(5));G.enter().append(\"circle\").attr({class:\"grid-circle\"}).style(R),G.attr(\"r\",r),G.exit().remove()}H.select(\"circle.outside-circle\").attr({r:x}).style(R);var Y=t.select(\"circle.background-circle\").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var W=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(W).attr({transform:\"rotate(\"+h.radialAxis.orientation+\")\"}),H.selectAll(\".domain\").style(R),H.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\"]]+\")\"}}),H.selectAll(\"g>line\").style({stroke:\"black\"})}var X=t.select(\".angular.axis-group\").selectAll(\"g.angular-tick\").data(D),Z=X.enter().append(\"g\").classed(\"angular-tick\",!0);X.attr({transform:function(t,e){return\"rotate(\"+c(t)+\")\"}}).style({display:h.angularAxis.visible?\"block\":\"none\"}),X.exit().remove(),Z.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(R),Z.selectAll(\".minor\").style({stroke:h.minorTickColor}),X.select(\"line.grid-line\").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?\"block\":\"none\"}),Z.append(\"text\").classed(\"axis-text\",!0).style(N);var J=X.select(\"text.axis-text\").attr({x:x+h.labelOffset,dy:a+\"em\",transform:function(t,e){var r=c(t),n=x+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&&J.text(function(t,e){return e%(h.minorTicks+1)!=0?\"\":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(F.selectAll(\".angular-tick text\")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));O.attr({transform:\"translate(\"+[x+K,h.margin.top]+\")\"});var Q=t.select(\"g.geometry-group\").selectAll(\"g\").size()>0,$=t.select(\"g.geometry-group\").selectAll(\"g.geometry\").data(p);if($.enter().append(\"g\").attr({class:function(t,e){return\"geometry geometry\"+e}}),$.exit().remove(),p[0]||Q){var tt=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=$.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,tt.push({data:t,geometryConfig:n})});var et=[];n.nest().key(function(t,e){return void 0!==t.data.groupId||\"unstacked\"}).entries(tt).forEach(function(t,e){\"unstacked\"===t.key?et=et.concat(t.values.map(function(t,e){return[t]})):et.push(t.values)}),et.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 i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var rt,nt,it=t.select(\".guides-group\"),at=t.select(\".tooltips-group\"),ot=o.tooltipPanel().config({container:at,fontSize:8})(),st=o.tooltipPanel().config({container:at,fontSize:8})(),lt=o.tooltipPanel().config({container:at,hasTick:!0})();if(!k){var ct=it.select(\"line\").attr({x1:0,y1:0,y2:0}).style({stroke:\"grey\",\"pointer-events\":\"none\"});F.on(\"mousemove.angular-guide\",function(t,e){var r=o.util.getMousePos(Y).angle;ct.attr({x2:-x,transform:\"rotate(\"+r+\")\"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;rt=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);ot.text(o.util.round(rt)).move([i[0]+_[0],i[1]+_[1]])}).on(\"mouseout.angular-guide\",function(t,e){it.select(\"line\").style({opacity:0})})}var ut=it.select(\"circle\").style({stroke:\"grey\",fill:\"none\"});F.on(\"mousemove.radial-guide\",function(t,e){var n=o.util.getMousePos(Y).radius;ut.attr({r:n}).style({opacity:.5}),nt=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);st.text(o.util.round(nt)).move([i[0]+_[0],i[1]+_[1]])}).on(\"mouseout.radial-guide\",function(t,e){ut.style({opacity:0}),lt.hide(),ot.hide(),st.hide()}),t.selectAll(\".geometry-group .mark\").on(\"mouseover.tooltip\",function(e,r){var i=n.select(this),a=this.style.fill,s=\"black\",l=this.style.opacity||1;if(i.attr({\"data-opacity\":l}),a&&\"none\"!==a){i.attr({\"data-fill\":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};k&&(c.t=w[e[0]]);var u=\"t: \"+c.t+\", r: \"+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),d=[f.left+f.width/2-U[0]-h.left,f.top+f.height/2-U[1]-h.top];lt.config({color:s}).text(u),lt.move(d)}else a=this.style.stroke||\"black\",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\")&<.show()}).on(\"mouseout.tooltip\",function(t,e){lt.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\")})})})}(c),this},h.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]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,\"on\"),h},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;i<a;i++)(e=t[i])in r?(r[e]++,n[e]=r[e]):r[e]=1;return n},o.util.duplicates=function(t){return Object.keys(o.util.duplicatesCount(t))},o.util.translator=function(t,e,r,n){if(n){var i=r.slice();r=e,e=i}var a=e.reduce(function(t,e){if(void 0!==t)return t[e]},t);void 0!==a&&(e.reduce(function(t,r,n){if(void 0!==t)return n===e.length-1&&delete t[r],t[r]},t),r.reduce(function(t,e,n){return void 0===t[e]&&(t[e]={}),n===r.length-1&&(t[e]=a),t[e]},t))},o.PolyChart=function(){function t(){var t=e[0].geometryConfig,r=t.container;\"string\"==typeof r&&(r=n.select(r)),r.datum(e).each(function(e,r){var i=!!e[0].data.yStack,o=e.map(function(t,e){return i?n.zip(t.data.t[0],t.data.r[0],t.data.yStack[0]):n.zip(t.data.t[0],t.data.r[0])}),s=t.angularScale,l=t.radialScale.domain()[0],c={};c.bar=function(r,i,a){var o=e[a].data,l=t.radialScale(r[1])-t.radialScale(0),c=t.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:\"mark bar\",d:\"M\"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join(\"L\")+\"Z\",transform:function(e,r){return\"rotate(\"+(t.orientation+s(e[0]))+\")\"}})},c.dot=function(r,i,a){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(e[a].data.dotSize).type(e[a].data.dotType)(r,i);n.select(this).attr({class:\"mark dot\",d:s,transform:function(e,r){var n=function(t){return{x:t.r*Math.cos(t.t),y:t.r*Math.sin(t.t)}}(function(e,r){return{r:t.radialScale(e[1]),t:(t.angularScale(e[0])+t.orientation)*Math.PI/180}}(o));return\"translate(\"+[n.x,n.y]+\")\"}})};var u=n.svg.line.radial().interpolate(e[0].data.lineInterpolation).radius(function(e){return t.radialScale(e[1])}).angle(function(e){return t.angularScale(e[0])*Math.PI/180});c.line=function(r,i,a){var s=r[2]?o[a].map(function(t,e){return[t[0],t[1]+t[2]]}):o[a];if(n.select(this).each(c.dot).style({opacity:function(t,r){return+e[a].data.dotVisible},fill:p.stroke(r,i,a)}).attr({class:\"mark dot\"}),!(i>0)){var l=n.select(this.parentNode).selectAll(\"path.line\").data([0]);l.enter().insert(\"path\"),l.attr({class:\"line\",d:u(s),transform:function(e,r){return\"rotate(\"+(t.orientation+90)+\")\"},\"pointer-events\":\"none\"}).style({fill:function(t,e){return p.fill(r,i,a)},\"fill-opacity\":0,stroke:function(t,e){return p.stroke(r,i,a)},\"stroke-width\":function(t,e){return p[\"stroke-width\"](r,i,a)},\"stroke-dasharray\":function(t,e){return p[\"stroke-dasharray\"](r,i,a)},opacity:function(t,e){return p.opacity(r,i,a)},display:function(t,e){return p.display(r,i,a)}})}};var f=t.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,d=n.svg.arc().startAngle(function(t){return-h/2}).endAngle(function(t){return h/2}).innerRadius(function(e){return t.radialScale(l+(e[2]||0))}).outerRadius(function(e){return t.radialScale(l+(e[2]||0))+t.radialScale(e[1])});c.arc=function(e,r,i){n.select(this).attr({class:\"mark arc\",d:d,transform:function(e,r){return\"rotate(\"+(t.orientation+s(e[0])+90)+\")\"}})};var p={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 a[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\"}},m=n.select(this).selectAll(\"g.layer\").data(o);m.enter().append(\"g\").attr({class:\"layer\"});var g=m.selectAll(\"path.mark\").data(function(t,e){return t});g.enter().append(\"path\").attr({class:\"mark\"}),g.style(p).each(c[t.geometryType]),g.exit().remove(),m.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch(\"hover\"),a={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]={}),i(e[r],o.PolyChart.defaultConfig()),i(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,a=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var a=i({},r.elements[e]);return a.name=t,a.color=[].concat(r.elements[e].color)[n],a})}),o=n.merge(a);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}),c=r.fontSize,u=null==r.isContinuous?\"number\"==typeof o[0]:r.isContinuous,f=u?r.height:c*o.length,h=s.classed(\"legend-group\",!0).selectAll(\"svg\").data([0]),d=h.enter().append(\"svg\").attr({width:300,height:f+c,xmlns:\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\",version:\"1.1\"});d.append(\"g\").classed(\"legend-axis\",!0),d.append(\"g\").classed(\"legend-marks\",!0);var p=n.range(o.length),m=n.scale[u?\"linear\":\"ordinal\"]().domain(p).range(l),g=n.scale[u?\"linear\":\"ordinal\"]().domain(p)[u?\"range\":\"rangePoints\"]([0,f]);if(u){var v=h.select(\".legend-marks\").append(\"defs\").append(\"linearGradient\").attr({id:\"grad1\",x1:\"0%\",y1:\"0%\",x2:\"0%\",y2:\"100%\"}).selectAll(\"stop\").data(l);v.enter().append(\"stop\"),v.attr({offset:function(t,e){return e/(l.length-1)*100+\"%\"}}).style({\"stop-color\":function(t,e){return t}}),h.append(\"rect\").classed(\"legend-mark\",!0).attr({height:r.height,width:r.colorBandWidth,fill:\"url(#grad1)\"})}else{var y=h.select(\".legend-marks\").selectAll(\"path.legend-mark\").data(o);y.enter().append(\"path\").classed(\"legend-mark\",!0),y.attr({transform:function(t,e){return\"translate(\"+[c/2,g(e)+c/2]+\")\"},d:function(t,e){return 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)()}(t.symbol,c)},fill:function(t,e){return m(e)}}),y.exit().remove()}var x=n.svg.axis().scale(g).orient(\"right\"),b=h.select(\"g.legend-axis\").attr({transform:\"translate(\"+[u?r.colorBandWidth:c,c/2]+\")\"}).call(x);return b.selectAll(\".domain\").style({fill:\"none\",stroke:\"none\"}),b.selectAll(\"line\").style({fill:\"none\",stroke:u?r.textColor:\"none\"}),b.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?(i(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,a={container:null,hasTick:!1,fontSize:12,color:\"white\",padding:5},s=\"tooltip-\"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(\"g.\"+s).data([0])).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:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?\"#aaa\":\"white\",u=o>=.5?\"black\":\"white\",f=i||\"\";e.style({fill:u,\"font-size\":a.fontSize+\"px\"}).text(f);var h=a.padding,d=e.node().getBBox(),p={fill:a.color,stroke:s,\"stroke-width\":\"2px\"},m=d.width+2*h+l,g=d.height+2*h;return r.attr({d:\"M\"+[[l,-g/2],[l,-g/4],[a.hasTick?0:l,0],[l,g/4],[l,g/2],[m,g/2],[m,-g/2]].join(\"L\")+\"Z\"}).style(p),t.attr({transform:\"translate(\"+[l,-g/2+2*h]+\")\"}),t.style({display:\"block\"}),c},c.move=function(e){if(t)return t.attr({transform:\"translate(\"+[e[0],e[1]]+\")\"}).style({display:\"block\"}),c},c.hide=function(){if(t)return t.style({display:\"none\"}),c},c.show=function(){if(t)return t.style({display:\"block\"}),c},c.config=function(t){return i(a,t),c},c},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=i({},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 a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},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\"],c=[\"top\",\"right\",\"bottom\",\"left\",\"pad\"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}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}},{\"../../../constants/alignment\":716,\"../../../lib\":743,d3:128}],862:[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,c=e.exports={};c.framework=function(t){function e(e,i){return i&&(f=i),n.select(n.select(f).node().parentNode).selectAll(\".svg-container>*:not(.chart-root)\").remove(),r=r?l(r,e):e,a||(a=o.Axis()),u=o.adapter.plotly().convert(r),a.config(u).render(f),t.data=r.data,t.layout=r.layout,c.fillLayout(t),r}var r,i,a,u,f,h=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){h.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){h.undo()},e.redo=function(){h.redo()},e},c.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\":618,\"../../../lib\":743,\"./micropolar\":861,\"./undo_manager\":863,d3:128}],863:[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<r.length-1},getCommands:function(){return r},getPreviousCommand:function(){return r[n-1]},getIndex:function(){return n}}}},{}],864:[function(t,e,r){\"use strict\";function n(t,e){this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=t._fullLayout,n=\"clip\"+r._uid+e;this.clipIds.circle=n+\"-circle\",this.clipPaths.circle=r._clips.append(\"clipPath\").attr(\"id\",this.clipIds.circle),this.clipPaths.circle.append(\"path\"),this.framework=r._polarlayer.append(\"g\").attr(\"class\",e),this.radialTickLayout=null,this.angularTickLayout=null}function i(t,e,r){M.setConvert(t,r),t._min=e._min,t._max=e._max,t.setScale()}function a(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return\"side\"in t&&(e+=t.side),e}function o(t,e){if(l(e))return _.symbolFuncs[0](t);var r=t*Math.cos(D(e[0])),n=-t*Math.sin(D(e[0])),i=t*Math.cos(D(e[1])),a=-t*Math.sin(D(e[1]));return\"M\"+[r,n]+\"A\"+[t,t]+\" \"+(Math.abs(e[1]-e[0])<=180?[0,0,0]:[0,1,0])+\" \"+[i,a]}function s(t,e){return o(t,e)+(l(e)?\"\":\"L0,0Z\")}function l(t){return 360===Math.abs(t[1]-t[0])}function c(t,e,r){return e?(t.attr(\"display\",null),t.attr(r)):t&&t.attr(\"display\",\"none\"),t}function u(t,e){return\"translate(\"+t+\",\"+e+\")\"}function f(t){return\"rotate(\"+t+\")\"}function h(t){return Math.abs(t)<1e-10?0:t>0?1:-1}function d(t){return h(Math.cos(t))}function p(t){return h(Math.sin(t))}var m=t(\"d3\"),g=t(\"tinycolor2\"),v=t(\"../../plotly\"),y=t(\"../../registry\"),x=t(\"../../lib\"),b=t(\"../../components/color\"),_=t(\"../../components/drawing\"),w=t(\"../plots\"),M=t(\"../cartesian/axes\"),k=t(\"../../components/dragelement\"),A=t(\"../cartesian/dragbox\"),T=t(\"../../components/fx\"),S=t(\"../../components/titles\"),E=t(\"../cartesian/select\"),L=t(\"../../lib/setcursor\"),C=t(\"../../constants/alignment\").MID_SHIFT,z=x._,D=x.deg2rad,I=x.rad2deg,P=x.wrap360,O=x.wrap180,F=t(\"./helpers\").setConvertAngular,R=t(\"./constants\"),N=n.prototype;e.exports=function(t,e){return new n(t,e)},N.plot=function(t,e){var r=e[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n<t.length;n++){if(!1===t[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(e,r),this.updateLayout(e,r),w.generalUpdatePerTraceModule(this.gd,this,t,r),this.updateFx(e,r)},N.updateLayers=function(t,e){var r=this.layers,n=e.radialaxis,i=e.angularaxis,a=R.layerNames,o=a.indexOf(\"frontplot\"),s=a.slice(0,o),l=\"below traces\"===i.layer,c=\"below traces\"===n.layer;l&&s.push(\"angular-axis\"),c&&s.push(\"radial-axis\"),l&&s.push(\"angular-line\"),c&&s.push(\"radial-line\"),s.push(\"frontplot\"),l||s.push(\"angular-axis\"),c||s.push(\"radial-axis\"),l||s.push(\"angular-line\"),c||s.push(\"radial-line\");var u=this.framework.selectAll(\".polarsublayer\").data(s,String);u.enter().append(\"g\").attr(\"class\",function(t){return\"polarsublayer \"+t}).each(function(t){var e=r[t]=m.select(this);switch(t){case\"frontplot\":e.append(\"g\").classed(\"scatterlayer\",!0);break;case\"backplot\":e.append(\"g\").classed(\"maplayer\",!0);break;case\"plotbg\":r.bgcircle=e.append(\"path\");break;case\"radial-grid\":e.style(\"fill\",\"none\"),e.append(\"g\").classed(\"x\",1);break;case\"angular-grid\":e.style(\"fill\",\"none\"),e.append(\"g\").classed(\"angular\",1);break;case\"radial-line\":e.append(\"line\").style(\"fill\",\"none\");break;case\"angular-line\":e.append(\"path\").style(\"fill\",\"none\")}}),u.order()},N.updateLayout=function(t,e){var r=this,n=r.layers,i=t._size,a=e.domain.x,o=e.domain.y;r.xOffset=i.l+i.w*a[0],r.yOffset=i.t+i.h*(1-o[1]);var l,c,f,h,d,p=r.xLength=i.w*(a[1]-a[0]),m=r.yLength=i.h*(o[1]-o[0]),g=r.sector=e.sector,v=r.sectorBBox=function(t){var e,r,n,i,a=t[0],o=t[1]-a,s=P(a),l=s+o,c=Math.cos(D(s)),u=Math.sin(D(s)),f=Math.cos(D(l)),h=Math.sin(D(l));return i=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h),e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f),r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h),n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f),[e,r,n,i]}(g),y=v[2]-v[0],x=v[3]-v[1],w=m/p,k=Math.abs(x/y);w>k?(l=p,d=(m-(c=p*k))/i.h/2,f=[a[0],a[1]],h=[o[0]+d,o[1]-d]):(c=m,d=(p-(l=m/k))/i.w/2,f=[a[0]+d,a[1]-d],h=[o[0],o[1]]),r.xLength2=l,r.yLength2=c,r.xDomain2=f,r.yDomain2=h;var A=r.xOffset2=i.l+i.w*f[0],T=r.yOffset2=i.t+i.h*(1-h[1]),S=r.radius=l/y,E=r.cx=A-S*v[0],L=r.cy=T+S*v[3],C=r.cxx=E-A,z=r.cyy=L-T;r.updateRadialAxis(t,e),r.updateRadialAxisTitle(t,e),r.updateAngularAxis(t,e);var I=r.radialAxis.range,O=I[1]-I[0],F=r.xaxis={type:\"linear\",_id:\"x\",range:[v[0]*O,v[2]*O],domain:f};M.setConvert(F,t),F.setScale();var R=r.yaxis={type:\"linear\",_id:\"y\",range:[v[1]*O,v[3]*O],domain:h};M.setConvert(R,t),R.setScale(),F.isPtWithinRange=function(t){return r.isPtWithinSector(t)},R.isPtWithinRange=function(){return!0},n.frontplot.attr(\"transform\",u(A,T)).call(_.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.circle),n.bgcircle.attr({d:s(S,g),transform:u(E,L)}).call(b.fill,e.bgcolor),r.clipPaths.circle.select(\"path\").attr(\"d\",s(S,g)).attr(\"transform\",u(C,z)),r.framework.selectAll(\".crisp\").classed(\"crisp\",0)},N.updateRadialAxis=function(t,e){var r=this.gd,n=this.layers,s=this.radius,l=this.cx,h=this.cy,d=t._size,p=e.radialaxis,m=e.sector,g=P(m[0]);this.fillViewInitialKey(\"radialaxis.angle\",p.angle);var v=this.radialAxis=x.extendFlat({},p,{_axislayer:n[\"radial-axis\"],_gridlayer:n[\"radial-grid\"],_id:\"x\",_pos:0,side:{counterclockwise:\"top\",clockwise:\"bottom\"}[p.side],domain:[0,s/d.w],anchor:\"free\",position:0,_counteraxis:!0});i(v,p,t),M.doAutoRange(v),p.range=v.range.slice(),p._input.range=v.range.slice(),this.fillViewInitialKey(\"radialaxis.range\",v.range.slice()),\"auto\"===v.tickangle&&g>90&&g<=270&&(v.tickangle=180),v._transfn=function(t){return\"translate(\"+v.l2p(t.x)+\",0)\"},v._gridpath=function(t){return o(v.r2p(t.x),m)};var y=a(p);this.radialTickLayout!==y&&(n[\"radial-axis\"].selectAll(\".xtick\").remove(),this.radialTickLayout=y),M.doTicks(r,v,!0),c(n[\"radial-axis\"],p.showticklabels||p.ticks,{transform:u(l,h)+f(-p.angle)}),c(n[\"radial-grid\"],p.showgrid,{transform:u(l,h)}).selectAll(\"path\").attr(\"transform\",null),c(n[\"radial-line\"].select(\"line\"),p.showline,{x1:0,y1:0,x2:s,y2:0,transform:u(l,h)+f(-p.angle)}).attr(\"stroke-width\",p.linewidth).call(b.stroke,p.linecolor)},N.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,l=this.id+\"title\",c=void 0!==r?r:s.angle,u=D(c),f=Math.cos(u),h=Math.sin(u),d=0;if(s.title){var p=_.bBox(this.layers[\"radial-axis\"].node()).height,m=s.titlefont.size;d=\"counterclockwise\"===s.side?-p-.4*m:p+.8*m}this.layers[\"radial-axis-title\"]=S.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:a+i/2*f+d*h,y:o-i/2*h+d*f,\"text-anchor\":\"middle\"},transform:{rotate:-c}})},N.updateAngularAxis=function(t,e){function r(t){return T.c2rad(t.x,\"degrees\")}function n(t){return[v*Math.cos(t),v*Math.sin(t)]}var o=this,h=o.gd,g=o.layers,v=o.radius,y=o.cx,_=o.cy,w=e.angularaxis,k=e.sector,A=k.map(D);o.fillViewInitialKey(\"angularaxis.rotation\",w.rotation);var T=o.angularAxis=x.extendFlat({},w,{_axislayer:g[\"angular-axis\"],_gridlayer:g[\"angular-grid\"],_id:\"angular\",_pos:0,side:\"right\",domain:[0,Math.PI],anchor:\"free\",position:0,_counteraxis:!0});\"linear\"===T.type?(T.autorange=!1,l(k)?T.range=k.slice():T.range=A.map(T.unTransformRad).map(I),\"radians\"===T.thetaunit&&(T.tick0=I(T.tick0),T.dtick=I(T.dtick))):\"category\"===T.type&&(T._tickFilter=function(t){return o.isPtWithinSector({r:o.radialAxis.range[1],rad:T.c2rad(t.x)})}),i(T,w,t),M.doAutoRange(T),T._transfn=function(t){var e=r(t),i=n(e),a=u(y+i[0],_-i[1]),o=m.select(this);return o&&o.node()&&o.classed(\"ticks\")&&(a+=f(-I(e))),a},T._gridpath=function(t){var e=n(r(t));return\"M0,0L\"+-e[0]+\",\"+e[1]};var S=\"outside\"!==w.ticks?.7:.5;T._labelx=function(t){var e=r(t),n=T._labelStandoff,i=T._pad;return(0===p(e)?0:Math.cos(e)*(n+i+S*t.fontSize))+d(e)*(t.dx+n+i)},T._labely=function(t){var e=r(t),n=T._labelStandoff,i=T._labelShift,a=T._pad;return t.dy+t.fontSize*C-i+-Math.sin(e)*(n+a+S*t.fontSize)},T._labelanchor=function(t,e){var n=r(e);return 0===p(n)?d(n)>0?\"start\":\"end\":\"middle\"};var E=a(w);o.angularTickLayout!==E&&(g[\"angular-axis\"].selectAll(\".angulartick\").remove(),o.angularTickLayout=E),M.doTicks(h,T,!0),c(g[\"angular-line\"].select(\"path\"),w.showline,{d:s(v,k),transform:u(y,_)}).attr(\"stroke-width\",w.linewidth).call(b.stroke,w.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t,e),this.updateRadialDrag(t,e),this.updateMainDrag(t,e))},N.updateMainDrag=function(t,e){function r(t,e){var r=t-w,n=e-M;return Math.sqrt(r*r+n*n)}function n(t,e){return Math.atan2(M-e,t-w)}function i(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function a(t,e){var r=R.cornerLen,n=R.cornerHalfWidth;if(0===t)return s(2*n,S);var a=r/t/2,o=e-a,l=e+a,c=Math.max(0,Math.min(t,x)),u=c-n,f=c+n;return\"M\"+i(u,o)+\"A\"+[u,u]+\" 0,0,0 \"+i(u,l)+\"L\"+i(f,l)+\"A\"+[f,f]+\" 0,0,1 \"+i(f,o)+\"Z\"}function o(t,e){var i=C+t,o=z+e,l=r(C,z),c=Math.min(r(i,o),x),u=n(C,z),f=n(i,o);l<y?l=0:x-l<y?l=x:c<y?c=0:x-c<y&&(c=x);var h,d;Math.abs(c-l)>p?(l<c?(D=l,I=c):(D=c,I=l,f=[u,u=f][0]),h=P+s(I,S)+s(D,S),d=a(D,u)+a(I,f)):(D=null,I=null,h=P,d=\"M0,0Z\"),N.attr(\"d\",h),j.attr(\"d\",d),A.transitionZoombox(N,j,O,F),O=!0}function l(){if(A.removeZoombox(f),null!==D&&null!==I){A.showDoubleClickNotifier(f);var t=c.radialAxis.range,e=t[1]-t[0],r={};r[c.id+\".radialaxis.range\"]=[t[0]+D*e/x,t[0]+I*e/x],v.relayout(f,r)}}var c=this,f=c.gd,h=c.layers,d=t._zoomlayer,p=R.MINZOOM,y=R.OFFEDGE,x=c.radius,b=c.cx,_=c.cy,w=c.cxx,M=c.cyy,S=e.sector,L=A.makeDragger(h,\"path\",\"maindrag\",\"crosshair\");m.select(L).attr(\"d\",s(x,S)).attr(\"transform\",u(b,_));var C,z,D,I,P,O,F,N,j,B={element:L,gd:f,subplot:c.id,plotinfo:{xaxis:c.xaxis,yaxis:c.yaxis},xaxes:[c.xaxis],yaxes:[c.yaxis]};B.prepFn=function(t,e,r){var n=f._fullLayout.dragmode,i=L.getBoundingClientRect();switch(C=e-i.left,z=r-i.top,n){case\"zoom\":B.moveFn=o,B.doneFn=l,function(){D=null,I=null,P=s(x,S),O=!1;var t=f._fullLayout[c.id];F=g(t.bgcolor).getLuminance(),(N=A.makeZoombox(d,F,b,_,P)).attr(\"fill-rule\",\"evenodd\"),j=A.makeCorners(d,b,_),A.clearSelect(d)}();break;case\"select\":case\"lasso\":E(t,e,r,B,n)}},B.clickFn=function(t,e){if(A.removeZoombox(f),2===t){var r={};for(var n in c.viewInitial)r[c.id+\".\"+n]=c.viewInitial[n];f.emit(\"plotly_doubleclick\",null),v.relayout(f,r)}T.click(f,e,c.id)},L.onmousemove=function(t){T.hover(f,t,c.id),f._fullLayout._lasthover=L,f._fullLayout._hoversubplot=c.id},L.onmouseout=function(t){f._dragging||k.unhover(f,t)},k.init(B)},N.updateRadialDrag=function(t,e){function r(t,e){if(C)C(t,e);else{var r=[t,-e],n=[Math.cos(p),Math.sin(p)],d=Math.abs(x.dot(r,n)/Math.sqrt(x.dot(r,r)));isNaN(d)||(C=d<.5?function(t,e){var r=E+t,n=L+e;z=I(Math.atan2(c-n,r-l));var a=u(l,c)+f(-z);o[\"radial-axis\"].attr(\"transform\",a),o[\"radial-line\"].select(\"line\").attr(\"transform\",a);var s=i.gd._fullLayout,h=s[i.id];i.updateRadialAxisTitle(s,h,z)}:function(t,e){var r=x.dot([t,-e],[Math.cos(p),Math.sin(p)]),n=g[1]-b*r/s*.75;if(b>0!=n>g[0])return;P=h.range[1]=n,M.doTicks(a,i.radialAxis,!0),o[\"radial-grid\"].attr(\"transform\",u(l,c)).selectAll(\"path\").attr(\"transform\",null);var f=P-g[0],d=i.sectorBBox;i.xaxis.range=[d[0]*f,d[2]*f],i.yaxis.range=[d[1]*f,d[3]*f],i.xaxis.setScale(),i.yaxis.setScale();for(var m in i.traceHash){var v=i.traceHash[m],_=x.filterVisible(v),w=v[0][0].trace._module,k=a._fullLayout[i.id];if(w.plot(a,i,_,k),!y.traceIs(m,\"gl\"))for(var A=0;A<_.length;A++)w.style(a,_[A])}})}}function n(){null!==z?v.relayout(a,i.id+\".radialaxis.angle\",z):null!==P&&v.relayout(a,i.id+\".radialaxis.range[1]\",P)}var i=this,a=i.gd,o=i.layers,s=i.radius,l=i.cx,c=i.cy,h=i.radialAxis,d=e.radialaxis,p=D(d.angle),g=h.range.slice(),b=g[1]-g[0],_=R.radialDragBoxSize,w=_/2;if(d.visible){var T=A.makeRectDragger(o,\"radialdrag\",\"crosshair\",-w,-w,_,_),S={element:T,gd:a},E=l+(s+w)*Math.cos(p),L=c-(s+w)*Math.sin(p);m.select(T).attr(\"transform\",u(E,L));var C,z,P;S.prepFn=function(){C=null,z=null,P=null,S.moveFn=r,S.doneFn=n,A.clearSelect(t._zoomlayer)},S.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<R.MINDRAG&&(t=0,e=0),[t,e]},k.init(S)}},N.updateAngularDrag=function(t,e){function r(t,e){return Math.atan2(g+w-e,t-p-w)}function n(t,e){var n=r(E+t,C+e),i=I(n-j);P=z+i,s.frontplot.attr(\"transform\",u(a.xOffset2,a.yOffset2)+f([-i,p,g])),a.clipPaths.circle.select(\"path\").attr(\"transform\",u(p,g)+f(i)),U.each(function(){var t=m.select(this),e=_.getTranslate(t);t.attr(\"transform\",u(e.x,e.y)+f([i]))}),V.each(function(){var t=m.select(this),e=t.select(\"text\"),r=_.getTranslate(t);t.attr(\"transform\",f([i,e.attr(\"x\"),e.attr(\"y\")])+u(r.x,r.y))});var c=a.angularAxis;c.rotation=O(P),\"linear\"!==c.type||l(b)||(c.range=N.map(D).map(c.unTransformRad).map(I)),F(c),M.doTicks(o,c,!0),a._hasClipOnAxisFalse&&!l(b)&&(a.sector=[N[0]-i,N[1]-i],B.call(_.hideOutsideRangePoints,a));for(var h in a.traceHash)if(y.traceIs(h,\"gl\")){var d=a.traceHash[h],v=x.filterVisible(d),w=d[0][0].trace._module,k=o._fullLayout[a.id];w.plot(o,a,v,k)}}function i(){V.select(\"text\").attr(\"transform\",null);var t={};t[a.id+\".angularaxis.rotation\"]=P,v.relayout(o,t)}var a=this,o=a.gd,s=a.layers,c=a.radius,h=a.cx,d=a.cy,p=a.cxx,g=a.cyy,b=e.sector,w=R.angularDragBoxSize,T=A.makeDragger(s,\"path\",\"angulardrag\",\"move\"),S={element:T,gd:o};m.select(T).attr(\"d\",function(t,e,r){function n(t,e){return[t*Math.cos(e),-t*Math.sin(e)]}function i(t,e,r){return\"A\"+[t,t]+\" \"+[0,c,r]+\" \"+n(t,e)}var a,o,s,c=Math.abs(r[1]-r[0])<=180?0:1;return l(r)?(a=0,s=2*Math.PI,o=Math.PI,\"M\"+n(t,a)+i(t,o,0)+i(t,s,0)+\"ZM\"+n(e,a)+i(e,o,1)+i(e,s,1)+\"Z\"):(a=D(r[0]),s=D(r[1]),\"M\"+n(t,a)+\"L\"+n(e,a)+i(e,s,0)+\"L\"+n(t,s)+i(t,a,1)+\"Z\")}(c,c+w,b)).attr(\"transform\",u(h,d)).call(L,\"move\");var E,C,z,P,N,j,B=s.frontplot.select(\".scatterlayer\").selectAll(\".trace\"),U=B.selectAll(\".point\"),V=B.selectAll(\".textpoint\");S.prepFn=function(e,o,s){var l=t[a.id];N=l.sector.slice(),z=l.angularaxis.rotation;var c=T.getBoundingClientRect();E=o-c.left,C=s-c.top,j=r(E,C),S.moveFn=n,S.doneFn=i,A.clearSelect(t._zoomlayer)},k.init(S)},N.isPtWithinSector=function(t){var e=this.sector,r=this.radialAxis,n=r.range,i=r.c2r(t.r),a=P(e[0]),o=P(e[1]);a>o&&(o+=360);var s,c,u=P(I(t.rad)),f=u+360;return n[1]>=n[0]?(s=n[0],c=n[1]):(s=n[1],c=n[0]),i>=s&&i<=c&&(l(e)||u>=a&&u<=o||f>=a&&f<=o)},N.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../components/titles\":709,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../registry\":873,\"../cartesian/axes\":789,\"../cartesian/dragbox\":797,\"../cartesian/select\":807,\"../plots\":852,\"./constants\":853,\"./helpers\":854,d3:128,tinycolor2:546}],865:[function(t,e,r){\"use strict\";var n=t(\"../lib\");e.exports=function(t,e,r,i){function a(t,e){return n.coerce(o,s,c,t,e)}for(var o,s,l=i.type,c=i.attributes,u=i.handleDefaults,f=i.partition||\"x\",h=e._subplots[l],d=h.length,p=0;p<d;p++){var m=h[p];o=t[m]?t[m]:t[m]={},e[m]=s={},a(\"domain.\"+f,[p/d,(p+1)/d]),a(\"domain.\"+{x:\"y\",y:\"x\"}[f]),i.id=m,u(o,s,a,i)}}},{\"../lib\":743}],866:[function(t,e,r){\"use strict\";var n=t(\"./ternary\"),i=t(\"../../plots/get_data\").getSubplotCalcData,a=t(\"../../lib\").counterRegex;r.name=\"ternary\",r.attr=\"subplot\",r.idRoot=\"ternary\",r.idRegex=r.attrRegex=a(\"ternary\"),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.calcdata,a=e._subplots.ternary,o=0;o<a.length;o++){var s=a[o],l=i(r,\"ternary\",s),c=e[s]._subplot;c||(c=new n({id:s,graphDiv:t,container:e._ternarylayer.node()},e),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\"a-title\"].remove(),s.layers[\"b-title\"].remove(),s.layers[\"c-title\"].remove())}}},{\"../../lib\":743,\"../../plots/get_data\":826,\"./layout/attributes\":867,\"./layout/defaults\":870,\"./layout/layout_attributes\":871,\"./ternary\":872}],867:[function(t,e,r){\"use strict\";e.exports={subplot:{valType:\"subplotid\",dflt:\"ternary\",editType:\"calc\"}}},{}],868:[function(t,e,r){\"use strict\";var n=t(\"../../cartesian/layout_attributes\"),i=t(\"../../../lib/extend\").extendFlat;e.exports={title:n.title,titlefont:n.titlefont,color:n.color,tickmode:n.tickmode,nticks:i({},n.nticks,{dflt:6,min:1}),tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,separatethousands:n.separatethousands,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:i({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:i({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,layer:n.layer,min:{valType:\"number\",dflt:0,min:0}}},{\"../../../lib/extend\":732,\"../../cartesian/layout_attributes\":801}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../lib\"),i=t(\"./axis_attributes\"),a=t(\"../../cartesian/tick_label_defaults\"),o=t(\"../../cartesian/tick_mark_defaults\"),s=t(\"../../cartesian/tick_value_defaults\"),l=t(\"../../cartesian/line_grid_defaults\");e.exports=function(t,e,r){function c(r,a){return n.coerce(t,e,i,r,a)}e.type=\"linear\";var u=c(\"color\"),f=u===t.color?u:r.font.color,h=e._name.charAt(0).toUpperCase(),d=\"Component \"+h,p=c(\"title\",d);e._hovertitle=p===d?p:h,n.coerceFont(c,\"titlefont\",{family:r.font.family,size:Math.round(1.2*r.font.size),color:f}),c(\"min\"),s(t,e,c,\"linear\"),a(t,e,c,\"linear\",{noHover:!1}),o(t,e,c,{outerTicks:!0});c(\"showticklabels\")&&(n.coerceFont(c,\"tickfont\",{family:r.font.family,size:r.font.size,color:f}),c(\"tickangle\"),c(\"tickformat\")),l(t,e,c,{dfltColor:u,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),c(\"hoverformat\"),c(\"layer\")}},{\"../../../lib\":743,\"../../cartesian/line_grid_defaults\":803,\"../../cartesian/tick_label_defaults\":809,\"../../cartesian/tick_mark_defaults\":810,\"../../cartesian/tick_value_defaults\":811,\"./axis_attributes\":868}],870:[function(t,e,r){\"use strict\";function n(t,e,r,n){var a=r(\"bgcolor\"),o=r(\"sum\");n.bgColor=i.combine(a,n.paper_bgcolor);for(var c,u,f,h=0;h<l.length;h++)u=t[c=l[h]]||{},f=e[c]={_name:c,type:\"linear\"},s(u,f,n);var d=e.aaxis,p=e.baxis,m=e.caxis;d.min+p.min+m.min>=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\":618,\"../../subplot_defaults\":865,\"./axis_defaults\":869,\"./layout_attributes\":871}],871:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color/attributes\"),i=t(\"../../domain_attributes\"),a=t(\"./axis_attributes\"),o=t(\"../../../plot_api/edit_types\").overrideAll;e.exports=o({domain:i({name:\"ternary\"}),bgcolor:{valType:\"color\",dflt:n.background},sum:{valType:\"number\",dflt:1,min:0},aaxis:a,baxis:a,caxis:a},\"plot\",\"from-root\")},{\"../../../components/color/attributes\":617,\"../../../plot_api/edit_types\":773,\"../../domain_attributes\":815,\"./axis_attributes\":868}],872:[function(t,e,r){\"use strict\";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e)}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\"),c=l._,u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../cartesian/set_convert\"),d=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),m=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),v=t(\"../../components/fx\"),y=t(\"../../components/titles\"),x=t(\"../cartesian/select\"),b=t(\"../cartesian/constants\");e.exports=n;var _=n.prototype;_.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},_.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;i<t.length;i++){if(!1===t[i][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),p.generalUpdatePerTraceModule(this.graphDiv,this,t,r),this.layers.plotbg.select(\"path\").call(u.fill,r.bgcolor)},_.makeFramework=function(t){var e=t[this.id],r=this.clipId=\"clip\"+this.layoutId+this.id;this.clipDef=t._clips.selectAll(\"#\"+r).data([0]),this.clipDef.enter().append(\"clipPath\").attr(\"id\",r).append(\"path\").attr(\"d\",\"M0,0Z\");var n=this.clipIdRelative=\"clip-relative\"+this.layoutId+this.id;this.clipDefRelative=t._clips.selectAll(\"#\"+n).data([0]),this.clipDefRelative.enter().append(\"clipPath\").attr(\"id\",n).append(\"path\").attr(\"d\",\"M0,0Z\"),this.plotContainer=this.container.selectAll(\"g.\"+this.id).data([0]),this.plotContainer.enter().append(\"g\").classed(this.id,!0),this.updateLayers(e),f.setClipUrl(this.layers.backplot,r),f.setClipUrl(this.layers.grids,r)},_.updateLayers=function(t){var e=this.layers,r=[\"draglayer\",\"plotbg\",\"backplot\",\"grids\"];\"below traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"below traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"below traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\"),r.push(\"frontplot\"),\"above traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"above traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"above traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\");var n=this.plotContainer.selectAll(\"g.toplevel\").data(r,String),i=[\"agrid\",\"bgrid\",\"cgrid\"];n.enter().append(\"g\").attr(\"class\",function(t){return\"toplevel \"+t}).each(function(t){var r=a.select(this);e[t]=r,\"frontplot\"===t?r.append(\"g\").classed(\"scatterlayer\",!0):\"backplot\"===t?r.append(\"g\").classed(\"maplayer\",!0):\"plotbg\"===t?r.append(\"path\").attr(\"d\",\"M0,0Z\"):\"aline\"===t||\"bline\"===t||\"cline\"===t?r.append(\"path\"):\"grids\"===t&&i.forEach(function(t){e[t]=r.append(\"g\").classed(\"grid \"+t,!0);var n=\"bgrid\"===t?\"x\":\"y\";e[t].append(\"g\").classed(n,!0)})}),n.order()};var w=Math.sqrt(4/3);_.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,p=(c.x[0]+c.x[1])/2,m=(c.y[0]+c.y[1])/2,g=c.x[1]-c.x[0],v=c.y[1]-c.y[0],y=g*e.w,x=v*e.h,b=t.sum,_=t.aaxis.min,M=t.baxis.min,k=t.caxis.min;y>w*x?i=(a=x)*w:a=(i=y)/w,o=g*i/y,s=v*a/x,r=e.l+e.w*p-i/2,n=e.t+e.h*(1-m)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:\"linear\",range:[_+2*k-b,b-_-2*M],domain:[p-o/2,p+o/2],_id:\"x\"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.xaxis.isPtWithinRange=function(t){return t.a>=l.aaxis.range[0]&&t.a<=l.aaxis.range[1]&&t.b>=l.baxis.range[1]&&t.b<=l.baxis.range[0]&&t.c>=l.caxis.range[1]&&t.c<=l.caxis.range[0]},l.yaxis={type:\"linear\",range:[_,b-M-k],domain:[m-s/2,m+s/2],_id:\"y\"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale(),l.yaxis.isPtWithinRange=function(){return!0};var A=l.yaxis.domain[0],T=l.aaxis=d({},t.aaxis,{visible:!0,range:[_,b-M-k],side:\"left\",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*w],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:\"y\",_length:i,_gridpath:\"M0,0l\"+a+\",-\"+i/2});h(T,l.graphDiv._fullLayout),T.setScale();var S=l.baxis=d({},t.baxis,{visible:!0,range:[b-_-k,M],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(S,l.graphDiv._fullLayout),S.setScale(),T._counteraxis=S;var E=l.caxis=d({},t.caxis,{visible:!0,range:[b-_-M,k],side:\"right\",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*w],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:\"y\",_length:i,_gridpath:\"M0,0l-\"+a+\",\"+i/2});h(E,l.graphDiv._fullLayout),E.setScale();var L=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";l.clipDef.select(\"path\").attr(\"d\",L),l.layers.plotbg.select(\"path\").attr(\"d\",L);var C=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";l.clipDefRelative.select(\"path\").attr(\"d\",C);var z=\"translate(\"+r+\",\"+n+\")\";l.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",z),l.clipDefRelative.select(\"path\").attr(\"transform\",null);var D=\"translate(\"+(r-S._offset)+\",\"+(n+a)+\")\";l.layers.baxis.attr(\"transform\",D),l.layers.bgrid.attr(\"transform\",D);var I=\"translate(\"+(r+i/2)+\",\"+n+\")rotate(30)translate(0,-\"+T._offset+\")\";l.layers.aaxis.attr(\"transform\",I),l.layers.agrid.attr(\"transform\",I);var P=\"translate(\"+(r+i/2)+\",\"+n+\")rotate(-30)translate(0,-\"+E._offset+\")\";l.layers.caxis.attr(\"transform\",P),l.layers.cgrid.attr(\"transform\",P),l.drawAxes(!0),l.plotContainer.selectAll(\".crisp\").classed(\"crisp\",!1),l.layers.aline.select(\"path\").attr(\"d\",T.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(u.stroke,T.linecolor||\"#000\").style(\"stroke-width\",(T.linewidth||0)+\"px\"),l.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(u.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),l.layers.cline.select(\"path\").attr(\"d\",E.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(u.stroke,E.linecolor||\"#000\").style(\"stroke-width\",(E.linewidth||0)+\"px\"),l.graphDiv._context.staticPlot||l.initInteractions(),f.setClipUrl(l.layers.frontplot,l._hasClipOnAxisFalse?null:l.clipId)},_.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.aaxis,i=this.baxis,a=this.caxis;if(m.doTicks(e,n,!0),m.doTicks(e,i,!0),m.doTicks(e,a,!0),t){var o=Math.max(n.showticklabels?n.tickfont.size/2:0,(a.showticklabels?.75*a.tickfont.size:0)+(\"outside\"===a.ticks?.87*a.ticklen:0));this.layers[\"a-title\"]=y.draw(e,\"a\"+r,{propContainer:n,propName:this.id+\".aaxis.title\",placeholder:c(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-n.titlefont.size/3-o,\"text-anchor\":\"middle\"}});var s=(i.showticklabels?i.tickfont.size:0)+(\"outside\"===i.ticks?i.ticklen:0)+3;this.layers[\"b-title\"]=y.draw(e,\"b\"+r,{propContainer:i,propName:this.id+\".baxis.title\",placeholder:c(e,\"Click to enter Component B title\"),attributes:{x:this.x0-s,y:this.y0+this.h+.83*i.titlefont.size+s,\"text-anchor\":\"middle\"}}),this.layers[\"c-title\"]=y.draw(e,\"c\"+r,{propContainer:a,propName:this.id+\".caxis.title\",placeholder:c(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+s,y:this.y0+this.h+.83*a.titlefont.size+s,\"text-anchor\":\"middle\"}})}};var M=b.MINZOOM/2+.87,k=\"m-0.87,.5h\"+M+\"v3h-\"+(M+5.2)+\"l\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l2.6,1.5l-\"+M/2+\",\"+.87*M+\"Z\",A=\"m0.87,.5h-\"+M+\"v3h\"+(M+5.2)+\"l-\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l-2.6,1.5l\"+M/2+\",\"+.87*M+\"Z\",T=\"m0,1l\"+M/2+\",\"+.87*M+\"l2.6,-1.5l-\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l-\"+(M/2+2.6)+\",\"+(.87*M+4.5)+\"l2.6,1.5l\"+M/2+\",-\"+.87*M+\"Z\",S=\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\",E=!0;_.initInteractions=function(){function t(t,e){return 1-e/O.h}function e(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function r(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function n(n,i){var a=m+n,o=y+i,s=Math.max(0,Math.min(1,t(0,y),t(0,o))),l=Math.max(0,Math.min(1,e(m,y),e(a,o))),c=Math.max(0,Math.min(1,r(m,y),r(a,o))),u=(s/2+c)*O.w,f=(1-s/2-l)*O.w,h=(u+f)/2,d=f-u,p=(1-s)*O.h,g=p-d/w;d<b.MINZOOM?(L=_,I.attr(\"d\",z),P.attr(\"d\",\"M0,0Z\")):(L={a:_.a+s*M,b:_.b+l*M,c:_.c+c*M},I.attr(\"d\",z+\"M\"+u+\",\"+p+\"H\"+f+\"L\"+h+\",\"+g+\"L\"+u+\",\"+p+\"Z\"),P.attr(\"d\",\"M\"+m+\",\"+y+S+\"M\"+u+\",\"+p+k+\"M\"+f+\",\"+p+A+\"M\"+h+\",\"+g+T)),D||(I.transition().style(\"fill\",C>.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 a(){if(i(R),L!==_){var t={};t[O.id+\".aaxis.min\"]=L.a,t[O.id+\".baxis.min\"]=L.b,t[O.id+\".caxis.min\"]=L.c,s.relayout(R,t),E&&R.data&&R._context.showTips&&(l.notifier(c(R,\"Double-click to zoom back out\"),\"long\"),E=!1)}}function h(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m,i=[(L={a:_.a-n,b:_.b+(r+n)/2,c:_.c-(r-n)/2}).a,L.b,L.c].sort(),a=i.indexOf(L.a),o=i.indexOf(L.b),s=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],b:i[o],c:i[s]},e=(_.a-L.a)*O.yaxis._m,t=(_.c-L.c-_.b+L.b)*O.xaxis._m);var l=\"translate(\"+(O.x0+t)+\",\"+(O.y0+e)+\")\";O.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",l);var c=\"translate(\"+-t+\",\"+-e+\")\";O.clipDefRelative.select(\"path\").attr(\"transform\",c),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),O._hasClipOnAxisFalse&&O.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(f.hideOutsideRangePoints,O)}function d(){var t={};t[O.id+\".aaxis.min\"]=L.a,t[O.id+\".baxis.min\"]=L.b,t[O.id+\".caxis.min\"]=L.c,s.relayout(R,t)}function p(){N.selectAll(\".select-outline\").remove()}var m,y,_,M,L,C,z,D,I,P,O=this,F=O.layers.plotbg.select(\"path\").node(),R=O.graphDiv,N=R._fullLayout._zoomlayer,j={element:F,gd:R,plotinfo:{xaxis:O.xaxis,yaxis:O.yaxis},subplot:O.id,prepFn:function(t,e,r){j.xaxes=[O.xaxis],j.yaxes=[O.yaxis];var i=R._fullLayout.dragmode;t.shiftKey&&(i=\"pan\"===i?\"zoom\":\"pan\"),j.minDrag=\"lasso\"===i?1:void 0,\"zoom\"===i?(j.moveFn=n,j.doneFn=a,function(t,e,r){var n=F.getBoundingClientRect();m=e-n.left,y=r-n.top,_={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=_,M=O.aaxis.range[1]-_.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=N.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",\"translate(\"+O.x0+\", \"+O.y0+\")\").style({fill:C>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",z),P=N.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",\"translate(\"+O.x0+\", \"+O.y0+\")\").style({fill:u.background,stroke:u.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),p()}(0,e,r)):\"pan\"===i?(j.moveFn=h,j.doneFn=d,_={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=_,p()):\"select\"!==i&&\"lasso\"!==i||x(t,e,r,j,i)},clickFn:function(t,e){if(i(R),2===t){var r={};r[O.id+\".aaxis.min\"]=0,r[O.id+\".baxis.min\"]=0,r[O.id+\".caxis.min\"]=0,R.emit(\"plotly_doubleclick\",null),s.relayout(R,r)}v.click(R,e,O.id)}};F.onmousemove=function(t){v.hover(R,t,O.id),R._fullLayout._lasthover=F,R._fullLayout._hoversubplot=O.id},F.onmouseout=function(t){R._dragging||g.unhover(R,t)},g.init(j)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../components/titles\":709,\"../../lib\":743,\"../../lib/extend\":732,\"../../plotly\":784,\"../cartesian/axes\":789,\"../cartesian/constants\":794,\"../cartesian/select\":807,\"../cartesian/set_convert\":808,\"../plots\":852,d3:128,tinycolor2:546}],873:[function(t,e,r){\"use strict\";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n<e.length;n++)u(r.layoutArrayRegexes,e[n])}}function i(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[e];i&&d(r.modules[e]._module.attributes,i)}}function a(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[e];i&&d(r.transformsRegistry[e].attributes,i)}}function o(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=\"subplot\"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&d(a,s)}}function s(t){return\"object\"==typeof t&&(t=t.type),t}var l=t(\"./lib/loggers\"),c=t(\"./lib/noop\"),u=t(\"./lib/push_unique\"),f=t(\"./lib/extend\"),h=f.extendFlat,d=f.extendDeepAll,p=t(\"./plots/attributes\"),m=t(\"./plots/layout_attributes\");r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.register=function(t,e,n,a){if(r.modules[e])l.log(\"Type \"+e+\" already registered\");else{for(var o={},s=0;s<n.length;s++)o[n[s]]=!0,r.allCategories[n[s]]=!0;r.modules[e]={_module:t,categories:o},a&&Object.keys(a).length&&(r.modules[e].meta=a),r.allTypes.push(e);for(var c in r.componentsRegistry)i(c,e);t.layoutAttributes&&h(r.traceLayoutAttributes,t.layoutAttributes)}},r.registerSubplot=function(t){var e=t.name;if(r.subplotsRegistry[e])l.log(\"Plot type \"+e+\" already registered.\");else{n(t),r.subplotsRegistry[e]=t;for(var i in r.componentsRegistry)o(i,t.name)}},r.registerComponent=function(t){var e=t.name;r.componentsRegistry[e]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&u(r.layoutArrayContainers,e),n(t));for(var s in r.modules)i(e,s);for(var l in r.subplotsRegistry)o(e,l);for(var c in r.transformsRegistry)a(e,c);t.schema&&t.schema.layout&&d(m,t.schema.layout)},r.registerTransform=function(t){r.transformsRegistry[t.name]=t;for(var e in r.componentsRegistry)a(e,t.name)},r.getModule=function(t){var e=r.modules[s(t)];return!!e&&e._module},r.traceIs=function(t,e){if(\"various\"===(t=s(t)))return!1;var n=r.modules[t];return n||(t&&\"area\"!==t&&l.log(\"Unrecognized trace type \"+t+\".\"),n=r.modules[p.type.dflt]),!!n.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n?n[e]||c:c},r.registerLocale=function(t){var e=t.name,n=e.split(\"-\")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=r.localeRegistry,c=l[e];if(c||(l[e]=c={}),n!==e){var u=l[n];u||(l[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=i),s&&u.format===c.format&&(u.format=a)}o&&(c.dictionary=i),s&&(c.format=a)}},{\"./lib/extend\":732,\"./lib/loggers\":748,\"./lib/noop\":752,\"./lib/push_unique\":756,\"./plots/attributes\":787,\"./plots/layout_attributes\":843}],874:[function(t,e,r){\"use strict\";function n(t){var e;switch(t){case\"themes__thumb\":e={autosize:!0,width:150,height:150,title:\"\",showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\"thumbnail\":e={title:\"\",hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\"\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function i(t){return[\"xaxis\",\"yaxis\",\"zaxis\"].indexOf(t.slice(0,5))>-1}var a=t(\"../lib\"),o=a.extendFlat,s=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,l=t.layout,c=s([],a),u=s({},l,n(e.tileClass)),f=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),\"thumbnail\"===e.tileClass||\"themes__thumb\"===e.tileClass){u.annotations=[];var h=Object.keys(u);for(r=0;r<h.length;r++)i(h[r])&&(u[h[r]].title=\"\");for(r=0;r<c.length;r++){var d=c[r];d.showscale=!1,d.marker&&(d.marker.showscale=!1),\"pie\"===d.type&&(d.textposition=\"none\")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)u.annotations.push(e.annotations[r]);var p=Object.keys(u).filter(function(t){return t.match(/^scene\\d*$/)});if(p.length){var m={};for(\"thumbnail\"===e.tileClass&&(m={title:\"\",showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<p.length;r++){var g=u[p[r]];g.xaxis||(g.xaxis={}),g.yaxis||(g.yaxis={}),g.zaxis||(g.zaxis={}),o(g.xaxis,m),o(g.yaxis,m),o(g.zaxis,m),g._scene=null}}var v=document.createElement(\"div\");e.tileClass&&(v.className=e.tileClass);var y={gd:v,td:v,layout:u,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return\"transparent\"!==e.setBackground&&(y.config.setBackground=e.setBackground||\"opaque\"),y.gd.defaultLayout=n(e.tileClass),y}},{\"../lib\":743}],875:[function(t,e,r){\"use strict\";var n=t(\"../plot_api/to_image\"),i=t(\"../lib\"),a=t(\"./filesaver\");e.exports=function(t,e){return e=e||{},e.format=e.format||\"png\",new Promise(function(r,o){t._snapshotInProgress&&o(new Error(\"Snapshotting already in progress.\")),i.isIE()&&\"svg\"!==e.format&&o(new Error(\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\")),t._snapshotInProgress=!0;var s=n(t,e),l=e.filename||t.fn||\"newplot\";l+=\".\"+e.format,s.then(function(e){return t._snapshotInProgress=!1,a(e,l)}).then(function(t){r(t)}).catch(function(e){t._snapshotInProgress=!1,o(e)})})}},{\"../lib\":743,\"../plot_api/to_image\":782,\"./filesaver\":876}],876:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=document.createElement(\"a\"),n=\"download\"in r,i=/Version\\/[\\d\\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(a,o){if(\"undefined\"!=typeof navigator&&/MSIE [1-9]\\./.test(navigator.userAgent)&&o(new Error(\"IE < 10 unsupported\")),i&&(document.location.href=\"data:application/octet-stream\"+t.slice(t.search(/[,;]/)),a(e)),e||(e=\"download\"),n&&(r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),a(e)),\"undefined\"!=typeof navigator&&navigator.msSaveBlob){var s=t.split(/^data:image\\/svg\\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),e),a(e)}o(new Error(\"download error\"))})}},{}],877:[function(t,e,r){\"use strict\";r.getDelay=function(t){return t._has&&(t._has(\"gl3d\")||t._has(\"gl2d\"))?500:0},r.getRedrawFunc=function(t){var e=t._fullLayout||{};if(!(!(e._has&&e._has(\"polar\"))&&t.data&&t.data[0]&&t.data[0].r))return function(){(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()})}}},{}],878:[function(t,e,r){\"use strict\";var n=t(\"./helpers\"),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(\"./cloneplot\"),toSVG:t(\"./tosvg\"),svgToImg:t(\"./svgtoimg\"),toImage:t(\"./toimage\"),downloadImage:t(\"./download\")};e.exports=i},{\"./cloneplot\":874,\"./download\":875,\"./helpers\":877,\"./svgtoimg\":879,\"./toimage\":880,\"./tosvg\":881}],879:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"events\").EventEmitter;e.exports=function(t){var e=t.emitter||new i,r=new Promise(function(i,a){var o=window.Image,s=t.svg,l=t.format||\"png\";if(n.isIE()&&\"svg\"!==l){var c=new Error(\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\");return a(c),t.promise?r:e.emit(\"error\",c)}var u=t.canvas,f=t.scale||1,h=f*(t.width||300),d=f*(t.height||150),p=u.getContext(\"2d\"),m=new o,g=\"data:image/svg+xml,\"+encodeURIComponent(s);u.width=h,u.height=d,m.onload=function(){var r;switch(\"svg\"!==l&&p.drawImage(m,0,0,h,d),l){case\"jpeg\":r=u.toDataURL(\"image/jpeg\");break;case\"png\":r=u.toDataURL(\"image/png\");break;case\"webp\":r=u.toDataURL(\"image/webp\");break;case\"svg\":r=g;break;default:var n=\"Image format is not jpeg, png, svg or webp.\";if(a(new Error(n)),!t.promise)return e.emit(\"error\",n)}i(r),t.promise||e.emit(\"success\",r)},m.onerror=function(r){if(a(r),!t.promise)return e.emit(\"error\",r)},m.src=g});return t.promise?r:e}},{\"../lib\":743,events:138}],880:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i=t(\"../plotly\"),a=t(\"../lib\"),o=t(\"./helpers\"),s=t(\"./cloneplot\"),l=t(\"./tosvg\"),c=t(\"./svgtoimg\");e.exports=function(t,e){var r=new n,u=s(t,{format:\"png\"}),f=u.gd;f.style.position=\"absolute\",f.style.left=\"-5000px\",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.plot(f,u.data,u.layout,u.config).then(h).then(function(){var t=o.getDelay(f._fullLayout);setTimeout(function(){var t=l(f),n=document.createElement(\"canvas\");n.id=a.randstr(),(r=c({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}},t)}).catch(function(t){r.emit(\"error\",t)}),r}},{\"../lib\":743,\"../plotly\":784,\"./cloneplot\":874,\"./helpers\":877,\"./svgtoimg\":879,\"./tosvg\":881,events:138}],881:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../lib\"),a=t(\"../components/drawing\"),o=t(\"../components/color\"),s=t(\"../constants/xmlns_namespaces\"),l=/\"/g,c=\"TOBESTRIPPED\",u=new RegExp('(\"'+c+\")|(\"+c+'\")',\"g\");e.exports=function(t,e,r){var f,h=t._fullLayout,d=h._paper,p=h._toppaper,m=h.width,g=h.height;d.insert(\"rect\",\":first-child\").call(a.setRect,0,0,m,g).call(o.fill,h.paper_bgcolor);var v=h._basePlotModules||[];for(f=0;f<v.length;f++){var y=v[f];y.toSVG&&y.toSVG(t)}if(p){var x=p.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&d.node().appendChild(_)}}h._draggers&&h._draggers.remove(),d.node().style.background=\"\",d.selectAll(\"text\").attr({\"data-unformatted\":null,\"data-math\":null}).each(function(){var t=n.select(this);if(\"hidden\"!==this.style.visibility&&\"none\"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('\"')&&t.style(\"font-family\",e.replace(l,c))}else t.remove()}),d.selectAll(\".point,.scatterpts\").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf(\"url(\")&&t.style(\"fill\",e.replace(l,c))}),\"pdf\"!==e&&\"eps\"!==e||d.selectAll(\"#MathJax_SVG_glyphs path\").attr(\"stroke-width\",0),d.node().setAttributeNS(s.xmlns,\"xmlns\",s.svg),d.node().setAttributeNS(s.xmlns,\"xmlns:xlink\",s.xlink),\"svg\"===e&&r&&(d.attr(\"width\",r*m),d.attr(\"height\",r*g),d.attr(\"viewBox\",\"0 0 \"+m+\" \"+g));var w=(new window.XMLSerializer).serializeToString(d.node());return w=function(t){var e=n.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}(w),w=function(t){return t.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")}(w),w=w.replace(u,\"'\"),i.isIE()&&(w=(w=(w=w.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),w}},{\"../components/color\":618,\"../components/drawing\":643,\"../constants/xmlns_namespaces\":723,\"../lib\":743,d3:128}],882:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").mergeArray;e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n(e.text,t,\"tx\"),n(e.hovertext,t,\"htx\");var i=e.marker;if(i){n(i.opacity,t,\"mo\"),n(i.color,t,\"mc\");var a=i.line;a&&(n(a.color,t,\"mlc\"),n(a.width,t,\"mlw\"))}}},{\"../../lib\":743}],883:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../components/errorbars/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../plots/font_attributes\"),l=t(\"../../lib/extend\").extendFlat,c=s({editType:\"calc\",arrayOk:!0}),u=n.marker,f=l({line:l({width:l({},u.line.width,{dflt:0}),editType:\"calc\"},i(\"marker.line\")),editType:\"calc\"},i(\"marker\"),{showscale:u.showscale,colorbar:o,opacity:{valType:\"number\",arrayOk:!0,dflt:1,min:0,max:1,editType:\"style\"}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"none\",arrayOk:!0,editType:\"calc\"},textfont:l({},c,{}),insidetextfont:l({},c,{}),outsidetextfont:l({},c,{}),constraintext:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"both\",\"none\"],dflt:\"both\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},base:{valType:\"any\",dflt:null,arrayOk:!0,editType:\"calc\"},offset:{valType:\"number\",dflt:null,arrayOk:!0,editType:\"calc\"},width:{valType:\"number\",dflt:null,min:0,arrayOk:!0,editType:\"calc\"},marker:f,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:\"style\"},textfont:n.selected.textfont,editType:\"style\"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:\"style\"},textfont:n.unselected.textfont,editType:\"style\"},r:n.r,t:n.t,error_y:a,error_x:a,_deprecated:{bardir:{valType:\"enumerated\",editType:\"calc\",values:[\"v\",\"h\"]}}}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/errorbars/attributes\":645,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../scatter/attributes\":1066}],884:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/colorscale/has_colorscale\"),o=t(\"../../components/colorscale/calc\"),s=t(\"./arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\");e.exports=function(t,e){var r,c,u,f,h,d=i.getFromId(t,e.xaxis||\"x\"),p=i.getFromId(t,e.yaxis||\"y\");\"h\"===(e.orientation||(e.x&&!e.y?\"h\":\"v\"))?(r=d,u=d.makeCalcdata(e,\"x\"),c=p.makeCalcdata(e,\"y\"),h=e.xcalendar):(r=p,u=p.makeCalcdata(e,\"y\"),c=d.makeCalcdata(e,\"x\"),h=e.ycalendar);var m=Math.min(c.length,u.length),g=new Array(m);for(f=0;f<m;f++)g[f]={p:c[f],s:u[f]},e.ids&&(g[f].id=String(e.ids[f]));var v,y=e.base;if(Array.isArray(y)){for(f=0;f<Math.min(y.length,g.length);f++)v=r.d2c(y[f],0,h),n(v)?(g[f].b=+v,g[f].hasB=1):g[f].b=0;for(;f<g.length;f++)g[f].b=0}else{v=r.d2c(y,0,h);var x=n(v);for(v=x?v:0,f=0;f<g.length;f++)g[f].b=v,x&&(g[f].hasB=1)}return a(e,\"marker\")&&o(e,e.marker.color,\"marker\",\"c\"),a(e,\"marker.line\")&&o(e,e.marker.line.color,\"marker.line\",\"c\"),s(g,e),l(g,e),g}},{\"../../components/colorscale/calc\":625,\"../../components/colorscale/has_colorscale\":632,\"../../plots/cartesian/axes\":789,\"../scatter/calc_selection\":1068,\"./arrays_to_calcdata\":882,\"fast-isnumeric\":140}],885:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../scatter/xy_defaults\"),o=t(\"../bar/style_defaults\"),s=t(\"../../components/errorbars/defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}var f=n.coerceFont;if(a(t,e,c,u)){u(\"orientation\",e.x&&!e.y?\"h\":\"v\"),u(\"base\"),u(\"offset\"),u(\"width\"),u(\"text\"),u(\"hovertext\");var h=u(\"textposition\"),d=Array.isArray(h)||\"auto\"===h,p=d||\"inside\"===h,m=d||\"outside\"===h;if(p||m){var g=f(u,\"textfont\",c.font);p&&f(u,\"insidetextfont\",g),m&&f(u,\"outsidetextfont\",g),u(\"constraintext\"),u(\"selected.textfont.color\"),u(\"unselected.textfont.color\")}o(t,e,u,r,c),s(t,e,i.defaultLine,{axis:\"y\"}),s(t,e,i.defaultLine,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{\"../../components/color\":618,\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../bar/style_defaults\":895,\"../scatter/xy_defaults\":1090,\"./attributes\":883}],886:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../components/errorbars\"),a=t(\"../../components/color\"),o=t(\"../scatter/fill_hover_text\");e.exports=function(t,e,r,s){function l(t){return t[p]-t.w/2}function c(t){return t[p]+t.w/2}function u(t){return n.inbox(w(t)-h,M(t)-h)}function f(t){return n.inbox(t.b-d,t[m]-d)+(t[m]-d)/(t[m]-t.b)}var h,d,p,m,g,v,y=t.cd,x=y[0].trace,b=y[0].t,_=\"closest\"===s,w=_?l:function(t){return Math.min(l(t),t.p-b.bardelta/2)},M=_?c:function(t){return Math.max(c(t),t.p+b.bardelta/2)};\"h\"===x.orientation?(h=r,d=e,p=\"y\",m=\"x\",g=f,v=u):(h=e,d=r,p=\"x\",m=\"y\",v=f,g=u);var k=t[p+\"a\"],A=t[m+\"a\"],T=n.getDistanceFunction(s,g,v);if(n.getClosest(y,T,t),!1!==t.index){_||(w=function(t){return Math.min(l(t),t.p-b.bargroupwidth/2)},M=function(t){return Math.max(c(t),t.p+b.bargroupwidth/2)});var S=y[t.index],E=S.mcc||x.marker.color,L=S.mlcc||x.marker.line.color,C=S.mlw||x.marker.line.width;a.opacity(E)?t.color=E:a.opacity(L)&&C&&(t.color=L);var z=x.base?S.b+S.s:S.s;return t[m+\"0\"]=t[m+\"1\"]=A.c2p(S[m],!0),t[m+\"LabelVal\"]=z,t[p+\"0\"]=k.c2p(w(S),!0),t[p+\"1\"]=k.c2p(M(S),!0),t[p+\"LabelVal\"]=S.p,o(S,x,t),i.hoverInfo(S,x,t),[t]}}},{\"../../components/color\":618,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../scatter/fill_hover_text\":1074}],887:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.layoutAttributes=t(\"./layout_attributes\"),n.supplyDefaults=t(\"./defaults\"),n.supplyLayoutDefaults=t(\"./layout_defaults\"),n.calc=t(\"./calc\"),n.setPositions=t(\"./set_positions\"),n.colorbar=t(\"../scatter/colorbar\"),n.arraysToCalcdata=t(\"./arrays_to_calcdata\"),n.plot=t(\"./plot\"),n.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"bar\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"bar\",\"oriented\",\"markerColorscale\",\"errorBarsOK\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../scatter/colorbar\":1070,\"./arrays_to_calcdata\":882,\"./attributes\":883,\"./calc\":884,\"./defaults\":885,\"./hover\":886,\"./layout_attributes\":888,\"./layout_defaults\":889,\"./plot\":890,\"./select\":891,\"./set_positions\":892,\"./style\":894}],888:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],889:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=0;h<r.length;h++){var d=r[h];if(n.traceIs(d,\"bar\")){if(l=!0,\"overlay\"!==t.barmode&&\"stack\"!==t.barmode){var p=d.xaxis+d.yaxis;f[p]&&(u=!0),f[p]=!0}if(d.visible&&\"histogram\"===d.type){\"category\"!==i.getFromId({_fullLayout:e},d[\"v\"===d.orientation?\"xaxis\":\"yaxis\"]).type&&(c=!0)}}}if(l){\"overlay\"!==s(\"barmode\")&&s(\"barnorm\"),s(\"bargap\",c&&!u?0:.2),s(\"bargroupgap\")}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./layout_attributes\":888}],890:[function(t,e,r){\"use strict\";function n(t,e,r,n,l,c,u,f){function d(e,r,n){return e.append(\"text\").text(r).attr({class:\"bartext bartext-\"+m,transform:\"\",\"text-anchor\":\"middle\",\"data-notex\":1}).call(p.font,n).call(h.convertToTspans,t)}var m,g=r[0].trace,M=g.orientation,k=function(t,e){var r=o(t.text,e);return s(v,r)}(g,n);if(k&&\"none\"!==(m=function(t,e){var r=o(t.textposition,e);return function(t,e,r){t.coerceNumber&&(e=+e);return-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt}(y,r)}(g,n))){var A,T,S,E,L=function(t,e,r){return a(x,t.textfont,e,r)}(g,n,t._fullLayout.font),C=function(t,e,r){return a(b,t.insidetextfont,e,r)}(g,n,L),z=function(t,e,r){return a(_,t.outsidetextfont,e,r)}(g,n,L),D=t._fullLayout.barmode,I=\"stack\"===D||\"relative\"===D,P=r[n],O=!I||P._outmost,F=Math.abs(c-l)-2*w,R=Math.abs(f-u)-2*w;if(\"outside\"===m&&(O||(m=\"inside\")),\"auto\"===m)if(O){m=\"inside\",A=d(e,k,C),S=(T=p.bBox(A.node())).width,E=T.height;S>0&&E>0&&(S<=F&&E<=R||S<=R&&E<=F||(\"h\"===M?F>=S*(R/E):R>=E*(F/S)))?m=\"inside\":(m=\"outside\",A.remove(),A=null)}else m=\"inside\";if(!A&&(A=d(e,k,\"outside\"===m?z:C),T=p.bBox(A.node()),S=T.width,E=T.height,S<=0||E<=0))A.remove();else{var N;N=\"outside\"===m?function(t,e,r,n,a,o,s){var l,c=\"h\"===o?Math.abs(n-r):Math.abs(e-t);c>2*w&&(l=w);var u=1;s&&(u=\"h\"===o?Math.min(1,c/a.height):Math.min(1,c/a.width));var f,h,d,p,m=(a.left+a.right)/2,g=(a.top+a.bottom)/2;f=u*a.width,h=u*a.height,\"h\"===o?e<t?(d=e-l-f/2,p=(r+n)/2):(d=e+l+f/2,p=(r+n)/2):n>r?(d=(t+e)/2,p=n+l+h/2):(d=(t+e)/2,p=n-l-h/2);return i(m,g,d,p,u,!1)}(l,c,u,f,T,M,\"both\"===g.constraintext||\"outside\"===g.constraintext):function(t,e,r,n,a,o,s){var l,c,u,f,h,d=a.width,p=a.height,m=(a.left+a.right)/2,g=(a.top+a.bottom)/2,v=Math.abs(e-t),y=Math.abs(n-r);v>2*w&&y>2*w?(v-=2*(h=w),y-=2*h):h=0;var x,b;d<=v&&p<=y?(x=!1,b=1):d<=y&&p<=v?(x=!0,b=1):d<p==v<y?(x=!1,b=s?Math.min(v/d,y/p):1):(x=!0,b=s?Math.min(y/d,v/p):1);x&&(x=90);x?(l=b*p,c=b*d):(l=b*d,c=b*p);\"h\"===o?e<t?(u=e+h+l/2,f=(r+n)/2):(u=e-h-l/2,f=(r+n)/2):n>r?(u=(t+e)/2,f=n-h-c/2):(u=(t+e)/2,f=n+h+c/2);return i(m,g,u,f,b,x)}(l,c,u,f,T,M,\"both\"===g.constraintext||\"inside\"===g.constraintext),A.attr(\"transform\",N)}}}function i(t,e,r,n,i,a){var o;i<1?o=\"scale(\"+i+\") \":(i=1,o=\"\");return\"translate(\"+(r-i*t)+\" \"+(n-i*e)+\")\"+o+(a?\"rotate(\"+a+\" \"+t+\" \"+e+\") \":\"\")}function a(t,e,r,n){var i=o((e=e||{}).family,r),a=o(e.size,r),l=o(e.color,r);return{family:s(t.family,i,n.family),size:function(t,e,r){if(c(e)){e=+e;var n=t.min,i=t.max,a=void 0!==n&&e<n||void 0!==i&&e>i;if(!a)return e}return void 0!==r?r:t.dflt}(t.size,a,n.size),color:function(t,e,r){return u(e).isValid()?e:void 0!==r?r:t.dflt}(t.color,l,n.color)}}function o(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r}function s(t,e,r){if(\"string\"==typeof e){if(e||!t.noBlank)return e}else if(\"number\"==typeof e&&!t.strict)return String(e);return void 0!==r?r:t.dflt}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../lib\"),h=t(\"../../lib/svg_text_utils\"),d=t(\"../../components/color\"),p=t(\"../../components/drawing\"),m=t(\"../../components/errorbars\"),g=t(\"./attributes\"),v=g.text,y=g.textposition,x=g.textfont,b=g.insidetextfont,_=g.outsidetextfont,w=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.each(function(t){t[0].node3=l.select(this)}),s.append(\"g\").attr(\"class\",\"points\").each(function(e){var r=l.select(this),s=e[0].t,u=e[0].trace,h=s.poffset,p=Array.isArray(h);r.selectAll(\"g.point\").data(f.identity).enter().append(\"g\").classed(\"point\",!0).each(function(r,s){function f(t){return 0===o.bargap&&0===o.bargroupgap?l.round(Math.round(t)-k,2):t}var m,g,v,y,x=r.p+(p?h[s]:h),b=x+r.w,_=r.b,w=_+r.s;if(\"h\"===u.orientation?(v=a.c2p(x,!0),y=a.c2p(b,!0),m=i.c2p(_,!0),g=i.c2p(w,!0),r.ct=[g,(v+y)/2]):(m=i.c2p(x,!0),g=i.c2p(b,!0),v=a.c2p(_,!0),y=a.c2p(w,!0),r.ct=[(m+g)/2,y]),c(m)&&c(g)&&c(v)&&c(y)&&m!==g&&v!==y){var M=(r.mlw+1||u.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,k=l.round(M/2%1,2);if(!t._context.staticPlot){var A=d.opacity(r.mc||u.marker.color)<1||M>.01?f:function(t,e){return Math.abs(t-e)>=2?f(t):t>e?Math.ceil(t):Math.floor(t)};g=A(g,m=A(m,g)),y=A(y,v=A(v,y))}var T=l.select(this);T.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",\"M\"+m+\",\"+v+\"V\"+y+\"H\"+g+\"V\"+v+\"Z\"),n(t,T,e,s,m,g,v,y)}else l.select(this).remove()})}),s.call(m.plot,e)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"./attributes\":883,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],891:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[];if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var s=n[r];e.contains(s.ct)?(o.push({pointNumber:r,x:i.c2d(s.x),y:a.c2d(s.y)}),s.selected=1):s.selected=0}return o}},{}],892:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(n.length){var g,x,b,_,w=t._fullLayout.barmode,M=\"group\"===w;if(\"overlay\"===w)i(t,e,r,n);else if(M){for(g=[],x=[],b=0;b<n.length;b++)void 0===(_=n[b])[0].trace.offset?x.push(_):g.push(_);x.length&&function(t,e,r,n){var i=t._fullLayout.barnorm,a=new y(n,!1,!i);(function(t,e,r){var n,i,a,c,u=t._fullLayout,f=u.bargap,h=u.bargroupgap,d=r.positions,p=r.distinctPositions,m=r.minDiff,g=r.traces,v=d.length!==p.length,y=g.length,x=m*(1-f),b=v?x/y:x,_=b*(1-h);for(n=0;n<y;n++){i=g[n],a=i[0];var w=v?((2*n+1-y)*b-_)/2:-_/2;(c=a.t).barwidth=_,c.poffset=w,c.bargroupwidth=x,c.bardelta=m}r.binWidth=g[0][0].t.barwidth/100,o(r),s(t,e,r),l(t,e,r,v)})(t,e,a),i?(f(t,r,a),h(t,r,a)):u(t,r,a)}(t,e,r,x),g.length&&i(t,e,r,g)}else{for(g=[],x=[],b=0;b<n.length;b++)void 0===(_=n[b])[0].trace.base?x.push(_):g.push(_);x.length&&function(t,e,r,n){var i=t._fullLayout.barmode,o=\"stack\"===i,s=\"relative\"===i,l=t._fullLayout.barnorm,u=new y(n,s,!(l||o||s));a(t,e,u),function(t,e,r){var n,i,a,o,s=t._fullLayout.barnorm,l=d(e),u=r.traces,f=[null,null];for(n=0;n<u.length;n++)for(i=u[n],a=0;a<i.length;a++)if((o=i[a]).s!==m){var h=r.put(o.p,o.b+o.s),g=h+o.b+o.s;o.b=h,o[l]=g,s||(p(e.c2l(g))&&c(f,g),o.hasB&&p(e.c2l(h))&&c(f,h))}s||v.expand(e,f,{tozero:!0,padded:!0})}(t,r,u);for(var f=0;f<n.length;f++)for(var g=n[f],x=0;x<g.length;x++){var b=g[x];if(b.s!==m){var _=b.b+b.s===u.get(b.p,b.s);_&&(b._outmost=!0)}}l&&h(t,r,u)}(t,e,r,x),g.length&&i(t,e,r,g)}}}function i(t,e,r,n){for(var i=t._fullLayout.barnorm,o=!i,s=0;s<n.length;s++){var l=n[s],c=new y([l],!1,o);a(t,e,c),i?(f(t,r,c),h(t,r,c)):u(t,r,c)}}function a(t,e,r){var n,i,a=t._fullLayout,c=a.bargap,u=a.bargroupgap,f=r.minDiff,h=r.traces,d=f*(1-c),p=d*(1-u),m=-p/2;for(n=0;n<h.length;n++)(i=h[n][0].t).barwidth=p,i.poffset=m,i.bargroupwidth=d,i.bardelta=f;r.binWidth=h[0][0].t.barwidth/100,o(r),s(t,e,r),l(t,e,r)}function o(t){var e,r,n,i,a,o,s=t.traces;for(e=0;e<s.length;e++){i=(n=(r=s[e])[0]).trace,o=n.t;var l,c=i.offset,u=o.poffset;if(Array.isArray(c)){for(l=c.slice(0,r.length),a=0;a<l.length;a++)p(l[a])||(l[a]=u);for(a=l.length;a<r.length;a++)l.push(u);o.poffset=l}else void 0!==c&&(o.poffset=c);var f=i.width,h=o.barwidth;if(Array.isArray(f)){var d=f.slice(0,r.length);for(a=0;a<d.length;a++)p(d[a])||(d[a]=h);for(a=d.length;a<r.length;a++)d.push(h);if(o.barwidth=d,void 0===c){for(l=[],a=0;a<r.length;a++)l.push(u+(h-d[a])/2);o.poffset=l}}else void 0!==f&&(o.barwidth=f,void 0===c&&(o.poffset=u+(h-f)/2))}}function s(t,e,r){for(var n=r.traces,i=d(e),a=0;a<n.length;a++)for(var o=n[a],s=o[0].t,l=s.poffset,c=Array.isArray(l),u=s.barwidth,f=Array.isArray(u),h=0;h<o.length;h++){var p=o[h],m=p.w=f?u[h]:u;p[i]=p.p+(c?l[h]:l)+m/2}}function l(t,e,r,n){var i=r.traces,a=r.distinctPositions,o=a[0],s=r.minDiff,l=s/2;v.minDtick(e,s,o,n);for(var c=Math.min.apply(Math,a)-l,u=Math.max.apply(Math,a)+l,f=0;f<i.length;f++){var h=i[f],d=h[0],p=d.trace;if(void 0!==p.width||void 0!==p.offset)for(var m=d.t,g=m.poffset,y=m.barwidth,x=Array.isArray(g),b=Array.isArray(y),_=0;_<h.length;_++){var w=h[_],M=x?g[_]:g,k=b?y[_]:y,A=w.p+M,T=A+k;c=Math.min(c,A),u=Math.max(u,T)}}v.expand(e,[c,u],{padded:!1})}function c(t,e){p(t[0])?t[0]=Math.min(t[0],e):t[0]=e,p(t[1])?t[1]=Math.max(t[1],e):t[1]=e}function u(t,e,r){for(var n=r.traces,i=d(e),a=[null,null],o=0;o<n.length;o++)for(var s=n[o],l=0;l<s.length;l++){var u=s[l],f=u.b,h=f+u.s;u[i]=h,p(e.c2l(h))&&c(a,h),u.hasB&&p(e.c2l(f))&&c(a,f)}v.expand(e,a,{tozero:!0,padded:!0})}function f(t,e,r){for(var n=r.traces,i=0;i<n.length;i++)for(var a=n[i],o=0;o<a.length;o++){var s=a[o];s.s!==m&&r.put(s.p,s.b+s.s)}}function h(t,e,r){function n(t){p(e.c2l(t))&&(t<l-s||t>u+s||!p(l))&&(h=!0,c(f,t))}for(var i=r.traces,a=d(e),o=\"fraction\"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u=\"stack\"===t._fullLayout.barmode?o:l,f=[l,u],h=!1,g=0;g<i.length;g++)for(var y=i[g],x=0;x<y.length;x++){var b=y[x];if(b.s!==m){var _=Math.abs(o/r.get(b.p,b.s));b.b*=_,b.s*=_;var w=b.b,M=w+b.s;b[a]=M,n(M),b.hasB&&n(w)}}v.expand(e,f,{tozero:!0,padded:h})}function d(t){return t._id.charAt(0)}var p=t(\"fast-isnumeric\"),m=t(\"../../constants/numerical\").BADNUM,g=t(\"../../registry\"),v=t(\"../../plots/cartesian/axes\"),y=t(\"./sieve.js\");e.exports=function(t,e){var r,i=e.xaxis,a=e.yaxis,o=t._fullData,s=t.calcdata,l=[],c=[];for(r=0;r<o.length;r++){var u=o[r];!0===u.visible&&g.traceIs(u,\"bar\")&&u.xaxis===i._id&&u.yaxis===a._id&&(\"h\"===u.orientation?l.push(s[r]):c.push(s[r]))}n(t,i,a,c),n(t,a,i,l)}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./sieve.js\":893,\"fast-isnumeric\":140}],893:[function(t,e,r){\"use strict\";function n(t,e,r){this.traces=t,this.separateNegativeValues=e,this.dontMergeOverlappingData=r;for(var n=1/0,o=[],s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++){var u=l[c];u.p!==a&&o.push(u.p)}l[0]&&l[0].width1&&(n=Math.min(l[0].width1,n))}this.positions=o;var f=i.distinctVals(o);this.distinctPositions=f.vals,1===f.vals.length&&n!==1/0?this.minDiff=n:this.minDiff=Math.min(f.minDiff,n),this.binWidth=this.minDiff,this.bins={}}e.exports=n;var i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;n.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},n.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},n.prototype.getLabel=function(t,e){return(e<0&&this.separateNegativeValues?\"v\":\"^\")+(this.dontMergeOverlappingData?t:Math.round(t/this.binWidth))}},{\"../../constants/numerical\":721,\"../../lib\":743}],894:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/errorbars\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.bars\"),o=r.size(),s=t._fullLayout;r.style(\"opacity\",function(t){return t[0].trace.opacity}).each(function(t){(\"stack\"===s.barmode&&o>1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")}),r.selectAll(\"g.points\").each(function(e){var r=n.select(this),a=r.selectAll(\"path\"),o=r.selectAll(\"text\"),s=e[0].trace;i.pointStyle(a,s,t),i.selectedPointStyle(a,s),o.each(function(t){function e(e){var n=r[e];return Array.isArray(n)?n[t.i]:n}var r,a=n.select(this);a.classed(\"bartext-inside\")?r=s.insidetextfont:a.classed(\"bartext-outside\")&&(r=s.outsidetextfont),r||(r=s.textfont),i.font(a,e(\"family\"),e(\"size\"),e(\"color\"))}),i.selectedTextStyle(o,s)}),a.style(r)}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,d3:128}],895:[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\"),r(\"marker.opacity\"),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":618,\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632}],896:[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\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},text:a({},n.text,{}),whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calcIfAutorange\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],dflt:\"outliers\",editType:\"calcIfAutorange\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],dflt:!1,editType:\"calcIfAutorange\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calcIfAutorange\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calcIfAutorange\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:a({},o.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:a({},o.size,{arrayOk:!1,editType:\"calcIfAutorange\"}),color:a({},o.color,{arrayOk:!1,editType:\"style\"}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine,editType:\"style\"}),width:a({},s.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":617,\"../../lib/extend\":732,\"../scatter/attributes\":1066}],897:[function(t,e,r){\"use strict\";function n(t,e){return t.v-e.v}function i(t){return t.v}var a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=o._,l=t(\"../../plots/cartesian/axes\");e.exports=function(t,e){var r,c,u,f,h,d=t._fullLayout,p=l.getFromId(t,e.xaxis||\"x\"),m=l.getFromId(t,e.yaxis||\"y\"),g=[],v=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(c=p,u=\"x\",f=m,h=\"y\"):(c=m,u=\"y\",f=p,h=\"x\");var y=c.makeCalcdata(e,u),x=function(t,e,r,n,i){if(e in t)return r.makeCalcdata(t,e);var s;s=e+\"0\"in t?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||a(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;var l=r.d2c(s,0,t[e+\"calendar\"]);return n.map(function(){return l})}(e,h,f,y,d[v]),b=o.distinctVals(x),_=b.vals,w=b.minDiff/2,M=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(_,w),k=y.length,A=_.length,T=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(A);for(r=0;r<k;r++){var S=y[r];if(a(S)){var E=o.findBin(x[r],M);if(E>=0&&E<A){var L={v:S,i:r};!function(t,e,r){var n={text:\"tx\"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}(L,e,r),T[E].push(L)}}}for(r=0;r<A;r++)if(T[r].length>0){var C=T[r].sort(n),z=C.map(i),D=z.length,I={pos:_[r],pts:C};I.min=z[0],I.max=z[D-1],I.mean=o.mean(z,D),I.sd=o.stdev(z,D,I.mean),I.q1=o.interp(z,.25),I.med=o.interp(z,.5),I.q3=o.interp(z,.75),I.lf=Math.min(I.q1,z[Math.min(o.findBin(2.5*I.q1-1.5*I.q3,z,!0)+1,D-1)]),I.uf=Math.max(I.q3,z[Math.max(o.findBin(2.5*I.q3-1.5*I.q1,z),0)]),I.lo=4*I.q1-3*I.q3,I.uo=4*I.q3-3*I.q1,g.push(I)}return function(t,e){if(Array.isArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;o.tagSelected(n,e,i)}}(g,e),l.expand(c,y,{padded:!0}),g.length>0?(g[0].t={num:d[v],dPos:w,posLetter:h,valLetter:u,labels:{med:s(t,\"median:\"),min:s(t,\"min:\"),q1:s(t,\"q1:\"),q3:s(t,\"q3:\"),max:s(t,\"max:\"),mean:\"sd\"===e.boxmean?s(t,\"mean \\xb1 \\u03c3:\"):s(t,\"mean:\"),lf:s(t,\"lower fence:\"),uf:s(t,\"upper fence:\")}},e._fullInput&&\"candlestick\"===e._fullInput.type&&delete g[0].t.labels,d[v]++,g):[{t:{empty:!0}}]}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"fast-isnumeric\":140}],898:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i,a=r(\"y\"),s=r(\"x\");if(a&&a.length)i=\"v\",s||r(\"x0\");else{if(!s||!s.length)return void(e.visible=!1);i=\"h\",r(\"y0\")}o.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],n),r(\"orientation\",i)}function i(t,e,r,n){var i=n.prefix,o=a.coerce2(t,e,l,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),c=r(i+\"points\",o||s?\"suspectedoutliers\":void 0);c?(r(\"jitter\",\"all\"===c?.3:0),r(\"pointpos\",\"all\"===c?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.color\",e.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),\"suspectedoutliers\"===c&&(r(\"marker.line.outliercolor\",e.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\")):delete e.marker,r(\"hoveron\"),a.coerceSelectionMarkerOpacity(e,r)}var a=t(\"../../lib\"),o=t(\"../../registry\"),s=t(\"../../components/color\"),l=t(\"./attributes\");e.exports={supplyDefaults:function(t,e,r,o){function c(r,n){return a.coerce(t,e,l,r,n)}n(t,e,c,o),!1!==e.visible&&(c(\"line.color\",(t.marker||{}).color||r),c(\"line.width\"),c(\"fillcolor\",s.addOpacity(e.line.color,.5)),c(\"whiskerwidth\"),c(\"boxmean\"),i(t,e,c,{prefix:\"box\"}))},handleSampleDefaults:n,handlePointsDefaults:i}},{\"../../components/color\":618,\"../../lib\":743,\"../../registry\":873,\"./attributes\":896}],899:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i,c,u,f,h,d,p,m,g,v=t.cd,y=t.xa,x=t.ya,b=v[0].trace,_=v[0].t,w=\"violin\"===b.type,M=[],k=\"closest\"!==n||w?_.bdPos:2.5*_.bdPos,A=function(t){return t.pos+_.bPos-d};w&&\"both\"!==b.side?(\"positive\"===b.side&&(g=function(t){var e=A(t);return s.inbox(e,e+k)}),\"negative\"===b.side&&(g=function(t){var e=A(t);return s.inbox(e-k,e)})):g=function(t){var e=A(t);return s.inbox(e-k,e+k)};var T;T=w?function(t){return s.inbox(t.span[0]-h,t.span[1]-h)}:function(t){return s.inbox(t.min-h,t.max-h)},\"h\"===b.orientation?(h=e,d=r,p=T,m=g,i=\"y\",u=x,c=\"x\",f=y):(h=r,d=e,p=g,m=T,i=\"x\",u=y,c=\"y\",f=x);var S=s.getDistanceFunction(n,p,m);if(s.getClosest(v,S,t),!1===t.index)return[];var E=v[t.index],L=b.line.color,C=(b.marker||{}).color;l.opacity(L)&&b.line.width?t.color=L:l.opacity(C)&&b.boxpoints?t.color=C:t.color=b.fillcolor,t[i+\"0\"]=u.c2p(E.pos+_.bPos-_.bdPos,!0),t[i+\"1\"]=u.c2p(E.pos+_.bPos+_.bdPos,!0),a.tickText(u,u.c2l(E.pos),\"hover\").text,t[i+\"LabelVal\"]=E.pos;var z={},D=[\"med\",\"min\",\"q1\",\"q3\",\"max\"];(b.boxmean||(b.meanline||{}).visible)&&D.push(\"mean\"),(b.boxpoints||b.points)&&D.push(\"lf\",\"uf\");for(var I=0;I<D.length;I++){var P=D[I];if(P in E&&!(E[P]in z)){z[E[P]]=!0;var O=E[P],F=f.c2p(O,!0),R=o.extendFlat({},t);R[c+\"0\"]=R[c+\"1\"]=F,R[c+\"LabelVal\"]=O,R[c+\"Label\"]=(_.labels?_.labels[P]+\" \":\"\")+a.hoverLabelText(f,O),\"mean\"===P&&\"sd\"in E&&\"sd\"===b.boxmean&&(R[c+\"err\"]=E.sd),t.name=\"\",M.push(R)}}return M}function i(t,e,r){for(var n,i,a,l=t.cd,u=t.xa,f=t.ya,h=l[0].trace,d=u.c2p(e),p=f.c2p(r),m=s.quadrature(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(u.c2p(t.x)-d)-e,1-3/e)},function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-p)-e,1-3/e)}),g=!1,v=0;v<l.length;v++){i=l[v];for(var y=0;y<(i.pts||[]).length;y++){var x=m(a=i.pts[y]);x<=t.distance&&(t.distance=x,g=[v,y])}}if(!g)return!1;a=(i=l[g[0]]).pts[g[1]];var b=u.c2p(a.x,!0),_=f.c2p(a.y,!0),w=a.mrc||1;return n=o.extendFlat({},t,{index:a.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,xLabelVal:a.x,y0:_-w,y1:_+w,yLabelVal:a.y}),c(a,h,n),n}var a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"../scatter/fill_hover_text\");e.exports={hoverPoints:function(t,e,r,a){var o,s=t.cd[0].trace.hoveron,l=[];return-1!==s.indexOf(\"boxes\")&&(l=l.concat(n(t,e,r,a))),-1!==s.indexOf(\"points\")&&(o=i(t,e,r)),\"closest\"===a?o?[o]:l:o?(l.push(o),l):l},hoverOnBoxes:n,hoverOnPoints:i}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074}],900:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.layoutAttributes=t(\"./layout_attributes\"),n.supplyDefaults=t(\"./defaults\").supplyDefaults,n.supplyLayoutDefaults=t(\"./layout_defaults\").supplyLayoutDefaults,n.calc=t(\"./calc\"),n.setPositions=t(\"./set_positions\").setPositions,n.plot=t(\"./plot\").plot,n.style=t(\"./style\"),n.hoverPoints=t(\"./hover\").hoverPoints,n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"box\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":896,\"./calc\":897,\"./defaults\":898,\"./hover\":899,\"./layout_attributes\":901,\"./layout_defaults\":902,\"./plot\":903,\"./select\":904,\"./set_positions\":905,\"./style\":906}],901:[function(t,e,r){\"use strict\";e.exports={boxmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},boxgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"},boxgroupgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"}}},{}],902:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){for(var a,o=0;o<r.length;o++)if(r[o].type===i){a=!0;break}a&&(n(i+\"mode\"),n(i+\"gap\"),n(i+\"groupgap\"))}var i=t(\"../../lib\"),a=t(\"./layout_attributes\");e.exports={supplyLayoutDefaults:function(t,e,r){n(0,0,r,function(r,n){return i.coerce(t,e,a,r,n)},\"box\")},_supply:n}},{\"../../lib\":743,\"./layout_attributes\":901}],903:[function(t,e,r){\"use strict\";function n(){var t=u;return u=(69069*u+1)%4294967296,Math.abs(u-t)<429496729?n():u/4294967296}function i(t,e,r,n){var i,a,o=e.pos,c=e.val,u=n.bPos,f=n.wdPos||0,h=n.bPosPxOffset||0,d=r.whiskerwidth||0;Array.isArray(n.bdPos)?(i=n.bdPos[0],a=n.bdPos[1]):(i=n.bdPos,a=n.bdPos),t.selectAll(\"path.box\").data(l.identity).enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"box\").each(function(t){var e=t.pos,n=o.c2p(e+u,!0)+h,p=o.c2p(e+u-i,!0)+h,m=o.c2p(e+u+a,!0)+h,g=o.c2p(e+u-f,!0)+h,v=o.c2p(e+u+f,!0)+h,y=c.c2p(t.q1,!0),x=c.c2p(t.q3,!0),b=l.constrain(c.c2p(t.med,!0),Math.min(y,x)+1,Math.max(y,x)-1),_=c.c2p(!1===r.boxpoints?t.min:t.lf,!0),w=c.c2p(!1===r.boxpoints?t.max:t.uf,!0);\"h\"===r.orientation?s.select(this).attr(\"d\",\"M\"+b+\",\"+p+\"V\"+m+\"M\"+y+\",\"+p+\"V\"+m+\"H\"+x+\"V\"+p+\"ZM\"+y+\",\"+n+\"H\"+_+\"M\"+x+\",\"+n+\"H\"+w+(0===d?\"\":\"M\"+_+\",\"+g+\"V\"+v+\"M\"+w+\",\"+g+\"V\"+v)):s.select(this).attr(\"d\",\"M\"+p+\",\"+b+\"H\"+m+\"M\"+p+\",\"+y+\"H\"+m+\"V\"+x+\"H\"+p+\"ZM\"+n+\",\"+y+\"V\"+_+\"M\"+n+\",\"+x+\"V\"+w+(0===d?\"\":\"M\"+g+\",\"+_+\"H\"+v+\"M\"+g+\",\"+w+\"H\"+v))})}function a(t,e,r,i){var a=e.x,o=e.y,s=i.bdPos,d=i.bPos,p=r.boxpoints||r.points;u=2e9,t.selectAll(\"g.points\").data(function(t){return t.forEach(function(t){t.t=i,t.trace=r}),t}).enter().append(\"g\").attr(\"class\",\"points\").selectAll(\"path\").data(function(t){var e,i,a=\"all\"===p?t.pts:t.pts.filter(function(e){return e.v<t.lf||e.v>t.uf}),o=Math.max((t.max-t.min)/10,t.q3-t.q1),c=1e-9*o,u=o*h,m=[],g=0;if(r.jitter){if(0===o)for(g=1,m=new Array(a.length),e=0;e<a.length;e++)m[e]=1;else for(e=0;e<a.length;e++){var v=Math.max(0,e-f),y=a[v].v,x=Math.min(a.length-1,e+f),b=a[x].v;\"all\"!==p&&(a[e].v<t.lf?b=Math.min(b,t.lf):y=Math.max(y,t.uf));var _=Math.sqrt(u*(x-v)/(b-y+c))||0;_=l.constrain(Math.abs(_),0,1),m.push(_),g=Math.max(_,g)}i=2*r.jitter/g}for(e=0;e<a.length;e++){var w=a[e],M=w.v,k=r.jitter?i*m[e]*(n()-.5):0,A=t.pos+d+s*(r.pointpos+k);\"h\"===r.orientation?(w.y=A,w.x=M):(w.x=A,w.y=M),\"suspectedoutliers\"===p&&M<t.uo&&M>t.lo&&(w.so=!0)}return a}).enter().append(\"path\").classed(\"point\",!0).call(c.translatePoints,a,o)}function o(t,e,r,n){var i,a,o=e.pos,c=e.val,u=n.bPos,f=n.bPosPxOffset||0;Array.isArray(n.bdPos)?(i=n.bdPos[0],a=n.bdPos[1]):(i=n.bdPos,a=n.bdPos),t.selectAll(\"path.mean\").data(l.identity).enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}).each(function(t){var e=o.c2p(t.pos+u,!0)+f,n=o.c2p(t.pos+u-i,!0)+f,l=o.c2p(t.pos+u+a,!0)+f,h=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),p=c.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?s.select(this).attr(\"d\",\"M\"+h+\",\"+n+\"V\"+l+(\"sd\"===r.boxmean?\"m0,0L\"+d+\",\"+e+\"L\"+h+\",\"+n+\"L\"+p+\",\"+e+\"Z\":\"\")):s.select(this).attr(\"d\",\"M\"+n+\",\"+h+\"H\"+l+(\"sd\"===r.boxmean?\"m0,0L\"+e+\",\"+d+\"L\"+n+\",\"+h+\"L\"+e+\",\"+p+\"Z\":\"\"))})}var s=t(\"d3\"),l=t(\"../../lib\"),c=t(\"../../components/drawing\"),u=2e9,f=5,h=.01;e.exports={plot:function(t,e,r){var n=t._fullLayout,l=e.xaxis,c=e.yaxis;e.plot.select(\".boxlayer\").selectAll(\"g.trace.boxes\").data(r).enter().append(\"g\").attr(\"class\",\"trace boxes\").each(function(t){var e=t[0],r=e.t,u=e.trace,f=e.node3=s.select(this),h=n._numBoxes,d=\"group\"===n.boxmode&&h>1,p=r.dPos*(1-n.boxgap)*(1-n.boxgroupgap)/(d?h:1),m=d?2*r.dPos*((r.num+.5)/h-.5)*(1-n.boxgap):0,g=p*u.whiskerwidth;if(!0!==u.visible||r.empty)s.select(this).remove();else{var v,y;\"h\"===u.orientation?(v=c,y=l):(v=l,y=c),r.bPos=m,r.bdPos=p,r.wdPos=g,i(f,{pos:v,val:y},u,r),u.boxpoints&&a(f,{x:l,y:c},u,r),u.boxmean&&o(f,{pos:v,val:y},u,r)}})},plotBoxAndWhiskers:i,plotPoints:a,plotBoxMean:o}},{\"../../components/drawing\":643,\"../../lib\":743,d3:128}],904:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],c=a.c2p(l.x),u=o.c2p(l.y);e.contains([c,u])?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],905:[function(t,e,r){\"use strict\";function n(t,e,r,n,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=[],d=\"violin\"===t?\"_numViolins\":\"_numBoxes\";for(s=0;s<r.length;s++)for(c=u[r[s]],l=0;l<c.length;l++)h.push(c[l].pos);if(h.length){var p=a.distinctVals(h),m=p.minDiff/2;for(h.length===p.vals.length&&(f[d]=1),i.minDtick(n,p.minDiff,p.vals[0],!0),s=0;s<r.length;s++)(c=u[r[s]])[0].t.dPos=m;var g=(1-f[t+\"gap\"])*(1-f[t+\"groupgap\"])*m/f[d];i.expand(n,p.vals,{vpadminus:m+o[0]*g,vpadplus:m+o[1]*g})}}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=[\"v\",\"h\"];e.exports={setPositions:function(t,e){for(var r=t.calcdata,i=e.xaxis,a=e.yaxis,s=0;s<o.length;s++){for(var l=o[s],c=\"h\"===l?a:i,u=[],f=0,h=0,d=0;d<r.length;d++){var p=r[d],m=p[0].t,g=p[0].trace;!0!==g.visible||\"box\"!==g.type||m.empty||g.orientation!==l||g.xaxis!==i._id||g.yaxis!==a._id||(u.push(d),!1!==g.boxpoints&&(f=Math.max(f,g.jitter-g.pointpos-1),h=Math.max(h,g.jitter+g.pointpos-1)))}n(\"box\",t,u,c,[f,h])}},setPositionOffset:n}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789}],906:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.boxes\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;r.selectAll(\"path.box\").style(\"stroke-width\",s+\"px\").call(i.stroke,o.line.color).call(i.fill,o.fillcolor),r.selectAll(\"path.mean\").style({\"stroke-width\":s,\"stroke-dasharray\":2*s+\"px,\"+s+\"px\"}).call(i.stroke,o.line.color);var l=r.selectAll(\"path.point\");a.pointStyle(l,o,t),a.selectedPointStyle(l,o)})}},{\"../../components/color\":618,\"../../components/drawing\":643,d3:128}],907:[function(t,e,r){\"use strict\";function n(t){return{name:a.increasing.name,showlegend:a.increasing.showlegend,line:{color:i({},o.line.color,{dflt:t}),width:o.line.width,editType:\"style\"},fillcolor:o.fillcolor,editType:\"style\"}}var i=t(\"../../lib\").extendFlat,a=t(\"../ohlc/attributes\"),o=t(\"../box/attributes\");e.exports={x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:i({},o.line.width,{}),editType:\"style\"},increasing:n(a.increasing.line.color.dflt),decreasing:n(a.decreasing.line.color.dflt),text:a.text,whiskerwidth:i({},o.whiskerwidth,{dflt:0})}},{\"../../lib\":743,\"../box/attributes\":896,\"../ohlc/attributes\":1024}],908:[function(t,e,r){\"use strict\";function n(t,e,r,n){o(t,e,r,n),r(n+\".line.color\"),r(n+\".line.width\",e.line.width),r(n+\".fillcolor\")}var i=t(\"../../lib\"),a=t(\"../ohlc/ohlc_defaults\"),o=t(\"../ohlc/direction_defaults\"),s=t(\"../ohlc/helpers\"),l=t(\"./attributes\");e.exports=function(t,e,r,o){function c(r,n){return i.coerce(t,e,l,r,n)}s.pushDummyTransformOpts(t,e);0!==a(t,e,c,o)?(c(\"line.width\"),n(t,e,c,\"increasing\"),n(t,e,c,\"decreasing\"),c(\"text\"),c(\"whiskerwidth\")):e.visible=!1}},{\"../../lib\":743,\"../ohlc/direction_defaults\":1026,\"../ohlc/helpers\":1027,\"../ohlc/ohlc_defaults\":1029,\"./attributes\":907}],909:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/register\");e.exports={moduleType:\"trace\",name:\"candlestick\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"showLegend\",\"candlestick\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\")},n(t(\"../box\")),n(t(\"./transform\"))},{\"../../plot_api/register\":779,\"../../plots/cartesian\":800,\"../box\":900,\"./attributes\":907,\"./defaults\":908,\"./transform\":910}],910:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"box\",boxpoints:!1,visible:t.visible,hoverinfo:t.hoverinfo,opacity:t.opacity,xaxis:t.xaxis,yaxis:t.yaxis,transforms:o.makeTransform(t,e,r)},i=t[r];return i&&a.extendFlat(n,{x:t.x||[0],xcalendar:t.xcalendar,y:[].concat(t.low).concat(t.high),whiskerwidth:t.whiskerwidth,text:t.text,name:i.name,showlegend:i.showlegend,line:i.line,fillcolor:i.fillcolor}),n}var i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../ohlc/helpers\");r.moduleType=\"transform\",r.name=\"candlestick\",r.attributes={},r.supplyDefaults=function(t,e,r,n){return o.clearEphemeralTransformOpts(n),o.copyOHLC(t,e),t},r.transform=function(t,e){for(var r=[],i=0;i<t.length;i++){var a=t[i];\"candlestick\"===a.type?r.push(n(a,e,\"increasing\"),n(a,e,\"decreasing\")):r.push(a)}return o.addRangeSlider(r,e.layout),r},r.calcTransform=function(t,e,r){for(var n=r.direction,a=o.getFilterFn(n),s=e.open,l=e.high,c=e.low,u=e.close,f=s.length,h=[],d=[],p=e._fullInput.x?function(t){var r=e.x[t];h.push(r,r,r,r,r,r)}:function(t){h.push(t,t,t,t,t,t)},m=function(t,e,r,n){d.push(r,t,n,n,n,e)},g=0;g<f;g++)a(s[g],u[g])&&i(l[g])&&i(c[g])&&(p(g),m(s[g],l[g],c[g],u[g]));e.x=h,e.y=d}},{\"../../lib\":743,\"../ohlc/helpers\":1027,\"fast-isnumeric\":140}],911:[function(t,e,r){\"use strict\";var n=t(\"./axis_defaults\");e.exports=function(t,e,r,i,a){i(\"a\")||(i(\"da\"),i(\"a0\"));i(\"b\")||(i(\"db\"),i(\"b0\")),function(t,e,r,i){[\"aaxis\",\"baxis\"].forEach(function(a){var o=a.charAt(0),s=t[a]||{},l={},c={tickfont:\"x\",id:o+\"axis\",letter:o,font:e.font,name:a,data:t[o],calendar:e.calendar,dfltColor:i,bgColor:r.paper_bgcolor,fullLayout:r};n(s,l,c),l._categories=l._categories||[],e[a]=l,t[a]||\"-\"===s.type||(t[a]={type:s.type})})}(t,e,r,a)}},{\"./axis_defaults\":916}],912:[function(t,e,r){\"use strict\";function n(t,e){if(!Array.isArray(t)||e>=10)return null;for(var r=1/0,i=-1/0,a=t.length,o=0;o<a;o++){var s=t[o];if(Array.isArray(s)){var l=n(s,e+1);l&&(r=Math.min(l[0],r),i=Math.max(l[1],i))}else r=Math.min(s,r),i=Math.max(s,i)}return[r,i]}e.exports=function(t){return n(t,0)}},{}],913:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./axis_attributes\"),a=t(\"../../components/color/attributes\"),o=n({editType:\"calc\"});o.family.dflt='\"Open Sans\", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:\"string\",editType:\"calc\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},a:{valType:\"data_array\",editType:\"calc\"},a0:{valType:\"number\",dflt:0,editType:\"calc\"},da:{valType:\"number\",dflt:1,editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},b0:{valType:\"number\",dflt:0,editType:\"calc\"},db:{valType:\"number\",dflt:1,editType:\"calc\"},cheaterslope:{valType:\"number\",dflt:1,editType:\"calc\"},aaxis:i,baxis:i,font:o,color:{valType:\"color\",dflt:a.defaultLine,editType:\"plot\"}}},{\"../../components/color/attributes\":617,\"../../plots/font_attributes\":816,\"./axis_attributes\":915}],914:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,d,p,m,g,v=Array.isArray(r)?\"a\":\"b\",y=(\"a\"===v?t.aaxis:t.baxis).smoothing,x=\"a\"===v?t.a2i:t.b2j,b=\"a\"===v?r:n,_=\"a\"===v?n:r,w=\"a\"===v?e.a.length:e.b.length,M=\"a\"===v?e.b.length:e.a.length,k=Math.floor(\"a\"===v?t.b2j(_):t.a2i(_)),A=\"a\"===v?function(e){return t.evalxy([],e,k)}:function(e){return t.evalxy([],k,e)};y&&(o=Math.max(0,Math.min(M-2,k)),s=k-o,a=\"a\"===v?function(e,r){return t.dxydi([],e,o,r,s)}:function(e,r){return t.dxydj([],o,e,s,r)});var T=x(b[0]),S=x(b[1]),E=T<S?1:-1,L=1e-8*(S-T),C=E>0?Math.floor:Math.ceil,z=E>0?Math.ceil:Math.floor,D=E>0?Math.min:Math.max,I=E>0?Math.max:Math.min,P=C(T+L),O=z(S-L),F=[[u=A(T)]];for(i=P;i*E<O*E;i+=E)l=[],p=I(T,i),g=(m=D(S,i+E))-p,c=Math.max(0,Math.min(w-2,Math.floor(.5*(p+m)))),f=A(m),y&&(h=a(c,p-c),d=a(c,m-c),l.push([u[0]+h[0]/3*g,u[1]+h[1]/3*g]),l.push([f[0]-d[0]/3*g,f[1]-d[1]/3*g])),l.push(f),F.push(l),u=f;return F}},{}],915:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../plots/cartesian/layout_attributes\"),o=t(\"../../plot_api/edit_types\").overrideAll;e.exports={color:{valType:\"color\",editType:\"calc\"},smoothing:{valType:\"number\",dflt:1,min:0,max:1.3,editType:\"calc\"},title:{valType:\"string\",editType:\"calc\"},titlefont:n({editType:\"calc\"}),titleoffset:{valType:\"number\",dflt:10,editType:\"calc\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",editType:\"calc\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}]},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cheatertype:{valType:\"enumerated\",values:[\"index\",\"value\"],dflt:\"value\",editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"linear\",\"array\"],dflt:\"array\",editType:\"calc\"},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},tickvals:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},showticklabels:{valType:\"enumerated\",values:[\"start\",\"end\",\"both\",\"none\"],dflt:\"start\",editType:\"calc\"},tickfont:n({editType:\"calc\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"calc\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"calc\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"calc\"},tickformatstops:o(a.tickformatstops,\"calc\",\"from-root\"),categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},labelpadding:{valType:\"integer\",dflt:10,editType:\"calc\"},labelprefix:{valType:\"string\",editType:\"calc\"},labelsuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showline:{valType:\"boolean\",dflt:!1,editType:\"calc\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"calc\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},gridcolor:{valType:\"color\",editType:\"calc\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},showgrid:{valType:\"boolean\",dflt:!0,editType:\"calc\"},minorgridcount:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},minorgridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},minorgridcolor:{valType:\"color\",dflt:i.lightLine,editType:\"calc\"},startline:{valType:\"boolean\",editType:\"calc\"},startlinecolor:{valType:\"color\",editType:\"calc\"},startlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endline:{valType:\"boolean\",editType:\"calc\"},endlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endlinecolor:{valType:\"color\",editType:\"calc\"},tick0:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},dtick:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},arraytick0:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},arraydtick:{valType:\"integer\",min:1,dflt:1,editType:\"calc\"},editType:\"calc\"}},{\"../../components/color/attributes\":617,\"../../plot_api/edit_types\":773,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/font_attributes\":816}],916:[function(t,e,r){\"use strict\";var n=t(\"./attributes\"),i=t(\"../../components/color\").addOpacity,a=t(\"../../registry\"),o=t(\"../../lib\"),s=t(\"../../plots/cartesian/tick_value_defaults\"),l=t(\"../../plots/cartesian/tick_label_defaults\"),c=t(\"../../plots/cartesian/category_order_defaults\"),u=t(\"../../plots/cartesian/set_convert\"),f=t(\"../../plots/cartesian/ordered_categories\"),h=t(\"../../plots/cartesian/axis_autotype\");e.exports=function(t,e,r){function d(r,n){return o.coerce(t,e,v,r,n)}function p(r,n){return o.coerce2(t,e,v,r,n)}var m=r.letter,g=r.font||{},v=n[m+\"axis\"];r.noHover=!0,r.name&&(e._name=r.name,e._id=r.name);var y=d(\"type\");if(\"-\"===y&&(r.data&&function(t,e){if(\"-\"===t.type){var r=t[t._id.charAt(0)+\"calendar\"];t.type=h(e,r)}}(e,r.data),\"-\"===e.type?e.type=\"linear\":y=t.type=e.type),d(\"smoothing\"),d(\"cheatertype\"),d(\"showticklabels\"),d(\"labelprefix\",m+\" = \"),d(\"labelsuffix\"),d(\"showtickprefix\"),d(\"showticksuffix\"),d(\"separatethousands\"),d(\"tickformat\"),d(\"exponentformat\"),d(\"showexponent\"),d(\"categoryorder\"),d(\"tickmode\"),d(\"tickvals\"),d(\"ticktext\"),d(\"tick0\"),d(\"dtick\"),\"array\"===e.tickmode&&(d(\"arraytick0\"),d(\"arraydtick\")),d(\"labelpadding\"),e._hovertitle=m,\"date\"===y){a.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",r.calendar)}u(e,r.fullLayout);var x=d(\"color\",r.dfltColor),b=x===t.color?x:g.color;d(\"title\"),o.coerceFont(d,\"titlefont\",{family:g.family,size:Math.round(1.2*g.size),color:b}),d(\"titleoffset\"),d(\"tickangle\");d(\"autorange\",!e.isValidRange(t.range))&&d(\"rangemode\"),d(\"range\"),e.cleanRange(),d(\"fixedrange\"),s(t,e,d,y),l(t,e,d,y,r),c(t,e,d);var _=p(\"gridcolor\",i(x,.3)),w=p(\"gridwidth\"),M=d(\"showgrid\");M||(delete e.gridcolor,delete e.gridwidth);var k=p(\"startlinecolor\",x),A=p(\"startlinewidth\",w);d(\"startline\",e.showgrid||!!k||!!A)||(delete e.startlinecolor,delete e.startlinewidth);var T=p(\"endlinecolor\",x),S=p(\"endlinewidth\",w);return d(\"endline\",e.showgrid||!!T||!!S)||(delete e.endlinecolor,delete e.endlinewidth),M?(d(\"minorgridcount\"),d(\"minorgridwidth\",w),d(\"minorgridcolor\",i(_,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridWidth),e._initialCategories=\"category\"===y?f(m,e.categoryorder,e.categoryarray,r.data):[],\"none\"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,d(\"tickmode\"),(!e.title||e.title&&0===e.title.length)&&(delete e.titlefont,delete e.titleoffset),e}},{\"../../components/color\":618,\"../../lib\":743,\"../../plots/cartesian/axis_autotype\":790,\"../../plots/cartesian/category_order_defaults\":793,\"../../plots/cartesian/ordered_categories\":804,\"../../plots/cartesian/set_convert\":808,\"../../plots/cartesian/tick_label_defaults\":809,\"../../plots/cartesian/tick_value_defaults\":811,\"../../registry\":873,\"./attributes\":913}],917:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./cheater_basis\"),a=t(\"./array_minmax\"),o=t(\"./map_2d_array\"),s=t(\"./calc_gridlines\"),l=t(\"./calc_labels\"),c=t(\"./calc_clippath\"),u=t(\"../heatmap/clean_2d_array\"),f=t(\"./smooth_fill_2d_array\");e.exports=function(t,e){var r,h=n.getFromId(t,e.xaxis||\"x\"),d=n.getFromId(t,e.yaxis||\"y\"),p=e.aaxis,m=e.baxis,g=e._a=e.a,v=e._b=e.b,y={},x=e.y;if(e._cheater){var b=\"index\"===p.cheatertype?g.length:g,_=\"index\"===m.cheatertype?v.length:v;e.x=r=i(b,_,e.cheaterslope)}else r=e.x;e._x=e.x=r=u(r),e._y=e.y=x=u(x),f(r,g,v),f(x,g,v),e.setScale(),y.xp=e.xp=o(e.xp,r,h.c2p),y.yp=e.yp=o(e.yp,x,d.c2p);var w=a(r),M=a(x),k=.5*(w[1]-w[0]),A=.5*(w[1]+w[0]),T=.5*(M[1]-M[0]),S=.5*(M[1]+M[0]);return w=[A-1.3*k,A+1.3*k],M=[S-1.3*T,S+1.3*T],n.expand(h,w,{padded:!0}),n.expand(d,M,{padded:!0}),s(e,y,\"a\",\"b\"),s(e,y,\"b\",\"a\"),l(e,p),l(e,m),y.clipsegments=c(e.xctrl,e.yctrl,p,m),y.x=r,y.y=x,y.a=g,y.b=v,[y]}},{\"../../plots/cartesian/axes\":789,\"../heatmap/clean_2d_array\":979,\"./array_minmax\":912,\"./calc_clippath\":918,\"./calc_gridlines\":919,\"./calc_labels\":920,\"./cheater_basis\":922,\"./map_2d_array\":934,\"./smooth_fill_2d_array\":938}],918:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=u;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][u],o[i]=e[i][u];for(s.push({x:a,y:o,bicubic:c}),i=u,a=[],o=[];i>=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],919:[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,c,u,f,h,d,p,g,v=[],y=[],x={};if(\"b\"===r)for(i=t.b2j(e),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,x.length=P,x.crossLength=I,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},n=0;n<I;n++)c=Math.min(I-2,n),u=n-c,f=t.evalxy([],n,i),E.smoothing&&n>0&&(h=t.dxydi([],n-1,o,0,s),v.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),d=t.dxydi([],n-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(n=t.a2i(e),c=Math.floor(Math.max(0,Math.min(I-2,n))),u=n-c,x.length=I,x.crossLength=P,x.xy=function(e){return t.evalxy([],n,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i<P;i++)o=Math.min(P-2,i),s=i-o,f=t.evalxy([],n,i),E.smoothing&&i>0&&(p=t.dxydj([],c,i-1,u,0),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),g=t.dxydj([],c,i-1,u,1),v.push(f[0]-g[0]/3),y.push(f[1]-g[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=r,x.axis=M,x.crossAxis=E,x.value=e,x.constvar=a,x.index=m,x.x=v,x.y=y,x.smoothing=E.smoothing,x}function s(e){var n,i,o,s,l,c=[],u=[],f={};if(f.length=w.length,f.crossLength=S.length,\"b\"===r)for(o=Math.max(0,Math.min(P-2,e)),l=Math.min(1,Math.max(0,e-o)),f.xy=function(r){return t.evalxy([],r,e)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},n=0;n<z;n++)c[n]=L[e*O][n],u[n]=C[e*O][n];else for(i=Math.max(0,Math.min(I-2,e)),s=Math.min(1,Math.max(0,e-i)),f.xy=function(r){return t.evalxy([],e,r)},f.dxy=function(e,r){return t.dxydj([],i,e,s,r)},n=0;n<D;n++)c[n]=L[n][e*O],u[n]=C[n][e*O];return f.axisLetter=r,f.axis=M,f.crossAxis=E,f.value=w[e],f.constvar=a,f.index=e,f.x=c,f.y=u,f.smoothing=E.smoothing,f}var l,c,u,f,h,d,p,m,g,v,y,x,b,_,w=t[r],M=t[r+\"axis\"],k=M._gridlines=[],A=M._minorgridlines=[],T=M._boundarylines=[],S=t[a],E=t[a+\"axis\"];if(\"array\"===M.tickmode)for(M.tickvals=[],l=0;l<w.length;l++)M.tickvals.push(w[l]);var L=t.xctrl,C=t.yctrl,z=L[0].length,D=L.length,I=t.a.length,P=t.b.length;n.calcTicks(M);var O=M.smoothing?3:1;if(\"array\"===M.tickmode){for(f=5e-15,d=(h=[Math.floor((w.length-1-M.arraytick0)/M.arraydtick*(1+f)),Math.ceil(-M.arraytick0/M.arraydtick/(1+f))].sort(function(t,e){return t-e}))[0]-1,p=h[1]+1,m=d;m<p;m++)(c=M.arraytick0+M.arraydtick*m)<0||c>w.length-1||k.push(i(s(c),{color:M.gridcolor,width:M.gridwidth}));for(m=d;m<p;m++)if(u=M.arraytick0+M.arraydtick*m,y=Math.min(u+M.arraydtick,w.length-1),!(u<0||u>w.length-1||y<0||y>w.length-1))for(x=w[u],b=w[y],l=0;l<M.minorgridcount;l++)(_=y-u)<=0||(v=x+(b-x)*(l+1)/(M.minorgridcount+1)*(M.arraydtick/_))<w[0]||v>w[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(f=5e-15,d=(h=[Math.floor((w[w.length-1]-M.tick0)/M.dtick*(1+f)),Math.ceil((w[0]-M.tick0)/M.dtick/(1+f))].sort(function(t,e){return t-e}))[0],p=h[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;m<p+1;m++)for(g=M.tick0+M.dtick*m,l=0;l<M.minorgridcount;l++)(v=g+M.dtick*(l+1)/(M.minorgridcount+1))<w[0]||v>w[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\":732,\"../../plots/cartesian/axes\":789}],920:[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;r<l.length;r++)o=l[r],-1!==[\"start\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[\"end\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{\"../../lib/extend\":732,\"../../plots/cartesian/axes\":789}],921:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=c*(l+c)*3,d=l*(l+c)*3;return[[e[0]+(h&&u/h),e[1]+(h&&f/h)],[e[0]-(d&&u/d),e[1]-(d&&f/d)]]}},{}],922:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArray;e.exports=function(t,e,r){var i,a,o,s,l,c=[],u=n(t)?t.length:t,f=n(e)?e.length:e,h=n(t)?t:null,d=n(e)?e:null;h&&(o=(h.length-1)/(h[h.length-1]-h[0])/(u-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var p,m=1/0,g=-1/0;for(a=0;a<f;a++)for(c[a]=[],l=d?(d[a]-d[0])*s:a/(f-1),i=0;i<u;i++)p=(h?(h[i]-h[0])*o:i/(u-1))-l*r,m=Math.min(p,m),g=Math.max(p,g),c[a][i]=p;var v=1/(g-m),y=-m*v;for(a=0;a<f;a++)for(i=0;i<u;i++)c[a][i]=v*c[a][i]+y;return c}},{\"../../lib\":743}],923:[function(t,e,r){\"use strict\";function n(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}var i=t(\"./catmull_rom\"),a=t(\"../../lib\").ensureArray;e.exports=function(t,e,r,o,s,l){var c,u,f,h,d,p,m,g,v,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=a(t,w),e=a(e,w),f=0;f<w;f++)t[f]=a(t[f],_),e[f]=a(e[f],_);for(u=0,h=0;u<b;u++,h+=l?3:1)for(d=t[h],p=e[h],m=r[u],g=o[u],c=0,f=0;c<x;c++,f+=s?3:1)d[f]=m[c],p[f]=g[c];if(s)for(u=0,h=0;u<b;u++,h+=l?3:1){for(c=1,f=3;c<x-1;c++,f+=3)v=i([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),t[h][f-1]=v[0][0],e[h][f-1]=v[0][1],t[h][f+1]=v[1][0],e[h][f+1]=v[1][1];y=n([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=n([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)v=i([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=v[0][0],e[h-1][f]=v[0][1],t[h+1][f]=v[1][0],e[h+1][f]=v[1][1];y=n([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=n([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)v=i([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+v[0][0]),e[h][f-1]=.5*(e[h][f-1]+v[0][1]),t[h][f+1]=.5*(t[h][f+1]+v[1][0]),e[h][f+1]=.5*(e[h][f+1]+v[1][1]);y=n([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=n([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{\"../../lib\":743,\"./catmull_rom\":921}],924:[function(t,e,r){\"use strict\";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],925:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3,n*=3;var h=i*i,d=1-i,p=d*d,m=d*i*2,g=-3*p,v=3*(p-m),y=3*(m-h),x=3*h,b=a*a,_=b*a,w=1-a,M=w*w,k=M*w;for(f=0;f<t.length;f++)o=g*(u=t[f])[n][r]+v*u[n][r+1]+y*u[n][r+2]+x*u[n][r+3],s=g*u[n+1][r]+v*u[n+1][r+1]+y*u[n+1][r+2]+x*u[n+1][r+3],l=g*u[n+2][r]+v*u[n+2][r+1]+y*u[n+2][r+2]+x*u[n+2][r+3],c=g*u[n+3][r]+v*u[n+3][r+1]+y*u[n+3][r+2]+x*u[n+3][r+3],e[f]=k*o+3*(M*a*s+w*b*l)+_*c;return e}:e?function(e,r,n,i,a){e||(e=[]);var o,s,l,c;r*=3;var u=i*i,f=1-i,h=f*f,d=f*i*2,p=-3*h,m=3*(h-d),g=3*(d-u),v=3*u,y=1-a;for(l=0;l<t.length;l++)o=p*(c=t[l])[n][r]+m*c[n][r+1]+g*c[n][r+2]+v*c[n][r+3],s=p*c[n+1][r]+m*c[n+1][r+1]+g*c[n+1][r+2]+v*c[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;n*=3;var h=a*a,d=h*a,p=1-a,m=p*p,g=m*p;for(u=0;u<t.length;u++)o=(f=t[u])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],c=f[n+3][r+1]-f[n+3][r],e[u]=g*o+3*(m*a*s+p*h*l)+d*c;return e}:function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u=1-a;for(l=0;l<t.length;l++)o=(c=t[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],e[l]=u*o+a*s;return e}}},{}],926:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3,n*=3;var h=i*i,d=h*i,p=1-i,m=p*p,g=m*p,v=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),M=3*(b-v),k=3*v;for(f=0;f<t.length;f++)o=_*(u=t[f])[n][r]+w*u[n+1][r]+M*u[n+2][r]+k*u[n+3][r],s=_*u[n][r+1]+w*u[n+1][r+1]+M*u[n+2][r+1]+k*u[n+3][r+1],l=_*u[n][r+2]+w*u[n+1][r+2]+M*u[n+2][r+2]+k*u[n+3][r+2],c=_*u[n][r+3]+w*u[n+1][r+3]+M*u[n+2][r+3]+k*u[n+3][r+3],e[f]=g*o+3*(m*i*s+p*h*l)+d*c;return e}:e?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3;var h=a*a,d=h*a,p=1-a,m=p*p,g=m*p;for(u=0;u<t.length;u++)o=(f=t[u])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],c=f[n+1][r+3]-f[n][r+3],e[u]=g*o+3*(m*a*s+p*h*l)+d*c;return e}:r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c;n*=3;var u=1-i,f=a*a,h=1-a,d=h*h,p=h*a*2,m=-3*d,g=3*(d-p),v=3*(p-f),y=3*f;for(l=0;l<t.length;l++)o=m*(c=t[l])[n][r]+g*c[n+1][r]+v*c[n+2][r]+y*c[n+3][r],s=m*c[n][r+1]+g*c[n+1][r+1]+v*c[n+2][r+1]+y*c[n+3][r+1],e[l]=u*o+i*s;return e}:function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u=1-i;for(l=0;l<t.length;l++)o=(c=t[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],e[l]=u*o+i*s;return e}}},{}],927:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));h*=3,d*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,_=m*m,w=_*m,M=1-m,k=M*M,A=k*M;for(f=0;f<t.length;f++)i=b*(u=t[f])[d][h]+3*(x*p*u[d][h+1]+y*g*u[d][h+2])+v*u[d][h+3],s=b*u[d+1][h]+3*(x*p*u[d+1][h+1]+y*g*u[d+1][h+2])+v*u[d+1][h+3],l=b*u[d+2][h]+3*(x*p*u[d+2][h+1]+y*g*u[d+2][h+2])+v*u[d+2][h+3],c=b*u[d+3][h]+3*(x*p*u[d+3][h+1]+y*g*u[d+3][h+2])+v*u[d+3][h+3],e[f]=A*i+3*(k*m*s+M*_*l)+w*c;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));h*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,_=1-m;for(u=0;u<t.length;u++)i=_*(f=t[u])[d][h]+m*f[d+1][h],s=_*f[d][h+1]+m*f[d+1][h+1],l=_*f[d][h+2]+m*f[d+1][h+1],c=_*f[d][h+3]+m*f[d+1][h+1],e[u]=b*i+3*(x*p*s+y*g*l)+v*c;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));d*=3;var g=m*m,v=g*m,y=1-m,x=y*y,b=x*y,_=1-p;for(u=0;u<t.length;u++)i=_*(f=t[u])[d][h]+p*f[d][h+1],s=_*f[d+1][h]+p*f[d+1][h+1],l=_*f[d+2][h]+p*f[d+2][h+1],c=_*f[d+3][h]+p*f[d+3][h+1],e[u]=b*i+3*(x*m*s+y*g*l)+v*c;return e}:function(e,r,n){e||(e=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-u)),d=Math.max(0,Math.min(1,n-f)),p=1-d,m=1-h;for(l=0;l<t.length;l++)i=m*(c=t[l])[f][u]+h*c[f][u+1],s=m*c[f+1][u]+h*c[f+1][u+1],e[l]=p*i+d*s;return e}}},{}],928:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./xy_defaults\"),a=t(\"./ab_defaults\"),o=t(\"./set_convert\"),s=t(\"./attributes\"),l=t(\"../../components/color/attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,s,r,i)}e._clipPathId=\"clip\"+e.uid+\"carpet\";var f=u(\"color\",l.defaultLine);if(n.coerceFont(u,\"font\"),u(\"carpet\"),a(t,e,c,u,f),e.a&&e.b){e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0);var h=i(t,e,u);o(e),e._cheater&&u(\"cheaterslope\"),h||(e.visible=!1)}else e.visible=!1}},{\"../../components/color/attributes\":617,\"../../lib\":743,\"./ab_defaults\":911,\"./attributes\":913,\"./set_convert\":937,\"./xy_defaults\":939}],929:[function(t,e,r){\"use strict\";e.exports=function(t){return Array.isArray(t[0])}},{}],930:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.plot=t(\"./plot\"),n.calc=t(\"./calc\"),n.animatable=!0,n.moduleType=\"trace\",n.name=\"carpet\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"carpet\",\"carpetAxis\",\"notLegendIsolatable\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":913,\"./calc\":917,\"./defaults\":928,\"./plot\":936}],931:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&(\"carpet\"===a.type&&(r||(r=a),a.carpet===e.carpet)))return a}return r}},{}],932:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(0===t.length)return\"\";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+\",\"+e[n]),r&&n<t.length-a&&(i.push(\"C\"),i.push([t[n+1]+\",\"+e[n+1],t[n+2]+\",\"+e[n+2]+\" \"].join(\" \")));return i.join(r?\"\":\"L\")}},{}],933:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n;for(Array.isArray(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],n=0;n<e.length;n++)t[n]=r(e[n]);return t}},{}],934:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n,i;for(Array.isArray(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],n=0;n<e.length;n++)for(Array.isArray(t[n])?t[n].length>e.length&&(t[n]=t[n].slice(0,e.length)):t[n]=[],i=0;i<e[0].length;i++)t[n][i]=r(e[n][i]);return t}},{}],935:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,c=1;if(a){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/u/f;c=Math.max(0,h)}var d=180*Math.atan2(s,o)/Math.PI;return d<-90?(d+=180,l=-l):d>90&&(d-=180,l=-l),{angle:d,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],936:[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],l=r[0].trace,c=e.xaxis,d=e.yaxis,m=l.aaxis,g=l.baxis,v=t._fullLayout,y=e.plot.selectAll(\".carpetlayer\"),x=v._clips,b=n(y,\"g\",\"carpet\"+l.uid).classed(\"trace\",!0),_=n(b,\"g\",\"minorlayer\"),w=n(b,\"g\",\"majorlayer\"),M=n(b,\"g\",\"boundarylayer\"),k=n(b,\"g\",\"labellayer\");b.style(\"opacity\",l.opacity),a(c,d,w,m,\"a\",m._gridlines),a(c,d,w,g,\"b\",g._gridlines),a(c,d,_,m,\"a\",m._minorgridlines),a(c,d,_,g,\"b\",g._minorgridlines),a(c,d,M,m,\"a-boundary\",m._boundarylines),a(c,d,M,g,\"b-boundary\",g._boundarylines);!function(t,e,r,n,i,a,o,l){var c,u,f,d;c=.5*(r.a[0]+r.a[r.a.length-1]),u=r.b[0],f=r.ab2xy(c,u,!0),d=r.dxyda_rough(c,u),void 0===o.angle&&p.extendFlat(o,h(r,i,a,f,r.dxydb_rough(c,u)));s(t,e,r,n,f,d,r.aaxis,i,a,o,\"a-title\"),c=r.a[0],u=.5*(r.b[0]+r.b[r.b.length-1]),f=r.ab2xy(c,u,!0),d=r.dxydb_rough(c,u),void 0===l.angle&&p.extendFlat(l,h(r,i,a,f,r.dxyda_rough(c,u)));s(t,e,r,n,f,d,r.baxis,i,a,l,\"b-title\")}(t,k,l,i,c,d,o(t,c,d,l,i,k,m._labels,\"a-label\"),o(t,c,d,l,i,k,g._labels,\"b-label\")),function(t,e,r,i,a){var o,s,l,c,h=r.select(\"#\"+t._clipPathId);h.size()||(h=r.append(\"clipPath\").classed(\"carpetclip\",!0));var d=n(h,\"path\",\"carpetboundary\"),p=e.clipsegments,m=[];for(c=0;c<p.length;c++)o=p[c],s=u([],o.x,i.c2p),l=u([],o.y,a.c2p),m.push(f(s,l,o.bicubic));var g=\"M\"+m.join(\"L\")+\"Z\";h.attr(\"id\",t._clipPathId),d.attr(\"d\",g)}(l,i,x,c,d)}function a(t,e,r,n,i,a){var o=\"const-\"+i+\"-lines\",s=r.selectAll(\".\"+o).data(a);s.enter().append(\"path\").classed(o,!0).style(\"vector-effect\",\"non-scaling-stroke\"),s.each(function(r){var n=r,i=n.x,a=n.y,o=u([],i,t.c2p),s=u([],a,e.c2p),c=\"M\"+f(o,s,n.smoothing);l.select(this).attr(\"d\",c).style(\"stroke-width\",n.width).style(\"stroke\",n.color).style(\"fill\",\"none\")}),s.exit().remove()}function o(t,e,r,n,i,a,o,s){var u=a.selectAll(\"text.\"+s).data(o);u.enter().append(\"text\").classed(s,!0);var f=0,p={};return u.each(function(i,a){var o;if(\"auto\"===i.axis.tickangle)o=h(n,e,r,i.xy,i.dxy);else{var s=(i.axis.tickangle+180)*Math.PI/180;o=h(n,e,r,i.xy,[Math.cos(s),Math.sin(s)])}a||(p={angle:o.angle,flip:o.flip});var u=(i.endAnchor?-1:1)*o.flip,m=l.select(this).attr({\"text-anchor\":u>0?\"start\":\"end\",\"data-notex\":1}).call(c.font,i.font).text(i.text).call(d.convertToTspans,t),g=c.bBox(this);m.attr(\"transform\",\"translate(\"+o.p[0]+\",\"+o.p[1]+\") rotate(\"+o.angle+\")translate(\"+i.axis.labelpadding*u+\",\"+.3*g.height+\")\"),f=Math.max(f,g.width+i.axis.labelpadding)}),u.exit().remove(),p.maxExtent=f,p}function s(t,e,r,n,i,a,o,s,u,f,p){var m=[];o.title&&m.push(o.title);var y=e.selectAll(\"text.\"+p).data(m),x=f.maxExtent;y.enter().append(\"text\").classed(p,!0),y.each(function(){var e=h(r,s,u,i,a);-1===[\"start\",\"both\"].indexOf(o.showticklabels)&&(x=0);var n=o.titlefont.size;x+=n+o.titleoffset;var p=(f.angle+(f.flip<0?180:0)-e.angle+450)%360,m=p>90&&p<270,y=l.select(this);y.text(o.title||\"\").call(d.convertToTspans,t),m&&(x=(-d.lineCount(y)+v)*g*n-x),y.attr(\"transform\",\"translate(\"+e.p[0]+\",\"+e.p[1]+\") rotate(\"+e.angle+\") translate(0,\"+x+\")\").classed(\"user-select-none\",!0).attr(\"text-anchor\",\"middle\").call(c.font,o.titlefont)}),y.exit().remove()}var l=t(\"d3\"),c=t(\"../../components/drawing\"),u=t(\"./map_1d_array\"),f=t(\"./makepath\"),h=t(\"./orient_text\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib\"),m=t(\"../../constants/alignment\");e.exports=function(t,e,r){for(var n=0;n<r.length;n++)i(t,e,r[n])};var g=m.LINE_SPACING,v=(1-m.MID_SHIFT)/g+1},{\"../../components/drawing\":643,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"./makepath\":932,\"./map_1d_array\":933,\"./orient_text\":935,d3:128}],937:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/search\").findBin,a=t(\"./compute_control_points\"),o=t(\"./create_spline_evaluator\"),s=t(\"./create_i_derivative_evaluator\"),l=t(\"./create_j_derivative_evaluator\");e.exports=function(t){var e=t.a,r=t.b,c=t.a.length,u=t.b.length,f=t.aaxis,h=t.baxis,d=e[0],p=e[c-1],m=r[0],g=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;d-=x,p+=x,m-=b,g+=b,t.isVisible=function(t,e){return t>d&&t<p&&e>m&&e<g},t.isOccluded=function(t,e){return t<d||t>p||e<m||e>g},f.c2p=function(t){return t},h.c2p=function(t){return t},t.setScale=function(){var e=t.x,r=t.y,n=a(t.xctrl,t.yctrl,e,r,f.smoothing,h.smoothing);t.xctrl=n[0],t.yctrl=n[1],t.evalxy=o([t.xctrl,t.yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t.xctrl,t.yctrl],f.smoothing,h.smoothing),t.dxydj=l([t.xctrl,t.yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-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]),c-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),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-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&&(n<e[0]||n>e[c-1]|i<r[0]||i>r[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,d,p,m=0,g=0,v=[];n<e[0]?(f=0,h=0,m=(n-e[0])/(e[1]-e[0])):n>e[c-1]?(f=c-2,h=1,m=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),i<r[0]?(d=0,p=0,g=(i-r[0])/(r[1]-r[0])):i>r[u-1]?(d=u-2,p=1,g=(i-r[u-1])/(r[u-1]-r[u-2])):p=s-(d=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(t.dxydi(v,f,d,h,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(t.dxydj(v,f,d,h,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\":761,\"./compute_control_points\":923,\"./constants\":924,\"./create_i_derivative_evaluator\":925,\"./create_j_derivative_evaluator\":926,\"./create_spline_evaluator\":927}],938:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){function i(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e<u-1&&void 0!==(n=t[r][e+1])&&(a++,i+=n),r>0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r<f-1&&void 0!==(n=t[r+1][e])&&(a++,i+=n),i/Math.max(1,a)}var a,o,s,l=[],c=[],u=t[0].length,f=t.length,h=0;for(a=0;a<u;a++)for(o=0;o<f;o++)void 0===t[o][a]&&(l.push(a),c.push(o),t[o][a]=i(a,o)),h=Math.max(h,Math.abs(t[o][a]));if(!l.length)return t;var d,p,m,g,v,y,x,b,_,w,M,k=0,A=0,T=l.length;do{for(k=0,s=0;s<T;s++){a=l[s],o=c[s];var S,E,L,C,z,D,I=0,P=0;0===a?(L=e[z=Math.min(u-1,2)],C=e[1],S=t[o][z],P+=(E=t[o][1])+(E-S)*(e[0]-C)/(C-L),I++):a===u-1&&(L=e[z=Math.max(0,u-3)],C=e[u-2],S=t[o][z],P+=(E=t[o][u-2])+(E-S)*(e[u-1]-C)/(C-L),I++),(0===a||a===u-1)&&o>0&&o<f-1&&(d=r[o+1]-r[o],P+=((p=r[o]-r[o-1])*t[o+1][a]+d*t[o-1][a])/(p+d),I++),0===o?(L=r[D=Math.min(f-1,2)],C=r[1],S=t[D][a],P+=(E=t[1][a])+(E-S)*(r[0]-C)/(C-L),I++):o===f-1&&(L=r[D=Math.max(0,f-3)],C=r[f-2],S=t[D][a],P+=(E=t[f-2][a])+(E-S)*(r[f-1]-C)/(C-L),I++),(0===o||o===f-1)&&a>0&&a<u-1&&(d=e[a+1]-e[a],P+=((p=e[a]-e[a-1])*t[o][a+1]+d*t[o][a-1])/(p+d),I++),I?P/=I:(m=e[a+1]-e[a],g=e[a]-e[a-1],b=(v=r[o+1]-r[o])*(y=r[o]-r[o-1])*(v+y),P=((x=m*g*(m+g))*(y*t[o+1][a]+v*t[o-1][a])+b*(g*t[o][a+1]+m*t[o][a-1]))/(b*(g+m)+x*(y+v))),k+=(w=(_=P-t[o][a])/h)*w,M=I?0:.85,t[o][a]+=_*(1+M)}k=Math.sqrt(k)}while(A++<100&&k>1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":743}],939:[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\":981,\"./has_columns\":929}],940:[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\"),l=s.extendFlat,c=s.extendDeepAll,u=n.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:n.locationmode,z:{valType:\"data_array\",editType:\"calc\"},text:l({},n.text,{}),marker:{line:{color:u.color,width:l({},u.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:n.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:n.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]})},c({},i,{zmax:{editType:\"calc\"},zmin:{editType:\"calc\"}}),{colorbar:a})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scattergeo/attributes\":1104}],941:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../components/colorscale/calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\");e.exports=function(t,e){for(var r=e.locations.length,l=new Array(r),c=0;c<r;c++){var u=l[c]={},f=e.locations[c],h=e.z[c];u.loc=\"string\"==typeof f?f:null,u.z=n(h)?h:i}return o(l,e),a(e,e.z,\"\",\"z\"),s(l,e),l}},{\"../../components/colorscale/calc\":625,\"../../constants/numerical\":721,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc_selection\":1068,\"fast-isnumeric\":140}],942:[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,c=s(\"locations\");if(c&&(l=c.length),c&&l){var u=s(\"z\");Array.isArray(u)?(u.length>l&&(e.z=u.slice(0,l)),s(\"locationmode\"),s(\"text\"),s(\"marker.line.color\"),s(\"marker.line.width\"),s(\"marker.opacity\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"./attributes\":940}],943:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],944:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./attributes\"),a=t(\"../scatter/fill_hover_text\");e.exports=function(t,e,r){var o,s,l,c,u=t.cd,f=u[0].trace,h=t.subplot;for(s=0;s<u.length;s++)if(o=u[s],c=!1,o._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains([e,r])&&(c=!c),o._polygons[l].contains([e+360,r])&&(c=!c);if(c)break}if(c&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,function(t,e,r,o){var s=r.hi||e.hoverinfo,l=\"all\"===s?i.hoverinfo.flags:s.split(\"+\"),c=-1!==l.indexOf(\"name\"),u=-1!==l.indexOf(\"location\"),f=-1!==l.indexOf(\"z\"),h=-1!==l.indexOf(\"text\"),d=[];!c&&u?t.nameOverride=r.loc:(c&&(t.nameOverride=e.name),u&&d.push(r.loc)),f&&d.push(function(t){return n.tickText(o,o.c2l(t),\"hover\").text}(r.z)),h&&a(r,e,d),t.extraText=d.join(\"<br>\")}(t,f,o,h.mockAxis),[t]}},{\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074,\"./attributes\":940}],945:[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.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"choropleth\",n.basePlotModule=t(\"../../plots/geo\"),n.categories=[\"geo\",\"noOpacity\"],n.meta={},e.exports=n},{\"../../plots/geo\":820,\"../heatmap/colorbar\":980,\"./attributes\":940,\"./calc\":941,\"./defaults\":942,\"./event_data\":943,\"./hover\":944,\"./plot\":946,\"./select\":947,\"./style\":948}],946:[function(t,e,r){\"use strict\";function n(t,e){for(var r=t[0].trace,n=t.length,i=s(r,e),a=0;a<n;a++){var c=t[a],u=l(r.locationmode,c.loc,i);u?(c.geojson=u,c.ct=u.properties.ct,c.index=a,c._polygons=function(t){function e(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}var r,n,i,a,s=t.geometry,l=s.coordinates,c=t.id,u=[];r=\"RUS\"===c||\"FJI\"===c?function(t){var r;if(null===e(t))r=t;else for(r=new Array(t.length),a=0;a<t.length;a++)r[a]=[t[a][0]<0?t[a][0]+360:t[a][0],t[a][1]];u.push(o.tester(r))}:\"ATA\"===c?function(t){var r=e(t);if(null===r)return u.push(o.tester(t));var n=new Array(t.length+1),i=0;for(a=0;a<t.length;a++)a>r?n[i++]=[t[a][0]+360,t[a][1]]:a===r?(n[i++]=t[a],n[i++]=[t[a][0],-90]):n[i++]=t[a];var s=o.tester(n);s.pts.pop(),u.push(s)}:function(t){u.push(o.tester(t))};switch(s.type){case\"MultiPolygon\":for(n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)r(l[n][i]);break;case\"Polygon\":for(n=0;n<l.length;n++)r(l[n])}return u}(u)):c.geojson=null}}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../lib/polygon\"),s=t(\"../../lib/topojson_utils\").getTopojsonFeatures,l=t(\"../../lib/geo_location_utils\").locationToFeature,c=t(\"./style\");e.exports=function(t,e,r){for(var o=0;o<r.length;o++)n(r[o],e.topojson);var s=e.layers.backplot.select(\".choroplethlayer\").selectAll(\"g.trace.choropleth\").data(r,function(t){return t[0].trace.uid});s.enter().append(\"g\").attr(\"class\",\"trace choropleth\"),s.exit().remove(),s.each(function(e){var r=(e[0].node3=i.select(this)).selectAll(\"path.choroplethlocation\").data(a.identity);r.enter().append(\"path\").classed(\"choroplethlocation\",!0),r.exit().remove(),c(t,e)})}},{\"../../lib\":743,\"../../lib/geo_location_utils\":735,\"../../lib/polygon\":755,\"../../lib/topojson_utils\":769,\"./style\":948,d3:128}],947:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=c.c2p(i),e.contains([a,o])?(u.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return u}},{}],948:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\"),o=t(\"../../components/colorscale\");e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,s=e[0].node3.selectAll(\".choroplethlocation\"),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFunc(o.extractScale(r.colorscale,r.zmin,r.zmax));s.each(function(t){n.select(this).attr(\"fill\",u(t.z)).call(i.stroke,t.mlc||c.color).call(a.dashLine,\"\",t.mlw||c.width||0).style(\"opacity\",l.opacity)}),a.selectedPointStyle(s,r)}(0,e)}},{\"../../components/color\":618,\"../../components/colorscale\":633,\"../../components/drawing\":643,d3:128}],949:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../components/drawing/attributes\").dash,l=t(\"../../plots/font_attributes\"),c=t(\"../../lib/extend\").extendFlat,u=i.line;e.exports=c({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,connectgaps:n.connectgaps,autocontour:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"contours.start\":void 0,\"contours.end\":void 0,\"contours.size\":void 0}},ncontours:{valType:\"integer\",dflt:15,min:1,editType:\"calc\"},contours:{start:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},end:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},coloring:{valType:\"enumerated\",values:[\"fill\",\"heatmap\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:{valType:\"boolean\",dflt:!0,editType:\"plot\"},showlabels:{valType:\"boolean\",dflt:!1,editType:\"plot\"},labelfont:l({editType:\"plot\",colorEditType:\"style\"}),labelformat:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:c({},u.color,{editType:\"style+colorbars\"}),width:c({},u.width,{editType:\"style+colorbars\"}),dash:s,smoothing:c({},u.smoothing,{}),editType:\"plot\"}},a,{autocolorscale:c({},a.autocolorscale,{dflt:!1}),zmin:c({},a.zmin,{editType:\"calc\"}),zmax:c({},a.zmax,{editType:\"calc\"})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../heatmap/attributes\":977,\"../scatter/attributes\":1066}],950:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"linear\",range:[t,e]};return i.autoTicks(n,(e-t)/(r||15)),n}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\").extendFlat,o=t(\"../heatmap/calc\");e.exports=function(t,e){var r=o(t,e),s=e.contours;if(!1!==e.autocontour){var l=n(e.zmin,e.zmax,e.ncontours);s.size=l.dtick,s.start=i.tickFirst(l),l.range.reverse(),s.end=i.tickFirst(l),s.start===e.zmin&&(s.start+=s.size),s.end===e.zmax&&(s.end-=s.size),s.start>s.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 c=s.start,u=s.end,f=e._input.contours;if(c>u&&(s.start=f.start=u,u=s.end=f.end=c,c=s.start),!(s.size>0)){var h;h=c===u?1:n(c,u,e.ncontours).dtick,f.size=s.size=h}}return r}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../heatmap/calc\":978}],951:[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){var l=i(t,s);e[0].t.cb=l;var c=r.contours,u=r.line,f=c.size||1,h=c.coloring,d=a(r,{isColorbar:!0});\"heatmap\"===h&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor(\"fill\"===h||\"heatmap\"===h?d:\"\").line({color:\"lines\"===h?d:u.color,width:!1!==c.showlines?u.width:0,dash:u.dash}).levels({start:c.start,end:o(c),size:f}).options(r.colorbar)()}else n.autoMargin(t,s)}},{\"../../components/colorbar/draw\":622,\"../../plots/plots\":852,\"./end_plus\":955,\"./make_color_map\":959}],952:[function(t,e,r){\"use strict\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],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]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],953:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){var a=n.coerce2(t,e,i,\"contours.start\"),o=n.coerce2(t,e,i,\"contours.end\"),s=!1===a||!1===o,l=r(\"contours.size\");!(s?e.autocontour=!0:r(\"autocontour\",!1))&&l||r(\"ncontours\")}},{\"../../lib\":743,\"./attributes\":949}],954:[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,c){function u(r,i){return n.coerce(t,e,l,r,i)}a(t,e,u,c)?(u(\"text\"),u(\"connectgaps\",i(e)),o(t,e,u),s(t,e,u,c)):e.visible=!1}},{\"../../lib\":743,\"../heatmap/has_columns\":984,\"../heatmap/xyz_defaults\":993,\"./attributes\":949,\"./contours_defaults\":953,\"./style_defaults\":963}],955:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],956:[function(t,e,r){\"use strict\";function n(t,e,r,n){return Math.abs(t[0]-e[0])<r&&Math.abs(t[1]-e[1])<n}function i(t,e){var r=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+n*n)}function a(t,e,r,a,c){function u(t){return g[t%g.length]}var f,h=e.join(\",\"),d=h,p=t.crossings[d],m=function(t,e,r){var n=0,i=0;t>20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==l.BOTTOMSTART.indexOf(t)?i=1:-1!==l.LEFTSTART.indexOf(t)?n=1:-1!==l.TOPSTART.indexOf(t)?i=-1:n=-1;return[n,i]}(p,r,e),g=[o(t,e,[-m[0],-m[1]])],v=m.join(\",\"),y=t.z.length,x=t.z[0].length;for(f=0;f<1e4;f++){if(p>20?(p=l.CHOOSESADDLE[p][(m[0]||m[1])<0?0:1],t.crossings[d]=l.SADDLEREMAINDER[p]):delete t.crossings[d],!(m=l.NEWDELTA[p])){s.log(\"Found bad marching index:\",p,e,t.level);break}g.push(o(t,e,m)),e[0]+=m[0],e[1]+=m[1],n(g[g.length-1],g[g.length-2],a,c)&&g.pop(),d=e.join(\",\");var b=m[0]&&(e[0]<0||e[0]>x-2)||m[1]&&(e[1]<0||e[1]>y-2);if(d===h&&m.join(\",\")===v||r&&b)break;p=t.crossings[d]}1e4===f&&s.log(\"Infinite loop in contour?\");var _,w,M,k,A,T,S,E,L,C,z,D=n(g[0],g[g.length-1],a,c),I=0,P=.2*t.smoothing,O=[],F=0;for(f=1;f<g.length;f++)I+=S=i(g[f],g[f-1]),O.push(S);var R=I/O.length*P;for(f=g.length-2;f>=F;f--)if((_=O[f])<R){for(M=0,w=f-1;w>=F&&_+O[w]<R;w--)_+=O[w];if(D&&f===g.length-2)for(M=0;M<w&&_+O[M]<R;M++)_+=O[M];A=f-w+M+1,T=Math.floor((f+w+M+2)/2),k=D||f!==g.length-2?D||-1!==w?A%2?u(T):[(u(T)[0]+u(T+1)[0])/2,(u(T)[1]+u(T+1)[1])/2]:g[0]:g[g.length-1],g.splice(w+1,f-w+1,k),f=w+1,M&&(F=M),D&&(f===g.length-2?g[M]=g[g.length-1]:0===f&&(g[g.length-1]=g[0]))}for(g.splice(0,F),f=0;f<g.length;f++)g[f].length=2;if(!(g.length<2))if(D)g.pop(),t.paths.push(g);else{r||s.log(\"Unclosed interior contour?\",t.level,h,g.join(\"L\"));var N=!1;for(E=0;E<t.edgepaths.length;E++)if(C=t.edgepaths[E],!N&&n(C[0],g[g.length-1],a,c)){g.pop(),N=!0;var j=!1;for(L=0;L<t.edgepaths.length;L++)if(z=t.edgepaths[L],n(z[z.length-1],g[0],a,c)){j=!0,g.shift(),t.edgepaths.splice(E,1),L===E?t.paths.push(g.concat(z)):(L>E&&L--,t.edgepaths[L]=z.concat(g,C));break}j||(t.edgepaths[E]=g.concat(C))}for(E=0;E<t.edgepaths.length&&!N;E++)n((C=t.edgepaths[E])[C.length-1],g[0],a,c)&&(g.shift(),t.edgepaths[E]=C.concat(g),N=!0);N||t.edgepaths.push(g)}}function o(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),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-c)*t.y[i]+c*t.y[i+1],!0),n,i+c]}var s=t(\"../../lib\"),l=t(\"./constants\");e.exports=function(t,e,r){var n,i,o,l;for(e=e||.01,r=r||.01,i=0;i<t.length;i++){for(o=t[i],l=0;l<o.starts.length;l++)a(o,o.starts[l],\"edge\",e,r);for(n=0;Object.keys(o.crossings).length&&n<1e4;)n++,a(o,Object.keys(o.crossings)[0].split(\",\").map(Number),void 0,e,r);1e4===n&&s.log(\"Infinite loop in contour?\")}}},{\"../../lib\":743,\"./constants\":952}],957:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/hover\");e.exports=function(t,e,r,i,a){return n(t,e,r,i,a,!0)}},{\"../heatmap/hover\":985}],958:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.plot=t(\"./plot\").plot,n.style=t(\"./style\"),n.colorbar=t(\"./colorbar\"),n.hoverPoints=t(\"./hover\"),n.moduleType=\"trace\",n.name=\"contour\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"contour\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":949,\"./calc\":950,\"./colorbar\":951,\"./defaults\":954,\"./hover\":957,\"./plot\":961,\"./style\":962}],959:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/colorscale\"),a=t(\"./end_plus\");e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,c=\"lines\"===e.coloring?0:1;isFinite(s)||(s=1,l=1);var u,f,h=t.colorscale,d=h.length,p=new Array(d),m=new Array(d);if(\"heatmap\"===e.coloring){for(t.zauto&&!1===t.autocontour&&(t.zmin=r-s/2,t.zmax=t.zmin+l*s),f=0;f<d;f++)u=h[f],p[f]=u[0]*(t.zmax-t.zmin)+t.zmin,m[f]=u[1];var g=n.extent([t.zmin,t.zmax,e.start,e.start+s*(l-1)]),v=g[t.zmin<t.zmax?0:1],y=g[t.zmin<t.zmax?1:0];v!==t.zmin&&(p.splice(0,0,v),m.splice(0,0,Range[0])),y!==t.zmax&&(p.push(y),m.push(m[m.length-1]))}else for(f=0;f<d;f++)u=h[f],p[f]=(u[0]*(l+c-1)-c/2)*s+r,m[f]=u[1];return i.makeColorScaleFunc({domain:p,range:m},{noNumericCheck:!0})}},{\"../../components/colorscale\":633,\"./end_plus\":955,d3:128}],960:[function(t,e,r){\"use strict\";var n=t(\"./constants\");e.exports=function(t){var e,r,i,a,o,s,l,c,u,f=t[0].z,h=f.length,d=f[0].length,p=2===h||2===d;for(r=0;r<h-1;r++)for(a=[],0===r&&(a=a.concat(n.BOTTOMSTART)),r===h-2&&(a=a.concat(n.TOPSTART)),e=0;e<d-1;e++)for(i=a.slice(),0===e&&(i=i.concat(n.LEFTSTART)),e===d-2&&(i=i.concat(n.RIGHTSTART)),o=e+\",\"+r,s=[[f[r][e],f[r][e+1]],[f[r+1][e],f[r+1][e+1]]],u=0;u<t.length;u++)(l=function(t,e){var r=(e[0][0]>t?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}((c=t[u]).level,s))&&(c.crossings[o]=l,-1!==i.indexOf(l)&&(c.starts.push([e,r]),p&&-1!==i.indexOf(l,i.indexOf(l)+1)&&c.starts.push([e,r])))}},{\"./constants\":952}],961:[function(t,e,r){\"use strict\";function n(t,e,n){var l=n[0].trace,c=n[0].x,u=n[0].y,g=l.contours,v=l.uid,y=e.xaxis,x=e.yaxis,b=t._fullLayout,_=\"contour\"+v,w=function(t,e,r){for(var n=t.size,i=[],a=p(t),s=t.start;s<a;s+=n)if(i.push({level:s,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y,z:r.z,smoothing:r.trace.line.smoothing}),i.length>1e3){o.warn(\"Too many contours, clipping at 1000\",t);break}return i}(g,e,n[0]);if(!0!==l.visible)return b._paper.selectAll(\".\"+_+\",.hm\"+v).remove(),void b._infolayer.selectAll(\".cb\"+v).remove();\"heatmap\"===g.coloring?(l.zauto&&!1===l.autocontour&&(l._input.zmin=l.zmin=g.start-g.size/2,l._input.zmax=l.zmax=l.zmin+w.length*g.size),f(t,e,[n])):(b._paper.selectAll(\".hm\"+v).remove(),b._infolayer.selectAll(\"g.rangeslider-container\").selectAll(\".hm\"+v).remove()),h(w),d(w);var M=y.c2p(c[0],!0),k=y.c2p(c[c.length-1],!0),A=x.c2p(u[0],!0),T=x.c2p(u[u.length-1],!0),S=[[M,T],[k,T],[k,A],[M,A]],E=r.makeContourGroup(e,n,_);!function(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\")}(E,S,g),function(t,e,r,n){var o=t.selectAll(\"g.contourfill\").data([0]);o.enter().append(\"g\").classed(\"contourfill\",!0);var s=o.selectAll(\"path\").data(\"fill\"===n.coloring?e:[]);s.enter().append(\"path\"),s.exit().remove(),s.each(function(t){var e=i(t,r);e?a.select(this).attr(\"d\",e).style(\"stroke\",\"none\"):a.select(this).remove()})}(E,w,S,g),function(t,e,n,i,l,c){var u=t.selectAll(\"g.contourlines\").data([0]);u.enter().append(\"g\").classed(\"contourlines\",!0);var f=!1!==l.showlines,h=l.showlabels,d=f&&h,p=r.createLines(u,f||h,e),g=r.createLineClip(u,d,n._fullLayout._clips,i.trace.uid),v=t.selectAll(\"g.contourlabels\").data(h?[0]:[]);if(v.exit().remove(),v.enter().append(\"g\").classed(\"contourlabels\",!0),h){var y=[c],x=[];o.clearLocationCache();var b=r.labelFormatter(l,i.t.cb,n._fullLayout),_=s.tester.append(\"text\").attr(\"data-notex\",1).call(s.font,l.labelfont),w=e[0].xaxis._length,M=e[0].yaxis._length,k={left:Math.max(c[0][0],0),right:Math.min(c[2][0],w),top:Math.max(c[0][1],0),bottom:Math.min(c[2][1],M)};k.middle=(k.top+k.bottom)/2,k.center=(k.left+k.right)/2;var A=Math.sqrt(w*w+M*M),T=m.LABELDISTANCE*A/Math.max(1,e.length/m.LABELINCREASE);p.each(function(t){var e=r.calcTextOpts(t.level,b,_,n);a.select(this).selectAll(\"path\").each(function(){var t=o.getVisibleSegment(this,k,e.height/2);if(t&&!(t.len<(e.width+e.height)*m.LABELMIN))for(var n=Math.min(Math.ceil(t.len/T),m.LABELMAX),i=0;i<n;i++){var a=r.findBestTextLocation(this,t,e,x,k);if(!a)break;r.addLabelData(a,e,x,y)}})}),_.remove(),r.drawLabels(v,x,n,g,d?y:null)}h&&!f&&p.remove()}(E,w,t,n[0],g,S),function(t,e,r,n,a){var o=\"clip\"+n.trace.uid,l=r.selectAll(\"#\"+o).data(n.trace.connectgaps?[]:[0]);if(l.enter().append(\"clipPath\").classed(\"contourclip\",!0).attr(\"id\",o),l.exit().remove(),!1===n.trace.connectgaps){var c={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:function(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e<o;e++)s.push(1);for(e=0;e<a;e++)i.push(s.slice());for(e=0;e<n.length;e++)r=n[e],i[r[0]][r[1]]=0;return t.zmask=i,i}(n),smoothing:0};h([c]),d([c]);var u=i(c,a),f=l.selectAll(\"path\").data([0]);f.enter().append(\"path\"),f.attr(\"d\",u)}else o=null;t.call(s.setClipUrl,o),e.plot.selectAll(\".hm\"+n.trace.uid).call(s.setClipUrl,o)}(E,e,b._clips,n[0],S)}function i(t,e){function r(t){return Math.abs(t[1]-e[0][1])<.01}function n(t){return Math.abs(t[1]-e[2][1])<.01}function i(t){return Math.abs(t[0]-e[0][0])<.01}function a(t){return Math.abs(t[0]-e[2][0])<.01}for(var l,c,u,f,h,d,p=Math.min(t.z[0][0],t.z[0][1]),m=t.edgepaths.length||p<=t.level?\"\":\"M\"+e.join(\"L\")+\"Z\",g=0,v=t.edgepaths.map(function(t,e){return e}),y=!0;v.length;){for(d=s.smoothopen(t.edgepaths[g],t.smoothing),m+=y?d:d.replace(/^M/,\"L\"),v.splice(v.indexOf(g),1),l=t.edgepaths[g][t.edgepaths[g].length-1],f=-1,u=0;u<4;u++){if(!l){o.log(\"Missing end?\",g,t);break}for(r(l)&&!a(l)?c=e[1]:i(l)?c=e[0]:n(l)?c=e[3]:a(l)&&(c=e[2]),h=0;h<t.edgepaths.length;h++){var x=t.edgepaths[h][0];Math.abs(l[0]-c[0])<.01?Math.abs(l[0]-x[0])<.01&&(x[1]-l[1])*(c[1]-x[1])>=0&&(c=x,f=h):Math.abs(l[1]-c[1])<.01?Math.abs(l[1]-x[1])<.01&&(x[0]-l[0])*(c[0]-x[0])>=0&&(c=x,f=h):o.log(\"endpt to newendpt is not vert. or horz.\",l,c,x)}if(l=c,f>=0)break;m+=\"L\"+c}if(f===t.edgepaths.length){o.log(\"unclosed perimeter path\");break}g=f,(y=-1===v.indexOf(g))&&(g=v[0],m+=\"Z\")}for(g=0;g<t.paths.length;g++)m+=s.smoothclosed(t.paths[g],t.smoothing);return m}var a=t(\"d3\"),o=t(\"../../lib\"),s=t(\"../../components/drawing\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plots/cartesian/axes\"),u=t(\"../../plots/cartesian/set_convert\"),f=t(\"../heatmap/plot\"),h=t(\"./make_crossings\"),d=t(\"./find_all_paths\"),p=t(\"./end_plus\"),m=t(\"./constants\"),g=m.LABELOPTIMIZER;r.plot=function(t,e,r){for(var i=0;i<r.length;i++)n(t,e,r[i])},r.makeContourGroup=function(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},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(\"g.contourlevel\").data(e?r:[]);if(i.exit().remove(),i.enter().append(\"g\").classed(\"contourlevel\",!0),e){var a=i.selectAll(\"path.openline\").data(function(t){return t.pedgepaths||t.edgepaths});a.exit().remove(),a.enter().append(\"path\").classed(\"openline\",!0),a.attr(\"d\",function(t){return s.smoothopen(t,n)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\");var o=i.selectAll(\"path.closedline\").data(function(t){return t.ppaths||t.paths});o.exit().remove(),o.enter().append(\"path\").classed(\"closedline\",!0),o.attr(\"d\",function(t){return s.smoothclosed(t,n)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\")}return i},r.createLineClip=function(t,e,r,n){var i=e?\"clipline\"+n:null,a=r.selectAll(\"#\"+i).data(e?[0]:[]);return a.exit().remove(),a.enter().append(\"clipPath\").classed(\"contourlineclip\",!0).attr(\"id\",i),s.setClipUrl(t,i),a},r.labelFormatter=function(t,e,r){if(t.labelformat)return r._d3locale.numberFormat(t.labelformat);var n;return e?n=e.axis:(n={type:\"linear\",_id:\"ycontour\",nticks:(t.end-t.start)/t.size,showexponent:\"all\",range:[t.start,t.end]},u(n,r),c.calcTicks(n),n._tmin=null,n._tmax=null),function(t){return c.tickText(n,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(l.convertToTspans,n);var a=s.bBox(r.node(),!0);return{text:i,width:a.width,height:a.height,level:t,dy:(a.top+a.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,i){var a,s,l,c,u,f=r.width;e.isClosed?(s=e.len/g.INITIALSEARCHPOINTS,a=e.min+s/2,l=e.max):(s=(e.len-f)/(g.INITIALSEARCHPOINTS+1),a=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,d=0;d<g.ITERATIONS;d++){for(var p=a;p<l;p+=s){var m=o.getTextLocation(t,e.total,p,f),v=function(t,e,r,n){var i=e.width/2,a=e.height/2,s=t.x,l=t.y,c=t.theta,u=Math.cos(c)*i,f=Math.sin(c)*i,h=(s>n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*a)),d=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*a);if(h<1||d<1)return 1/0;var p=g.EDGECOST*(1/(h-1)+1/(d-1));p+=g.ANGLECOST*c*c;for(var m=s-u,v=l-f,y=s+u,x=l+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,M=Math.sin(_.theta)*_.width/2,k=2*o.segmentDistance(m,v,y,x,_.x-w,_.y-M,_.x+w,_.y+M)/(e.height+_.height),A=_.level===e.level,T=A?g.SAMELEVELDISTANCE:1;if(k<=T)return 1/0;p+=g.NEIGHBORCOST*(A?g.SAMELEVELFACTOR:1)/(k-T)}return p}(m,r,n,i);v<h&&(h=v,u=m,c=p)}if(h>2*g.MAXCOST)break;d&&(s/=2),l=(a=c-s/2)+1.5*s}if(h<=g.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=i*u,h=a*c,d=i*c,p=-a*u,m=[[o-f-h,s-d-p],[o+f-h,s+d-p],[o+f+h,s+d+p],[o-f+h,s-d+p]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(m)},r.drawLabels=function(t,e,r,n,i){var o=t.selectAll(\"text\").data(e,function(t){return t.text+\",\"+t.x+\",\"+t.y+\",\"+t.theta});if(o.exit().remove(),o.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,n=t.y-Math.cos(t.theta)*t.dy;a.select(this).text(t.text).attr({x:e,y:n,transform:\"rotate(\"+180*t.theta/Math.PI+\" \"+e+\" \"+n+\")\"}).call(l.convertToTspans,r)}),i){for(var s=\"\",c=0;c<i.length;c++)s+=\"M\"+i[c].join(\"L\")+\"Z\";var u=n.selectAll(\"path\").data([0]);u.enter().append(\"path\"),u.attr(\"d\",s)}}},{\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/set_convert\":808,\"../heatmap/plot\":990,\"./constants\":952,\"./end_plus\":955,\"./find_all_paths\":956,\"./make_crossings\":960,d3:128}],962:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../heatmap/style\"),o=t(\"./make_color_map\");e.exports=function(t){var e=n.select(t).selectAll(\"g.contour\");e.style(\"opacity\",function(t){return t.trace.opacity}),e.each(function(t){var e=n.select(this),r=t.trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=\"constraint\"===a.type,f=!u&&\"lines\"===a.coloring,h=!u&&\"fill\"===a.coloring,d=f||h?o(r):null;e.selectAll(\"g.contourlevel\").each(function(t){n.select(this).selectAll(\"path\").call(i.lineGroupStyle,s.width,f?d(t.level):s.color,s.dash)});var p=a.labelfont;if(e.selectAll(\"g.contourlabels text\").each(function(t){i.font(n.select(this),{family:p.family,size:p.size,color:p.color||(f?d(t.level):s.color)})}),u)e.selectAll(\"g.contourfill path\").style(\"fill\",r.fillcolor);else if(h){var m;e.selectAll(\"g.contourfill path\").style(\"fill\",function(t){return void 0===m&&(m=t.level),d(t.level+.5*l)}),void 0===m&&(m=c),e.selectAll(\"g.contourbg path\").style(\"fill\",d(m-.5*l))}}),a(t)}},{\"../../components/drawing\":643,\"../heatmap/style\":991,\"./make_color_map\":959,d3:128}],963:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/defaults\"),i=t(\"../../lib\");e.exports=function(t,e,r,a,o){o||(o={});var s,l=r(\"contours.coloring\"),c=\"\";\"fill\"===l&&(s=r(\"contours.showlines\")),!1!==s&&(\"lines\"!==l&&(c=r(\"line.color\",o.defaultColor||\"#000\")),r(\"line.width\",void 0===o.defaultWidth?.5:o.defaultWidth),r(\"line.dash\")),r(\"line.smoothing\"),\"none\"!==l&&n(t,e,a,r,{prefix:\"\",cLetter:\"z\"});if(r(\"contours.showlabels\")){var u=a.font;i.coerceFont(r,\"contours.labelfont\",{family:u.family,size:u.size,color:c}),r(\"contours.labelformat\")}!1!==o.hasHover&&r(\"zhoverformat\")}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743}],964:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=i.contours,o=t(\"../scatter/attributes\"),s=t(\"../../components/colorscale/attributes\"),l=t(\"../../components/colorbar/attributes\"),c=t(\"../../lib/extend\").extendFlat,u=o.line,f=t(\"./constants\");e.exports=c({},{carpet:{valType:\"string\",editType:\"calc\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,transpose:n.transpose,atype:n.xtype,btype:n.ytype,mode:{valType:\"flaglist\",flags:[\"lines\",\"fill\"],extras:[\"none\"],editType:\"calc\"},connectgaps:n.connectgaps,fillcolor:{valType:\"color\",editType:\"calc\"},autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:{valType:\"enumerated\",values:[\"levels\",\"constraint\"],dflt:\"levels\",editType:\"calc\"},start:a.start,end:a.end,size:a.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:{valType:\"enumerated\",values:[].concat(f.INEQUALITY_OPS).concat(f.INTERVAL_OPS).concat(f.SET_OPS),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},editType:\"calc\"},line:{color:c({},u.color,{}),width:u.width,dash:u.dash,smoothing:c({},u.smoothing,{}),editType:\"plot\"}},s,{autocolorscale:c({},s.autocolorscale,{dflt:!1})},{colorbar:l})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../contour/attributes\":949,\"../heatmap/attributes\":977,\"../scatter/attributes\":1066,\"./constants\":967}],965:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"linear\",range:[t,e]};return i.autoTicks(n,(e-t)/(r||15)),n}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\").extendFlat,o=t(\"../../components/colorscale/calc\"),s=t(\"../heatmap/has_columns\"),l=t(\"../heatmap/convert_column_xyz\"),c=t(\"../heatmap/clean_2d_array\"),u=t(\"../heatmap/max_row_length\"),f=t(\"../heatmap/interp2d\"),h=t(\"../heatmap/find_empties\"),d=t(\"../heatmap/make_bound_array\"),p=t(\"./defaults\"),m=t(\"../carpet/lookup_carpetid\");e.exports=function(t,e){var r=e.carpetTrace=m(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var g=t.data[r.index],v=t.data[e.index];v.a||(v.a=g.a),v.b||(v.b=g.b),p(v,e,e._defaultColor,t._fullLayout)}var y=function(t,e){var r,n,i,a,p,m,g,v=e.carpetTrace,y=v.aaxis,x=v.baxis;y._minDtick=0,x._minDtick=0,s(e)&&l(e,y,x,\"a\",\"b\",[\"z\"]),r=e.a?y.makeCalcdata(e,\"a\"):[],a=e.b?x.makeCalcdata(e,\"b\"):[],n=e.a0||0,i=e.da||1,p=e.b0||0,m=e.db||1,g=c(e.z,e.transpose),e._emptypoints=h(g),e._interpz=f(g,e._emptypoints,e._interpz);var b=u(g),_=\"scaled\"===e.xtype?\"\":r,w=d(e,_,n,i,b,y),M=\"scaled\"===e.ytype?\"\":a,k={a:w,b:d(e,M,p,m,g.length,x),z:g};return\"levels\"===e.contours.type&&o(e,g,\"\",\"z\"),[k]}(0,e),x=e.contours;if(!0===e.autocontour){var b=n(e.zmin,e.zmax,e.ncontours);x.size=b.dtick,x.start=i.tickFirst(b),b.range.reverse(),x.end=i.tickFirst(b),x.start===e.zmin&&(x.start+=x.size),x.end===e.zmax&&(x.end-=x.size),x.start>x.end&&(x.start=x.end=(x.start+x.end)/2),e._input.contours=a({},x)}else{var _=x.start,w=x.end,M=e._input.contours;if(_>w&&(x.start=M.start=w,w=x.end=M.end=_,_=x.start),!(x.size>0)){var k;k=_===w?1:n(_,w,e.ncontours).dtick,M.size=x.size=k}}return y}}},{\"../../components/colorscale/calc\":625,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../carpet/lookup_carpetid\":931,\"../heatmap/clean_2d_array\":979,\"../heatmap/convert_column_xyz\":981,\"../heatmap/find_empties\":983,\"../heatmap/has_columns\":984,\"../heatmap/interp2d\":987,\"../heatmap/make_bound_array\":988,\"../heatmap/max_row_length\":989,\"./defaults\":971}],966:[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,c=n.z,u=-1/0,f=1/0;for(i=0;i<l;i++)f=Math.min(f,c[i][0]),f=Math.min(f,c[i][s-1]),u=Math.max(u,c[i][0]),u=Math.max(u,c[i][s-1]);for(i=1;i<s-1;i++)f=Math.min(f,c[0][i]),f=Math.min(f,c[l-1][i]),u=Math.max(u,c[0][i]),u=Math.max(u,c[l-1][i]);switch(e){case\">\":case\">=\":n.contours.value>u&&(t[0].prefixBoundary=!0);break;case\"<\":case\"<=\":n.contours.value<f&&(t[0].prefixBoundary=!0);break;case\"[]\":case\"()\":a=Math.min.apply(null,n.contours.value),(o=Math.max.apply(null,n.contours.value))<f&&(t[0].prefixBoundary=!0),a>u&&(t[0].prefixBoundary=!0);break;case\"][\":case\")(\":a=Math.min.apply(null,n.contours.value),o=Math.max.apply(null,n.contours.value),a<f&&o>u&&(t[0].prefixBoundary=!0)}}},{}],967:[function(t,e,r){\"use strict\";e.exports={INEQUALITY_OPS:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"]}},{}],968:[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-1!==o.INEQUALITY_OPS.indexOf(t)?n=r(i?e[0]:e):-1!==o.INTERVAL_OPS.indexOf(t)?n=i?[r(e[0]),r(e[1])]:[r(e),r(e)]:-1!==o.SET_OPS.indexOf(t)&&(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\":967,\"fast-isnumeric\":140}],969:[function(t,e,r){\"use strict\";var n=t(\"./constraint_mapping\"),i=t(\"fast-isnumeric\");e.exports=function(t,e){var r;-1===[\"=\",\"<\",\"<=\",\">\",\">=\"].indexOf(e.operation)?(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\":968,\"fast-isnumeric\":140}],970:[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<i.edgepaths.length;r++)i.edgepaths[r]=o(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=o(i.paths[r]);for(;a.edgepaths.length;)i.edgepaths.push(s(a.edgepaths.shift()));for(;a.paths.length;)i.paths.push(s(a.paths.shift()));t.pop();break;case\">=\":case\">\":if(1!==t.length)return void n.warn(\"Contour data invalid for the specified inequality operation.\");for(i=t[0],r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=o(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=o(i.paths[r])}}},{\"../../lib\":743}],971:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"./attributes\"),o=t(\"../contour/style_defaults\"),s=t(\"../scatter/fillcolor_defaults\"),l=t(\"../../plots/attributes\"),c=t(\"./constraint_value_defaults\"),u=t(\"../../components/color\").addOpacity;e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}if(h(\"carpet\"),t.a&&t.b){var d,p,m;if(!i(t,e,h,f,\"a\",\"b\"))return void(e.visible=!1);h(\"text\"),h(\"contours.type\");var g=e.contours;if(\"constraint\"===g.type){h(\"contours.operation\"),c(h,g),n.coerce(t,e,l,\"showlegend\",!0),h(\"contours.coloring\",\"=\"===g.operation?\"lines\":\"fill\"),h(\"contours.showlines\",!0),\"=\"===g.operation&&(g.coloring=\"lines\"),s(t,e,r,h);var v=e.fillcolor?u(e.fillcolor,1):r;o(t,e,h,f,{hasHover:!1,defaultColor:v,defaultWidth:2}),\"=\"===g.operation&&(h(\"line.color\",r),\"fill\"===g.coloring&&(g.coloring=\"lines\"),\"lines\"===g.coloring&&delete e.fillcolor),delete e.showscale,delete e.autocontour,delete e.autocolorscale,delete e.colorscale,delete e.ncontours,delete e.colorbar,e.line&&(delete e.line.autocolorscale,delete e.line.colorscale,delete e.line.mincolor,delete e.line.maxcolor)}else n.coerce(t,e,l,\"showlegend\",!1),p=n.coerce2(t,e,a,\"contours.start\"),m=n.coerce2(t,e,a,\"contours.end\"),d=h(\"contours.size\"),h(\"contours.coloring\"),!(!1===p||!1===m?e.autocontour=!0:h(\"autocontour\",!1))&&d||h(\"ncontours\"),o(t,e,h,f,{hasHover:!1}),delete e.value,delete e.operation}else e._defaultColor=r}},{\"../../components/color\":618,\"../../lib\":743,\"../../plots/attributes\":787,\"../contour/style_defaults\":963,\"../heatmap/xyz_defaults\":993,\"../scatter/fillcolor_defaults\":1075,\"./attributes\":964,\"./constraint_value_defaults\":969}],972:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){for(var i=t.size,a=[],o=r.trace.carpetTrace,s=t.start;s<t.end+i/10;s+=i)if(a.push({level:s,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:o.aaxis,yaxis:o.baxis,x:r.a,y:r.b,z:r.z,smoothing:r.trace.line.smoothing}),a.length>1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return a}},{\"../../lib\":743}],973:[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(\"../contour/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\":800,\"../contour/colorbar\":951,\"../contour/style\":962,\"./attributes\":964,\"./calc\":965,\"./defaults\":971,\"./plot\":976}],974:[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,c,u){function f(t){return Math.abs(t[1]-r[0][1])<S}function h(t){return Math.abs(t[1]-r[2][1])<S}function d(t){return Math.abs(t[0]-r[0][0])<T}function p(t){return Math.abs(t[0]-r[2][0])<T}function m(t,e){var r,n,a,o,m=\"\";for(f(t)&&!p(t)||h(t)&&!d(t)?(o=s.aaxis,a=i(s,l,[t[0],e[0]],.5*(t[1]+e[1]))):(o=s.baxis,a=i(s,l,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r<a.length;r++)for(m+=o.smoothing?\"C\":\"L\",n=0;n<a[r].length;n++){var g=a[r][n];m+=[c.c2p(g[0]),u.c2p(g[1])]+\" \"}return m}var g,v,y,x,b,_,w,M=\"\",k=e.edgepaths.map(function(t,e){return e}),A=!0,T=1e-4*Math.abs(r[0][0]-r[2][0]),S=1e-4*Math.abs(r[0][1]-r[2][1]);for(g=0,v=null;k.length;){var E=e.edgepaths[g][0];for(v&&(M+=m(v,E)),w=n.smoothopen(e.edgepaths[g].map(o),e.smoothing),M+=A?w:w.replace(/^M/,\"L\"),k.splice(k.indexOf(g),1),v=e.edgepaths[g][e.edgepaths[g].length-1],b=-1,x=0;x<4;x++){if(!v){a.log(\"Missing end?\",g,e);break}for(f(v)&&!p(v)?y=r[1]:d(v)?y=r[0]:h(v)?y=r[3]:p(v)&&(y=r[2]),_=0;_<e.edgepaths.length;_++){var L=e.edgepaths[_][0];Math.abs(v[0]-y[0])<T?Math.abs(v[0]-L[0])<T&&(L[1]-v[1])*(y[1]-L[1])>=0&&(y=L,b=_):Math.abs(v[1]-y[1])<S?Math.abs(v[1]-L[1])<S&&(L[0]-v[0])*(y[0]-L[0])>=0&&(y=L,b=_):a.log(\"endpt to newendpt is not vert. or horz.\",v,y,L)}if(b>=0)break;M+=m(v,y),v=y}if(b===e.edgepaths.length){a.log(\"unclosed perimeter path\");break}g=b,(A=-1===k.indexOf(g))&&(g=k[0],M+=m(v,y)+\"Z\",v=null)}for(g=0;g<e.paths.length;g++)M+=n.smoothclosed(e.paths[g].map(o),e.smoothing);return M}},{\"../../components/drawing\":643,\"../../lib\":743,\"../carpet/axis_aligned_line\":914}],975:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r<t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(u=a.edgepaths[n],l=[],i=0;i<u.length;i++)l[i]=e(u[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(u=a.paths[n],c=[],i=0;i<u.length;i++)c[i]=e(u[i]);s.push(c)}}}},{}],976:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t){var e=M.ab2xy(t[0],t[1],!0);return[L.c2p(e[0]),C.c2p(e[1])]}var w=r[0].trace,M=w.carpetTrace=b(t,w),k=t.calcdata[M.index][0];if(M.visible&&\"legendonly\"!==M.visible){var A=r[0].a,T=r[0].b,S=w.contours,E=w.uid,L=e.xaxis,C=e.yaxis,z=t._fullLayout,D=\"contour\"+E,I=y(S,e,r[0]),P=\"constraint\"===w.contours.type;if(!0===w.visible){var O=[[A[0],T[T.length-1]],[A[A.length-1],T[T.length-1]],[A[A.length-1],T[0]],[A[0],T[0]]];h(I);var F=1e-8*(A[A.length-1]-A[0]),R=1e-8*(T[T.length-1]-T[0]);d(I,F,R),\"constraint\"===w.contours.type&&(g(I,w.contours.operation),_(I,w.contours.operation,O,w)),x(I,n);var N,j,B,U,V=p.makeContourGroup(e,r,D),q=[];for(U=k.clipsegments.length-1;U>=0;U--)N=k.clipsegments[U],j=l([],N.x,L.c2p),B=l([],N.y,C.c2p),j.reverse(),B.reverse(),q.push(c(j,B,N.bicubic));var H=\"M\"+q.join(\"L\")+\"Z\";!function(t,e,r,n,i,a){var o,s,u,f,h=t.selectAll(\"g.contourbg\").data([0]);h.enter().append(\"g\").classed(\"contourbg\",!0);var d=h.selectAll(\"path\").data(\"fill\"!==a||i?[]:[0]);d.enter().append(\"path\"),d.exit().remove();var p=[];for(f=0;f<e.length;f++)o=e[f],s=l([],o.x,r.c2p),u=l([],o.y,n.c2p),p.push(c(s,u,o.bicubic));d.attr(\"d\",\"M\"+p.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}(V,k.clipsegments,L,C,P,S.coloring),function(t,e,r,n,i,a,o,l,c,u,f){var h=e.selectAll(\"g.contourfill\").data([0]);h.enter().append(\"g\").classed(\"contourfill\",!0);var d=h.selectAll(\"path\").data(\"fill\"===u?i:[]);d.enter().append(\"path\"),d.exit().remove(),d.each(function(e){var i=v(t,e,a,o,l,c,r,n);e.prefixBoundary&&(i=f+i),i?s.select(this).attr(\"d\",i).style(\"stroke\",\"none\"):s.select(this).remove()})}(w,V,L,C,I,O,n,M,k,S.coloring,H),function(t,e,r,n,l,c,h){var d=t.selectAll(\"g.contourlines\").data([0]);d.enter().append(\"g\").classed(\"contourlines\",!0);var g=!1!==l.showlines,v=l.showlabels,y=g&&v,x=p.createLines(d,g||v,e),b=p.createLineClip(d,y,r._fullLayout._defs,n.trace.uid),_=t.selectAll(\"g.contourlabels\").data(v?[0]:[]);if(_.exit().remove(),_.enter().append(\"g\").classed(\"contourlabels\",!0),v){var w=c.xaxis,M=c.yaxis,k=w._length,A=M._length,T=[[[0,0],[k,0],[k,A],[0,A]]],S=[];f.clearLocationCache();var E=p.labelFormatter(l,n.t.cb,r._fullLayout),L=u.tester.append(\"text\").attr(\"data-notex\",1).call(u.font,l.labelfont),C={left:0,right:k,center:k/2,top:0,bottom:A,middle:A/2},z=Math.sqrt(k*k+A*A),D=m.LABELDISTANCE*z/Math.max(1,e.length/m.LABELINCREASE);x.each(function(t){var e=p.calcTextOpts(t.level,E,L,r);s.select(this).selectAll(\"path\").each(function(r){var n=f.getVisibleSegment(this,C,e.height/2);if(n&&(function(t,e,r,n,s,l){function c(t,e){var r,n=0;return(Math.abs(t[0]-h)<.1||Math.abs(t[0]-d)<.1)&&(r=a(s.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,l*o(e,r)/2)),(Math.abs(t[1]-p)<.1||Math.abs(t[1]-m)<.1)&&(r=a(s.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,l*o(e,r)/2)),n}for(var u,f=0;f<r.pedgepaths.length;f++)e===r.pedgepaths[f]&&(u=r.edgepaths[f]);if(!u)return;var h=s.a[0],d=s.a[s.a.length-1],p=s.b[0],m=s.b[s.b.length-1];var g=i(t,0,1),v=i(t,n.total,n.total-1),y=c(u[0],g),x=n.total-c(u[u.length-1],v);n.min<y&&(n.min=y);n.max>x&&(n.max=x);n.len=n.max-n.min}(this,r,t,n,h,e.height),!(n.len<(e.width+e.height)*m.LABELMIN)))for(var s=Math.min(Math.ceil(n.len/D),m.LABELMAX),l=0;l<s;l++){var c=p.findBestTextLocation(this,n,e,S,C);if(!c)break;p.addLabelData(c,e,S,T)}})}),L.remove(),p.drawLabels(_,S,r,b,y?T:null)}v&&!g&&x.remove()}(V,I,t,r[0],S,e,M),u.setClipUrl(V,M._clipPathId)}else z._infolayer.selectAll(\".cb\"+E).remove()}}function i(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function a(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function o(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}var s=t(\"d3\"),l=t(\"../carpet/map_1d_array\"),c=t(\"../carpet/makepath\"),u=t(\"../../components/drawing\"),f=t(\"../../lib\"),h=t(\"../contour/make_crossings\"),d=t(\"../contour/find_all_paths\"),p=t(\"../contour/plot\"),m=t(\"../contour/constants\"),g=t(\"./convert_to_constraints\"),v=t(\"./join_all_paths\"),y=t(\"./empty_pathinfo\"),x=t(\"./map_pathinfo\"),b=t(\"../carpet/lookup_carpetid\"),_=t(\"./close_boundaries\");e.exports=function(t,e,r){for(var i=0;i<r.length;i++)n(t,e,r[i])}},{\"../../components/drawing\":643,\"../../lib\":743,\"../carpet/lookup_carpetid\":931,\"../carpet/makepath\":932,\"../carpet/map_1d_array\":933,\"../contour/constants\":952,\"../contour/find_all_paths\":956,\"../contour/make_crossings\":960,\"../contour/plot\":961,\"./close_boundaries\":966,\"./convert_to_constraints\":970,\"./empty_pathinfo\":972,\"./join_all_paths\":974,\"./map_pathinfo\":975,d3:128}],977:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../../lib/extend\").extendFlat;e.exports=o({},{z:{valType:\"data_array\",editType:\"calc\"},x:o({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:o({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:o({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:o({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:o({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:o({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},zhoverformat:{valType:\"string\",dflt:\"\",editType:\"none\"}},i,{autocolorscale:o({},i.autocolorscale,{dflt:!1})},{colorbar:a})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../scatter/attributes\":1066}],978:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../histogram2d/calc\"),s=t(\"../../components/colorscale/calc\"),l=t(\"./has_columns\"),c=t(\"./convert_column_xyz\"),u=t(\"./max_row_length\"),f=t(\"./clean_2d_array\"),h=t(\"./interp2d\"),d=t(\"./find_empties\"),p=t(\"./make_bound_array\");e.exports=function(t,e){function r(t){L=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: \"fast\": '+t)}var m,g,v,y,x,b,_,w,M,k=a.getFromId(t,e.xaxis||\"x\"),A=a.getFromId(t,e.yaxis||\"y\"),T=n.traceIs(e,\"contour\"),S=n.traceIs(e,\"histogram\"),E=n.traceIs(e,\"gl2d\"),L=T?\"best\":e.zsmooth;if(k._minDtick=0,A._minDtick=0,S?(m=(M=o(t,e)).x,g=M.x0,v=M.dx,y=M.y,x=M.y0,b=M.dy,_=M.z):(l(e)?(c(e,k,A,\"x\",\"y\",[\"z\"]),m=e.x,y=e.y):(m=e.x?k.makeCalcdata(e,\"x\"):[],y=e.y?A.makeCalcdata(e,\"y\"):[]),g=e.x0||0,v=e.dx||1,x=e.y0||0,b=e.dy||1,_=f(e.z,e.transpose),(T||e.connectgaps)&&(e._emptypoints=d(_),e._interpz=h(_,e._emptypoints,e._interpz))),\"fast\"===L)if(\"log\"===k.type||\"log\"===A.type)r(\"log axis found\");else if(!S){if(m.length){var C=(m[m.length-1]-m[0])/(m.length-1),z=Math.abs(C/100);for(w=0;w<m.length-1;w++)if(Math.abs(m[w+1]-m[w]-C)>z){r(\"x scale is not linear\");break}}if(y.length&&\"fast\"===L){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;w<y.length-1;w++)if(Math.abs(y[w+1]-y[w]-D)>I){r(\"y scale is not linear\");break}}}var P=u(_),O=\"scaled\"===e.xtype?\"\":m,F=p(e,O,g,v,P,k),R=\"scaled\"===e.ytype?\"\":y,N=p(e,R,x,b,_.length,A);E||(a.expand(k,F),a.expand(A,N));var j={x:F,y:N,z:_,text:e.text};if(O&&O.length===F.length-1&&(j.xCenter=O),R&&R.length===N.length-1&&(j.yCenter=R),S&&(j.xRanges=M.xRanges,j.yRanges=M.yRanges,j.pts=M.pts),s(e,_,\"\",\"z\"),T&&e.contours&&\"heatmap\"===e.contours.coloring){var B={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};j.xfill=p(B,O,g,v,P,k),j.yfill=p(B,R,x,b,_.length,A)}return[j]}},{\"../../components/colorscale/calc\":625,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../histogram2d/calc\":1010,\"./clean_2d_array\":979,\"./convert_column_xyz\":981,\"./find_empties\":983,\"./has_columns\":984,\"./interp2d\":987,\"./make_bound_array\":988,\"./max_row_length\":989}],979:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t,e){function r(t){if(n(t))return+t}var i,a,o,s,l,c;if(e){for(i=0,l=0;l<t.length;l++)i=Math.max(i,t[l].length);if(0===i)return!1;o=function(t){return t.length},s=function(t,e,r){return t[r][e]}}else i=t.length,o=function(t,e){return t[e].length},s=function(t,e,r){return t[e][r]};var u=new Array(i);for(l=0;l<i;l++)for(a=o(t,l),u[l]=new Array(a),c=0;c<a;c++)u[l][c]=r(s(t,l,c));return u}},{\"fast-isnumeric\":140}],980:[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=\"cb\"+r.uid,c=r.zmin,u=r.zmax;if(n(c)||(c=i.aggNums(Math.min,null,r.z)),n(u)||(u=i.aggNums(Math.max,null,r.z)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var f=e[0].t.cb=s(t,l),h=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});f.fillcolor(h).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],981:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,a,o,s){a=a||\"x\",o=o||\"y\",s=s||[\"z\"];var l,c,u,f=t[a].slice(),h=t[o].slice(),d=t.text,p=Math.min(f.length,h.length),m=void 0!==d&&!Array.isArray(d[0]),g=t[a+\"calendar\"],v=t[o+\"calendar\"];for(l=0;l<s.length;l++)(u=t[s[l]])&&(p=Math.min(p,u.length));for(p<f.length&&(f=f.slice(0,p)),p<h.length&&(h=h.slice(0,p)),l=0;l<p;l++)f[l]=e.d2c(f[l],0,g),h[l]=r.d2c(h[l],0,v);var y=n.distinctVals(f),x=y.vals,b=n.distinctVals(h),_=b.vals,w=[];for(l=0;l<s.length;l++)w[l]=n.init2dArray(_.length,x.length);var M,k,A;for(m&&(A=n.init2dArray(_.length,x.length)),l=0;l<p;l++)if(f[l]!==i&&h[l]!==i){for(M=n.findBin(f[l]+y.minDiff/2,x),k=n.findBin(h[l]+b.minDiff/2,_),c=0;c<s.length;c++)u=t[s[c]],w[c][k][M]=u[l];m&&(A[k][M]=d[l])}for(t[a]=x,t[o]=_,c=0;c<s.length;c++)t[s[c]]=w[c];m&&(t.text=A)}},{\"../../constants/numerical\":721,\"../../lib\":743}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./has_columns\"),a=t(\"./xyz_defaults\"),o=t(\"./style_defaults\"),s=t(\"../../components/colorscale/defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}a(t,e,u,c)?(u(\"text\"),o(t,e,u,c),u(\"connectgaps\",i(e)&&!1!==e.zsmooth),s(t,e,c,u,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"./attributes\":977,\"./has_columns\":984,\"./style_defaults\":992,\"./xyz_defaults\":993}],983:[function(t,e,r){\"use strict\";var n=t(\"./max_row_length\");e.exports=function(t){var e,r,i,a,o,s,l,c,u=[],f={},h=[],d=t[0],p=[],m=[0,0,0],g=n(t);for(r=0;r<t.length;r++)for(e=p,p=d,d=t[r+1]||[],i=0;i<g;i++)void 0===p[i]&&((s=(void 0!==p[i-1]?1:0)+(void 0!==p[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==d[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===p.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),u.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},c=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||m)[2]+(f[[r+1,i]]||m)[2]+(f[[r,i-1]]||m)[2]+(f[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw\"findEmpties iterated with no new neighbors\";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{\"./max_row_length\":989}],984:[function(t,e,r){\"use strict\";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],985:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=n.constants.MAXDIST;e.exports=function(t,e,r,s,l,c){if(!(t.distance<o)){var u,f,h,d,p=t.cd[0],m=p.trace,g=t.xa,v=t.ya,y=p.x,x=p.y,b=p.z,_=p.xCenter,w=p.yCenter,M=p.zmask,k=[m.zmin,m.zmax],A=m.zhoverformat,T=y,S=x;if(!1!==t.index){try{h=Math.round(t.index[1]),d=Math.round(t.index[0])}catch(e){return void i.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index)}if(h<0||h>=b[0].length||d<0||d>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1])>o||n.inbox(r-x[0],r-x[x.length-1])>o)return;if(c){var E;for(T=[2*y[0]-y[1]],E=1;E<y.length;E++)T.push((y[E]+y[E-1])/2);for(T.push([2*y[y.length-1]-y[y.length-2]]),S=[2*x[0]-x[1]],E=1;E<x.length;E++)S.push((x[E]+x[E-1])/2);S.push([2*x[x.length-1]-x[x.length-2]])}h=Math.max(0,Math.min(T.length-2,i.findBin(e,T))),d=Math.max(0,Math.min(S.length-2,i.findBin(r,S)))}var L=g.c2p(y[h]),C=g.c2p(y[h+1]),z=v.c2p(x[d]),D=v.c2p(x[d+1]);c?(C=L,u=y[h],D=z,f=x[d]):(u=_?_[h]:(y[h]+y[h+1])/2,f=w?w[d]:(x[d]+x[d+1])/2,m.zsmooth&&(L=C=g.c2p(u),z=D=v.c2p(f)));var I=b[d][h];M&&!M[d][h]&&(I=void 0);var P;Array.isArray(p.text)&&Array.isArray(p.text[d])&&(P=p.text[d][h]);var O,F={type:\"linear\",range:k,hoverformat:A,_separators:g._separators,_numFormat:g._numFormat};return O=a.tickText(F,I,\"hover\").text,[i.extendFlat(t,{index:[d,h],distance:o+10,x0:L,x1:C,y0:z,y1:D,xLabelVal:u,yLabelVal:f,zLabelVal:I,zLabel:O,text:P})]}}},{\"../../components/fx\":660,\"../../lib\":743,\"../../plots/cartesian/axes\":789}],986:[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.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.moduleType=\"trace\",n.name=\"heatmap\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":977,\"./calc\":978,\"./colorbar\":980,\"./defaults\":982,\"./hover\":985,\"./plot\":990,\"./style\":991}],987:[function(t,e,r){\"use strict\";function n(t){return.5-.25*Math.min(1,.5*t)}function i(t,e,r){var n,i,a,s,l,c,u,f,h,d,p,m,g,v=0;for(s=0;s<e.length;s++){for(i=(n=e[s])[0],a=n[1],p=t[i][a],d=0,h=0,l=0;l<4;l++)(u=t[i+(c=o[l])[0]])&&void 0!==(f=u[a+c[1]])&&(0===d?m=g=f:(m=Math.min(m,f),g=Math.max(g,f)),h++,d+=f);if(0===h)throw\"iterateInterp2d order is wrong: no defined neighbors\";t[i][a]=d/h,void 0===p?h<4&&(v=1):(t[i][a]=(1+r)*t[i][a]-r*p,g>m&&(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<e.length;o++)t[(s=e[o])[0]][s[1]]=r[s[0]][s[1]];else i(t,e);for(o=0;o<e.length&&!(e[o][2]<4);o++);for(e=e.slice(o),o=0;o<100&&l>.01;o++)l=i(t,e,n(l));return l>.01&&a.log(\"interp2d didn't converge quickly\",l),t}},{\"../../lib\":743}],988:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i,a,o){var s,l,c,u=[],f=n.traceIs(t,\"contour\"),h=n.traceIs(t,\"histogram\"),d=n.traceIs(t,\"gl2d\");if(Array.isArray(e)&&e.length>1&&!h&&\"category\"!==o.type){var p=e.length;if(!(p<=a))return f?e.slice(0,a):e.slice(0,a+1);if(f||d)u=e.slice(0,a);else if(1===a)u=[e[0]-.5,e[0]+.5];else{for(u=[1.5*e[0]-.5*e[1]],c=1;c<p;c++)u.push(.5*(e[c-1]+e[c]));u.push(1.5*e[p-1]-.5*e[p-2])}if(p<a){var m=u[u.length-1],g=m-u[u.length-2];for(c=p;c<a;c++)m+=g,u.push(m)}}else{l=i||1;var v=t[o._id.charAt(0)+\"calendar\"];for(s=h||\"category\"===o.type?o.r2c(r,0,v)||0:Array.isArray(e)&&1===e.length?e[0]:void 0===r?0:o.d2c(r,0,v),c=f||d?0:-.5;c<a;c++)u.push(s+l*c)}return u}},{\"../../registry\":873}],989:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,t[r].length);return e}},{}],990:[function(t,e,r){\"use strict\";function n(t,e){var r=e.length-2,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=e[n+1],o=l.constrain(n+(t-i)/(a-i)-.5,0,r),s=Math.round(o),c=Math.abs(o-s);return o&&o!==r&&c?{bin0:s,frac:c,bin1:Math.round(s+c/(o-s))}:{bin0:s,bin1:s,frac:0}}function i(t,e){var r=e.length-1,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a<=0?{bin0:n,bin1:n,frac:0}:a<.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function a(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}var o=t(\"tinycolor2\"),s=t(\"../../registry\"),l=t(\"../../lib\"),c=t(\"../../components/colorscale\"),u=t(\"../../constants/xmlns_namespaces\"),f=t(\"./max_row_length\");e.exports=function(t,e,r){for(var h=0;h<r.length;h++)!function(t,e,r){function h(t,e){if(void 0!==t){var r=Z(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),at+=e,ot+=r[0]*e,st+=r[1]*e,lt+=r[2]*e,r}return[0,0,0,0]}function d(t,e,r,n){var i=t[r.bin0];if(void 0===i)return h(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,h(i+r.frac*c+n.frac*(u+r.frac*a))}var p=r[0],m=p.trace,g=m.uid,v=e.xaxis,y=e.yaxis,x=t._fullLayout,b=\"hm\"+g;if(x._paper.selectAll(\".contour\"+g).remove(),x._infolayer.selectAll(\"g.rangeslider-container\").selectAll(\".contour\"+g).remove(),!0!==m.visible)return x._paper.selectAll(\".\"+b).remove(),void x._infolayer.selectAll(\".cb\"+g).remove();var _,w,M,k,A,T,S=p.z,E=p.x,L=p.y,C=p.xCenter,z=p.yCenter,D=s.traceIs(m,\"contour\"),I=D?\"best\":m.zsmooth,P=S.length,O=f(S),F=!1,R=!1;for(T=0;void 0===_&&T<E.length-1;)_=v.c2p(E[T]),T++;for(T=E.length-1;void 0===w&&T>0;)w=v.c2p(E[T]),T--;for(w<_&&(M=w,w=_,_=M,F=!0),T=0;void 0===k&&T<L.length-1;)k=y.c2p(L[T]),T++;for(T=L.length-1;void 0===A&&T>0;)A=y.c2p(L[T]),T--;if(A<k&&(M=k,k=A,A=M,R=!0),D&&(C=E,z=L,E=p.xfill,L=p.yfill),\"fast\"!==I){var N=\"best\"===I?0:.5;_=Math.max(-N*v._length,_),w=Math.min((1+N)*v._length,w),k=Math.max(-N*y._length,k),A=Math.min((1+N)*y._length,A)}var j=Math.round(w-_),B=Math.round(A-k),U=j<=0||B<=0,V=e.plot.select(\".imagelayer\").selectAll(\"g.hm.\"+b).data(U?[]:[0]);if(V.enter().append(\"g\").classed(\"hm\",!0).classed(b,!0),V.exit().remove(),!U){var q,H;\"fast\"===I?(q=O,H=P):(q=j,H=B);var G=document.createElement(\"canvas\");G.width=q,G.height=H;var Y,W,X=G.getContext(\"2d\"),Z=c.makeColorScaleFunc(c.extractScale(m.colorscale,m.zmin,m.zmax),{noNumericCheck:!0,returnArray:!0});\"fast\"===I?(Y=F?function(t){return O-1-t}:l.identity,W=R?function(t){return P-1-t}:l.identity):(Y=function(t){return l.constrain(Math.round(v.c2p(E[t])-_),0,j)},W=function(t){return l.constrain(Math.round(y.c2p(L[t])-k),0,B)});var J,K,Q,$,tt,et=W(0),rt=[et,et],nt=F?0:1,it=R?0:1,at=0,ot=0,st=0,lt=0;if(I){var ct,ut=0;try{ct=new Uint8Array(j*B*4)}catch(t){ct=new Array(j*B*4)}if(\"best\"===I){var ft,ht,dt,pt=C||E,mt=z||L,gt=new Array(pt.length),vt=new Array(mt.length),yt=new Array(j),xt=C?i:n,bt=z?i:n;for(T=0;T<pt.length;T++)gt[T]=Math.round(v.c2p(pt[T])-_);for(T=0;T<mt.length;T++)vt[T]=Math.round(y.c2p(mt[T])-k);for(T=0;T<j;T++)yt[T]=xt(T,gt);for(K=0;K<B;K++)for(ht=S[(ft=bt(K,vt)).bin0],dt=S[ft.bin1],T=0;T<j;T++,ut+=4)a(ct,ut,tt=d(ht,dt,yt[T],ft))}else for(K=0;K<P;K++)for($=S[K],rt=W(K),T=0;T<j;T++)tt=h($[T],1),a(ct,ut=4*(rt*j+Y(T)),tt);var _t=X.createImageData(j,B);try{_t.data.set(ct)}catch(t){var wt=_t.data,Mt=wt.length;for(K=0;K<Mt;K++)wt[K]=ct[K]}X.putImageData(_t,0,0)}else{var kt=m.xgap,At=m.ygap,Tt=Math.floor(kt/2),St=Math.floor(At/2);for(K=0;K<P;K++)if($=S[K],rt.reverse(),rt[it]=W(K+1),rt[0]!==rt[1]&&void 0!==rt[0]&&void 0!==rt[1])for(J=[Q=Y(0),Q],T=0;T<O;T++)J.reverse(),J[nt]=Y(T+1),J[0]!==J[1]&&void 0!==J[0]&&void 0!==J[1]&&(tt=h($[T],(J[1]-J[0])*(rt[1]-rt[0])),X.fillStyle=\"rgba(\"+tt.join(\",\")+\")\",X.fillRect(J[0]+Tt,rt[0]+St,J[1]-J[0]-kt,rt[1]-rt[0]-At))}ot=Math.round(ot/at),st=Math.round(st/at),lt=Math.round(lt/at);var Et=o(\"rgb(\"+ot+\",\"+st+\",\"+lt+\")\");t._hmpixcount=(t._hmpixcount||0)+at,t._hmlumcount=(t._hmlumcount||0)+at*Et.getLuminance();var Lt=V.selectAll(\"image\").data(r);Lt.enter().append(\"svg:image\").attr({xmlns:u.svg,preserveAspectRatio:\"none\"}),Lt.attr({height:B,width:j,x:_,y:k,\"xlink:href\":G.toDataURL(\"image/png\")}),Lt.exit().remove()}}(t,e,r[h])}},{\"../../components/colorscale\":633,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../registry\":873,\"./max_row_length\":989,tinycolor2:546}],991:[function(t,e,r){\"use strict\";var n=t(\"d3\");e.exports=function(t){n.select(t).selectAll(\".hm image\").style(\"opacity\",function(t){return t.trace.opacity})}},{d3:128}],992:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){!1===r(\"zsmooth\")&&(r(\"xgap\"),r(\"ygap\")),r(\"zhoverformat\")}},{}],993:[function(t,e,r){\"use strict\";function n(t,e){var r=e(t);return\"scaled\"===(r?e(t+\"type\",\"array\"):\"scaled\")&&(e(t+\"0\"),e(\"d\"+t)),r}var i=t(\"fast-isnumeric\"),a=t(\"../../registry\"),o=t(\"./has_columns\");e.exports=function(t,e,r,s,l,c){var u=r(\"z\");l=l||\"x\",c=c||\"y\";var f,h;if(void 0===u||!u.length)return 0;if(o(t)){if(f=r(l),h=r(c),!f||!h)return 0}else{if(f=n(l,r),h=n(c,r),!function(t){for(var e,r=!0,n=!1,a=!1,o=0;o<t.length;o++){if(e=t[o],!Array.isArray(e)){r=!1;break}e.length>0&&(n=!0);for(var s=0;s<e.length;s++)if(i(e[s])){a=!0;break}}return r&&n&&a}(u))return 0;r(\"transpose\")}return a.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[l,c],s),e.z.length}},{\"../../registry\":873,\"./has_columns\":984,\"fast-isnumeric\":140}],994:[function(t,e,r){\"use strict\";for(var n=t(\"../heatmap/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=[\"z\",\"x\",\"x0\",\"dx\",\"y\",\"y0\",\"dy\",\"text\",\"transpose\",\"xtype\",\"ytype\"],c={},u=0;u<l.length;u++){var f=l[u];c[f]=n[f]}o(c,i,{autocolorscale:o({},i.autocolorscale,{dflt:!1})},{colorbar:a}),e.exports=s(c,\"calc\",\"nested\")},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../heatmap/attributes\":977}],995:[function(t,e,r){\"use strict\";function n(t,e){this.scene=t,this.uid=e,this.type=\"heatmapgl\",this.name=\"\",this.hoverinfo=\"all\",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=i(t.glplot,this.options),this.heatmap._trace=this}var i=t(\"gl-heatmap2d\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib/str2rgbarray\"),s=n.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var i=n[0].length,s=n.length;this.options.shape=[i,s],this.options.x=r.x,this.options.y=r.y;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,a=new Array(i),s=new Array(4*i),l=0;l<i;l++){var c=e[l],u=o(c[1]);a[l]=r+c[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=u[f]}return{colorLevels:a,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options),a.expand(this.scene.xaxis,r.x),a.expand(this.scene.yaxis,r.y)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var i=new n(t,e.uid);return i.update(e,r),i}},{\"../../lib/str2rgbarray\":765,\"../../plots/cartesian/axes\":789,\"gl-heatmap2d\":173}],996:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"../heatmap/defaults\"),n.colorbar=t(\"../heatmap/colorbar\"),n.calc=t(\"../heatmap/calc\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"heatmapgl\",n.basePlotModule=t(\"../../plots/gl2d\"),n.categories=[\"gl\",\"gl2d\",\"2dMap\"],n.meta={},e.exports=n},{\"../../plots/gl2d\":829,\"../heatmap/calc\":978,\"../heatmap/colorbar\":980,\"../heatmap/defaults\":982,\"./attributes\":994,\"./convert\":995}],997:[function(t,e,r){\"use strict\";function n(t){var e={};e[\"autobin\"+t]=!1;var r={};return r[\"^autobin\"+t]=!1,{start:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},end:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},size:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},editType:\"calc\",impliedEdits:e}}var i=t(\"../bar/attributes\");e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:i.text,orientation:i.orientation,histfunc:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"min\",\"max\"],dflt:\"count\",editType:\"calc\"},histnorm:{valType:\"enumerated\",values:[\"\",\"percent\",\"probability\",\"density\",\"probability density\"],dflt:\"\",editType:\"calc\"},cumulative:{enabled:{valType:\"boolean\",dflt:!1,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"increasing\",\"decreasing\"],dflt:\"increasing\",editType:\"calc\"},currentbin:{valType:\"enumerated\",values:[\"include\",\"exclude\",\"half\"],dflt:\"include\",editType:\"calc\"},editType:\"calc\"},autobinx:{valType:\"boolean\",dflt:null,editType:\"calc\",impliedEdits:{\"xbins.start\":void 0,\"xbins.end\":void 0,\"xbins.size\":void 0}},nbinsx:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},xbins:n(\"x\"),autobiny:{valType:\"boolean\",dflt:null,editType:\"calc\",impliedEdits:{\"ybins.start\":void 0,\"ybins.end\":void 0,\"ybins.size\":void 0}},nbinsy:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},ybins:n(\"y\"),marker:i.marker,selected:i.selected,unselected:i.unselected,error_y:i.error_y,error_x:i.error_x,_deprecated:{bardir:i._deprecated.bardir}}},{\"../bar/attributes\":883}],998:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],999:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){return r(\"histnorm\"),n.forEach(function(t){r(t+\"bins.start\"),r(t+\"bins.end\"),r(t+\"bins.size\"),r(\"autobin\"+t),r(\"nbins\"+t)}),e}},{}],1e3:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min: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]>a){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]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},{\"fast-isnumeric\":140}],1001:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(t*e<=0)return 1/0;for(var o=Math.abs(e-t),l=\"date\"===r.type,u=i(o,l),f=0;f<10;f++){var h=i(80*u,l);if(u===h)break;if(!function(t,e,r,n,i,o){if(n&&t>c){var l=a(e,i,o),u=a(r,i,o),f=t===s?0:1;return l[f]!==u[f]}return Math.floor(r/t)-Math.floor(e/t)>.1}(h,t,e,l,r,n))break;u=h}return u}function i(t,e){return e&&t>h?t>c?t>1.1*s?s:t>1.1*l?l:c:t>u?u:t>f?f:h:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function a(t,e,r){var n=e.c2d(t,s,r).split(\"-\");return\"\"===n[0]&&(n.unshift(),n[0]=\"-\"+n[0]),n}var o=t(\"../../constants/numerical\"),s=o.ONEAVGYEAR,l=o.ONEAVGMONTH,c=o.ONEDAY,u=o.ONEHOUR,f=o.ONEMIN,h=o.ONESEC,d=t(\"../../plots/cartesian/axes\").tickIncrement;e.exports=function(t,e,r,i,a){var o,l,u=-1.1*e,f=-.1*e,h=t-f,p=r[0],m=r[1],g=Math.min(n(p+f,p+h,i,a),n(m+f,m+h,i,a)),v=Math.min(n(p+u,p+f,i,a),n(m+u,m+f,i,a));if(g>v&&v<Math.abs(m-p)/4e3?(o=g,l=!1):(o=Math.min(g,v),l=!0),\"date\"===i.type&&o>c){var y=o===s?1:6,x=o===s?\"M12\":\"M1\";return function(e,r){var n=i.c2d(e,s,a),o=n.indexOf(\"-\",y);o>0&&(n=n.substr(0,o));var c=i.d2c(n,0,a);if(c<e){var u=d(c,x,!1,a);(c+u)/2<e+t&&(c=u)}return r&&l?d(c,x,!0,a):c}}return function(e,r){var n=o*Math.round(e/o);return n+o/10<e&&n+.9*o<e+t&&(n+=o),r&&l&&(n-=o),n}}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789}],1002:[function(t,e,r){\"use strict\";function n(t,e,r,c,u){var f,h,d,p,m,g=c+\"bins\",v=\"overlay\"===t._fullLayout.barmode;if(e._autoBinFinished)delete e._autoBinFinished;else{var y=v?[e]:i(t,e),x=[],b=1/0,_=1/0,w=-1/0,M=\"autobin\"+c;for(f=0;f<y.length;f++){m=(h=y[f])._pos0=r.makeCalcdata(h,c);var k=h[g];if(h[M]||!k||null===k.start||null===k.end){d=h[c+\"calendar\"];var A=h.cumulative;if(k=l.autoBin(m,r,h[\"nbins\"+c],!1,d),v&&1===k._count&&\"category\"!==r.type){if(u)return[k,m,!0];k=function(t,e,r,a,o){var l,c,u=i(t,e),f=!1,h=1/0,d=[e];for(l=0;l<u.length;l++)if((c=u[l])===e)f=!0;else if(f){var p=n(t,c,r,a,!0),m=p[0],g=p[2];c._autoBinFinished=1,c._pos0=p[1],g?d.push(c):h=Math.min(h,m.size)}else h=Math.min(h,c[o].size);var v=new Array(d.length);for(l=0;l<d.length;l++)for(var y=d[l]._pos0,x=0;x<y.length;x++)if(void 0!==y[x]){v[l]=y[x];break}isFinite(h)||(h=s.distinctVals(v).minDiff);for(l=0;l<d.length;l++){var b=(c=d[l])[a+\"calendar\"];c._input[o]=c[o]={start:r.c2r(v[l]-h/2,0,b),end:r.c2r(v[l]+h/2,0,b),size:h}}return e[o]}(t,e,r,c,g)}A.enabled&&\"include\"!==A.currentbin&&(\"decreasing\"===A.direction?_=Math.min(_,r.r2c(k.start,0,d)-k.size):w=Math.max(w,r.r2c(k.end,0,d)+k.size)),x.push(h)}else p||(p={size:k.size,start:r.r2c(k.start,0,d),end:r.r2c(k.end,0,d)});b=function(t,e){if(t===1/0)return e;var r=a(t);return a(e)<r?e:t}(b,k.size),_=Math.min(_,r.r2c(k.start,0,d)),w=Math.max(w,r.r2c(k.end,0,d)),f&&(h._autoBinFinished=1)}if(p&&o(p.size)&&o(b)){b=b>p.size/1.9?p.size:p.size/Math.ceil(p.size/b);var T=p.start+(p.size-b)/2;_=T-b*Math.ceil((T-_)/b)}for(f=0;f<x.length;f++)d=(h=x[f])[c+\"calendar\"],h._input[g]=h[g]={start:r.c2r(_,0,d),end:r.c2r(w,0,d),size:b},h._input[M]=h[M]}return m=e._pos0,delete e._pos0,[e[g],m]}function i(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];\"histogram\"===l.type&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}function a(t){return o(t)?t:\"string\"==typeof t&&\"M\"===t.charAt(0)?p*+t.substr(1):1/0}var o=t(\"fast-isnumeric\"),s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../bar/arrays_to_calcdata\"),u=t(\"./bin_functions\"),f=t(\"./norm_functions\"),h=t(\"./average\"),d=t(\"./clean_bins\"),p=t(\"../../constants/numerical\").ONEAVGMONTH,m=t(\"./bin_label_vals\");e.exports=function(t,e){if(!0===e.visible){var r,i=[],a=[],p=l.getFromId(t,\"h\"===e.orientation?e.yaxis||\"y\":e.xaxis||\"x\"),g=\"h\"===e.orientation?\"y\":\"x\",v={x:\"y\",y:\"x\"}[g],y=e[g+\"calendar\"],x=e.cumulative;d(e,p,g);var b,_,w,M=n(t,e,p,g),k=M[0],A=M[1],T=\"string\"==typeof k.size,S=[],E=T?S:k,L=[],C=[],z=[],D=0,I=e.histnorm,P=e.histfunc,O=-1!==I.indexOf(\"density\");x.enabled&&O&&(I=I.replace(/ ?density$/,\"\"),O=!1);var F,R=\"max\"===P||\"min\"===P?null:0,N=u.count,j=f[I],B=!1,U=function(t){return p.r2c(t,0,y)};for(Array.isArray(e[v])&&\"count\"!==P&&(F=e[v],B=\"avg\"===P,N=u[P]),r=U(k.start),_=U(k.end)+(r-l.tickIncrement(r,k.size,!1,y))/1e6;r<_&&i.length<1e6&&(b=l.tickIncrement(r,k.size,!1,y),i.push((r+b)/2),a.push(R),z.push([]),S.push(r),O&&L.push(1/(b-r)),B&&C.push(0),!(b<=r));)r=b;S.push(r),T||\"date\"!==p.type||(E={start:U(E.start),end:U(E.end),size:E.size});var V=a.length,q=!0,H=1/0,G=1/0,Y={};for(r=0;r<A.length;r++){var W=A[r];(w=s.findBin(W,E))>=0&&w<V&&(D+=N(w,r,a,F,C),q&&z[w].length&&W!==A[z[w][0]]&&(q=!1),z[w].push(r),Y[r]=w,H=Math.min(H,W-S[w]),G=Math.min(G,S[w+1]-W))}var X;q||(X=m(H,G,S,p,y)),B&&(D=h(a,C)),j&&j(a,D,L),x.enabled&&function(t,e,r){function n(e){s=t[e],t[e]/=2}function i(e){o=t[e],t[e]=s+o/2,s+=o}var a,o,s;if(\"half\"===r)if(\"increasing\"===e)for(n(0),a=1;a<t.length;a++)i(a);else for(n(t.length-1),a=t.length-2;a>=0;a--)i(a);else if(\"increasing\"===e){for(a=1;a<t.length;a++)t[a]+=t[a-1];\"exclude\"===r&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];\"exclude\"===r&&(t.push(0),t.shift())}}(a,x.direction,x.currentbin);var Z=Math.min(i.length,a.length),J=[],K=0,Q=Z-1;for(r=0;r<Z;r++)if(a[r]){K=r;break}for(r=Z-1;r>=K;r--)if(a[r]){Q=r;break}for(r=K;r<=Q;r++)if(o(i[r])&&o(a[r])){var $={p:i[r],s:a[r],b:0};x.enabled||($.pts=z[r],q?$.p0=$.p1=z[r].length?A[z[r][0]]:i[r]:($.p0=X(S[r]),$.p1=X(S[r+1],!0))),J.push($)}return 1===J.length&&(J[0].width1=l.tickIncrement(J[0].p,k.size,!1,y)-J[0].p),c(J,e),Array.isArray(e.selectedpoints)&&s.tagSelected(J,e,Y),J}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../bar/arrays_to_calcdata\":882,\"./average\":998,\"./bin_functions\":1e3,\"./bin_label_vals\":1001,\"./clean_bins\":1003,\"./norm_functions\":1008,\"fast-isnumeric\":140}],1003:[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\",c=t[l];c||(c=t[l]={});var u=\"date\"===a?function(t){return t||0===t?i(t,s,c.calendar):null}:function(t){return n(t)?Number(t):null};c.start=u(c.start),c.end=u(c.end);var f=\"date\"===a?o:1,h=c.size;if(n(h))c.size=h>0?Number(h):f;else if(\"string\"!=typeof h)c.size=f;else{var d=h.charAt(0),p=h.substr(1);((p=n(p)?Number(p):0)<=0||\"date\"!==a||\"M\"!==d||p!==Math.round(p))&&(c.size=f)}var m=\"autobin\"+r;\"boolean\"!=typeof t[m]&&(t[m]=!((c.start||0===c.start)&&(c.end||0===c.end))),t[m]||delete t[\"nbins\"+r]}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],1004:[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\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,n){return i.coerce(t,e,c,r,n)}var h=f(\"x\"),d=f(\"y\");f(\"cumulative.enabled\")&&(f(\"cumulative.direction\"),f(\"cumulative.currentbin\")),f(\"text\");var p=f(\"orientation\",d&&!h?\"h\":\"v\"),m=e[\"v\"===p?\"x\":\"y\"];if(m&&m.length){n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],u);e[\"h\"===p?\"x\":\"y\"]&&f(\"histfunc\");o(t,e,f,\"h\"===p?[\"y\"]:[\"x\"]),s(t,e,f,r,u),l(t,e,a.defaultLine,{axis:\"y\"}),l(t,e,a.defaultLine,{axis:\"x\",inherit:\"y\"}),i.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../components/color\":618,\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../../registry\":873,\"../bar/style_defaults\":895,\"./attributes\":997,\"./bin_defaults\":999}],1005:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;t.pointNumbers=a,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var o;if(r._indexToPoints){o=[];for(var s=0;s<a.length;s++)o=o.concat(r._indexToPoints[a[s]])}else o=a;t.pointIndices=o}return t}},{}],1006:[function(t,e,r){\"use strict\";var n=t(\"../bar/hover\"),i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o){var s=(t=o[0]).cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var c=\"h\"===l.orientation?\"y\":\"x\";t[c+\"Label\"]=i(t[c+\"a\"],s.p0,s.p1)}return o}}},{\"../../plots/cartesian/axes\":789,\"../bar/hover\":886}],1007:[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(\"./hover\"),n.selectPoints=t(\"../bar/select\"),n.eventData=t(\"./event_data\"),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\":800,\"../bar/layout_attributes\":888,\"../bar/layout_defaults\":889,\"../bar/plot\":890,\"../bar/select\":891,\"../bar/set_positions\":892,\"../bar/style\":894,\"../scatter/colorbar\":1070,\"./attributes\":997,\"./calc\":1002,\"./defaults\":1004,\"./event_data\":1005,\"./hover\":1006}],1008:[function(t,e,r){\"use strict\";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},\"probability density\":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},{}],1009:[function(t,e,r){\"use strict\";var n=t(\"../histogram/attributes\"),i=t(\"../heatmap/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({},{x:n.x,y:n.y,z:{valType:\"data_array\",editType:\"calc\"},marker:{color:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,zhoverformat:i.zhoverformat},a,{autocolorscale:s({},a.autocolorscale,{dflt:!1})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../heatmap/attributes\":977,\"../histogram/attributes\":997}],1010:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){var s=e+\"bins\",c=\"autobin\"+e,u=t[s];h(t,n,e),!t[c]&&u&&null!==u.start&&null!==u.end||(u=l.autoBin(r,n,t[\"nbins\"+e],\"2d\",o),\"histogram2dcontour\"===t.type&&(u.start=a(l.tickIncrement(i(u.start),u.size,!0,o)),u.end=a(l.tickIncrement(i(u.end),u.size,!1,o))),t._input[s]=t[s]=u,t._input[c]=t[c])}function i(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function a(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function o(t,e,r,n,i,a){var o,s=t.length-1,l=new Array(s);if(e)for(o=0;o<s;o++)l[o]=[e[o],e[o]];else{var c=d(r,n,t,i,a);for(o=0;o<s;o++)l[o]=[c(t[o]),c(t[o+1],!0)]}return l}var s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../histogram/bin_functions\"),u=t(\"../histogram/norm_functions\"),f=t(\"../histogram/average\"),h=t(\"../histogram/clean_bins\"),d=t(\"../histogram/bin_label_vals\");e.exports=function(t,e){var r,h,d,p,m=l.getFromId(t,e.xaxis||\"x\"),g=e.x?m.makeCalcdata(e,\"x\"):[],v=l.getFromId(t,e.yaxis||\"y\"),y=e.y?v.makeCalcdata(e,\"y\"):[],x=e.xcalendar,b=e.ycalendar,_=function(t){return m.r2c(t,0,x)},w=function(t){return v.r2c(t,0,b)},M=function(t){return m.c2r(t,0,x)},k=function(t){return v.c2r(t,0,b)},A=Math.min(g.length,y.length);g.length>A&&g.splice(A,g.length-A),y.length>A&&y.splice(A,y.length-A),n(e,\"x\",g,m,_,M,x),n(e,\"y\",y,v,w,k,b);var T=[],S=[],E=[],L=\"string\"==typeof e.xbins.size,C=\"string\"==typeof e.ybins.size,z=[],D=[],I=L?z:e.xbins,P=C?D:e.ybins,O=0,F=[],R=[],N=e.histnorm,j=e.histfunc,B=-1!==N.indexOf(\"density\"),U=\"max\"===j||\"min\"===j?null:0,V=c.count,q=u[N],H=!1,G=[],Y=[],W=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";W&&\"count\"!==j&&(H=\"avg\"===j,V=c[j]);var X=e.xbins,Z=_(X.start),J=_(X.end)+(Z-l.tickIncrement(Z,X.size,!1,x))/1e6;for(r=Z;r<J;r=l.tickIncrement(r,X.size,!1,x))S.push(U),z.push(r),H&&E.push(0);z.push(r);var K=S.length,Q=_(e.xbins.start),$=(r-Q)/K,tt=M(Q+$/2);for(Z=w((X=e.ybins).start),J=w(X.end)+(Z-l.tickIncrement(Z,X.size,!1,b))/1e6,r=Z;r<J;r=l.tickIncrement(r,X.size,!1,b)){T.push(S.slice()),D.push(r);var et=new Array(K);for(h=0;h<K;h++)et[h]=[];R.push(et),H&&F.push(E.slice())}D.push(r);var rt=T.length,nt=w(e.ybins.start),it=(r-nt)/rt,at=k(nt+it/2);B&&(G=i(S.length,I,$,L),Y=i(T.length,P,it,C)),L||\"date\"!==m.type||(I=a(_,I)),C||\"date\"!==v.type||(P=a(w,P));var ot=!0,st=!0,lt=new Array(K),ct=new Array(rt),ut=1/0,ft=1/0,ht=1/0,dt=1/0;for(r=0;r<A;r++){var pt=g[r],mt=y[r];d=s.findBin(pt,I),p=s.findBin(mt,P),d>=0&&d<K&&p>=0&&p<rt&&(O+=V(d,r,T[p],W,F[p]),R[p][d].push(r),ot&&(void 0===lt[d]?lt[d]=pt:lt[d]!==pt&&(ot=!1)),st&&(void 0===ct[d]?ct[d]=mt:ct[d]!==mt&&(st=!1)),ut=Math.min(ut,pt-z[d]),ft=Math.min(ft,z[d+1]-pt),ht=Math.min(ht,mt-D[p]),dt=Math.min(dt,D[p+1]-mt))}if(H)for(p=0;p<rt;p++)O+=f(T[p],F[p]);if(q)for(p=0;p<rt;p++)q(T[p],O,G,Y[p]);return{x:g,xRanges:o(z,ot&<,ut,ft,m,x),x0:tt,dx:$,y:y,yRanges:o(D,st&&ct,ht,dt,v,b),y0:at,dy:it,z:T,pts:R}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../histogram/average\":998,\"../histogram/bin_functions\":1e3,\"../histogram/bin_label_vals\":1001,\"../histogram/clean_bins\":1003,\"../histogram/norm_functions\":1008}],1011:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./sample_defaults\"),a=t(\"../heatmap/style_defaults\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,l),o(t,e,l,c,{prefix:\"\",cLetter:\"z\"}))}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../heatmap/style_defaults\":992,\"./attributes\":1009,\"./sample_defaults\":1014}],1012:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/hover\"),i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a,o,s){var l=n(t,e,r,a,o,s);if(l){var c=(t=l[0]).index,u=c[0],f=c[1],h=t.cd[0],d=h.xRanges[f],p=h.yRanges[u];return t.xLabel=i(t.xa,d[0],d[1]),t.yLabel=i(t.ya,p[0],p[1]),l}}},{\"../../plots/cartesian/axes\":789,\"../heatmap/hover\":985}],1013:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"../heatmap/calc\"),n.plot=t(\"../heatmap/plot\"),n.colorbar=t(\"../heatmap/colorbar\"),n.style=t(\"../heatmap/style\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"../histogram/event_data\"),n.moduleType=\"trace\",n.name=\"histogram2d\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"histogram\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../heatmap/calc\":978,\"../heatmap/colorbar\":980,\"../heatmap/plot\":990,\"../heatmap/style\":991,\"../histogram/event_data\":1005,\"./attributes\":1009,\"./defaults\":1011,\"./hover\":1012}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../histogram/bin_defaults\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"y\");if(o&&o.length&&s&&s.length){n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a);(r(\"z\")||r(\"marker.color\"))&&r(\"histfunc\");i(t,e,r,[\"x\",\"y\"])}else e.visible=!1}},{\"../../registry\":873,\"../histogram/bin_defaults\":999}],1015:[function(t,e,r){\"use strict\";var n=t(\"../histogram2d/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:i.line,zhoverformat:n.zhoverformat},a,{zmin:s({},a.zmin,{editType:\"calc\"}),zmax:s({},a.zmax,{editType:\"calc\"})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../contour/attributes\":949,\"../histogram2d/attributes\":1009}],1016:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../histogram2d/sample_defaults\"),a=t(\"../contour/contours_defaults\"),o=t(\"../contour/style_defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c),o(t,e,c,l))}},{\"../../lib\":743,\"../contour/contours_defaults\":953,\"../contour/style_defaults\":963,\"../histogram2d/sample_defaults\":1014,\"./attributes\":1015}],1017:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"../contour/calc\"),n.plot=t(\"../contour/plot\").plot,n.style=t(\"../contour/style\"),n.colorbar=t(\"../contour/colorbar\"),n.hoverPoints=t(\"../contour/hover\"),n.moduleType=\"trace\",n.name=\"histogram2dcontour\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"contour\",\"histogram\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../contour/calc\":950,\"../contour/colorbar\":951,\"../contour/hover\":957,\"../contour/plot\":961,\"../contour/style\":962,\"./attributes\":1015,\"./defaults\":1016}],1018:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/color_attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../surface/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s(n(\"\",\"calc\",!1),{x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"},opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:s({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},showscale:i.showscale,colorbar:a,lightposition:{x:s({},o.lightposition.x,{dflt:1e5}),y:s({},o.lightposition.y,{dflt:1e5}),z:s({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:s({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\"},editType:\"calc\"},o.lighting)})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../components/colorscale/color_attributes\":626,\"../../lib/extend\":732,\"../surface/attributes\":1140}],1019:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(e,e.intensity,\"\",\"c\")}},{\"../../components/colorscale/calc\":625}],1020:[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=\"cb\"+r.uid,c=r.cmin,u=r.cmax,f=r.intensity||[];if(n(c)||(c=i.aggNums(Math.min,null,f)),n(u)||(u=i.aggNums(Math.max,null,f)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var h=e[0].t.cb=s(t,l),d=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});h.fillcolor(d).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1021:[function(t,e,r){\"use strict\";function n(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}function i(t){return t.map(f)}function a(t,e,r){for(var n=new Array(t.length),i=0;i<t.length;++i)n[i]=[t[i],e[i],r[i]];return n}var o=t(\"gl-mesh3d\"),s=t(\"tinycolor2\"),l=t(\"delaunay-triangulate\"),c=t(\"alpha-shape\"),u=t(\"convex-hull\"),f=t(\"../../lib/str2rgbarray\"),h=n.prototype;h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;return t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},h.update=function(t){function e(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}var r=this.scene,n=r.fullSceneLayout;this.data=t;var o,h=a(e(n.xaxis,t.x,r.dataScale[0],t.xcalendar),e(n.yaxis,t.y,r.dataScale[1],t.ycalendar),e(n.zaxis,t.z,r.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k)o=a(t.i,t.j,t.k);else if(0===t.alphahull)o=u(h);else if(t.alphahull>0)o=c(t.alphahull,h);else{var d=[\"x\",\"y\",\"z\"].indexOf(t.delaunayaxis);o=l(h.map(function(t){return[t[(d+1)%3],t[(d+2)%3]]}))}var p={positions:h,cells:o,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:f(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color=\"#fff\",p.vertexIntensity=t.intensity,p.vertexIntensityBounds=[t.cmin,t.cmax],p.colormap=function(t){return t.map(function(t){var e=t[0],r=s(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,1]}})}(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolor[0],p.vertexColors=i(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=i(t.facecolor)):(this.color=t.color,p.meshColor=f(t.color)),this.mesh.update(p)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=o({gl:r}),a=new n(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\"../../lib/str2rgbarray\":765,\"alpha-shape\":47,\"convex-hull\":109,\"delaunay-triangulate\":130,\"gl-mesh3d\":210,tinycolor2:546}],1022:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/colorscale/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function c(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 u=c([\"x\",\"y\",\"z\"]),f=c([\"i\",\"j\",\"k\"]);if(u){f&&f.forEach(function(t){for(var e=0;e<t.length;++e)t[e]|=0});n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],s),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"contour.show\",\"contour.color\",\"contour.width\",\"colorscale\",\"reversescale\",\"flatshading\",\"alphahull\",\"delaunayaxis\",\"opacity\"].forEach(function(t){l(t)}),\"intensity\"in t?(l(\"intensity\"),a(t,e,s,l,{prefix:\"\",cLetter:\"c\"})):(e.showscale=!1,\"facecolor\"in t?l(\"facecolor\"):\"vertexcolor\"in t?l(\"vertexcolor\"):l(\"color\",r))}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../../registry\":873,\"./attributes\":1018}],1023:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.colorbar=t(\"./colorbar\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"mesh3d\",n.basePlotModule=t(\"../../plots/gl3d\"),n.categories=[\"gl3d\"],n.meta={},e.exports=n},{\"../../plots/gl3d\":832,\"./attributes\":1018,\"./calc\":1019,\"./colorbar\":1020,\"./convert\":1021,\"./defaults\":1022}],1024:[function(t,e,r){\"use strict\";function n(t){return{name:{valType:\"string\",editType:\"style\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},line:{color:i({},s.color,{dflt:t}),width:s.width,dash:o,editType:\"style\"},editType:\"style\"}}var i=t(\"../../lib\").extendFlat,a=t(\"../scatter/attributes\"),o=t(\"../../components/drawing/attributes\").dash,s=a.line;e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},open:{valType:\"data_array\",dflt:[],editType:\"calc\"},high:{valType:\"data_array\",dflt:[],editType:\"calc\"},low:{valType:\"data_array\",dflt:[],editType:\"calc\"},close:{valType:\"data_array\",dflt:[],editType:\"calc\"},line:{width:i({},s.width,{}),dash:i({},o,{}),editType:\"style\"},increasing:n(\"#3D9970\"),decreasing:n(\"#FF4136\"),text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},tickwidth:{valType:\"number\",min:0,max:.5,dflt:.3,editType:\"calcIfAutorange\"}}},{\"../../components/drawing/attributes\":642,\"../../lib\":743,\"../scatter/attributes\":1066}],1025:[function(t,e,r){\"use strict\";function n(t,e,r,n){o(t,e,r,n),r(n+\".line.color\"),r(n+\".line.width\",e.line.width),r(n+\".line.dash\",e.line.dash)}var i=t(\"../../lib\"),a=t(\"./ohlc_defaults\"),o=t(\"./direction_defaults\"),s=t(\"./attributes\"),l=t(\"./helpers\");e.exports=function(t,e,r,o){function c(r,n){return i.coerce(t,e,s,r,n)}l.pushDummyTransformOpts(t,e);0!==a(t,e,c,o)?(c(\"line.width\"),c(\"line.dash\"),n(t,e,c,\"increasing\"),n(t,e,c,\"decreasing\"),c(\"text\"),c(\"tickwidth\")):e.visible=!1}},{\"../../lib\":743,\"./attributes\":1024,\"./direction_defaults\":1026,\"./helpers\":1027,\"./ohlc_defaults\":1029}],1026:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){r(n+\".showlegend\"),!1===t.showlegend&&(e[n].showlegend=!1);r(n+\".name\",e.name+\" - \"+n)}},{}],1027:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\");r.pushDummyTransformOpts=function(t,e){var r={type:e.type,_ephemeral:!0};Array.isArray(t.transforms)?t.transforms.push(r):t.transforms=[r]},r.clearEphemeralTransformOpts=function(t){var e=t.transforms;if(Array.isArray(e)){for(var r=0;r<e.length;r++)e[r]._ephemeral&&e.splice(r,1);0===e.length&&delete t.transforms}},r.copyOHLC=function(t,e){t.open&&(e.open=t.open),t.high&&(e.high=t.high),t.low&&(e.low=t.low),t.close&&(e.close=t.close)},r.makeTransform=function(t,e,r){var n=i.extendFlat([],t.transforms);return n[e.transformIndex]={type:t.type,direction:r,open:t.open,high:t.high,low:t.low,close:t.close},n},r.getFilterFn=function(t){return new function(t){function e(t,e){return t===e?e>i?r=!0:e<i&&(r=!1):r=t<e,i=e,r}var r=!0,i=null;return\"increasing\"===t?function(t,r){return n(t)&&n(r)&&e(+t,+r)}:function(t,r){return n(t)&&n(r)&&!e(+t,+r)}}(t)},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n<t.length;n++)if(!0===t[n].visible){r=!0;break}r&&(e.xaxis||(e.xaxis={}),e.xaxis.rangeslider||(e.xaxis.rangeslider={}))}},{\"../../lib\":743,\"fast-isnumeric\":140}],1028:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/register\");e.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"showLegend\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\")},n(t(\"../scatter\")),n(t(\"./transform\"))},{\"../../plot_api/register\":779,\"../../plots/cartesian\":800,\"../scatter\":1078,\"./attributes\":1024,\"./defaults\":1025,\"./transform\":1030}],1029:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i){var a,o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");return n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],i),a=Math.min(s.length,l.length,c.length,u.length),o&&(a=Math.min(a,o.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.open=s.slice(0,a)),a<l.length&&(e.high=l.slice(0,a)),a<c.length&&(e.low=c.slice(0,a)),a<u.length&&(e.close=u.slice(0,a)),a}},{\"../../registry\":873}],1030:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"scatter\",mode:\"lines\",connectgaps:!1,visible:t.visible,opacity:t.opacity,xaxis:t.xaxis,yaxis:t.yaxis,hoverinfo:function(t){var e=t.hoverinfo;if(\"all\"===e)return\"x+text+name\";var r=e.split(\"+\"),n=r.indexOf(\"y\"),i=r.indexOf(\"text\");-1!==n&&(r.splice(n,1),-1===i&&r.push(\"text\"));return r.join(\"+\")}(t),transforms:s.makeTransform(t,e,r)},i=t[r];return i&&a.extendFlat(n,{x:t.x||[0],xcalendar:t.xcalendar,y:[].concat(t.low).concat(t.high),text:t.text,name:i.name,showlegend:i.showlegend,line:i.line}),n}var i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=a._,s=t(\"./helpers\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../../plots/cartesian/axis_ids\");r.moduleType=\"transform\",r.name=\"ohlc\",r.attributes={},r.supplyDefaults=function(t,e,r,n){return s.clearEphemeralTransformOpts(n),s.copyOHLC(t,e),t},r.transform=function(t,e){for(var r=[],i=0;i<t.length;i++){var a=t[i];\"ohlc\"===a.type?r.push(n(a,e,\"increasing\"),n(a,e,\"decreasing\")):r.push(a)}return s.addRangeSlider(r,e.layout),r},r.calcTransform=function(t,e,r){var n,u=r.direction,f=s.getFilterFn(u),h=c.getFromTrace(t,e,\"x\"),d=c.getFromTrace(t,e,\"y\"),p=function(t,e,r){var n=r._fullInput,i=n.tickwidth,o=n._minDiff;if(!o){var s=t._fullData,l=[];o=1/0;var c;for(c=0;c<s.length;c++){var u=s[c]._fullInput;if(\"ohlc\"===u.type&&!0===u.visible&&u.xaxis===e._id&&(l.push(u),u.x&&u.x.length>1)){var f=a.simpleMap(u.x,e.d2c,0,r.xcalendar),h=a.distinctVals(f).minDiff;o=Math.min(o,h)}}for(o===1/0&&(o=1),c=0;c<l.length;c++)l[c]._minDiff=o}return o*i}(t,h,e),m=e.open,g=e.high,v=e.low,y=e.close,x=e.text,b=o(t,\"open:\")+\" \",_=o(t,\"high:\")+\" \",w=o(t,\"low:\")+\" \",M=o(t,\"close:\")+\" \",k=m.length,A=[],T=[],S=[];n=e._fullInput.x?function(t){var r=e.x[t],n=e.xcalendar,i=h.d2c(r,0,n);A.push(h.c2d(i-p,0,n),r,r,r,r,h.c2d(i+p,0,n),null)}:function(t){A.push(t-p,t,t,t,t,t+p,null)};for(var E=function(t,e,r,n){T.push(t,t,e,r,n,n,null)},L=function(t,e){return l.tickText(t,t.c2l(e),\"hover\").text},C=e._fullInput.hoverinfo,z=C.split(\"+\"),D=\"all\"===C,I=D||-1!==z.indexOf(\"y\"),P=D||-1!==z.indexOf(\"text\"),O=Array.isArray(x)?function(t){return x[t]||\"\"}:function(){return x},F=function(t,e,r,n,i){var a=[];I&&(a.push(b+L(d,e)),a.push(_+L(d,r)),a.push(w+L(d,n)),a.push(M+L(d,i))),P&&a.push(O(t));var o=a.join(\"<br>\");S.push(o,o,o,o,o,o,null)},R=0;R<k;R++)f(m[R],y[R])&&i(g[R])&&i(v[R])&&(n(R),E(m[R],g[R],v[R],y[R]),F(R,m[R],g[R],v[R],y[R]));e.x=A,e.y=T,e.text=S}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/axis_ids\":792,\"./helpers\":1027,\"fast-isnumeric\":140}],1031:[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(\"../../plots/font_attributes\"),l=t(\"../../plots/domain_attributes\"),c=t(\"../../lib/extend\"),u=c.extendDeepAll,f=c.extendFlat;e.exports={domain:l({name:\"parcoords\",trace:!0,editType:\"calc\"}),labelfont:s({editType:\"calc\"}),tickfont:s({editType:\"calc\"}),rangefont:s({editType:\"calc\"}),dimensions:{_isLinkedToArray:\"dimension\",label:{valType:\"string\",editType:\"calc\"},tickvals:f({},o.tickvals,{editType:\"calc\"}),ticktext:f({},o.ticktext,{editType:\"calc\"}),tickformat:{valType:\"string\",dflt:\"3s\",editType:\"calc\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},constraintrange:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},values:{valType:\"data_array\",dflt:[],editType:\"calc\"},editType:\"calc\"},line:f(u(n(\"line\",\"calc\"),{colorscale:{dflt:a.Viridis},autocolorscale:{dflt:!1}}),{showscale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},colorbar:i,editType:\"calc\"})}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/colorscale/scales\":637,\"../../lib/extend\":732,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1032:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../constants/xmlns_namespaces\");r.name=\"parcoords\",r.plot=function(t){var e=i(t.calcdata,\"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\").remove(),n._glimages.selectAll(\"*\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\".svg-container\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each(function(){var t=this.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":t,preserveAspectRatio:\"none\",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")},60)}},{\"../../constants/xmlns_namespaces\":723,\"../../plots/get_data\":826,\"./plot\":1040,d3:128}],1033:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/has_colorscale\"),i=t(\"../../components/colorscale/calc\"),a=t(\"../../lib\"),o=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),s=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}),l=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,\"line\")&&i(e,e.line.color,\"line\",\"c\"),o({lineColor:s,cscale:l})}},{\"../../components/colorscale/calc\":625,\"../../components/colorscale/has_colorscale\":632,\"../../lib\":743,\"../../lib/gup\":740}],1034:[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,c=\"cb\"+r.uid;if(t._fullLayout._infolayer.selectAll(\".\"+c).remove(),void 0!==l&&l.showscale){var u=l.color,f=l.cmin,h=l.cmax;n(f)||(f=i.aggNums(Math.min,null,u)),n(h)||(h=i.aggNums(Math.max,null,u));var d=e[0].t.cb=s(t,c),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,f,h),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:f,end:h,size:(h-f)/254}).options(l.colorbar)()}else a.autoMargin(t,c)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1035:[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},cn:{axisExtentText:\"axis-extent-text\",parcoordsLineLayers:\"parcoords-line-layers\",parcoordsLineLayer:\"parcoords-lines\",parcoords:\"parcoords\",parcoordsControlView:\"parcoords-control-view\",yAxis:\"y-axis\",axisOverlays:\"axis-overlays\",axis:\"axis\",axisHeading:\"axis-heading\",axisTitle:\"axis-title\",axisExtent:\"axis-extent\",axisExtentTop:\"axis-extent-top\",axisExtentTopText:\"axis-extent-top-text\",axisExtentBottom:\"axis-extent-bottom\",axisExtentBottomText:\"axis-extent-bottom-text\",axisBrush:\"axis-brush\"},id:{filterBarPattern:\"filter-bar-pattern\"}}},{}],1036:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/colorscale/has_colorscale\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./constants\").maxDimensionCount;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=function(t,e){function r(t,e){return n.coerce(a,o,i.dimensions,t,e)}var a,o,l,c=t.dimensions||[],u=e.dimensions=[],f=1/0;for(c.length>s&&(n.log(\"parcoords traces support up to \"+s+\" dimensions at the moment\"),c.splice(s)),l=0;l<c.length;l++)a=c[l],o={},n.isPlainObject(a)&&(r(\"visible\",r(\"values\").length>0)&&(r(\"label\"),r(\"tickvals\"),r(\"ticktext\"),r(\"tickformat\"),r(\"range\"),r(\"constraintrange\"),f=Math.min(f,o.values.length)),o._index=l,u.push(o));if(isFinite(f))for(l=0;l<u.length;l++)(o=u[l]).visible&&o.values.length>f&&(o.values=o.values.slice(0,f));return u}(t,e);!function(t,e,r,i,s){s(\"line.color\",r),a(t,\"line\")&&n.isArray(t.line.color)?(s(\"line.colorscale\"),o(t,e,i,s,{prefix:\"line.\",cLetter:\"c\"})):s(\"line.color\",r)}(t,e,r,l,c),c(\"domain.x\"),c(\"domain.y\"),Array.isArray(u)&&u.length||(e.visible=!1);var f={family:l.font.family,size:Math.round(l.font.size*(10/12)),color:l.font.color};n.coerceFont(c,\"labelfont\",f),n.coerceFont(c,\"tickfont\",f),n.coerceFont(c,\"rangefont\",f)}},{\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632,\"../../lib\":743,\"./attributes\":1031,\"./constants\":1035}],1037:[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\",\"regl\",\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1031,\"./base_plot\":1032,\"./calc\":1033,\"./colorbar\":1034,\"./defaults\":1036,\"./plot\":1040}],1038:[function(t,e,r){\"use strict\";function n(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 i(t,e,r,i,a,o){function s(c){var u;u=Math.min(i,a-c*i),o.offset=h*c*i,o.count=h*u,0===c&&(window.cancelAnimationFrame(r.currentRafs[l]),delete r.currentRafs[l],n(t,o.scissorX,o.scissorY,o.scissorWidth,o.viewBoxSize[1])),r.clearOnly||(e(o),c*i+u<a&&(r.currentRafs[l]=window.requestAnimationFrame(function(){s(c+1)})),r.drawCompleted=!1)}var l=o.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:m})}(t),r.drawCompleted=!0),s(0)}function a(t){return Math.max(u,Math.min(1-u,t))}function o(t,e){return(t>>>8*e)%256/255}function s(t,e){var r={};return[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15].map(function(r){return function(t,e,r){var n,i,a,o=[];for(i=0;i<t;i++)for(a=0;a<h;a++)for(n=0;n<d;n++)o.push(e[i*f+r*d+n]),r*d+n===f-1&&a%2==0&&(o[o.length-1]*=-1);return o}(t,e,r)}).forEach(function(t,e){r[\"p\"+e.toString(16)]=t}),r}function l(t,e,r){return t+e<=r}var c=t(\"./constants\"),u=1e-6,f=64,h=2,d=4,p=[119,119,119],m=new Uint8Array(4),g=new Uint8Array(4);e.exports=function(t,e,r){function u(t,e,r,n,i,a,o,s,u,f,d){var p,g,v,b,_=[t,e],w=c.verticalPadding/a,k=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})}),A=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(p=0;p<2;p++)for(b=_[p],g=0;g<4;g++)for(v=0;v<16;v++){var S=v+16*g;k[p][g][v]=v+16*g===b?1:0,A[p][g][v]=(!M&&l(v,16*g,I)?T[0===S?0:1+(S-1)%(T.length-1)].filter[p]:p)+(2*p-1)*w}return{key:o,resolution:[y,x],viewBoxPosition:[r+D,n],viewBoxSize:[i,a],i:t,ii:e,dim1A:k[0][0],dim1B:k[0][1],dim1C:k[0][2],dim1D:k[0][3],dim2A:k[1][0],dim2B:k[1][1],dim2C:k[1][2],dim2D:k[1][3],loA:A[0][0],loB:A[0][1],loC:A[0][2],loD:A[0][3],hiA:A[1][0],hiB:A[1][1],hiC:A[1][2],hiD:A[1][3],colorClamp:j,scatter:s||0,scissorX:(u===f?0:r+D)+(h.pad.l-D)+h.layoutWidth*m.x[0],scissorWidth:(u===d?y-r+D:i+.5)+(u===f?r+D:0),scissorY:n+h.pad.b+h.layoutHeight*m.y[0],scissorHeight:a,viewportX:h.pad.l-D+h.layoutWidth*m.x[0],viewportY:h.pad.b+h.layoutHeight*m.y[0],viewportWidth:y,viewportHeight:x}}var h=e.model,d=e.viewModel,m=h.domain,v=h.lines,y=h.canvasWidth,x=h.canvasHeight,b=d.dimensions,_=d.panels,w=h.unitToColor,M=e.context,k=e.pick,A={currentRafs:{},drawCompleted:!0,clearOnly:!1},T=b.slice(),S=T.length,E=T[0]?T[0].values.length:0,L=M,C=k?v.color.map(function(t,e){return e/v.color.length}):v.color,z=Math.max(1/255,Math.pow(1/C.length,1/3)),D=v.canvasOverdrag,I=_.length,P=function(t,e,r,n){for(var i=[],s=0;s<t;s++)for(var l=0;l<f;l++)i.push(l<e?r[l].paddedUnitValues[s]:l===f-1?a(n[s]):l>=f-4?o(s,f-2-l):.5);return i}(E,S,T,C),O=s(E,P),F=e.regl,R=F.texture({shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\",data:function(t,e,r){for(var n=[],i=0;i<256;i++){var a=t(i/255);n.push((e?p:a).concat(r))}return n}(w,M,Math.round(255*(M?z:1)))}),N=F({profile:!1,blend:{enable:L,func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:1,dstAlpha:1},equation:{rgb:\"add\",alpha:\"add\"},color:[0,0,0,0]},depth:{enable:!L,mask:!0,func:\"less\",range:[0,1]},cull:{enable:!0,face:\"back\"},scissor:{enable:!0,box:{x:F.prop(\"scissorX\"),y:F.prop(\"scissorY\"),width:F.prop(\"scissorWidth\"),height:F.prop(\"scissorHeight\")}},viewport:{x:F.prop(\"viewportX\"),y:F.prop(\"viewportY\"),width:F.prop(\"viewportWidth\"),height:F.prop(\"viewportHeight\")},dither:!1,vert:k?\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 p0, p1, p2, p3,\\n p4, p5, p6, p7,\\n p8, p9, pa, pb,\\n pc, pd, pe;\\n\\nattribute vec4 pf;\\n\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution,\\n viewBoxPosition,\\n viewBoxSize;\\n\\nuniform sampler2D palette;\\n\\nuniform vec2 colorClamp;\\n\\nuniform float scatter;\\n\\nvarying vec4 fragColor;\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit = vec4(1, 1, 1, 1);\\nvec2 xyProjection = vec2(1, 1);\\n\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\n return mat4(clamp(m[0], lo[0], hi[0]),\\n clamp(m[1], lo[1], hi[1]),\\n clamp(m[2], lo[2], hi[2]),\\n clamp(m[3], lo[3], hi[3]));\\n}\\n\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\n return mclamp(p, lo, hi) == p;\\n}\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * unit, unit);\\n}\\n\\nvoid main() {\\n\\n float x = 0.5 * sign(pf[3]) + 0.5;\\n float prominence = abs(pf[3]);\\n float depth = 1.0 - prominence;\\n\\n mat4 pA = mat4(p0, p1, p2, p3);\\n mat4 pB = mat4(p4, p5, p6, p7);\\n mat4 pC = mat4(p8, p9, pa, pb);\\n mat4 pD = mat4(pc, pd, pe, abs(pf));\\n\\n float show = float(mshow(pA, loA, hiA) &&\\n mshow(pB, loB, hiB) &&\\n mshow(pC, loC, hiC) &&\\n mshow(pD, loD, hiD));\\n\\n vec2 yy = show * vec2(val(pA, dim2A) + val(pB, dim2B) + val(pC, dim2C) + val(pD, dim2D),\\n val(pA, dim1A) + val(pB, dim1B) + val(pC, dim1C) + val(pD, dim1D));\\n\\n vec2 dimensionToggle = vec2(x, 1.0 - x);\\n\\n vec2 scatterToggle = vec2(scatter, 1.0 - scatter);\\n\\n float y = dot(yy, dimensionToggle);\\n mat2 xy = mat2(viewBoxSize * yy + dimensionToggle, viewBoxSize * vec2(x, y));\\n\\n vec2 viewBoxXY = viewBoxPosition + xy * scatterToggle;\\n\\n float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n gl_Position = vec4(\\n xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n depthOrHide,\\n 1.0\\n );\\n\\n // pick coloring\\n fragColor = vec4(pf.rgb, 1.0);\\n}\\n\":\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 p0, p1, p2, p3,\\n p4, p5, p6, p7,\\n p8, p9, pa, pb,\\n pc, pd, pe;\\n\\nattribute vec4 pf;\\n\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution,\\n viewBoxPosition,\\n viewBoxSize;\\n\\nuniform sampler2D palette;\\n\\nuniform vec2 colorClamp;\\n\\nuniform float scatter;\\n\\nvarying vec4 fragColor;\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit = vec4(1, 1, 1, 1);\\nvec2 xyProjection = vec2(1, 1);\\n\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\n return mat4(clamp(m[0], lo[0], hi[0]),\\n clamp(m[1], lo[1], hi[1]),\\n clamp(m[2], lo[2], hi[2]),\\n clamp(m[3], lo[3], hi[3]));\\n}\\n\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\n return mclamp(p, lo, hi) == p;\\n}\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * unit, unit);\\n}\\n\\nvoid main() {\\n\\n float x = 0.5 * sign(pf[3]) + 0.5;\\n float prominence = abs(pf[3]);\\n float depth = 1.0 - prominence;\\n\\n mat4 pA = mat4(p0, p1, p2, p3);\\n mat4 pB = mat4(p4, p5, p6, p7);\\n mat4 pC = mat4(p8, p9, pa, pb);\\n mat4 pD = mat4(pc, pd, pe, abs(pf));\\n\\n float show = float(mshow(pA, loA, hiA) &&\\n mshow(pB, loB, hiB) &&\\n mshow(pC, loC, hiC) &&\\n mshow(pD, loD, hiD));\\n\\n vec2 yy = show * vec2(val(pA, dim2A) + val(pB, dim2B) + val(pC, dim2C) + val(pD, dim2D),\\n val(pA, dim1A) + val(pB, dim1B) + val(pC, dim1C) + val(pD, dim1D));\\n\\n vec2 dimensionToggle = vec2(x, 1.0 - x);\\n\\n vec2 scatterToggle = vec2(scatter, 1.0 - scatter);\\n\\n float y = dot(yy, dimensionToggle);\\n mat2 xy = mat2(viewBoxSize * yy + dimensionToggle, viewBoxSize * vec2(x, y));\\n\\n vec2 viewBoxXY = viewBoxPosition + xy * scatterToggle;\\n\\n float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n gl_Position = vec4(\\n xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n depthOrHide,\\n 1.0\\n );\\n\\n // visible coloring\\n float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\n fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\n}\\n\",frag:\"precision lowp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\",primitive:\"lines\",lineWidth:1,attributes:O,uniforms:{resolution:F.prop(\"resolution\"),viewBoxPosition:F.prop(\"viewBoxPosition\"),viewBoxSize:F.prop(\"viewBoxSize\"),dim1A:F.prop(\"dim1A\"),dim2A:F.prop(\"dim2A\"),dim1B:F.prop(\"dim1B\"),dim2B:F.prop(\"dim2B\"),dim1C:F.prop(\"dim1C\"),dim2C:F.prop(\"dim2C\"),dim1D:F.prop(\"dim1D\"),dim2D:F.prop(\"dim2D\"),loA:F.prop(\"loA\"),hiA:F.prop(\"hiA\"),loB:F.prop(\"loB\"),hiB:F.prop(\"hiB\"),loC:F.prop(\"loC\"),hiC:F.prop(\"hiC\"),loD:F.prop(\"loD\"),hiD:F.prop(\"hiD\"),palette:R,colorClamp:F.prop(\"colorClamp\"),scatter:F.prop(\"scatter\")},offset:F.prop(\"offset\"),count:F.prop(\"count\")}),j=[0,1],B=[];return{setColorDomain:function(t){j[0]=t[0],j[1]=t[1]},render:function(t,e,a){var o,s,l,c=1/0,f=-1/0;for(o=0;o<I;o++)t[o].dim2.canvasX>f&&(f=t[o].dim2.canvasX,l=o),t[o].dim1.canvasX<c&&(c=t[o].dim1.canvasX,s=o);for(0===I&&n(F,0,0,y,x),o=0;o<I;o++){var h=t[o],d=h.dim1,p=d.crossfilterDimensionIndex,m=h.canvasX,g=h.canvasY,b=h.dim2.crossfilterDimensionIndex,_=h.panelSizeX,w=h.panelSizeY,M=m+_;if(e||!B[p]||B[p][0]!==m||B[p][1]!==M){B[p]=[m,M];var k=u(p,b,m,g,_,w,d.crossfilterDimensionIndex,r||d.scatter?1:0,o,s,l);A.clearOnly=a,i(F,N,A,e?v.blockLineCount:E,E,k)}}},readPixel:function(t,e){return F.read({x:t,y:e,width:1,height:1,data:g}),g},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return F.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){t.style[\"pointer-events\"]=\"none\",R.destroy()}}}},{\"./constants\":1035}],1039:[function(t,e,r){\"use strict\";function n(t){return!(\"visible\"in t)||t.visible}function i(t){var e=t.range?t.range[0]:d.min(t.values),r=t.range?t.range[1]:d.max(t.values);return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(r)&&isFinite(r)||(r=0),e===r&&(void 0===e?(e=0,r=1):0===e?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function a(t,e){var r,n,i,a,o;for(r=0,i=1/0,a=(n=t.range())[0];r<n.length;r++){if((o=Math.abs(n[r]-e))>i)return a;i=o,a=n[r]}return n[n.length-1]}function o(t){return d.scale.linear().domain(i(t))}function s(t,e,r){var i=v(e),a=i.trace,s=i.lineColor,l=i.cscale,c=a.line,u=a.domain,p=a.dimensions,m=t.width,g=a.labelfont,y=a.tickfont,x=a.rangefont,b=h.extendDeep({},c,{color:s.map(o({values:s,range:[c.cmin,c.cmax]})),blockLineCount:f.blockLineCount,canvasOverdrag:f.overdrag*f.canvasPixelRatio}),_=Math.floor(m*(u.x[1]-u.x[0])),w=Math.floor(t.height*(u.y[1]-u.y[0])),M=t.margin||{l:80,r:80,t:100,b:80},k=_,A=w;return{key:r,colCount:p.filter(n).length,dimensions:p,tickDistance:f.tickDistance,unitToColor:function(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}).map(function(t){return d.rgb(t)}),n=\"rgb\".split(\"\").map(function(t){return d.scale.linear().clamp(!0).domain(e).range(r.map(function(t){return function(e){return e[t]}}(t)))});return function(t){return n.map(function(e){return e(t)})}}(l),lines:b,labelFont:g,tickFont:y,rangeFont:x,layoutWidth:m,layoutHeight:t.height,domain:u,translateX:u.x[0]*m,translateY:t.height-u.y[1]*t.height,pad:M,canvasWidth:k*f.canvasPixelRatio+2*b.canvasOverdrag,canvasHeight:A*f.canvasPixelRatio,width:k,height:A,canvasPixelRatio:f.canvasPixelRatio}}function l(t){var e=t.width,r=t.height,a=t.dimensions,s=t.canvasPixelRatio,l=function(r){return e*r/Math.max(1,t.colCount-1)},c=f.verticalPadding/(r*s),u=1-2*c,h=function(t){return c+u*t},p={key:t.key,xScale:l,model:t},m={};return p.dimensions=a.filter(n).map(function(e,n){var a=o(e),c=m[e.label];m[e.label]=(c||0)+1;return{key:e.label+(c?\"__\"+c:\"\"),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:f.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(h),xScale:l,x:l(n),canvasX:l(n)*s,unitScale:function(t,e){return d.scale.linear().range([t-e,e])}(r,f.verticalPadding),domainScale:function(t,e,r){var n=i(r),a=r.ticktext;return r.tickvals?d.scale.ordinal().domain(r.tickvals.map(function(t,e){return function(r,n){if(e){var i=e[n];return null===i||void 0===i?t(r):i}return t(r)}}(d.format(r.tickformat),a))).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):d.scale.linear().domain(n).range([t-e,e])}(r,f.verticalPadding,e),ordinalScale:function(t){var e=i(t);return t.tickvals&&d.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function c(t){t.classed(f.cn.axisExtentText,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"default\").style(\"user-select\",\"none\")}var u=t(\"./lines\"),f=t(\"./constants\"),h=t(\"../../lib\"),d=t(\"d3\"),p=t(\"../../components/drawing\"),m=t(\"../../lib/gup\").keyFun,g=t(\"../../lib/gup\").repeat,v=t(\"../../lib/gup\").unwrap;e.exports=function(t,e,r,n,i,o){function y(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function x(t,e){return(f.scatter?function(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=i,o=0;o<i;o++)for(var s=0;s<i;s++){var l=r[s+o*i]||(r[s+o*i]={}),c=n[s],u=n[s+1];l.dim1=n[o+1],l.dim2=u,l.canvasX=c.canvasX,l.panelSizeX=u.canvasX-c.canvasX,l.panelSizeY=e.model.canvasHeight/a,l.y=o*l.panelSizeY,l.canvasY=e.model.canvasHeight-l.y-l.panelSizeY}}:function(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<i;o++){var s=r[o+a*i]||(r[o+a*i]={}),l=n[o],c=n[o+1];s.dim1=l,s.dim2=c,s.canvasX=l.canvasX,s.panelSizeX=c.canvasX-l.canvasX,s.panelSizeY=e.model.canvasHeight/1,s.y=a*s.panelSizeY,s.canvasY=e.model.canvasHeight-s.y-s.panelSizeY}})(t,e)}function b(t){return t.ordinal?function(){return\"\"}:d.format(t.tickFormat)}function _(){H=!0,k=!0}function w(t){A=!1;var e=t.parent,r=t.brush.extent(),n=e.dimensions,i=n[t.xIndex].filter,a=H&&r[0]===r[1];a&&(t.brush.clear(),d.select(this).select(\"rect.extent\").attr(\"y\",-100));var o=a?[0,1]:r.slice();if(o[0]!==i[0]||o[1]!==i[1]){n[t.xIndex].filter=o,e.focusLayer&&e.focusLayer.render(e.panels,!0);var s=y(e);!G&&s?(e.contextLayer&&e.contextLayer.render(e.panels,!0),G=!0):G&&!s&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),G=!1)}H=!1}function M(t){var e=t.parent,r=t.brush.extent(),n=r[0]===r[1],i=e.dimensions[t.xIndex].filter;if(!n&&t.ordinal&&(i[0]=a(t.ordinalScale,i[0]),i[1]=a(t.ordinalScale,i[1]),i[0]===i[1]&&(i[0]=Math.max(0,i[0]-.05),i[1]=Math.min(1,i[1]+.05)),d.select(this).transition().duration(150).call(t.brush.extent(i)),e.focusLayer.render(e.panels,!0)),e.pickLayer&&e.pickLayer.render(e.panels,!0),A=!0,k=\"ending\",o&&o.filterChanged){var s=t.domainToUnitScale.invert,l=i.map(s);o.filterChanged(e.key,t.visibleIndex,l)}}var k=!1,A=!0,T=n.filter(function(t){return v(t).trace.visible}).map(s.bind(0,i)).map(l);r.each(function(t,e){return h.extendFlat(t,T[e])});var S=r.selectAll(\".gl-canvas\").each(function(t){t.viewModel=T[0],t.model=t.viewModel?t.viewModel.model:null}),E={renderers:[],dimensions:[]},L=null;S.filter(function(t){return t.pick}).style(\"pointer-events\",\"auto\").on(\"mousemove\",function(t){if(A&&t.lineLayer&&o&&o.hover){var e=d.event,r=this.width,n=this.height,i=d.mouse(this),a=i[0],s=i[1];if(a<0||s<0||a>=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),c=0!==l[3],u=c?l[2]+256*(l[1]+256*l[0]):null,f={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:u};u!==L&&(c?o.hover(f):o.unhover&&o.unhover(f),L=u)}}),S.style(\"opacity\",function(t){return t.pick?.01:1}),e.style(\"background\",\"rgba(255, 255, 255, 0)\");var C=e.selectAll(\".\"+f.cn.parcoords).data(T,m);C.exit().remove(),C.enter().append(\"g\").classed(f.cn.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(function(t){var e=t.selectAll(\"defs\").data(g,m);e.enter().append(\"defs\");var r=e.selectAll(\"#\"+f.id.filterBarPattern).data(g,m);r.enter().append(\"pattern\").attr(\"id\",f.id.filterBarPattern).attr(\"patternUnits\",\"userSpaceOnUse\"),r.attr(\"x\",-f.bar.width).attr(\"width\",f.bar.capturewidth).attr(\"height\",function(t){return t.model.height});var n=r.selectAll(\"rect\").data(g,m);n.enter().append(\"rect\").attr(\"shape-rendering\",\"crispEdges\"),n.attr(\"height\",function(t){return t.model.height}).attr(\"width\",f.bar.width).attr(\"x\",f.bar.width/2).attr(\"fill\",f.bar.fillcolor).attr(\"fill-opacity\",f.bar.fillopacity).attr(\"stroke\",f.bar.strokecolor).attr(\"stroke-opacity\",f.bar.strokeopacity).attr(\"stroke-width\",f.bar.strokewidth)}),C.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 z=C.selectAll(\".\"+f.cn.parcoordsControlView).data(g,m);z.enter().append(\"g\").classed(f.cn.parcoordsControlView,!0).style(\"box-sizing\",\"content-box\"),z.attr(\"transform\",function(t){return\"translate(\"+t.model.pad.l+\",\"+t.model.pad.t+\")\"});var D=z.selectAll(\".\"+f.cn.yAxis).data(function(t){return t.dimensions},m);D.enter().append(\"g\").classed(f.cn.yAxis,!0).each(function(t){E.dimensions.push(t)}),z.each(function(t){x(D,t)}),S.filter(function(t){return!!t.viewModel}).each(function(t){t.lineLayer=u(this,t,f.scatter),t.viewModel[t.key]=t.lineLayer,E.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),D.attr(\"transform\",function(t){return\"translate(\"+t.xScale(t.xIndex)+\", 0)\"}),D.call(d.behavior.drag().origin(function(t){return t}).on(\"drag\",function(t){var e=t.parent;A=!1,k||(t.x=Math.max(-f.overdrag,Math.min(t.model.width+f.overdrag,d.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,D.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}),x(D,e),D.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr(\"transform\",function(t){return\"translate(\"+t.xScale(t.xIndex)+\", 0)\"}),d.select(this).attr(\"transform\",\"translate(\"+t.x+\", 0)\"),D.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!y(e)),e.focusLayer.render&&e.focusLayer.render(e.panels))}).on(\"dragend\",function(t){var e=t.parent;k?\"ending\"===k&&(k=!1):(t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,x(D,e),d.select(this).attr(\"transform\",function(t){return\"translate(\"+t.x+\", 0)\"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!y(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),A=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex})))})),D.exit().remove();var I=D.selectAll(\".\"+f.cn.axisOverlays).data(g,m);I.enter().append(\"g\").classed(f.cn.axisOverlays,!0),I.selectAll(\".\"+f.cn.axis).remove();var P=I.selectAll(\".\"+f.cn.axis).data(g,m);P.enter().append(\"g\").classed(f.cn.axis,!0),P.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain();d.select(this).call(d.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n:null).tickFormat(t.ordinal?function(t){return t}:null).scale(r)),p.font(P.selectAll(\"text\"),t.model.tickFont)}),P.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),P.selectAll(\"text\").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 O=I.selectAll(\".\"+f.cn.axisHeading).data(g,m);O.enter().append(\"g\").classed(f.cn.axisHeading,!0);var F=O.selectAll(\".\"+f.cn.axisTitle).data(g,m);F.enter().append(\"text\").classed(f.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"user-select\",\"none\").style(\"pointer-events\",\"auto\"),F.attr(\"transform\",\"translate(0,\"+-f.axisTitleOffset+\")\").text(function(t){return t.label}).each(function(t){p.font(F,t.model.labelFont)});var R=I.selectAll(\".\"+f.cn.axisExtent).data(g,m);R.enter().append(\"g\").classed(f.cn.axisExtent,!0);var N=R.selectAll(\".\"+f.cn.axisExtentTop).data(g,m);N.enter().append(\"g\").classed(f.cn.axisExtentTop,!0),N.attr(\"transform\",\"translate(0,\"+-f.axisExtentOffset+\")\");var j=N.selectAll(\".\"+f.cn.axisExtentTopText).data(g,m);j.enter().append(\"text\").classed(f.cn.axisExtentTopText,!0).call(c),j.text(function(t){return b(t)(t.domainScale.domain().slice(-1)[0])}).each(function(t){p.font(j,t.model.rangeFont)});var B=R.selectAll(\".\"+f.cn.axisExtentBottom).data(g,m);B.enter().append(\"g\").classed(f.cn.axisExtentBottom,!0),B.attr(\"transform\",function(t){return\"translate(0,\"+(t.model.height+f.axisExtentOffset)+\")\"});var U=B.selectAll(\".\"+f.cn.axisExtentBottomText).data(g,m);U.enter().append(\"text\").classed(f.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(c),U.text(function(t){return b(t)(t.domainScale.domain()[0])}).each(function(t){p.font(U,t.model.rangeFont)});var V=I.selectAll(\".\"+f.cn.axisBrush).data(g,m),q=V.enter().append(\"g\").classed(f.cn.axisBrush,!0);V.each(function(t){t.brush||(t.brush=d.svg.brush().y(t.unitScale).on(\"brushstart\",_).on(\"brush\",w).on(\"brushend\",M),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),d.select(this).call(t.brush))}),q.selectAll(\"rect\").attr(\"x\",-f.bar.capturewidth/2).attr(\"width\",f.bar.capturewidth),q.selectAll(\"rect.extent\").attr(\"fill\",\"url(#\"+f.id.filterBarPattern+\")\").style(\"cursor\",\"ns-resize\").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr(\"y\",-100),q.selectAll(\".resize rect\").attr(\"height\",f.bar.handleheight).attr(\"opacity\",0).style(\"visibility\",\"visible\"),q.selectAll(\".resize.n rect\").style(\"cursor\",\"n-resize\").attr(\"y\",f.bar.handleoverlap-f.bar.handleheight),q.selectAll(\".resize.s rect\").style(\"cursor\",\"s-resize\").attr(\"y\",f.bar.handleoverlap);var H=!1,G=!1;return E}},{\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"./constants\":1035,\"./lines\":1038,d3:128}],1040:[function(t,e,r){(function(r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"regl\");e.exports=function(t,e){var a=t._fullLayout,o=a._toppaper,s=a._paperdiv,l=a._glcontainer;a._glcanvas.each(function(e){e.regl||(e.regl=i({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio}))});var c={},u={},f=a._size;e.forEach(function(e,r){c[r]=t.data[r].dimensions,u[r]=t.data[r].dimensions.slice()});n(s,o,l,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,r,n){var i=u[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit(\"plotly_restyle\")},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved: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)}}(u[e].filter(n));c[e].sort(a),u[e].filter(function(t){return!n(t)}).sort(function(t){return u[e].indexOf(t)}).forEach(function(t){c[e].splice(c[e].indexOf(t),1),c[e].splice(u[e].indexOf(t),0,t)}),t.emit(\"plotly_restyle\")}})}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./parcoords\":1039,regl:506}],1041:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../plots/attributes\"),o=t(\"../../plots/domain_attributes\"),s=t(\"../../lib/extend\").extendFlat,l=i({editType:\"calc\",colorEditType:\"style\"});e.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:n.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},editType:\"calc\"},text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:s({},a.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"calc\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),domain:o({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"number\",min:-360,max:360,dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"}}},{\"../../components/color/attributes\":617,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1042:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");r.name=\"pie\",r.plot=function(t){var e=n.getModule(\"pie\"),r=function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a._module===e&&!0===a.visible&&r.push(i)}return r}(t.calcdata,e);r.length&&e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"pie\"),a=e._has&&e._has(\"pie\");i&&!a&&n._pielayer.selectAll(\"g.trace\").remove()}},{\"../../registry\":873}],1043:[function(t,e,r){\"use strict\";function n(t){var e,r=t.slice();for(e=0;e<t.length;e++)r.push(a(t[e]).lighten(20).toHexString());for(e=0;e<t.length;e++)r.push(a(t[e]).darken(20).toHexString());return r}var i=t(\"fast-isnumeric\"),a=t(\"tinycolor2\"),o=t(\"../../components/color\"),s=t(\"./helpers\");e.exports=function(t,e){function r(t,e){return!!t&&(!!(t=a(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),_[e]||(_[e]=t),t))}var c,u,f,h,d,p=e.values,m=Array.isArray(p)&&p.length,g=e.labels,v=e.marker.colors,y=[],x=t._fullLayout,b=x.colorway,_=x._piecolormap,w={},M=0,k=x.hiddenlabels||[];if(x._piecolorway||b===o.defaults||(x._piecolorway=n(b)),e.dlabel)for(g=new Array(p.length),c=0;c<p.length;c++)g[c]=String(e.label0+c*e.dlabel);var A=(m?p:g).length;for(c=0;c<A;c++){if(m){if(u=p[c],!i(u))continue;if((u=+u)<0)continue}else u=1;void 0!==(f=g[c])&&\"\"!==f||(f=c);var T=w[f=String(f)];void 0===T?(w[f]=y.length,(h=-1!==k.indexOf(f))||(M+=u),y.push({v:u,label:f,color:r(v[c]),i:c,pts:[c],hidden:h})):((d=y[T]).v+=u,d.pts.push(c),d.hidden||(M+=u),!1===d.color&&v[c]&&(d.color=r(v[c],f)))}for(e.sort&&y.sort(function(t,e){return e.v-t.v}),c=0;c<y.length;c++)!1===(d=y[c]).color&&(_[d.label]?d.color=_[d.label]:(_[d.label]=d.color=function(t,e){if(!l){var r=o.defaults;l=n(r)}var i=e||l;return i[t%i.length]}(x._piedefaultcolorcount,x._piecolorway),x._piedefaultcolorcount++));if(y[0]&&(y[0].vTotal=M),e.textinfo&&\"none\"!==e.textinfo){var S,E=-1!==e.textinfo.indexOf(\"label\"),L=-1!==e.textinfo.indexOf(\"text\"),C=-1!==e.textinfo.indexOf(\"value\"),z=-1!==e.textinfo.indexOf(\"percent\"),D=x.separators;for(c=0;c<y.length;c++){if(d=y[c],S=E?[d.label]:[],L){var I=s.getFirstFilled(e.text,d.pts);I&&S.push(I)}C&&S.push(s.formatPieValue(d.v,D)),z&&S.push(s.formatPiePercent(d.v/M,D)),d.text=S.join(\"<br>\")}}return y};var l},{\"../../components/color\":618,\"./helpers\":1046,\"fast-isnumeric\":140,tinycolor2:546}],1044:[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\"),c=o(\"labels\");if(!Array.isArray(c)){if(!Array.isArray(l)||!l.length)return void(e.visible=!1);o(\"label0\"),o(\"dlabel\")}o(\"marker.line.width\")&&o(\"marker.line.color\");var u=o(\"marker.colors\");Array.isArray(u)||(e.marker.colors=[]),o(\"scalegroup\");var f=o(\"text\"),h=o(\"textinfo\",Array.isArray(f)?\"text+percent\":\"percent\");if(o(\"hovertext\"),h&&\"none\"!==h){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\":743,\"./attributes\":1041}],1045:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx/helpers\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),r}},{\"../../components/fx/helpers\":657}],1046:[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)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r<e.length;r++){var n=t[e[r]];if(n||0===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0}},{\"../../lib\":743}],1047:[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\":1041,\"./base_plot\":1042,\"./calc\":1043,\"./defaults\":1044,\"./layout_attributes\":1048,\"./layout_defaults\":1049,\"./plot\":1050,\"./style\":1051,\"./style_one\":1052}],1048:[function(t,e,r){\"use strict\";e.exports={hiddenlabels:{valType:\"data_array\",editType:\"calc\"}}},{}],1049:[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\":743,\"./layout_attributes\":1048}],1050:[function(t,e,r){\"use strict\";function n(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 i(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}}var a=t(\"d3\"),o=t(\"../../components/fx\"),s=t(\"../../components/color\"),l=t(\"../../components/drawing\"),c=t(\"../../lib/svg_text_utils\"),u=t(\"./helpers\"),f=t(\"./event_data\");e.exports=function(t,e){var r=t._fullLayout;!function(t,e){var r,n,i,a,o,s,l,c,u,f=[];for(i=0;i<t.length;i++){if(o=t[i][0],s=o.trace,r=e.w*(s.domain.x[1]-s.domain.x[0]),n=e.h*(s.domain.y[1]-s.domain.y[0]),l=s.pull,Array.isArray(l))for(l=0,a=0;a<s.pull.length;a++)s.pull[a]>l&&(l=s.pull[a]);o.r=Math.min(r,n)/(2+2*l),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===f.indexOf(s.scalegroup)&&f.push(s.scalegroup)}for(a=0;a<f.length;a++){for(u=1/0,c=f[a],i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(u=Math.min(u,o.r*o.r/o.vTotal));for(i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(o.r=Math.sqrt(u*o.vTotal))}}(e,r._size);var h=r._pielayer.selectAll(\"g.trace\").data(e);h.enter().append(\"g\").attr({\"stroke-linejoin\":\"round\",class:\"trace\"}),h.exit().remove(),h.order(),h.each(function(e){var h=a.select(this),d=e[0],p=d.trace;!function(t){function e(t){return[a.r*Math.sin(t),-a.r*Math.cos(t)]}var r,n,i,a=t[0],o=a.trace,s=o.rotation*Math.PI/180,l=2*Math.PI/a.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(r=0;r<t.length&&t[r].hidden;r++);if(r===t.length)return;s+=l*t[r].v,l*=-1,c=\"px1\",u=\"px0\"}for(i=e(s),r=0;r<t.length;r++)(n=t[r]).hidden||(n[c]=i,s+=l*n.v/2,n.pxmid=e(s),n.midangle=s,i=e(s+=l*n.v/2),n[u]=i,n.largeArc=n.v>a.vTotal/2?1:0)}(e),h.each(function(){var h=a.select(this).selectAll(\"g.slice\").data(e);h.enter().append(\"g\").classed(\"slice\",!0),h.exit().remove();var m=[[[],[]],[[],[]]],g=!1;h.each(function(e){function s(t,r,n,i){return\"a\"+i*d.r+\",\"+i*d.r+\" 0 \"+e.largeArc+(n?\" 1 \":\" 0 \")+i*(r[0]-t[0])+\",\"+i*(r[1]-t[1])}if(e.hidden)a.select(this).selectAll(\"path,g\").remove();else{e.pointNumber=e.i,e.curveNumber=p.index,m[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var h=d.cx,v=d.cy,y=a.select(this),x=y.selectAll(\"path.surface\").data([e]),b=!1,_=!1;if(x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.select(\"path.textline\").remove(),y.on(\"mouseover\",function(){var i=t._fullLayout,s=t._fullData[p.index];if(!t._dragging&&!1!==i.hovermode){var l=s.hoverinfo;if(Array.isArray(l)&&(l=o.castHoverinfo({hoverinfo:[u.castOption(l,e.pts)],_module:p._module},i,0)),\"all\"===l&&(l=\"label+text+value+percent+name\"),\"none\"!==l&&\"skip\"!==l&&l){var c=n(e,d),m=h+e.pxmid[0]*(1-c),g=v+e.pxmid[1]*(1-c),y=r.separators,x=[];if(-1!==l.indexOf(\"label\")&&x.push(e.label),-1!==l.indexOf(\"text\")){var w=u.castOption(s.hovertext||s.text,e.pts);w&&x.push(w)}-1!==l.indexOf(\"value\")&&x.push(u.formatPieValue(e.v,y)),-1!==l.indexOf(\"percent\")&&x.push(u.formatPiePercent(e.v/d.vTotal,y));var M=p.hoverlabel,k=M.font;o.loneHover({x0:m-c*d.r,x1:m+c*d.r,y:g,text:x.join(\"<br>\"),name:-1!==l.indexOf(\"name\")?s.name:void 0,idealAlign:e.pxmid[0]<0?\"left\":\"right\",color:u.castOption(M.bgcolor,e.pts)||e.color,borderColor:u.castOption(M.bordercolor,e.pts),fontFamily:u.castOption(k.family,e.pts),fontSize:u.castOption(k.size,e.pts),fontColor:u.castOption(k.color,e.pts)},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t}),b=!0}t.emit(\"plotly_hover\",{points:[f(e,s)],event:a.event}),_=!0}}).on(\"mouseout\",function(r){var n=t._fullLayout,i=t._fullData[p.index];_&&(r.originalEvent=a.event,t.emit(\"plotly_unhover\",{points:[f(e,i)],event:a.event}),_=!1),b&&(o.loneUnhover(n._hoverlayer.node()),b=!1)}).on(\"click\",function(){var r=t._fullLayout,n=t._fullData[p.index];t._dragging||!1===r.hovermode||(t._hoverdata=[f(e,n)],o.click(t,a.event))}),p.pull){var w=+u.castOption(p.pull,e.pts)||0;w>0&&(h+=w*e.pxmid[0],v+=w*e.pxmid[1])}e.cxFinal=h,e.cyFinal=v;var M=p.hole;if(e.v===d.vTotal){var k=\"M\"+(h+e.px0[0])+\",\"+(v+e.px0[1])+s(e.px0,e.pxmid,!0,1)+s(e.pxmid,e.px0,!0,1)+\"Z\";M?x.attr(\"d\",\"M\"+(h+M*e.px0[0])+\",\"+(v+M*e.px0[1])+s(e.px0,e.pxmid,!1,M)+s(e.pxmid,e.px0,!1,M)+\"Z\"+k):x.attr(\"d\",k)}else{var A=s(e.px0,e.px1,!0,1);if(M){var T=1-M;x.attr(\"d\",\"M\"+(h+M*e.px1[0])+\",\"+(v+M*e.px1[1])+s(e.px1,e.px0,!1,M)+\"l\"+T*e.px0[0]+\",\"+T*e.px0[1]+A+\"Z\")}else x.attr(\"d\",\"M\"+h+\",\"+v+\"l\"+e.px0[0]+\",\"+e.px0[1]+A+\"Z\")}var S=u.castOption(p.textposition,e.pts),E=y.selectAll(\"g.slicetext\").data(e.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each(function(){var r=a.select(this).selectAll(\"text\").data([0]);r.enter().append(\"text\").attr(\"data-notex\",1),r.exit().remove(),r.text(e.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(l.font,\"outside\"===S?p.outsidetextfont:p.insidetextfont).call(c.convertToTspans,t);var o,s=l.bBox(r.node());\"outside\"===S?o=i(s,e):(o=function(t,e,r){var i=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=n(e,r),c={scale:l*r.r*2/i,rCenter:1-l,rotate:0};if(c.scale>=1)return c;var u=a+1/(2*Math.tan(o)),f=r.r*Math.min(1/(Math.sqrt(u*u+.5)+u),s/(Math.sqrt(a*a+s/2)+a)),h={scale:2*f/t.height,rCenter:Math.cos(f/r.r)-f*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>h.scale?g:h;return c.scale<1&&v.scale>c.scale?v:c}(s,e,d),\"auto\"===S&&o.scale<1&&(r.call(l.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(s=l.bBox(r.node())),o=i(s,e)));var u=h+e.pxmid[0]*o.rCenter+(o.x||0),f=v+e.pxmid[1]*o.rCenter+(o.y||0);o.outside&&(e.yLabelMin=f-s.height/2,e.yLabelMid=f,e.yLabelMax=f+s.height/2,e.labelExtraX=0,e.labelExtraY=0,g=!0),r.attr(\"transform\",\"translate(\"+u+\",\"+f+\")\"+(o.scale<1?\"scale(\"+o.scale+\")\":\"\")+(o.rotate?\"rotate(\"+o.rotate+\")\":\"\")+\"translate(\"+-(s.left+s.right)/2+\",\"+-(s.top+s.bottom)/2+\")\")})}}),g&&function(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}function i(t,r){r||(r={});var n,i,a,s,d=r.labelExtraY+(o?r.yLabelMax:r.yLabelMin),p=o?t.yLabelMin:t.yLabelMax,g=o?t.yLabelMax:t.yLabelMin,v=t.cyFinal+c(t.px0[1],t.px1[1]),y=d-p;if(y*h>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(i=0;i<m.length;i++)(a=m[i])===t||(u.castOption(e.pull,t.pts)||0)>=(u.castOption(e.pull,a.pts)||0)||((t.pxmid[1]-a.pxmid[1])*h>0?(y=a.cyFinal+c(a.px0[1],a.px1[1])-p-t.labelExtraY)*h>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*h>0&&(n=3*f*Math.abs(i-m.indexOf(t)),(s=a.cxFinal+l(a.px0[0],a.px1[0])+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*f>0&&(t.labelExtraX+=s)))}var a,o,s,l,c,f,h,d,p,m,g,v,y;for(o=0;o<2;o++)for(s=o?r:n,c=o?Math.max:Math.min,h=o?1:-1,a=0;a<2;a++){for(l=a?Math.max:Math.min,f=a?1:-1,(d=t[o][a]).sort(s),p=t[1-o][a],m=p.concat(d),v=[],g=0;g<d.length;g++)void 0!==d[g].yLabelMid&&v.push(d[g]);for(y=!1,g=0;o&&g<p.length;g++)if(void 0!==p[g].yLabelMid){y=p[g];break}for(g=0;g<v.length;g++){var x=g&&v[g-1];y&&!g&&(x=y),i(v[g],x)}}}(m,p),h.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=a.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=\"M\"+n+\",\"+(t.cyFinal+t.pxmid[1]),o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],c=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(c)?i+=\"l\"+c*t.pxmid[0]/t.pxmid[1]+\",\"+c+\"H\"+(n+t.labelExtraX+o):i+=\"l\"+t.labelExtraX+\",\"+l+\"v\"+(c-l)+\"h\"+o}else i+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+o;e.append(\"path\").classed(\"textline\",!0).call(s.stroke,p.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,p.outsidetextfont.size/8),d:i,fill:\"none\"})}})})}),setTimeout(function(){h.selectAll(\"tspan\").each(function(){var t=a.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))})},0)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../lib/svg_text_utils\":766,\"./event_data\":1045,\"./helpers\":1046,d3:128}],1051:[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].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each(function(t){n.select(this).call(i,t,e)})})}},{\"./style_one\":1052,d3:128}],1052:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./helpers\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style({\"stroke-width\":s}).call(n.fill,e.color).call(n.stroke,o)}},{\"../../components/color\":618,\"./helpers\":1046}],1053:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\");e.exports={x:n.x,y:n.y,xy:{valType:\"data_array\",editType:\"calc\"},indices:{valType:\"data_array\",editType:\"calc\"},xbounds:{valType:\"data_array\",editType:\"calc\"},ybounds:{valType:\"data_array\",editType:\"calc\"},text:n.text,marker:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,arrayOk:!1,editType:\"calc\"},blend:{valType:\"boolean\",dflt:null,editType:\"calc\"},sizemin:{valType:\"number\",min:.1,max:2,dflt:.5,editType:\"calc\"},sizemax:{valType:\"number\",min:.1,dflt:20,editType:\"calc\"},border:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},arearatio:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"}}},{\"../scatter/attributes\":1066}],1054:[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=i(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var i=t(\"gl-pointcloud2d\"),a=t(\"../../lib/str2rgbarray\"),o=t(\"../scatter/get_trace_color\"),s=[\"xaxis\",\"yaxis\"],l=n.prototype;l.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}},l.update=function(t){this.index=t.index,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=o(t,{})},l.updateFast=function(t){var e,r,n,i,o,s,l=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,u=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,h=t.indices,d=this.bounds;if(u){if(n=u,e=u.length>>>1,f)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;s<e;s++)i=n[2*s],o=n[2*s+1],i<d[0]&&(d[0]=i),i>d[2]&&(d[2]=i),o<d[1]&&(d[1]=o),o>d[3]&&(d[3]=o);if(h)r=h;else for(r=new Int32Array(e),s=0;s<e;s++)r[s]=s}else for(e=l.length,n=new Float32Array(2*e),r=new Int32Array(e),s=0;s<e;s++)i=l[s],o=c[s],r[s]=s,n[2*s]=i,n[2*s+1]=o,i<d[0]&&(d[0]=i),i>d[2]&&(d[2]=i),o<d[1]&&(d[1]=o),o>d[3]&&(d[3]=o);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=a(t.marker.color),m=a(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||c.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,x=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=x,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,x/2)},l.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)(n=(r=this.scene[s[o]])._min)||(n=[]),n.push({val:t[o],pad:a}),(i=r._max)||(i=[]),i.push({val:t[o+2],pad:a})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new n(t,e.uid);return r.update(e),r}},{\"../../lib/str2rgbarray\":765,\"../scatter/get_trace_color\":1076,\"gl-pointcloud2d\":235}],1055:[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\":743,\"./attributes\":1053}],1056:[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=[\"gl\",\"gl2d\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/gl2d\":829,\"../scatter3d/calc\":1092,\"./attributes\":1053,\"./convert\":1054,\"./defaults\":1055}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../components/fx/attributes\"),s=t(\"../../plots/domain_attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;e.exports=c({hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hoverlabel:o.hoverlabel,domain:s({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\"},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),node:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20}},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]}}},\"calc\",\"nested\")},{\"../../components/color/attributes\":617,\"../../components/fx/attributes\":652,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../components/fx/layout_attributes\");r.name=\"sankey\",r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){var e=i(t.calcdata,\"sankey\");a(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()}},{\"../../components/fx/layout_attributes\":661,\"../../plot_api/edit_types\":773,\"../../plots/get_data\":826,\"./plot\":1063}],1059:[function(t,e,r){\"use strict\";var n=t(\"strongly-connected-components\"),i=t(\"../../lib\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){return function(t,e,r){for(var i=t.map(function(){return[]}),a=0;a<Math.min(e.length,r.length);a++){if(e[a]===r[a])return!0;i[e[a]].push(r[a])}return n(i).components.some(function(t){return t.length>1})}(e.node.label,e.link.source,e.link.target)&&(i.error(\"Circularity is present in the Sankey data. Removing all nodes and links.\"),e.link.label=[],e.link.source=[],e.link.target=[],e.link.value=[],e.link.color=[],e.node.label=[],e.node.color=[]),a({link:e.link,node:e.node})}},{\"../../lib\":743,\"../../lib/gup\":740,\"strongly-connected-components\":537}],1060:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"cubic-in-out\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeCapture:\"node-capture\",nodeCentered:\"node-entered\",nodeLabelGuide:\"node-label-guide\",nodeLabel:\"node-label\",nodeLabelTextPath:\"node-label-text-path\"}}},{}],1061:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"tinycolor2\");e.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}l(\"node.label\"),l(\"node.pad\"),l(\"node.thickness\"),l(\"node.line.color\"),l(\"node.line.width\");var c=s.colorway;l(\"node.color\",e.node.label.map(function(t,e){return a.addOpacity(function(t){return c[t%c.length]}(e),.8)})),l(\"link.label\"),l(\"link.source\"),l(\"link.target\"),l(\"link.value\"),l(\"link.line.color\"),l(\"link.line.width\"),l(\"link.color\",e.link.value.map(function(){return o(s.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\"})),l(\"domain.x\"),l(\"domain.y\"),l(\"orientation\"),l(\"valueformat\"),l(\"valuesuffix\"),l(\"arrangement\"),n.coerceFont(l,\"textfont\",n.extendFlat({},s.font));e.node.label.some(function(t,r){return-1===e.link.source.indexOf(r)&&-1===e.link.target.indexOf(r)})&&n.warn(\"Some of the nodes are neither sources nor targets, they will not be displayed.\")}},{\"../../components/color\":618,\"../../lib\":743,\"./attributes\":1057,tinycolor2:546}],1062:[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.moduleType=\"trace\",n.name=\"sankey\",n.basePlotModule=t(\"./base_plot\"),n.categories=[\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1057,\"./base_plot\":1058,\"./calc\":1059,\"./defaults\":1061,\"./plot\":1063}],1063:[function(t,e,r){\"use strict\";function n(t){return\"\"!==t}function i(t,e){return t.filter(function(t){return t.key===e.traceId})}function a(t,e){p.select(t).select(\"path\").style(\"fill-opacity\",e),p.select(t).select(\"rect\").style(\"fill-opacity\",e)}function o(t){p.select(t).select(\"text.name\").style(\"fill\",\"black\")}function s(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function l(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function c(t,e,r){e&&r&&i(r,e).selectAll(\".\"+x.sankeyLink).filter(s(e)).call(f.bind(0,e,r,!1))}function u(t,e,r){e&&r&&i(r,e).selectAll(\".\"+x.sankeyLink).filter(s(e)).call(h.bind(0,e,r,!1))}function f(t,e,r,n){var a=n.datum().link.label;n.style(\"fill-opacity\",.4),a&&i(e,t).selectAll(\".\"+x.sankeyLink).filter(function(t){return t.link.label===a}).style(\"fill-opacity\",.4),r&&i(e,t).selectAll(\".\"+x.sankeyNode).filter(l(t)).call(c)}function h(t,e,r,n){var a=n.datum().link.label;n.style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),a&&i(e,t).selectAll(\".\"+x.sankeyLink).filter(function(t){return t.link.label===a}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),r&&i(e,t).selectAll(x.sankeyNode).filter(l(t)).call(u)}function d(t,e){var r=t.hoverlabel||{},n=y.nestedProperty(r,e).get();return!Array.isArray(n)&&n}var p=t(\"d3\"),m=t(\"./render\"),g=t(\"../../components/fx\"),v=t(\"../../components/color\"),y=t(\"../../lib\"),x=t(\"./constants\").cn,b=y._;e.exports=function(t,e){var r=t._fullLayout,i=r._paper,s=r._size,l=b(t,\"source:\")+\" \",y=b(t,\"target:\")+\" \",_=b(t,\"incoming flow count:\")+\" \",w=b(t,\"outgoing flow count:\")+\" \";m(i,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},{linkEvents:{hover:function(e,r,n){p.select(e).call(f.bind(0,r,n,!0)),t.emit(\"plotly_hover\",{event:p.event,points:[r.link]})},follow:function(e,i){var s=i.link.trace,c=t._fullLayout._paperdiv.node().getBoundingClientRect(),u=e.getBoundingClientRect(),f=u.left+u.width/2,h=u.top+u.height/2,m=g.loneHover({x:f-c.left,y:h-c.top,name:p.format(i.valueFormat)(i.link.value)+i.valueSuffix,text:[i.link.label||\"\",l+i.link.source.label,y+i.link.target.label].filter(n).join(\"<br>\"),color:d(s,\"bgcolor\")||v.addOpacity(i.tinyColorHue,1),borderColor:d(s,\"bordercolor\"),fontFamily:d(s,\"font.family\"),fontSize:d(s,\"font.size\"),fontColor:d(s,\"font.color\"),idealAlign:p.event.x<f?\"right\":\"left\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});a(m,.65),o(m)},unhover:function(e,n,i){p.select(e).call(h.bind(0,n,i,!0)),t.emit(\"plotly_unhover\",{event:p.event,points:[n.link]}),g.loneUnhover(r._hoverlayer.node())},select:function(e,r){var n=r.link;n.originalEvent=p.event,t._hoverdata=[n],g.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,n){p.select(e).call(c,r,n),t.emit(\"plotly_hover\",{event:p.event,points:[r.node]})},follow:function(e,i){var s=i.node.trace,l=p.select(e).select(\".\"+x.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),u=l.node().getBoundingClientRect(),f=u.left-2-c.left,h=u.right+2-c.left,m=u.top+u.height/4-c.top,v=g.loneHover({x0:f,x1:h,y:m,name:p.format(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,_+i.node.targetLinks.length,w+i.node.sourceLinks.length].filter(n).join(\"<br>\"),color:d(s,\"bgcolor\")||i.tinyColorHue,borderColor:d(s,\"bordercolor\"),fontFamily:d(s,\"font.family\"),fontSize:d(s,\"font.size\"),fontColor:d(s,\"font.color\"),idealAlign:\"left\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});a(v,.85),o(v)},unhover:function(e,n,i){p.select(e).call(u,n,i),t.emit(\"plotly_unhover\",{event:p.event,points:[n.node]}),g.loneUnhover(r._hoverlayer.node())},select:function(e,r,n){var i=r.node;i.originalEvent=p.event,t._hoverdata=[i],p.select(e).call(u,r,n),g.click(t,{target:!0})}}})}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../lib\":743,\"./constants\":1060,\"./render\":1064,d3:128}],1064:[function(t,e,r){\"use strict\";function n(t){t.lastDraggedX=t.x,t.lastDraggedY=t.y}function i(t){return function(e){return e.node.originalX===t.node.originalX}}function a(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y+t[e].dy/2}function o(t){t.attr(\"transform\",function(t){return\"translate(\"+t.node.x.toFixed(3)+\", \"+(t.node.y-t.node.dy/2).toFixed(3)+\")\"})}function s(t){var e=t.sankey.nodes();!function(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y-t[e].dy/2}(e);var r=t.sankey.link()(t.link);return a(e),r}function l(t){t.call(o)}function c(t,e){t.call(l),e.attr(\"d\",s)}function u(t){t.attr(\"width\",function(t){return t.visibleWidth}).attr(\"height\",function(t){return t.visibleHeight})}function f(t){return t.link.dy>1||t.linkLineWidth>0}function h(t){return\"translate(\"+t.translateX+\",\"+t.translateY+\")\"+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function d(t){return\"translate(\"+(t.horizontal?0:t.labelY)+\" \"+(t.horizontal?t.labelY:0)+\")\"}function p(t){return w.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+_.nodeTextOffsetHorizontal:_.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-_.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-_.nodeTextOffsetHorizontal,0]])}function m(t){return t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\"}function g(t){return t.horizontal?\"scale(1 1)\":\"scale(-1 1)\"}function v(t){return t.darkBackground&&!t.horizontal?\"rgb(255,255,255)\":\"rgb(0,0,0)\"}function y(t){return t.horizontal&&t.left?\"100%\":\"0%\"}function x(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",function(t){t.interactionState.dragInProgress||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on(\"mousemove.basic\",function(t){t.interactionState.dragInProgress||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on(\"mouseout.basic\",function(t){t.interactionState.dragInProgress||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on(\"click.basic\",function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||r.select(this,t,e)})}function b(t,e,r){var a=w.behavior.drag().origin(function(t){return t.node}).on(\"dragstart\",function(a){if(\"fixed\"!==a.arrangement&&(E.raiseToTop(this),a.interactionState.dragInProgress=a.node,n(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+Math.floor(a.node.originalX);a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r){var n=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=S.forceSimulation(n).alphaDecay(0).force(\"collide\",S.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(_.forceIterations)).force(\"constrain\",function(t,e,r,n){return function(){for(var t=0,i=0;i<r.length;i++){var a=r[i];a===n.interactionState.dragInProgress?(a.x=a.lastDraggedX,a.y=a.lastDraggedY):(a.vx=(a.originalX-a.x)/_.forceTicksPerFrame,a.y=Math.min(n.size-a.dy/2,Math.max(a.dy/2,a.y))),t=Math.max(t,Math.abs(a.vx),Math.abs(a.vy))}!n.interactionState.dragInProgress&&t<.1&&n.forceLayouts[e].alpha()>0&&n.forceLayouts[e].alpha(0)}}(0,e,n,r)).stop()}(0,o,a),function(t,e,r,n){window.requestAnimationFrame(function a(){for(var o=0;o<_.forceTicksPerFrame;o++)r.forceLayouts[n].tick();r.sankey.relayout(),c(t.filter(i(r)),e),r.forceLayouts[n].alpha()>0&&window.requestAnimationFrame(a)})}(t,e,a,o)}}).on(\"drag\",function(r){if(\"fixed\"!==r.arrangement){var a=w.event.x,o=w.event.y;\"snap\"===r.arrangement?(r.node.x=a,r.node.y=o):(\"freeform\"===r.arrangement&&(r.node.x=a),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,o))),n(r.node),\"snap\"!==r.arrangement&&(r.sankey.relayout(),c(t.filter(i(r)),e))}}).on(\"dragend\",function(t){t.interactionState.dragInProgress=!1});t.on(\".drag\",null).call(a)}var _=t(\"./constants\"),w=t(\"d3\"),M=t(\"tinycolor2\"),k=t(\"../../components/color\"),A=t(\"../../components/drawing\"),T=t(\"@plotly/d3-sankey\").sankey,S=t(\"d3-force\"),E=t(\"../../lib\"),L=t(\"../../lib/gup\").keyFun,C=t(\"../../lib/gup\").repeat,z=t(\"../../lib/gup\").unwrap;e.exports=function(t,e,r,n){var i=t.selectAll(\".\"+_.cn.sankey).data(e.filter(function(t){return z(t).trace.visible}).map(function(t,e,r){for(var n,i=z(e).trace,o=i.domain,s=i.node,l=i.link,c=i.arrangement,u=\"h\"===i.orientation,f=i.node.pad,h=i.node.thickness,d=i.node.line.color,p=i.node.line.width,m=i.link.line.color,g=i.link.line.width,v=i.valueformat,y=i.valuesuffix,x=i.textfont,b=t.width*(o.x[1]-o.x[0]),w=t.height*(o.y[1]-o.y[0]),M=s.label.map(function(t,e){return{pointNumber:e,label:t,color:E.isArray(s.color)?s.color[e]:s.color}}),k=l.value.map(function(t,e){return{pointNumber:e,label:l.label[e],color:E.isArray(l.color)?l.color[e]:l.color,source:l.source[e],target:l.target[e],value:t}}),A=T().size(u?[b,w]:[w,b]).nodeWidth(h).nodePadding(f).nodes(M).links(k).layout(_.sankeyIterations),S=A.nodes(),L=0;L<S.length;L++)(n=S[L]).width=b,n.height=w;return a(M),{key:r,trace:i,guid:Math.floor(1e12*(1+Math.random())),horizontal:u,width:b,height:w,nodePad:f,nodeLineColor:d,nodeLineWidth:p,linkLineColor:m,linkLineWidth:g,valueFormat:v,valueSuffix:y,textFont:x,translateX:o.x[0]*b+t.margin.l,translateY:t.height-o.y[1]*t.height+t.margin.t,dragParallel:u?w:b,dragPerpendicular:u?b:w,nodes:M,links:k,arrangement:c,sankey:A,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,r)),L);i.exit().remove(),i.enter().append(\"g\").classed(_.cn.sankey,!0).style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"shape-rendering\",\"geometricPrecision\").style(\"pointer-events\",\"auto\").style(\"box-sizing\",\"content-box\").attr(\"transform\",h),i.transition().ease(_.ease).duration(_.duration).attr(\"transform\",h);var l=i.selectAll(\".\"+_.cn.sankeyLinks).data(C,L);l.enter().append(\"g\").classed(_.cn.sankeyLinks,!0).style(\"fill\",\"none\");var c=l.selectAll(\".\"+_.cn.sankeyLink).data(function(t){return t.sankey.links().filter(function(t){return t.value}).map(function(t,e,r){var n=M(r.color),i=r.source.label+\"|\"+r.target.label,a=t[i];t[i]=(a||0)+1;var o=i+\"__\"+t[i];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:o,traceId:e.key,link:r,tinyColorHue:k.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,interactionState:e.interactionState}}.bind(null,{},t))},L);c.enter().append(\"path\").classed(_.cn.sankeyLink,!0).attr(\"d\",s).call(x,i,n.linkEvents),c.style(\"stroke\",function(t){return f(t)?k.tinyRGB(M(t.linkLineColor)):t.tinyColorHue}).style(\"stroke-opacity\",function(t){return f(t)?k.opacity(t.linkLineColor):t.tinyColorAlpha}).style(\"stroke-width\",function(t){return f(t)?t.linkLineWidth:1}).style(\"fill\",function(t){return t.tinyColorHue}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),c.transition().ease(_.ease).duration(_.duration).attr(\"d\",s),c.exit().transition().ease(_.ease).duration(_.duration).style(\"opacity\",0).remove();var w=i.selectAll(\".\"+_.cn.sankeyNodeSet).data(C,L);w.enter().append(\"g\").classed(_.cn.sankeyNodeSet,!0),w.style(\"cursor\",function(t){switch(t.arrangement){case\"fixed\":return\"default\";case\"perpendicular\":return\"ns-resize\";default:return\"move\"}});var S=w.selectAll(\".\"+_.cn.sankeyNode).data(function(t){var e=t.sankey.nodes();return function(t){var e,r=[];for(e=0;e<t.length;e++)t[e].originalX=t[e].x,t[e].originalY=t[e].y,-1===r.indexOf(t[e].x)&&r.push(t[e].x);for(r.sort(function(t,e){return t-e}),e=0;e<t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.filter(function(t){return t.value}).map(function(t,e,r){var n=M(r.color),i=_.nodePadAcross,a=e.nodePad/2,o=r.dx,s=Math.max(.5,r.dy),l=r.label,c=t[l];t[l]=(c||0)+1;var u=l+\"__\"+t[l];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:u,traceId:e.key,node:r,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(o),visibleHeight:s,zoneX:-i,zoneY:-a,zoneWidth:o+2*i,zoneHeight:s+2*a,labelY:e.horizontal?r.dy/2+1:r.dx/2+1,left:1===r.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:k.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,u].join(\" \"),interactionState:e.interactionState}}.bind(null,{},t))},L);S.enter().append(\"g\").classed(_.cn.sankeyNode,!0).call(o).call(x,i,n.nodeEvents),S.call(b,c,n),S.transition().ease(_.ease).duration(_.duration).call(o),S.exit().transition().ease(_.ease).duration(_.duration).style(\"opacity\",0).remove();var D=S.selectAll(\".\"+_.cn.nodeRect).data(C);D.enter().append(\"rect\").classed(_.cn.nodeRect,!0).call(u),D.style(\"stroke-width\",function(t){return t.nodeLineWidth}).style(\"stroke\",function(t){return k.tinyRGB(M(t.nodeLineColor))}).style(\"stroke-opacity\",function(t){return k.opacity(t.nodeLineColor)}).style(\"fill\",function(t){return t.tinyColorHue}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),D.transition().ease(_.ease).duration(_.duration).call(u);var I=S.selectAll(\".\"+_.cn.nodeCapture).data(C);I.enter().append(\"rect\").classed(_.cn.nodeCapture,!0).style(\"fill-opacity\",0),I.attr(\"x\",function(t){return t.zoneX}).attr(\"y\",function(t){return t.zoneY}).attr(\"width\",function(t){return t.zoneWidth}).attr(\"height\",function(t){return t.zoneHeight});var P=S.selectAll(\".\"+_.cn.nodeCentered).data(C);P.enter().append(\"g\").classed(_.cn.nodeCentered,!0).attr(\"transform\",d),P.transition().ease(_.ease).duration(_.duration).attr(\"transform\",d);var O=P.selectAll(\".\"+_.cn.nodeLabelGuide).data(C);O.enter().append(\"path\").classed(_.cn.nodeLabelGuide,!0).attr(\"id\",function(t){return t.uniqueNodeLabelPathId}).attr(\"d\",p).attr(\"transform\",m),O.transition().ease(_.ease).duration(_.duration).attr(\"d\",p).attr(\"transform\",m);var F=P.selectAll(\".\"+_.cn.nodeLabel).data(C);F.enter().append(\"text\").classed(_.cn.nodeLabel,!0).attr(\"transform\",g).style(\"user-select\",\"none\").style(\"cursor\",\"default\").style(\"fill\",\"black\"),F.style(\"text-shadow\",function(t){return t.horizontal?\"-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff\":\"none\"}).each(function(t){A.font(F,t.textFont)}),F.transition().ease(_.ease).duration(_.duration).attr(\"transform\",g);var R=F.selectAll(\".\"+_.cn.nodeLabelTextPath).data(C);R.enter().append(\"textPath\").classed(_.cn.nodeLabelTextPath,!0).attr(\"alignment-baseline\",\"middle\").attr(\"xlink:href\",function(t){return\"#\"+t.uniqueNodeLabelPathId}).attr(\"startOffset\",y).style(\"fill\",v),R.text(function(t){return t.horizontal||t.node.dy>5?t.node.label:\"\"}).attr(\"text-anchor\",function(t){return t.horizontal&&t.left?\"end\":\"start\"}),R.transition().ease(_.ease).duration(_.duration).attr(\"startOffset\",y).style(\"fill\",v)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"./constants\":1060,\"@plotly/d3-sankey\":41,d3:128,\"d3-force\":124,tinycolor2:546}],1065:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;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 i=e.marker;if(i){n.mergeArray(i.size,t,\"ms\"),n.mergeArray(i.opacity,t,\"mo\"),n.mergeArray(i.symbol,t,\"mx\"),n.mergeArray(i.color,t,\"mc\");var a=i.line;i.line&&(n.mergeArray(a.color,t,\"mlc\"),n.mergeArray(a.width,t,\"mlw\"));var o=i.gradient;o&&\"none\"!==o.type&&(n.mergeArray(o.type,t,\"mgt\"),n.mergeArray(o.color,t,\"mgc\"))}}},{\"../../lib\":743}],1066:[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(\"../../plots/font_attributes\"),s=t(\"../../components/drawing/attributes\").dash,l=t(\"../../components/drawing\"),c=(t(\"./constants\"),t(\"../../lib/extend\").extendFlat);e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",dflt:1,editType:\"calc\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dy:{valType:\"number\",dflt:1,editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"],editType:\"calc\"},hoveron:{valType:\"flaglist\",flags:[\"points\",\"fills\"],editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},shape:{valType:\"enumerated\",values:[\"linear\",\"spline\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},smoothing:{valType:\"number\",min:0,max:1.3,dflt:1,editType:\"plot\"},dash:c({},s,{editType:\"style\"}),simplify:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cliponaxis:{valType:\"boolean\",dflt:!0,editType:\"plot\"},fill:{valType:\"enumerated\",values:[\"none\",\"tozeroy\",\"tozerox\",\"tonexty\",\"tonextx\",\"toself\",\"tonext\"],dflt:\"none\",editType:\"calc\"},fillcolor:{valType:\"color\",editType:\"style\"},marker:c({symbol:{valType:\"enumerated\",values:l.symbolList,dflt:\"circle\",arrayOk:!0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,arrayOk:!0,editType:\"style\"},size:{valType:\"number\",min:0,dflt:6,arrayOk:!0,editType:\"calcIfAutorange\"},maxdisplayed:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},sizeref:{valType:\"number\",dflt:1,editType:\"calc\"},sizemin:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"diameter\",\"area\"],dflt:\"diameter\",editType:\"calc\"},showscale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},colorbar:a,line:c({width:{valType:\"number\",min:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},n(\"marker.line\")),gradient:{type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],arrayOk:!0,dflt:\"none\",editType:\"calc\"},color:{valType:\"color\",arrayOk:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},n(\"marker\")),selected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},unselected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},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,editType:\"calc\"},textfont:o({editType:\"calc\",colorEditType:\"style\",arrayOk:!0}),r:{valType:\"data_array\",editType:\"calc\"},t:{valType:\"data_array\",editType:\"calc\"},error_y:i,error_x:i}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/drawing\":643,\"../../components/drawing/attributes\":642,\"../../components/errorbars/attributes\":645,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"./constants\":1072}],1067:[function(t,e,r){\"use strict\";function n(t,e){if(s.hasMarkers(t)){var r,n=t.marker,i=1.6*(t.marker.sizeref||1);if(r=\"area\"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/i),3)}:function(t){return Math.max((t||0)/i,3)},Array.isArray(n.size)){var o={type:\"linear\"};a.setConvert(o);var l=o.makeCalcdata(t.marker,\"size\");return l.length>e&&l.splice(e,l.length-e),l.map(r)}return r(n.size)}}var i=t(\"fast-isnumeric\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../constants/numerical\").BADNUM,s=t(\"./subtypes\"),l=t(\"./colorscale_calc\"),c=t(\"./arrays_to_calcdata\"),u=t(\"./calc_selection\");e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis||\"x\"),f=a.getFromId(t,e.yaxis||\"y\"),h=r.makeCalcdata(e,\"x\"),d=f.makeCalcdata(e,\"y\"),p=Math.min(h.length,d.length);r._minDtick=0,f._minDtick=0,h.length>p&&h.splice(p,h.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0},v=n(e,p);v&&(m.ppad=g.ppad=v),!(\"tozerox\"===e.fill||\"tonextx\"===e.fill&&t.firstscatter)||h[0]===h[p-1]&&d[0]===d[p-1]?e.error_y.visible||-1===[\"tonexty\",\"tozeroy\"].indexOf(e.fill)&&(s.hasMarkers(e)||s.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!(\"tozeroy\"===e.fill||\"tonexty\"===e.fill&&t.firstscatter)||h[0]===h[p-1]&&d[0]===d[p-1]?-1!==[\"tonextx\",\"tozerox\"].indexOf(e.fill)&&(g.padded=!1):g.tozero=!0,a.expand(r,h,m),a.expand(f,d,g);for(var y=new Array(p),x=0;x<p;x++)y[x]=i(h[x])&&i(d[x])?{x:h[x],y:d[x]}:{x:o,y:o},e.ids&&(y[x].id=String(e.ids[x]));return c(y,e),l(e),u(y,e),t.firstscatter=!1,y},calcMarkerSize:n}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"./arrays_to_calcdata\":1065,\"./calc_selection\":1068,\"./colorscale_calc\":1071,\"./subtypes\":1088,\"fast-isnumeric\":140}],1068:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){Array.isArray(e.selectedpoints)&&n.tagSelected(t,e)}},{\"../../lib\":743}],1069:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0;e<t.length;e++){var r=t[e];if(\"scatter\"===r.type){var n=r.fill;if(\"none\"!==n&&\"toself\"!==n&&(r.opacity=void 0,\"tonexty\"===n||\"tonextx\"===n))for(var i=e-1;i>=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1070:[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,c=\"cb\"+r.uid;if(t._fullLayout._infolayer.selectAll(\".\"+c).remove(),void 0!==l&&l.showscale){var u=l.color,f=l.cmin,h=l.cmax;n(f)||(f=i.aggNums(Math.min,null,u)),n(h)||(h=i.aggNums(Math.max,null,u));var d=e[0].t.cb=s(t,c),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,f,h),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:f,end:h,size:(h-f)/254}).options(l.colorbar)()}else a.autoMargin(t,c)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1071:[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\":625,\"../../components/colorscale/has_colorscale\":632,\"./subtypes\":1088}],1072:[function(t,e,r){\"use strict\";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],1073:[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\"),c=t(\"./line_defaults\"),u=t(\"./line_shape_defaults\"),f=t(\"./text_defaults\"),h=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=g<a.PTS_LINESONLY?\"lines+markers\":\"lines\";if(g){m(\"text\"),m(\"hovertext\"),m(\"mode\",v),o.hasLines(e)&&(c(t,e,r,p,m),u(t,e,m),m(\"connectgaps\"),m(\"line.simplify\")),o.hasMarkers(e)&&l(t,e,r,p,m,{gradient:!0}),o.hasText(e)&&f(t,e,p,m);var y=[];(o.hasMarkers(e)||o.hasText(e))&&(m(\"cliponaxis\"),m(\"marker.maxdisplayed\"),y.push(\"points\")),m(\"fill\"),\"none\"!==e.fill&&(h(t,e,r,m),o.hasLines(e)||u(t,e,m)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||y.push(\"fills\"),m(\"hoveron\",y.join(\"+\")||\"points\"),d(t,e,r,{axis:\"y\"}),d(t,e,r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,m)}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"./attributes\":1066,\"./constants\":1072,\"./fillcolor_defaults\":1075,\"./line_defaults\":1079,\"./line_shape_defaults\":1081,\"./marker_defaults\":1084,\"./subtypes\":1088,\"./text_defaults\":1089,\"./xy_defaults\":1090}],1074:[function(t,e,r){\"use strict\";function n(t){return t||0===t}var i=t(\"../../lib\");e.exports=function(t,e,r){var a=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},o=i.extractOption(t,e,\"htx\",\"hovertext\");if(n(o))return a(o);var s=i.extractOption(t,e,\"tx\",\"text\");return n(s)?a(s):void 0}},{\"../../lib\":743}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\");e.exports=function(t,e,r,i){var a=!1;if(e.marker){var o=e.marker.color,s=(e.marker.line||{}).color;o&&!Array.isArray(o)?a=o:s&&!Array.isArray(s)&&(a=s)}i(\"fillcolor\",n.addOpacity((e.line||{}).color||a||r,.5))}},{\"../../components/color\":618}],1076:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./subtypes\");e.exports=function(t,e){var r,a;if(\"lines\"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if(\"none\"===t.mode)return t.fill?t.fillcolor:\"\";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:\"\")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},{\"../../components/color\":618,\"./subtypes\":1088}],1077:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/fx\"),a=t(\"../../components/errorbars\"),o=t(\"./get_trace_color\"),s=t(\"../../components/color\"),l=t(\"./fill_hover_text\"),c=i.constants.MAXDIST;e.exports=function(t,e,r,u){var f=t.cd,h=f[0].trace,d=t.xa,p=t.ya,m=d.c2p(e),g=p.c2p(r),v=[m,g],y=h.hoveron||\"\",x=-1!==h.mode.indexOf(\"markers\")?3:.5;if(-1!==y.indexOf(\"points\")){var b=function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(d.c2p(t.x)-m);return n<e?r*n/e:n-e+r},_=function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(p.c2p(t.y)-g);return n<e?r*n/e:n-e+r},w=function(t){var e=Math.max(x,t.mrc||0),r=d.c2p(t.x)-m,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-x/e)},M=i.getDistanceFunction(u,b,_,w);if(i.getClosest(f,M,t),!1!==t.index){var k=f[t.index],A=d.c2p(k.x,!0),T=p.c2p(k.y,!0),S=k.mrc||1;return n.extendFlat(t,{color:o(h,k),x0:A-S,x1:A+S,xLabelVal:k.x,y0:T-S,y1:T+S,yLabelVal:k.y,kink:Math.max(x,k.mrc||0)}),l(k,h,t),a.hoverInfo(k,h,t),[t]}}if(-1!==y.indexOf(\"fills\")&&h._polygons){var E,L,C,z,D,I,P,O,F,R=h._polygons,N=[],j=!1,B=1/0,U=-1/0,V=1/0,q=-1/0;for(E=0;E<R.length;E++)(C=R[E]).contains(v)&&(j=!j,N.push(C),V=Math.min(V,C.ymin),q=Math.max(q,C.ymax));if(j){var H=((V=Math.max(V,0))+(q=Math.min(q,p._length)))/2;for(E=0;E<N.length;E++)for(z=N[E].pts,L=1;L<z.length;L++)(O=z[L-1][1])>H!=(F=z[L][1])>=H&&(I=z[L-1][0],P=z[L][0],F-O&&(D=I+(P-I)*(H-O)/(F-O),B=Math.min(B,D),U=Math.max(U,D)));B=Math.max(B,0),U=Math.min(U,d._length);var G=s.defaultLine;return s.opacity(h.fillcolor)?G=h.fillcolor:s.opacity((h.line||{}).color)&&(G=h.line.color),n.extendFlat(t,{distance:c+10,x0:B,x1:U,y0:H,y1:H,color:G}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{\"../../components/color\":618,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../../lib\":743,\"./fill_hover_text\":1074,\"./get_trace_color\":1076}],1078:[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\").calc,n.arraysToCalcdata=t(\"./arrays_to_calcdata\"),n.plot=t(\"./plot\"),n.colorbar=t(\"./colorbar\"),n.style=t(\"./style\").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\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./arrays_to_calcdata\":1065,\"./attributes\":1066,\"./calc\":1067,\"./clean_data\":1069,\"./colorbar\":1070,\"./defaults\":1073,\"./hover\":1077,\"./plot\":1085,\"./select\":1086,\"./style\":1087,\"./subtypes\":1088}],1079:[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\":628,\"../../components/colorscale/has_colorscale\":632}],1080:[function(t,e,r){\"use strict\";var n=t(\"../../constants/numerical\").BADNUM,i=t(\"../../lib\"),a=i.segmentsIntersect,o=i.constrain,s=t(\"./constants\");e.exports=function(t,e){function r(e){var r=t[e],i=P.c2p(r.x),a=O.c2p(r.y);return i===n||a===n?r.intoCenter||!1:[i,a]}function l(t){var e=t[0]/P._length,r=t[1]/O._length;return(1+s.toleranceGrowth*Math.max(0,-e,e-1,-r,r-1))*N}function c(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function u(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=nt[i],s=a(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);s&&(!n||Math.abs(s.x-r[0][0])>1||Math.abs(s.y-r[0][1])>1)&&(s=[s.x,s.y],n&&c(s,t)<c(r[0],t)?r.unshift(s):r.push(s),n++)}return r}function f(t){if(t[0]<$||t[0]>tt||t[1]<et||t[1]>rt)return[o(t[0],$,tt),o(t[1],et,rt)]}function h(t,e){return t[0]===e[0]&&(t[0]===$||t[0]===tt)||(t[1]===e[1]&&(t[1]===et||t[1]===rt)||void 0)}function d(t,e){var r=[],n=f(t),i=f(e);return n&&i&&h(n,i)?r:(n&&r.push(n),i&&r.push(i),r)}function p(t,e,r){return function(n,a){var o=f(n),s=f(a),l=[];if(o&&s&&h(o,s))return l;o&&l.push(o),s&&l.push(s);var c=2*i.constrain((n[t]+a[t])/2,e,r)-((o||n)[t]+(s||a)[t]);if(c){(o&&s?c>0==o[t]>s[t]?o:s:o||s)[t]+=c}return l}}function m(t){var e=t[0],r=t[1],n=e===q[H-1][0],i=r===q[H-1][1];if(!n||!i)if(H>1){var a=e===q[H-2][0],o=r===q[H-2][1];n&&(e===$||e===tt)&&a?o?H--:q[H-1]=t:i&&(r===et||r===rt)&&o?a?H--:q[H-1]=t:q[H++]=t}else q[H++]=t}function g(t){q[H-1][0]!==t[0]&&q[H-1][1]!==t[1]&&m([W,X]),m(t),Z=null,W=X=0}function v(t){if(G=t[0]<$?$:t[0]>tt?tt:0,Y=t[1]<et?et:t[1]>rt?rt:0,G||Y){if(H)if(Z){var e=K(Z,t);e.length>1&&(g(e[0]),q[H++]=e[1])}else J=K(q[H-1],t)[0],q[H++]=J;else q[H++]=[G||t[0],Y||t[1]];var r=q[H-1];G&&Y&&(r[0]!==G||r[1]!==Y)?(Z&&(W!==G&&X!==Y?m(W&&X?function(t,e){var r=e[0]-t[0],n=(e[1]-t[1])/r;return(t[1]*e[0]-e[1]*t[0])/r>0?[n>0?$:tt,rt]:[n>0?tt:$,et]}(Z,t):[W||G,X||Y]):W&&X&&m([W,X])),m([G,Y])):W-G&&X-Y&&m([G||W,Y||X]),Z=t,W=G,X=Y}else Z&&g(K(Z,t)[0]),q[H++]=t}var y,x,b,_,w,M,k,A,T,S,E,L,C,z,D,I,P=e.xaxis,O=e.yaxis,F=e.simplify,R=e.connectGaps,N=e.baseTolerance,j=e.shape,B=\"linear\"===j,U=[],V=s.minTolerance,q=new Array(t.length),H=0;F||(N=V=-1);var G,Y,W,X,Z,J,K,Q=s.maxScreensAway,$=-P._length*Q,tt=P._length*(1+Q),et=-O._length*Q,rt=O._length*(1+Q),nt=[[$,et,tt,et],[tt,et,tt,rt],[tt,rt,$,rt],[$,rt,$,et]];for(\"linear\"===j||\"spline\"===j?K=u:\"hv\"===j||\"vh\"===j?K=d:\"hvh\"===j?K=p(0,$,tt):\"vhv\"===j&&(K=p(1,et,rt)),y=0;y<t.length;y++)if(x=r(y)){for(H=0,Z=null,v(x),y++;y<t.length;y++){if(!(_=r(y))){if(R)continue;break}if(B){if(!((S=c(_,x))<l(_)*V)){for(A=[(_[0]-x[0])/S,(_[1]-x[1])/S],w=x,E=S,L=z=D=0,k=!1,b=_,y++;y<t.length;y++){if(!(M=r(y))){if(R)continue;break}if(T=[M[0]-x[0],M[1]-x[1]],I=T[0]*A[1]-T[1]*A[0],z=Math.min(z,I),(D=Math.max(D,I))-z>l(M))break;b=M,(C=T[0]*A[0]+T[1]*A[1])>E?(E=C,_=M,k=!1):C<L&&(L=C,w=M,k=!0)}if(k?(v(_),b!==w&&v(w)):(w!==x&&v(w),b!==_&&v(_)),v(b),y>=t.length||!M)break;v(M),x=M}}else v(_)}Z&&m([W||Z[0],X||Z[1]]),U.push(q.slice(0,H))}return U}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./constants\":1072}],1081:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],1082:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n,i,a=null;for(i=0;i<r.length;++i)!0===(n=r[i][0].trace).visible?(n._nexttrace=null,-1!==[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(n.fill)&&(n._prevtrace=a,a&&(a._nexttrace=n)),a=n):n._prevtrace=n._nexttrace=null}},{}],1083:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t){var e=t.marker,r=e.sizeref||1,i=e.sizemin||0,a=\"area\"===e.sizemode?function(t){return Math.sqrt(t/r)}:function(t){return t/r};return function(t){var e=a(t/2);return n(e)&&e>0?Math.max(e,i):0}}},{\"fast-isnumeric\":140}],1084:[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,c){var u=o.isBubble(t),f=(t.line||{}).color;if(c=c||{},f&&(r=f),l(\"marker.symbol\"),l(\"marker.opacity\",u?.7:1),l(\"marker.size\"),l(\"marker.color\",r),i(t,\"marker\")&&a(t,e,s,l,{prefix:\"marker.\",cLetter:\"c\"}),c.noSelect||(l(\"selected.marker.color\"),l(\"unselected.marker.color\"),l(\"selected.marker.size\"),l(\"unselected.marker.size\")),c.noLine||(l(\"marker.line.color\",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,\"marker.line\")&&a(t,e,s,l,{prefix:\"marker.line.\",cLetter:\"c\"}),l(\"marker.line.width\",u?1:0)),u&&(l(\"marker.sizeref\"),l(\"marker.sizemin\"),l(\"marker.sizemode\")),c.gradient){\"none\"!==l(\"marker.gradient.type\")&&l(\"marker.gradient.color\")}}},{\"../../components/color\":618,\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632,\"./subtypes\":1088}],1085:[function(t,e,r){\"use strict\";function n(t,e,r,n,u,h,d){function p(t){return w?t.transition():t}function m(t){p(t).attr(\"d\",\"M0,0Z\")}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(){return!1}function x(e){var n,s,c=e[0].trace,u=i.select(this),f=l.hasMarkers(c),h=l.hasText(c),d=function(t){if(t.ids)return v}(c),m=y,x=y;f&&(m=c.marker.maxdisplayed||c._needsCull?g:a.identity),h&&(x=c.marker.maxdisplayed||c._needsCull?g:a.identity);var b=(n=u.selectAll(\"path.point\").data(m,d)).enter().append(\"path\").classed(\"point\",!0);w&&b.call(o.pointStyle,c,t).call(o.translatePoints,M,k).style(\"opacity\",0).transition().style(\"opacity\",1);var _=f&&o.tryColorscale(c.marker,\"\"),A=f&&o.tryColorscale(c.marker,\"line\");n.order(),n.each(function(e){var n=i.select(this),a=p(n);(s=o.translatePoint(e,a,M,k))?(o.singlePointStyle(e,a,c,_,A,t),r.layerClipId&&o.hideOutsideRangePoint(e,a,M,k,c.xcalendar,c.ycalendar),c.customdata&&n.classed(\"plotly-customdata\",null!==e.data&&void 0!==e.data)):a.remove()}),w?n.exit().transition().style(\"opacity\",0).remove():n.exit().remove(),(n=u.selectAll(\"g\").data(x,d)).enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),n.order(),n.each(function(t){var e=i.select(this),n=p(e.select(\"text\"));(s=o.translatePoint(t,n,M,k))?r.layerClipId&&o.hideOutsideRangePoint(t,e,M,k,c.xcalendar,c.ycalendar):e.remove()}),n.selectAll(\"text\").call(o.textPointStyle,c,t).each(function(t){var e=M.c2p(t.x),r=k.c2p(t.y);i.select(this).selectAll(\"tspan.line\").each(function(){p(i.select(this)).attr({x:e,y:r})})}),n.exit().remove()}var b,_;!function(t,e,r,n,o){var s=r.xaxis,c=r.yaxis,u=i.extent(a.simpleMap(s.range,s.r2c)),f=i.extent(a.simpleMap(c.range,c.r2c)),h=n[0].trace;if(!l.hasMarkers(h))return;var d=h.marker.maxdisplayed;if(0===d)return;var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),m=Math.ceil(p.length/d),g=0;o.forEach(function(t,r){var n=t[0].trace;l.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&g++});var v=Math.round(g*m/3+Math.floor(g/3)*m/7.1);n.forEach(function(t){delete t.vis}),p.forEach(function(t,e){0===Math.round((e+v)%m)&&(t.vis=!0)})}(0,e,r,n,u);var w=!!d&&d.duration>0,M=r.xaxis,k=r.yaxis,A=n[0].trace,T=A.line,S=i.select(h);if(S.call(s.plot,r,d),!0===A.visible){p(S).style(\"opacity\",A.opacity);var E,L,C=A.fill.charAt(A.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),n[0].node3=S;var z=\"\",D=[],I=A._prevtrace;I&&(z=I._prevRevpath||\"\",L=I._nextFill,D=I._polygons);var P,O,F,R,N,j,B,U,V,q=\"\",H=\"\",G=[],Y=a.noop;if(E=A._ownFill,l.hasLines(A)||\"none\"!==A.fill){for(L&&L.datum(n),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(T.shape)?(F=o.steps(T.shape),R=o.steps(T.shape.split(\"\").reverse().join(\"\"))):F=R=\"spline\"===T.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?o.smoothclosed(t.slice(1),T.smoothing):o.smoothopen(t,T.smoothing)}:function(t){return\"M\"+t.join(\"L\")},N=function(t){return R(t.reverse())},G=c(n,{xaxis:M,yaxis:k,connectGaps:A.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,simplify:T.simplify}),V=A._polygons=new Array(G.length),_=0;_<G.length;_++)A._polygons[_]=f(G[_]);G.length&&(j=G[0][0],U=(B=G[G.length-1])[B.length-1]),Y=function(t){return function(e){if(P=F(e),O=N(e),q?C?(q+=\"L\"+P.substr(1),H=O+\"L\"+H.substr(1)):(q+=\"Z\"+P,H=O+\"Z\"+H):(q=P,H=O),l.hasLines(A)&&e.length>1){var r=i.select(this);if(r.datum(n),t)p(r.style(\"opacity\",0).attr(\"d\",P).call(o.lineGroupStyle)).style(\"opacity\",1);else{var a=p(r);a.attr(\"d\",P),o.singleLineStyle(n,a)}}}}}var W=S.selectAll(\".js-line\").data(G);p(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(o.lineGroupStyle).each(Y(!0)),o.setClipUrl(W,r.layerClipId),G.length?(E?j&&U&&(C?(\"y\"===C?j[1]=U[1]=k.c2p(0,!0):\"x\"===C&&(j[0]=U[0]=M.c2p(0,!0)),p(E).attr(\"d\",\"M\"+U+\"L\"+j+\"L\"+q.substr(1)).call(o.singleFillStyle)):p(E).attr(\"d\",q+\"Z\").call(o.singleFillStyle)):L&&(\"tonext\"===A.fill.substr(0,6)&&q&&z?(\"tonext\"===A.fill?p(L).attr(\"d\",q+\"Z\"+z+\"Z\").call(o.singleFillStyle):p(L).attr(\"d\",q+\"L\"+z.substr(1)+\"Z\").call(o.singleFillStyle),A._polygons=A._polygons.concat(D)):(m(L),A._polygons=null)),A._prevRevpath=H,A._prevPolygons=V):(E?m(E):L&&m(L),A._polygons=A._prevRevpath=A._prevPolygons=null);var X=S.selectAll(\".points\");b=X.data([n]),X.each(x),b.enter().append(\"g\").classed(\"points\",!0).each(x),b.exit().remove(),b.each(function(t){var e=!1===t[0].trace.cliponaxis;o.setClipUrl(i.select(this),e?null:r.layerClipId)})}}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../components/drawing\"),s=t(\"../../components/errorbars\"),l=t(\"./subtypes\"),c=t(\"./line_points\"),u=t(\"./link_traces\"),f=t(\"../../lib/polygon\").tester;e.exports=function(t,e,r,a,s){var l,c,f,h,d=e.plot.select(\"g.scatterlayer\"),p=!a,m=!!a&&a.duration>0;for((f=d.selectAll(\"g.trace\").data(r,function(t){return t[0].trace.uid})).enter().append(\"g\").attr(\"class\",function(t){return\"trace scatter trace\"+t[0].trace.uid}).style(\"stroke-miterlimit\",2),u(t,e,r),function(t,e,r){var n;e.selectAll(\"g.trace\").each(function(t){var e=i.select(this);if((n=t[0].trace)._nexttrace){if(n._nextFill=e.select(\".js-fill.js-tonext\"),!n._nextFill.size()){var a=\":first-child\";e.select(\".js-fill.js-tozero\").size()&&(a+=\" + *\"),n._nextFill=e.insert(\"path\",a).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),e.selectAll(\".js-fill\").call(o.setClipUrl,r.layerClipId)})}(0,d,e),l=0,c={};l<r.length;l++)c[r[l][0].trace.uid]=l;if(d.selectAll(\"g.trace\").sort(function(t,e){return c[t[0].trace.uid]>c[e[0].trace.uid]?1:-1}),m){s&&(h=s());i.transition().duration(a.duration).ease(a.easing).each(\"end\",function(){h&&h()}).each(\"interrupt\",function(){h&&h()}).each(function(){d.selectAll(\"g.trace\").each(function(i,o){n(t,o,e,i,r,this,a)})})}else d.selectAll(\"g.trace\").each(function(i,o){n(t,o,e,i,r,this,a)});p&&f.exit().remove(),d.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../lib\":743,\"../../lib/polygon\":755,\"./line_points\":1080,\"./link_traces\":1082,\"./subtypes\":1088,d3:128}],1086:[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,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=c.c2p(i.y),e.contains([a,o])?(u.push({pointNumber:r,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{\"./subtypes\":1088}],1087:[function(t,e,r){\"use strict\";function n(t,e,r){var n=t.selectAll(\"path.point\"),i=t.selectAll(\"text\");a.pointStyle(n,e,r),a.textPointStyle(i,e,r),a.selectedPointStyle(n,e),a.selectedTextStyle(i,e)}var i=t(\"d3\"),a=t(\"../../components/drawing\"),o=t(\"../../components/errorbars\");e.exports={style:function(t,e){var r=e?e[0].node3:i.select(t).selectAll(\"g.trace.scatter\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.selectAll(\"g.points\").each(function(e){n(i.select(this),e.trace||e[0].trace,t)}),r.selectAll(\"g.trace path.js-line\").call(a.lineGroupStyle),r.selectAll(\"g.trace path.js-fill\").call(a.fillGroupStyle),r.call(o.style)},stylePoints:n}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,d3:128}],1088:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"lines\")},hasMarkers:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"markers\")},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"text\")},isBubble:function(t){return n.isPlainObject(t.marker)&&Array.isArray(t.marker.size)}}},{\"../../lib\":743}],1089:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i,a){a=a||{},i(\"textposition\"),n.coerceFont(i,\"textfont\",r.font),a.noSelect||(i(\"selected.textfont.color\"),i(\"unselected.textfont.color\"))}},{\"../../lib\":743}],1090:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i){var a,o=i(\"x\"),s=i(\"y\");if(n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],r),o)s?((a=Math.min(o.length,s.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.y=s.slice(0,a))):(a=o.length,i(\"y0\"),i(\"dy\"));else{if(!s)return 0;a=e.y.length,i(\"x0\"),i(\"dx\")}return a}},{\"../../registry\":873}],1091:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../components/errorbars/attributes\"),o=t(\"../../constants/gl3d_dashes\"),s=t(\"../../constants/gl3d_markers\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll,u=n.line,f=n.marker,h=f.line,d=e.exports=c({x:n.x,y:n.y,z:{valType:\"data_array\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),mode:l({},n.mode,{dflt:\"lines+markers\"}),surfaceaxis:{valType:\"enumerated\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\"color\"},projection:{x:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},y:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},z:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:l({width:u.width,dash:{valType:\"enumerated\",values:Object.keys(o),dflt:\"solid\"},showscale:{valType:\"boolean\",dflt:!1}},i(\"line\")),marker:l({symbol:{valType:\"enumerated\",values:Object.keys(s),dflt:\"circle\",arrayOk:!0},size:l({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:l({},f.opacity,{arrayOk:!1}),showscale:f.showscale,colorbar:f.colorbar,line:l({width:l({},h.width,{arrayOk:!1})},i(\"marker.line\"))},i(\"marker\")),textposition:l({},n.textposition,{dflt:\"top center\"}),textfont:n.textfont,error_x:a,error_y:a,error_z:a},\"calc\",\"nested\");d.x.editType=d.y.editType=d.z.editType=\"calc+clearAxisTypes\"},{\"../../components/colorscale/color_attributes\":626,\"../../components/errorbars/attributes\":645,\"../../constants/gl3d_dashes\":718,\"../../constants/gl3d_markers\":719,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../scatter/attributes\":1066}],1092:[function(t,e,r){\"use strict\";var n=t(\"../scatter/arrays_to_calcdata\"),i=t(\"../scatter/colorscale_calc\");e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(e),r}},{\"../scatter/arrays_to_calcdata\":1065,\"../scatter/colorscale_calc\":1071}],1093:[function(t,e,r){\"use strict\";function n(t,e,r){if(!e||!e.visible)return null;for(var n=i(e),a=new Array(t.length),o=0;o<t.length;o++){var s=n(+t[o],o);a[o]=[-s[0]*r,s[1]*r]}return a}var i=t(\"../../components/errorbars/compute_error\");e.exports=function(t,e){var r=[n(t.x,t.error_x,e[0]),n(t.y,t.error_y,e[1]),n(t.z,t.error_z,e[2])],i=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(r);if(0===i)return null;for(var a=new Array(i),o=0;o<i;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(r[l])for(var c=0;c<2;c++)s[c][l]=r[l][o][c];a[o]=s}return a}},{\"../../components/errorbars/compute_error\":647}],1094:[function(t,e,r){\"use strict\";function n(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\"\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}function i(t,e){return e(4*t)}function a(t){return x[t]}function o(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,p.identity);return a}function s(t,e){var r,n,s,l,c,u,f=[],h=t.fullSceneLayout,d=t.dataScale,y=h.xaxis,x=h.yaxis,_=h.zaxis,w=e.marker,M=e.line,k=e.x||[],A=e.y||[],T=e.z||[],S=k.length,E=e.xcalendar,L=e.ycalendar,C=e.zcalendar;for(n=0;n<S;n++)s=y.d2l(k[n],0,E)*d[0],l=x.d2l(A[n],0,L)*d[1],c=_.d2l(T[n],0,C)*d[2],f[n]=[s,l,c];if(Array.isArray(e.text))u=e.text;else if(void 0!==e.text)for(u=new Array(S),n=0;n<S;n++)u[n]=e.text;if(r={position:f,mode:e.mode,text:u},\"line\"in e&&(r.lineColor=g(M,1,S),r.lineWidth=M.width,r.lineDashes=M.dash),\"marker\"in e){var z=v(e);r.scatterColor=g(w,1,S),r.scatterSize=o(w.size,S,i,20,z),r.scatterMarker=o(w.symbol,S,a,\"\\u25cf\"),r.scatterLineWidth=w.line.width,r.scatterLineColor=g(w.line,1,S),r.scatterAngle=0}\"textposition\"in e&&(r.textOffset=function(t){var e=[0,0];return Array.isArray(t)?[0,-1]:(t.indexOf(\"bottom\")>=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)}(e.textposition),r.textColor=g(e.textfont,1,S),r.textSize=o(e.textfont.size,S,p.identity,12),r.textFont=e.textfont.family,r.textAngle=0);var D=[\"x\",\"y\",\"z\"];for(r.project=[!1,!1,!1],r.projectScale=[1,1,1],r.projectOpacity=[1,1,1],n=0;n<3;++n){var I=e.projection[D[n]];(r.project[n]=I.show)&&(r.projectOpacity[n]=I.opacity,r.projectScale[n]=I.scale)}r.errorBounds=b(e,d);var P=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[0,0,0],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&(a=t[2]),a&&(e[i]=a.width/2,r[i]=m(a.color),n=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return r.errorColor=P.color,r.errorLineWidth=P.lineWidth,r.errorCapSize=P.capSize,r.delaunayAxis=e.surfaceaxis,r.delaunayColor=m(e.surfacecolor),r}function l(t){if(Array.isArray(t)){var e=t[0];return Array.isArray(e)&&(t=e),\"rgb(\"+t.slice(0,3).map(function(t){return Math.round(255*t)})+\")\"}return null}var c=t(\"gl-line3d\"),u=t(\"gl-scatter3d\"),f=t(\"gl-error3d\"),h=t(\"gl-mesh3d\"),d=t(\"delaunay-triangulate\"),p=t(\"../../lib\"),m=t(\"../../lib/str2rgbarray\"),g=t(\"../../lib/gl_format_color\"),v=t(\"../scatter/make_bubble_size_func\"),y=t(\"../../constants/gl3d_dashes\"),x=t(\"../../constants/gl3d_markers\"),b=t(\"./calc_errors\"),_=n.prototype;_.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),this.textLabels?void 0!==this.textLabels[t.data.index]?t.textLabel=this.textLabels[t.data.index]:t.textLabel=this.textLabels:t.textLabel=\"\";var e=t.index=t.data.index;return t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},_.update=function(t){var e,r,n,i,a=this.scene.glplot.gl,o=y.solid;this.data=t;var p=s(this.scene,t);\"mode\"in p&&(this.mode=p.mode),\"lineDashes\"in p&&p.lineDashes in y&&(o=y[p.lineDashes]),this.color=l(p.scatterColor)||l(p.lineColor),this.dataPoints=p.position,e={gl:a,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(\"lines\")?this.linePlot?this.linePlot.update(e):(this.linePlot=c(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var m=t.opacity;if(t.marker&&t.marker.opacity&&(m*=t.marker.opacity),r={gl:a,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:m,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(\"markers\")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=u(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),i={gl:a,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(\"text\")?this.textMarkers?this.textMarkers.update(i):(this.textMarkers=u(i),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),n={gl:a,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(n):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&&(this.errorBars=f(n),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis>=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],s=[];for(n=0;n<t.length;++n){var l=t[n];!isNaN(l[i])&&isFinite(l[i])&&!isNaN(l[a])&&isFinite(l[a])&&(o.push([l[i],l[a]]),s.push(n))}var c=d(o);for(n=0;n<c.length;++n)for(var u=c[n],f=0;f<u.length;++f)u[f]=s[u[f]];return{positions:t,cells:c,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=a,this.delaunayMesh=h(g),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)},_.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=function(t,e){var r=new n(t,e.uid);return r.update(e),r}},{\"../../constants/gl3d_dashes\":718,\"../../constants/gl3d_markers\":719,\"../../lib\":743,\"../../lib/gl_format_color\":739,\"../../lib/str2rgbarray\":765,\"../scatter/make_bubble_size_func\":1083,\"./calc_errors\":1093,\"delaunay-triangulate\":130,\"gl-error3d\":168,\"gl-line3d\":177,\"gl-mesh3d\":210,\"gl-scatter3d\":239}],1095:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/text_defaults\"),c=t(\"../../components/errorbars/defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,f){function h(r,n){return i.coerce(t,e,u,r,n)}if(function(t,e,r,i){var a=0,o=r(\"x\"),s=r(\"y\"),l=r(\"z\");return n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],i),o&&s&&l&&((a=Math.min(o.length,s.length,l.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.y=s.slice(0,a)),a<l.length&&(e.z=l.slice(0,a))),a}(t,e,h,f)){h(\"text\"),h(\"hovertext\"),h(\"mode\"),a.hasLines(e)&&(h(\"connectgaps\"),s(t,e,r,f,h)),a.hasMarkers(e)&&o(t,e,r,f,h,{noSelect:!0}),a.hasText(e)&&l(t,e,f,h,{noSelect:!0});var d=(e.line||{}).color,p=(e.marker||{}).color;h(\"surfaceaxis\")>=0&&h(\"surfacecolor\",d||p);for(var m=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var v=\"projection.\"+m[g];h(v+\".show\")&&(h(v+\".opacity\"),h(v+\".scale\"))}c(t,e,r,{axis:\"z\"}),c(t,e,r,{axis:\"y\",inherit:\"z\"}),c(t,e,r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../../registry\":873,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1091}],1096:[function(t,e,r){\"use strict\";var n={};n.plot=t(\"./convert\"),n.attributes=t(\"./attributes\"),n.markerSymbols=t(\"../../constants/gl3d_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/gl3d_markers\":719,\"../../plots/gl3d\":832,\"../scatter/colorbar\":1070,\"./attributes\":1091,\"./calc\":1092,\"./convert\":1094,\"./defaults\":1095}],1097:[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,c=n.line,u=l.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:s({},n.mode,{dflt:\"markers\"}),text:s({},n.text,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:[\"linear\",\"spline\"]}),smoothing:c.smoothing,editType:\"calc\"},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:u.width,editType:\"calc\"},a(\"marker\".line)),gradient:l.gradient,editType:\"calc\"},a(\"marker\"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1098:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,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 c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e.a.length,d=new Array(h),p=!1;for(c=0;c<h;c++)if(u=e.a[c],f=e.b[c],n(u)&&n(f)){var m=r.ab2xy(+u,+f,!0),g=r.isVisible(+u,+f);g||(p=!0),d[c]={x:m[0],y:m[1],a:u,b:f,vis:g}}else d[c]={x:!1,y:!1};return e._needsCull=p,d[0].carpet=r,d[0].trace=e,s(e,h),i(e),a(d,e),o(d,e),d}}},{\"../carpet/lookup_carpetid\":931,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1099:[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\"),c=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,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)){m&&p<m.length&&(e.a=m.slice(0,p)),g&&p<g.length&&(e.b=g.slice(0,p)),d(\"text\");d(\"mode\",p<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,d),l(t,e,d),d(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,d,{gradient:!0}),a.hasText(e)&&c(t,e,h,d);var v=[];(a.hasMarkers(e)||a.hasText(e))&&(d(\"marker.maxdisplayed\"),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,d),a.hasLines(e)||l(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1097}],1100:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t}},{}],1101:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\");e.exports=function(t,e,r,i){function a(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,g.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}var o=n(t,e,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,c=t.xa._length,u=c*l/2,f=c-u;return s.x0=Math.max(Math.min(s.x0,f),u),s.x1=Math.max(Math.min(s.x1,f),u),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var d=s.trace,p=d._carpet,m=(h.hi||d.hoverinfo).split(\"+\"),g=[];-1!==m.indexOf(\"all\")&&(m=[\"a\",\"b\"]),-1!==m.indexOf(\"a\")&&a(p.aaxis,h.a),-1!==m.indexOf(\"b\")&&a(p.baxis,h.b);var v=p.ab2ij([h.a,h.b]),y=Math.floor(v[0]),x=v[0]-y,b=Math.floor(v[1]),_=v[1]-b,w=p.evalxy([],y,b,x,_);return g.push(\"y: \"+w[1].toFixed(3)),s.extraText=g.join(\"<br>\"),o}}},{\"../scatter/hover\":1077}],1102:[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(\"../scatter/style\").style,n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"../scatter/select\"),n.eventData=t(\"./event_data\"),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\":800,\"../scatter/colorbar\":1070,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1097,\"./calc\":1098,\"./defaults\":1099,\"./event_data\":1100,\"./hover\":1101,\"./plot\":1103}],1103:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/drawing\");e.exports=function(t,e,r){var o,s,l,c=r[0][0].carpet,u={xaxis:i.getFromId(t,c.xaxis||\"x\"),yaxis:i.getFromId(t,c.yaxis||\"y\"),plot:e.plot};for(n(t,u,r),o=0;o<r.length;o++)s=r[o][0].trace,l=u.plot.selectAll(\"g.trace\"+s.uid+\" .js-line\"),a.setClipUrl(l,c._clipPathId)}},{\"../../components/drawing\":643,\"../../plots/cartesian/axes\":789,\"../scatter/plot\":1085}],1104:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/colorscale/color_attributes\"),o=t(\"../../components/drawing/attributes\").dash,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll,c=n.marker,u=n.line,f=c.line;e.exports=l({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:s({},n.mode,{dflt:\"markers\"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:u.color,width:u.width,dash:o},connectgaps:n.connectgaps,marker:s({symbol:c.symbol,opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,showscale:c.showscale,colorbar:c.colorbar,line:s({width:f.width},a(\"marker.line\")),gradient:c.gradient},a(\"marker\")),fill:{valType:\"enumerated\",values:[\"none\",\"toself\"],dflt:\"none\"},fillcolor:n.fillcolor,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\"lon\",\"lat\",\"location\",\"text\",\"name\"]})},\"calc\",\"nested\")},{\"../../components/colorscale/color_attributes\":626,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1105:[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\"),s=t(\"../scatter/calc_selection\"),l=t(\"../../lib\")._;e.exports=function(t,e){for(var r=Array.isArray(e.locations),c=r?e.locations.length:e.lon.length,u=new Array(c),f=0;f<c;f++){var h=u[f]={};if(r){var d=e.locations[f];h.loc=\"string\"==typeof d?d:null}else{var p=e.lon[f],m=e.lat[f];n(p)&&n(m)?h.lonlat=[+p,+m]:h.lonlat=[i,i]}}return o(u,e),a(e),s(u,e),c&&(u[0].t={labels:{lat:l(t,\"lat:\")+\" \",lon:l(t,\"lon:\")+\" \"}}),u}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1106:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}!function(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))<n.length&&(e.lon=n.slice(0,a)),a<i.length&&(e.lat=i.slice(0,a)),a)}(0,e,f)?e.visible=!1:(f(\"text\"),f(\"hovertext\"),f(\"mode\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,u,f,{gradient:!0}),i.hasText(e)&&s(t,e,u,f),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f))}},{\"../../lib\":743,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1104}],1107:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null,t}},{}],1108:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../constants/numerical\").BADNUM,o=t(\"../scatter/get_trace_color\"),s=t(\"../scatter/fill_hover_text\"),l=t(\"./attributes\");e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.xa,h=t.ya,d=t.subplot,p=d.projection.isLonLatOverEdges,m=d.project;if(n.getClosest(c,function(t){var n=t.lonlat;if(n[0]===a)return 1/0;if(p(n))return 1/0;var i=m(n),o=m([e,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)},t),!1!==t.index){var g=c[t.index],v=g.lonlat,y=[f.c2p(v),h.c2p(v)],x=g.mrc||1;return t.x0=y[0]-x,t.x1=y[0]+x,t.y0=y[1]-x,t.y1=y[1]+x,t.loc=g.loc,t.lon=v[0],t.lat=v[1],t.color=o(u,g),t.extraText=function(t,e,r,n){function a(t){return i.tickText(r,r.c2l(t),\"hover\").text+\"\\xb0\"}var o=e.hi||t.hoverinfo,c=\"all\"===o?l.hoverinfo.flags:o.split(\"+\"),u=-1!==c.indexOf(\"location\")&&Array.isArray(t.locations),f=-1!==c.indexOf(\"lon\"),h=-1!==c.indexOf(\"lat\"),d=-1!==c.indexOf(\"text\"),p=[];return u?p.push(e.loc):f&&h?p.push(\"(\"+a(e.lonlat[0])+\", \"+a(e.lonlat[1])+\")\"):f?p.push(n.lon+a(e.lonlat[0])):h&&p.push(n.lat+a(e.lonlat[1])),d&&s(e,t,p),p.join(\"<br>\")}(u,g,d.mockAxis,c[0].t.labels),[t]}}},{\"../../components/fx\":660,\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076,\"./attributes\":1104}],1109:[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.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"scattergeo\",n.basePlotModule=t(\"../../plots/geo\"),n.categories=[\"geo\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/geo\":820,\"../scatter/colorbar\":1070,\"./attributes\":1104,\"./calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./plot\":1110,\"./select\":1111,\"./style\":1112}],1110:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM,o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../lib/geo_location_utils\").locationToFeature,l=t(\"../../lib/geojson_utils\"),c=t(\"../scatter/subtypes\"),u=t(\"./style\");e.exports=function(t,e,r){function f(t,e){t.lonlat[0]===a&&n.select(e).remove()}for(var h=0;h<r.length;h++)!function(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l<t.length;l++){var c=t[l],u=s(i,c.loc,n);c.lonlat=u?u.properties.ct:[a,a]}}(r[h],e.topojson);var d=e.layers.frontplot.select(\".scatterlayer\").selectAll(\"g.trace.scattergeo\").data(r,function(t){return t[0].trace.uid});d.enter().append(\"g\").attr(\"class\",\"trace scattergeo\"),d.exit().remove(),d.selectAll(\"*\").remove(),d.each(function(e){var r=e[0].node3=n.select(this),a=e[0].trace;if(c.hasLines(a)||\"none\"!==a.fill){var o=l.calcTraceToLineCoords(e),s=\"none\"!==a.fill?l.makePolygon(o):l.makeLine(o);r.selectAll(\"path.js-line\").data([{geojson:s,trace:a}]).enter().append(\"path\").classed(\"js-line\",!0).style(\"stroke-miterlimit\",2)}c.hasMarkers(a)&&r.selectAll(\"path.point\").data(i.identity).enter().append(\"path\").classed(\"point\",!0).each(function(t){f(t,this)}),c.hasText(a)&&r.selectAll(\"g\").data(i.identity).enter().append(\"g\").append(\"text\").each(function(t){f(t,this)}),u(t,e)})}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/geo_location_utils\":735,\"../../lib/geojson_utils\":736,\"../../lib/topojson_utils\":769,\"../scatter/subtypes\":1088,\"./style\":1112,d3:128}],1111:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\");e.exports=function(t,e){var r,i,a,o,s,l=t.cd,c=t.xaxis,u=t.yaxis,f=[],h=l[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(s=0;s<l.length;s++)l[s].selected=0;else for(s=0;s<l.length;s++)i=(r=l[s]).lonlat,a=c.c2p(i),o=u.c2p(i),e.contains([a,o])?(f.push({pointNumber:s,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0;return f}},{\"../scatter/subtypes\":1088}],1112:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\"),o=t(\"../scatter/style\").stylePoints;e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,s=e[0].node3;s.style(\"opacity\",e[0].trace.opacity),o(s,r,t),s.selectAll(\"path.js-line\").style(\"fill\",\"none\").each(function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||\"\",o.width||0),\"none\"!==r.fill&&e.call(a.fill,r.fillcolor)})}(t,e)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../scatter/style\":1087,d3:128}],1113:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../constants/gl2d_dashes\"),o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=n.line,c=n.marker,u=c.line,f=e.exports=s({x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:o({},n.text,{}),mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\"],extras:[\"none\"]},line:{color:l.color,width:l.width,dash:{valType:\"enumerated\",values:Object.keys(a),dflt:\"solid\"}},marker:o({},i(\"marker\"),{symbol:c.symbol,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:c.opacity,showscale:c.showscale,colorbar:c.colorbar,line:o({},i(\"marker.line\"),{width:u.width})}),connectgaps:n.connectgaps,fill:n.fill,fillcolor:n.fillcolor,hoveron:n.hoveron,selected:{marker:n.selected.marker},unselected:{marker:n.unselected.marker},error_y:n.error_y,error_x:n.error_x},\"calc\",\"nested\");f.x.editType=f.y.editType=f.x0.editType=f.y0.editType=\"calc+clearAxisTypes\"},{\"../../components/colorscale/color_attributes\":626,\"../../constants/gl2d_dashes\":717,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../scatter/attributes\":1066}],1114:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/constants\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/xy_defaults\"),s=t(\"../scatter/marker_defaults\"),l=t(\"../scatter/line_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),u=t(\"../../components/errorbars/defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,r,i)}var p=!!t.marker&&/-open/.test(t.marker.symbol),m=a.isBubble(t),g=o(t,e,h,d);if(g){d(\"text\"),d(\"mode\",g<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(d(\"connectgaps\"),l(t,e,r,h,d));var v=[];a.hasMarkers(e)&&(s(t,e,r,h,d),d(\"marker.line.width\",p||m?1:0),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&c(t,e,r,d),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),u(t,e,r,{axis:\"y\"}),u(t,e,r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/xy_defaults\":1090,\"./attributes\":1113}],1115:[function(t,e,r){(function(r){\"use strict\";function n(t,e,r,n){function i(t){var e,n,i,o={},s=Array.isArray(t.symbol);if(s||(n=/-open/.test(t.symbol)),s||Array.isArray(t.color)||Array.isArray(t.line.color)||Array.isArray(t.line)||Array.isArray(t.opacity)){o.colors=new Array(_),o.borderColors=new Array(_);var l=y(t,t.opacity,_),c=y(t.line,t.opacity,_);if(!Array.isArray(c[0])){var u=c;for(c=Array(_),e=0;e<_;e++)c[e]=u}if(!Array.isArray(l[0])){var f=l;for(l=Array(_),e=0;e<_;e++)l[e]=f}for(o.colors=l,o.borderColors=c,e=0;e<_;e++)s&&(i=t.symbol[e],n=/-open/.test(i)),n&&(c[e]=l[e].slice(),l[e]=l[e].slice(),l[e][3]=0);o.opacity=r.opacity}else n?(o.color=M(t.color,\"uint8\"),o.color[3]=0,o.borderColor=M(t.color,\"uint8\")):(o.color=M(t.color,\"uint8\"),o.borderColor=M(t.line.color,\"uint8\")),o.opacity=r.opacity*t.opacity;if(Array.isArray(t.symbol))for(o.markers=new Array(_),e=0;e<_;++e)o.markers[e]=a(t.symbol[e]);else o.marker=a(t.symbol);var h,d,p=t&&(Array.isArray(t.size)||Array.isArray(t.line.width)),m=g(r);if(p){d=o.sizes=new Array(_);var v=o.borderSizes=new Array(_);if(Array.isArray(t.size))for(e=0;e<_;++e)d[e]=m(t.size[e]);else for(h=m(t.size),e=0;e<_;++e)d[e]=h;if(Array.isArray(t.line.width))for(e=0;e<_;++e)v[e]=m(t.line.width[e]);else for(h=m(t.line.width),e=0;e<_;++e)v[e]=h}else h=o.size=m(t&&t.size||10),o.borderSizes=m(t.line.width);return o}var o,s,f,h,p,m,x,b=t._fullLayout,_=n.length/2,w=r.marker,k=0,A=0,T=u.getFromId(t,r.xaxis),S=u.getFromId(t,r.yaxis);!0!==r.visible?(s=!1,f=!1,h=!1,m=!1,x=!1):(s=d.hasLines(r)&&n.length>1,f=r.error_x&&!0===r.error_x.visible,h=r.error_y&&!0===r.error_y.visible,p=f||h,m=d.hasMarkers(r),x=!!r.fill&&\"none\"!==r.fill);var E,L,C,z,D,I,O,F,R=p?l.calcFromTrace(r,b):null;if(f){(C={}).positions=n;var N=new Float64Array(4*_);if(\"log\"===T.type)for(o=0;o<_;++o)N[k++]=n[2*o]-T.d2l(R[o].xs)||0,N[k++]=T.d2l(R[o].xh)-n[2*o]||0,N[k++]=0,N[k++]=0;else for(o=0;o<_;++o)N[k++]=n[2*o]-R[o].xs||0,N[k++]=R[o].xh-n[2*o]||0,N[k++]=0,N[k++]=0;r.error_x.copy_ystyle&&(r.error_x=r.error_y),C.errors=N,C.capSize=2*r.error_x.width,C.lineWidth=r.error_x.thickness,C.color=r.error_x.color}if(h){(z={}).positions=n;var j=new Float64Array(4*_);if(\"log\"===S.type)for(o=0;o<_;++o)j[A++]=0,j[A++]=0,j[A++]=n[2*o+1]-S.d2l(R[o].ys)||0,j[A++]=S.d2l(R[o].yh)-n[2*o+1]||0;else for(o=0;o<_;++o)j[A++]=0,j[A++]=0,j[A++]=n[2*o+1]-R[o].ys||0,j[A++]=R[o].yh-n[2*o+1]||0;z.errors=j,z.capSize=2*r.error_y.width,z.lineWidth=r.error_y.thickness,z.color=r.error_y.color}if(s){(E={}).thickness=r.line.width,E.color=r.line.color,E.opacity=r.opacity,E.overlay=!0;var B=(v[r.line.dash]||[1]).slice();for(o=0;o<B.length;++o)B[o]*=E.thickness;if(E.dashes=B,\"hv\"===r.line.shape){for(F=[],o=0;o<Math.floor(n.length/2)-1;o++)isNaN(n[2*o])||isNaN(n[2*o+1])?(F.push(NaN),F.push(NaN),F.push(NaN),F.push(NaN)):(F.push(n[2*o]),F.push(n[2*o+1]),F.push(n[2*o+2]),F.push(n[2*o+1]));F.push(n[n.length-2]),F.push(n[n.length-1])}else if(\"vh\"===r.line.shape){for(F=[],o=0;o<Math.floor(n.length/2)-1;o++)isNaN(n[2*o])||isNaN(n[2*o+1])?(F.push(NaN),F.push(NaN),F.push(NaN),F.push(NaN)):(F.push(n[2*o]),F.push(n[2*o+1]),F.push(n[2*o]),F.push(n[2*o+3]));F.push(n[n.length-2]),F.push(n[n.length-1])}else F=n;var U=!1;for(o=0;o<F.length;o++)if(isNaN(F[o])){U=!0;break}if(E.join=U||F.length>P?\"rect\":m?\"rect\":\"round\",U&&r.connectgaps){var V=F[0],q=F[1];for(o=0;o<F.length;o+=2)isNaN(F[o])||isNaN(F[o+1])?(F[o]=V,F[o+1]=q):(V=F[o],q=F[o+1])}E.positions=F}return x&&((D={}).fill=r.fillcolor,D.thickness=0,D.closed=!0),m&&(L=i(w),I=r.selected?i(c({},w,r.selected.marker)):L,O=r.unselected?i(c({},w,r.unselected.marker)):L,L.positions=n),{line:E,marker:L,errorX:C,errorY:z,fill:D,selected:I,unselected:O}}function i(t,e){var r=e._scene,n=t._fullLayout;return e._scene||((r=e._scene={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],selectedOptions:[],unselectedOptions:[],errorXOptions:[],errorYOptions:[],selectBatch:null,unselectBatch:null,fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,select2d:null}).update=function(t){for(var e=Array(r.count),n=0;n<r.count;n++)e[n]=t;r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.draw()},r.draw=function(){var t;for(t=0;t<r.count;t++)r.fill2d&&r.fill2d.draw(t);for(t=0;t<r.count;t++)r.line2d&&r.line2d.draw(t),r.error2d&&(r.error2d.draw(t),r.error2d.draw(t+r.count)),r.scatter2d&&!r.selectBatch&&r.scatter2d.draw(t);r.select2d&&r.selectBatch&&(r.select2d.draw(r.selectBatch),r.scatter2d.draw(r.unselectBatch)),r.dirty=!1},r.clear=function(){var t,i,a=n._size,o=n.width,s=n.height,l=e.xaxis,c=e.yaxis;t=l&&l.domain&&c&&c.domain?[a.l+l.domain[0]*a.w,a.b+c.domain[0]*a.h,o-a.r-(1-l.domain[1])*a.w,s-a.t-(1-c.domain[1])*a.h]:[a.l,a.b,o-a.r,s-a.t],r.select2d&&((i=r.select2d.regl._gl).enable(i.SCISSOR_TEST),i.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT)),r.scatter2d&&((i=r.scatter2d.regl._gl).enable(i.SCISSOR_TEST),i.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT))},r.clearSelect=function(){r.selectBatch&&(r.selectBatch=null,r.unselectBatch=null,r.scatter2d.update(r.markerOptions),r.clear(),r.draw())},r.destroy=function(){r.fill2d&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy(),r.line2d&&r.line2d.destroy(),r.select2d&&r.select2d.destroy(),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.selectedOptions=null,r.unselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.selectBatch=null,r.unselectBatch=null,delete e._scene}),r.dirty||(r.dirty=!0,r.count=0,r.lineOptions=[],r.fillOptions=[],r.markerOptions=[],r.selectedOptions=[],r.unselectedOptions=[],r.errorXOptions=[],r.errorYOptions=[]),r}function a(t){if(\"circle\"===t)return null;var e,r,n=m.symbolNumber(t),i=m.symbolFuncs[n%100],a=!!m.symbolNoDot[n%100],o=!!m.symbolNoFill[n%100],s=O.test(t);return D[t]?D[t]:(e=s&&!a?i(1.1*C)+I:i(C),r=k(e,{w:L,h:L,viewBox:[-C,-C,C,C],stroke:o?z:-z}),D[t]=r,r||null)}var o=t(\"../../lib\"),s=t(\"../scatter/get_trace_color\"),l=t(\"../../components/errorbars\"),c=t(\"object-assign\"),u=t(\"../../plots/cartesian/axes\"),f=t(\"kdgrass\"),h=t(\"../../components/fx\"),d=t(\"../scatter/subtypes\"),p=t(\"../scatter/colorscale_calc\"),m=t(\"../../components/drawing\"),g=t(\"../scatter/make_bubble_size_func\"),v=t(\"../../constants/gl2d_dashes\"),y=t(\"../../lib/gl_format_color\"),x=t(\"../scatter/link_traces\"),b=t(\"regl-scatter2d\"),_=t(\"regl-line2d\"),w=t(\"regl-error2d\"),M=t(\"color-normalize\"),k=t(\"svg-path-sdf\"),A=t(\"regl\"),T=t(\"../scatter/fill_hover_text\"),S=t(\"fast-isnumeric\"),E=h.constants.MAXDIST,L=200,C=20,z=C/20,D={},I=m.symbolFuncs[0](.05*C),P=1e5,O=/-dot/;e.exports={moduleType:\"trace\",name:\"scattergl\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"errorBarsOK\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),cleanData:t(\"../scatter/clean_data\"),colorbar:t(\"../scatter/colorbar\"),calc:function(t,e){var r,a,o,s,l,c=t._fullLayout,h={},d=u.getFromId(t,e.xaxis),m=u.getFromId(t,e.yaxis),g=c._plots[e.xaxis+e.yaxis],v=\"linear\"===d.type?e.x:d.makeCalcdata(e,\"x\"),y=\"linear\"===m.type?e.y:m.makeCalcdata(e,\"y\"),x=(v||y).length;if(!v)for(v=Array(x),a=0;a<x;a++)v[a]=a;if(!y)for(y=Array(x),a=0;a<x;a++)y[a]=a;var b,_;if(\"log\"===d.type)for(b=Array(v.length),a=0,o=v.length;a<o;a++)b[a]=v[a],v[a]=d.d2l(v[a]);else for(b=v,a=0,o=v.length;a<o;a++)v[a]=parseFloat(v[a]);if(\"log\"===m.type)for(_=Array(y.length),a=0,o=y.length;a<o;a++)_[a]=y[a],y[a]=m.d2l(y[a]);else for(_=y,a=0,o=y.length;a<o;a++)y[a]=parseFloat(y[a]);for(r=new Array(2*x),a=0;a<x;a++)s=S(v[a])?+v[a]:NaN,l=S(y[a])?+y[a]:NaN,r[2*a]=s,r[2*a+1]=l;if(\"log\"!==d.type&&\"log\"!==m.type)h.tree=f(r,512);else{var w=h.ids=Array(x);for(a=0;a<x;a++)w[a]=a}p(e);var M=n(t,0,e,r);if(M.markers)if(Array.isArray(M.markers.sizes)){var k=M.markers.sizes;u.expand(d,b,{padded:!0,ppad:k}),u.expand(m,_,{padded:!0,ppad:k})}else{var A=[1/0,-1/0],T=[1/0,-1/0],E=M.markers.size;for(a=0;a<x;a++)s=v[a],l=y[a],A[0]>s&&(A[0]=s),A[1]<s&&(A[1]=s),T[0]>l&&(T[0]=l),T[1]<l&&(T[1]=l);x<P?(u.expand(d,b,{padded:!0,ppad:E}),u.expand(m,_,{padded:!0,ppad:E})):(d._min&&d._min.push({val:A[0],pad:E}),d._max&&d._max.push({val:A[1],pad:E}),m._min&&m._min.push({val:T[0],pad:E}),m._max&&m._max.push({val:T[1],pad:E}))}else u.expand(d,b,{padded:!0}),u.expand(m,_,{padded:!0});var L=i(t,g);return M.fill&&!L.fill2d&&(L.fill2d=!0),M.marker&&!L.scatter2d&&(L.scatter2d=!0),M.line&&!L.line2d&&(L.line2d=!0),!M.errorX&&!M.errorY||L.error2d||(L.error2d=!0),L.lineOptions.push(M.line),L.errorXOptions.push(M.errorX),L.errorYOptions.push(M.errorY),L.fillOptions.push(M.fill),L.markerOptions.push(M.marker),L.selectedOptions.push(M.selected),L.unselectedOptions.push(M.unselected),L.count++,h.scene=L,h.index=L.count-1,h.x=v,h.y=y,h.rawx=b,h.rawy=_,h.positions=r,h.count=x,[{x:!1,y:!1,t:h,trace:e}]},plot:function(t,e,n){if(n.length){var i=t._fullLayout,a=n[0][0].t.scene;if(a){var o=i._size,s=i.width,l=i.height;i._glcanvas.each(function(e){e.regl||e.pick||(e.regl=A({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},extensions:[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio}))});var c=i._glcanvas.data()[0].regl;if(x(t,e,n),a.dirty){if(!0===a.error2d&&(a.error2d=w(c)),!0===a.line2d&&(a.line2d=_(c)),!0===a.scatter2d&&(a.scatter2d=b(c)),!0===a.fill2d&&(a.fill2d=_(c)),a.line2d&&a.line2d.update(a.lineOptions),a.error2d){var f=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(f)}a.scatter2d&&(a.selectBatch?(a.scatter2d.update(a.unselectedOptions),a.select2d.update(a.selectedOptions)):a.scatter2d.update(a.markerOptions)),a.fill2d&&(a.fillOptions.forEach(function(t,e){var r=n[e];if(t&&r&&r[0]&&r[0].trace){var i,o,s=r[0],l=s.trace,c=s.t,u=a.lineOptions[e],f=[],h=u&&u.positions||c.positions;if(\"tozeroy\"===l.fill)(f=(f=[h[0],0]).concat(h)).push(h[h.length-2]),f.push(0);else if(\"tozerox\"===l.fill)(f=(f=[0,h[1]]).concat(h)).push(0),f.push(h[h.length-1]);else if(\"toself\"===l.fill||\"tonext\"===l.fill){for(f=[],i=0,o=0;o<h.length;o+=2)(isNaN(h[o])||isNaN(h[o+1]))&&((f=f.concat(h.slice(i,o))).push(h[i],h[i+1]),i=o+2);f=f.concat(h.slice(i)),i&&f.push(h[i],h[i+1])}else{var d=l._nexttrace;if(d){var p=a.lineOptions[e+1];if(p){var m=p.positions;if(\"tonexty\"===l.fill){for(f=h.slice(),e=Math.floor(m.length/2);e--;){var g=m[2*e],v=m[2*e+1];isNaN(g)||isNaN(v)||(f.push(g),f.push(v))}t.fill=d.fillcolor}}}}if(l._prevtrace&&\"tonext\"===l._prevtrace.fill){var y=a.lineOptions[e-1].positions,x=f.length/2,b=[i=x];for(o=0;o<y.length;o+=2)(isNaN(y[o])||isNaN(y[o+1]))&&(b.push(o/2+x+1),i=o+2);f=f.concat(y),t.hole=b}t.opacity=l.opacity,t.positions=f}}),a.fill2d.update(a.fillOptions))}var h=i.dragmode;\"lasso\"!==h&&\"select\"!==h||a.select2d&&a.selectBatch&&a.scatter2d.update(a.unselectedOptions);var d=n.map(function(r){if(r&&r[0]&&r[0].trace){var n,c=r[0],f=c.trace,d=c.t,p=d.rawx,m=d.rawy,g=e.xaxis||u.getFromId(t,f.xaxis||\"x\"),v=e.yaxis||u.getFromId(t,f.yaxis||\"y\"),y=[(g._rl||g.range)[0],(v._rl||v.range)[0],(g._rl||g.range)[1],(v._rl||v.range)[1]],x=[o.l+g.domain[0]*o.w,o.b+v.domain[0]*o.h,s-o.r-(1-g.domain[1])*o.w,l-o.t-(1-v.domain[1])*o.h];if(f.selectedpoints||\"lasso\"===h||\"select\"===h){if(!a.select2d&&a.scatter2d){var _=i._glcanvas.data()[1].regl;a.select2d=b(_,{clone:a.scatter2d}),a.select2d.update(a.selectedOptions),f.selectedpoints&&!a.selectBatch&&(a.selectBatch=Array(a.count),a.unselectBatch=Array(a.count),a.scatter2d.update(a.unselectedOptions))}else a.select2d.update(a.selectedOptions);if(f.selectedpoints&&!a.unselectBatch[d.index]){a.selectBatch[d.index]=f.selectedpoints;var w=f.selectedpoints,M={};for(n=0;n<w.length;n++)M[w[n]]=!0;var k=[];for(n=0;n<d.count;n++)M[n]||k.push(n);a.unselectBatch[d.index]=k}var A=Array(d.count),T=Array(d.count);for(n=0;n<d.count;n++)A[n]=g.c2p(p[n]),T[n]=v.c2p(m[n]);d.xpx=A,d.ypx=T}else d.xpx=d.ypx=null;return f.visible?{viewport:x,range:y}:null}});a.fill2d&&a.fill2d.update(d),a.line2d&&a.line2d.update(d),a.error2d&&a.error2d.update(d.concat(d)),a.scatter2d&&a.scatter2d.update(d),a.select2d&&a.select2d.update(d),a.draw()}}},hoverPoints:function(t,e,r,n){var i,a=t.cd,c=a[0].t,u=a[0].trace,f=t.xa,h=t.ya,d=c.rawx,p=c.rawy,m=f.c2p(e),g=h.c2p(r);if(c.tree){var v=f.p2c(m-E),y=f.p2c(m+E),x=h.p2c(g-E),b=h.p2c(g+E);i=\"x\"===n?c.tree.range(Math.min(v,y),Math.min(h._rl[0],h._rl[1]),Math.max(v,y),Math.max(h._rl[0],h._rl[1])):c.tree.range(Math.min(v,y),Math.min(x,b),Math.max(v,y),Math.max(x,b))}else{if(!c.ids)return[t];i=c.ids}var _,w,M,k,A,S,L,C=E;if(\"x\"===n)for(k=0;k<i.length;k++)w=d[i[k]],(A=Math.abs(f.c2p(w)-m))<C&&(C=A,_=i[k]);else for(k=0;k<i.length;k++)w=d[i[k]],M=p[i[k]],A=f.c2p(w)-m,S=h.c2p(M)-g,(L=Math.sqrt(A*A+S*S))<C&&(C=L,_=i[k]);if(t.index=_,void 0===_)return[t];var z={pointNumber:_,x:d[_],y:p[_]};z.tx=Array.isArray(u.text)?u.text[_]:u.text,z.htx=Array.isArray(u.hovertext)?u.hovertext[_]:u.hovertext,z.data=Array.isArray(u.customdata)?u.customdata[_]:u.customdata,z.tp=Array.isArray(u.textposition)?u.textposition[_]:u.textposition;var D=u.textfont;D&&(z.ts=Array.isArray(D.size)?D.size[_]:D.size,z.tc=Array.isArray(D.color)?D.color[_]:D.color,z.tf=Array.isArray(D.family)?D.family[_]:D.family);var I=u.marker;I&&(z.ms=Array.isArray(I.size)?I.size[_]:I.size,z.mo=Array.isArray(I.opacity)?I.opacity[_]:I.opacity,z.mx=Array.isArray(I.symbol)?I.symbol[_]:I.symbol,z.mc=Array.isArray(I.color)?I.color[_]:I.color);var P=I&&I.line;P&&(z.mlc=Array.isArray(P.color)?P.color[_]:P.color,z.mlw=Array.isArray(P.width)?P.width[_]:P.width);var O=I&&I.gradient;O&&\"none\"!==O.type&&(z.mgt=Array.isArray(O.type)?O.type[_]:O.type,z.mgc=Array.isArray(O.color)?O.color[_]:O.color);var F=f.c2p(z.x,!0),R=h.c2p(z.y,!0),N=z.mrc||1,j=u.hoverlabel;j&&(z.hbg=Array.isArray(j.bgcolor)?j.bgcolor[_]:j.bgcolor,z.hbc=Array.isArray(j.bordercolor)?j.bordercolor[_]:j.bordercolor,z.hts=Array.isArray(j.font.size)?j.font.size[_]:j.font.size,z.htc=Array.isArray(j.font.color)?j.font.color[_]:j.font.color,z.htf=Array.isArray(j.font.family)?j.font.family[_]:j.font.family,z.hnl=Array.isArray(j.namelength)?j.namelength[_]:j.namelength);var B=u.hoverinfo;B&&(z.hi=Array.isArray(B)?B[_]:B);var U={};return U[t.index]=z,o.extendFlat(t,{color:s(u,z),x0:F-N,x1:F+N,xLabelVal:z.x,y0:R-N,y1:R+N,yLabelVal:z.y,cd:U}),z.htx?t.text=z.htx:z.tx?t.text=z.tx:u.text&&(t.text=u.text),T(z,u,t),l.hoverInfo(z,u,t),[t]},style:function(t,e){if(e){var r=e[0].t.scene;r.clear(),r.draw()}},selectPoints:function(t,e){var r=t.cd,n=[],i=r[0].trace,a=r[0].t,o=a.x,s=a.y,l=a.rawx,c=a.rawy,u=a.scene;if(!u)return n;var f=!d.hasMarkers(i)&&!d.hasText(i);if(!0!==i.visible||f)return n;var h,p=null,m=null;if(!1===e||e.degenerate)for(m=Array(a.count),h=0;h<a.count;h++)m[h]=h;else for(p=[],m=[],h=0;h<a.count;h++)e.contains([a.xpx[h],a.ypx[h]])?(p.push(h),n.push({pointNumber:h,x:l?l[h]:o[h],y:c?c[h]:s[h]})):m.push(h);return u.selectBatch||(u.selectBatch=Array(u.count),u.unselectBatch=Array(u.count),u.scatter2d.update(u.unselectedOptions)),u.selectBatch[a.index]=p,u.unselectBatch[a.index]=m,n},sceneOptions:n,sceneUpdate:i,meta:{}}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../../constants/gl2d_dashes\":717,\"../../lib\":743,\"../../lib/gl_format_color\":739,\"../../plots/cartesian\":800,\"../../plots/cartesian/axes\":789,\"../scatter/clean_data\":1069,\"../scatter/colorbar\":1070,\"../scatter/colorscale_calc\":1071,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076,\"../scatter/link_traces\":1082,\"../scatter/make_bubble_size_func\":1083,\"../scatter/subtypes\":1088,\"./attributes\":1113,\"./defaults\":1114,\"color-normalize\":99,\"fast-isnumeric\":140,kdgrass:292,\"object-assign\":462,regl:506,\"regl-error2d\":500,\"regl-line2d\":501,\"regl-scatter2d\":503,\"svg-path-sdf\":544}],1116:[function(t,e,r){\"use strict\";var n=t(\"../scattergeo/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../plots/mapbox/layout_attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/colorbar/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll,u=n.line,f=n.marker;e.exports=c({lon:n.lon,lat:n.lat,mode:l({},i.mode,{dflt:\"markers\"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width},connectgaps:i.connectgaps,marker:{symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,color:f.color,colorscale:f.colorscale,cauto:f.cauto,cmax:f.cmax,cmin:f.cmin,autocolorscale:f.autocolorscale,reversescale:f.reversescale,showscale:f.showscale,colorbar:s},fill:n.fill,fillcolor:i.fillcolor,textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,selected:{marker:{opacity:i.selected.marker.opacity}},unselected:{marker:{opacity:i.unselected.marker.opacity}},hoverinfo:l({},o.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]})},\"calc\",\"nested\")},{\"../../components/colorbar/attributes\":619,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../../plots/mapbox/layout_attributes\":848,\"../scatter/attributes\":1066,\"../scattergeo/attributes\":1104}],1117:[function(t,e,r){\"use strict\";function n(){return{geojson:f.makeBlank(),layout:{visibility:\"none\"},paint:{}}}function i(t){return Array.isArray(t)?function(t){return t}:t?function(){return t}:a}function a(){return\"\"}function o(t,e){return t[0]-e[0]}function s(t){return t[0]===u}var l=t(\"fast-isnumeric\"),c=t(\"../../lib\"),u=t(\"../../constants/numerical\").BADNUM,f=t(\"../../lib/geojson_utils\"),h=t(\"../../components/colorscale\"),d=t(\"../scatter/make_bubble_size_func\"),p=t(\"../scatter/subtypes\"),m=t(\"../../plots/mapbox/convert_text_opts\"),g=t(\"../../constants/interactions\").DESELECTDIM,v=\"circle-color\",y=\"circle-radius\",x=\"circle-opacity\";e.exports=function(t){var e=t[0].trace,r=!0===e.visible,u=\"none\"!==e.fill,b=p.hasLines(e),_=p.hasMarkers(e),w=p.hasText(e),M=_&&\"circle\"===e.marker.symbol,k=_&&\"circle\"!==e.marker.symbol,A=n(),T=n(),S=n(),E=n(),L={fill:A,line:T,circle:S,symbol:E};if(!r)return L;var C;if((u||b)&&(C=f.calcTraceToLineCoords(t)),u&&(A.geojson=f.makePolygon(C),A.layout.visibility=\"visible\",c.extendFlat(A.paint,{\"fill-color\":e.fillcolor})),b&&(T.geojson=f.makeLine(C),T.layout.visibility=\"visible\",c.extendFlat(T.paint,{\"line-width\":e.line.width,\"line-color\":e.line.color,\"line-opacity\":e.opacity})),M){var z={};z[v]={},z[y]={},z[x]={},S.geojson=function(t,e){function r(t,r,n,i){void 0===e[r][n]&&(e[r][n]=i),t[r]=e[r][n]}var n,i=t[0].trace,a=i.marker;h.hasColorscale(i,\"marker\")?n=h.makeColorScaleFunc(h.extractScale(a.colorscale,a.cmin,a.cmax)):Array.isArray(a.color)&&(n=c.identity);var o;p.isBubble(i)&&(o=d(i));var u;u=i.selectedpoints?function(t,e){return i.opacity*e*(t.selected?1:g)}:function(t,e){return i.opacity*e};var f;Array.isArray(a.opacity)?f=function(t){var e=l(t.mo)?+c.constrain(t.mo,0,1):0;return u(t,e)}:i.selectedpoints&&(f=function(t){return u(t,a.opacity)});for(var m=[],b=0;b<t.length;b++){var _=t[b],w=_.lonlat;if(!s(w)){var M={};if(n){var k=_.mcc=n(_.mc);r(M,v,k,b)}o&&r(M,y,o(_.ms),b),f&&r(M,x,f(_),b),m.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:w},properties:M})}}return{type:\"FeatureCollection\",features:m}}(t,z),S.layout.visibility=\"visible\",c.extendFlat(S.paint,{\"circle-opacity\":function(t,e){var r,n=t.marker;if(Array.isArray(n.opacity)||t.selectedpoints){for(var i=Object.keys(e[x]),a=[],s=0;s<i.length;s++){var l=i[s];a.push([e[x][l],+l])}r={property:x,stops:a.sort(o)}}else r=t.opacity*n.opacity;return r}(e,z),\"circle-color\":function(t,e){var r,n=t.marker;if(Array.isArray(n.color)){for(var i=Object.keys(e[v]),a=[],o=0;o<i.length;o++){var s=i[o];a.push([e[v][s],s])}r={property:v,stops:a}}else r=n.color;return r}(e,z),\"circle-radius\":function(t,e){var r,n=t.marker;if(Array.isArray(n.size)){for(var i=Object.keys(e[y]),a=[],s=0;s<i.length;s++){var l=i[s];a.push([e[y][l],+l])}r={property:y,stops:a.sort(o)}}else r=n.size/2;return r}(e,z)})}if((k||w)&&(E.geojson=function(t){for(var e=t[0].trace,r=(e.marker||{}).symbol,n=e.text,o=\"circle\"!==r?i(r):a,l=p.hasText(e)?i(n):a,c=[],u=0;u<t.length;u++){var f=t[u];s(f.lonlat)||c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:f.lonlat},properties:{symbol:o(f.mx),text:l(f.tx)}})}return{type:\"FeatureCollection\",features:c}}(t),c.extendFlat(E.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),k&&(c.extendFlat(E.layout,{\"icon-size\":e.marker.size/10}),c.extendFlat(E.paint,{\"icon-opacity\":e.opacity*e.marker.opacity,\"icon-color\":e.marker.color})),w)){var D=(e.marker||{}).size,I=m(e.textposition,D);c.extendFlat(E.layout,{\"text-size\":e.textfont.size,\"text-anchor\":I.anchor,\"text-offset\":I.offset}),c.extendFlat(E.paint,{\"text-color\":e.textfont.color,\"text-opacity\":e.opacity})}return L}},{\"../../components/colorscale\":633,\"../../constants/interactions\":720,\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/geojson_utils\":736,\"../../plots/mapbox/convert_text_opts\":845,\"../scatter/make_bubble_size_func\":1083,\"../scatter/subtypes\":1088,\"fast-isnumeric\":140}],1118:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(function(t,e,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return a<n.length&&(e.lon=n.slice(0,a)),a<i.length&&(e.lat=i.slice(0,a)),a}(0,e,f)){if(f(\"text\"),f(\"hovertext\"),f(\"mode\"),i.hasLines(e)&&(o(t,e,r,u,f,{noDash:!0}),f(\"connectgaps\")),i.hasMarkers(e)){a(t,e,r,u,f,{noLine:!0,noSelect:!0});var h=e.marker;h.line={width:0},\"circle\"!==h.symbol&&(Array.isArray(h.size)&&(h.size=h.size[0]),Array.isArray(h.color)&&(h.color=h.color[0]))}i.hasText(e)&&s(t,e,u,f,{noSelect:!0}),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1116}],1119:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1120:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../scatter/get_trace_color\"),a=t(\"../scatter/fill_hover_text\"),o=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){var s=t.cd,l=s[0].trace,c=t.xa,u=t.ya,f=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),h=e-f;if(n.getClosest(s,function(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([h,e[1]])),i=Math.abs(u.c2p(e)-u.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)},t),!1!==t.index){var d=s[t.index],p=d.lonlat,m=[p[0]+f,p[1]],g=c.c2p(m),v=u.c2p(m),y=d.mrc||1;return t.x0=g-y,t.x1=g+y,t.y0=v-y,t.y1=v+y,t.color=i(l,d),t.extraText=function(t,e,r){function n(t){return t+\"\\xb0\"}var i=(e.hi||t.hoverinfo).split(\"+\"),o=-1!==i.indexOf(\"all\"),s=-1!==i.indexOf(\"lon\"),l=-1!==i.indexOf(\"lat\"),c=e.lonlat,u=[];return o||s&&l?u.push(\"(\"+n(c[0])+\", \"+n(c[1])+\")\"):s?u.push(r.lon+n(c[0])):l&&u.push(r.lat+n(c[1])),(o||-1!==i.indexOf(\"text\"))&&a(e,t,u),u.join(\"<br>\")}(l,d,s[0].t.labels),[t]}}},{\"../../components/fx\":660,\"../../constants/numerical\":721,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076}],1121:[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.plot=t(\"./plot\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.style=function(t,e){if(e){e[0].trace._glTrace.update(e)}},n.moduleType=\"trace\",n.name=\"scattermapbox\",n.basePlotModule=t(\"../../plots/mapbox\"),n.categories=[\"mapbox\",\"gl\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatterlike\"],n.meta={},e.exports=n},{\"../../plots/mapbox\":846,\"../scatter/colorbar\":1070,\"../scattergeo/calc\":1105,\"./attributes\":1116,\"./defaults\":1118,\"./event_data\":1119,\"./hover\":1120,\"./plot\":1122,\"./select\":1123}],1122:[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)),t[0].trace._glTrace=this},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=new n(t,e[0].trace.uid);return r.update(e),r}},{\"./convert\":1117}],1123:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\");e.exports=function(t,e){var r,i,a,o,s,l=t.cd,c=t.xaxis,u=t.yaxis,f=[],h=l[0].trace;if(!n.hasMarkers(h))return[];if(!1===e)for(s=0;s<l.length;s++)l[s].selected=0;else for(s=0;s<l.length;s++)i=(r=l[s]).lonlat,a=c.c2p(i),o=u.c2p(i),e.contains([a,o])?(f.push({pointNumber:s,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0;return f}},{\"../scatter/subtypes\":1088}],1124:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat,i=t(\"../scatter/attributes\"),a=t(\"../../plots/attributes\"),o=i.line;e.exports={mode:i.mode,r:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},theta:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\",\"gradians\"],dflt:\"degrees\",editType:\"calc+clearAxisTypes\"},text:i.text,hovertext:i.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:[\"linear\",\"spline\"]}),smoothing:o.smoothing,editType:\"calc\"},connectgaps:i.connectgaps,marker:i.marker,cliponaxis:n({},i.cliponaxis,{dflt:!1}),textposition:i.textposition,textfont:i.textfont,fill:n({},i.fill,{values:[\"none\",\"toself\",\"tonext\"]}),fillcolor:i.fillcolor,hoverinfo:n({},a.hoverinfo,{flags:[\"r\",\"theta\",\"text\",\"name\"]}),hoveron:i.hoveron,selected:i.selected,unselected:i.unselected}},{\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1125:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/cartesian/axes\"),o=t(\"../scatter/colorscale_calc\"),s=t(\"../scatter/arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\"),c=t(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){function r(t){return d.c2rad(t,e.thetaunit)}for(var u=t._fullLayout,f=e.subplot,h=u[f].radialaxis,d=u[f].angularaxis,p=h.makeCalcdata(e,\"r\"),m=d.makeCalcdata(e,\"theta\"),g=p.length,v=new Array(g),y=0;y<g;y++){var x=p[y],b=m[y],_=v[y]={};n(x)&&n(b)?(_.r=x,_.theta=b,_.rad=r(b)):_.r=i}var w=c(e,g);return a.expand(h,p,{ppad:w}),\"linear\"!==d.type&&(d.autorange=!0,a.expand(d,m)),o(e),s(v,e),l(v,e),v}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1126:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/line_shape_defaults\"),l=t(\"../scatter/text_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),u=t(\"../scatter/constants\").PTS_LINESONLY,f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,r,i)}var p=d(\"r\"),m=d(\"theta\"),g=p&&m?Math.min(p.length,m.length):0;if(g){g<p.length&&(e.r=p.slice(0,g)),g<m.length&&(e.theta=m.slice(0,g)),d(\"thetaunit\"),d(\"mode\",g<u?\"lines+markers\":\"lines\"),d(\"text\"),d(\"hovertext\"),i.hasLines(e)&&(o(t,e,r,h,d),s(t,e,d),d(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,h,d,{gradient:!0}),i.hasText(e)&&l(t,e,h,d);var v=[];(i.hasMarkers(e)||i.hasText(e))&&(d(\"cliponaxis\"),d(\"marker.maxdisplayed\"),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(c(t,e,r,d),i.hasLines(e)||s(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1124}],1127:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t,e){c.push(t._hovertitle+\": \"+a.tickText(t,e,\"hover\").text)}var i=r.radialAxis,s=r.angularAxis,l=(t.hi||e.hoverinfo).split(\"+\"),c=[];i._hovertitle=\"r\",s._hovertitle=\"\\u03b8\";var u,f=s._c2rad(t.theta,e.thetaunit);return u=\"linear\"===s.type&&e.thetaunit!==s.thetaunit?\"degrees\"===s.thetaunit?o.rad2deg(f):f:t.theta,-1!==l.indexOf(\"all\")&&(l=[\"r\",\"theta\"]),-1!==l.indexOf(\"r\")&&n(i,i.c2r(t.r)),-1!==l.indexOf(\"theta\")&&n(s,u),c.join(\"<br>\")}var i=t(\"../scatter/hover\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\");e.exports={hoverPoints:function(t,e,r,a){var o=i(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtWithinSector(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,s.extraText=n(c,u,l),o}},makeHoverPointText:n}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../scatter/hover\":1077}],1128:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":855,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1124,\"./calc\":1125,\"./defaults\":1126,\"./hover\":1127,\"./plot\":1129}],1129:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){var a,o,s,l={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.circle:null},c=e.radialAxis,u=c.range;for(s=u[0]>u[1]?function(t){return t<=0}:function(t){return t>=0},a=0;a<r.length;a++)for(o=0;o<r[a].length;o++){var f=r[a][o],h=f.r;if(h!==i){var d=c.c2r(h)-u[0];if(s(d)){var p=f.rad;f.x=d*Math.cos(p),f.y=d*Math.sin(p);continue}f.intoCenter=[e.cxx,e.cyy]}f.x=i,f.y=i}n(t,l,r)}},{\"../../constants/numerical\":721,\"../scatter/plot\":1085}],1130:[function(t,e,r){\"use strict\";var n=t(\"../scatterpolar/attributes\"),i=t(\"../scattergl/attributes\");e.exports={mode:n.mode,r:n.r,theta:n.theta,thetaunit:n.thetaunit,text:n.text,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,hoverinfo:n.hoverinfo,hoveron:n.hoveron,selected:n.selected,unselected:n.unselected}},{\"../scattergl/attributes\":1113,\"../scatterpolar/attributes\":1124}],1131:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/fillcolor_defaults\"),l=t(\"../scatter/constants\").PTS_LINESONLY,c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}var h=f(\"r\"),d=f(\"theta\"),p=h&&d?Math.min(h.length,d.length):0;if(p){p<h.length&&(e.r=h.slice(0,p)),p<d.length&&(e.theta=d.slice(0,p)),f(\"thetaunit\"),f(\"mode\",p<l?\"lines+markers\":\"lines\"),f(\"text\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\"connectgaps\"));var m=[];i.hasMarkers(e)&&(a(t,e,r,u,f),m.push(\"points\")),f(\"fill\"),\"none\"!==e.fill&&s(t,e,r,f),\"tonext\"!==e.fill&&\"toself\"!==e.fill||m.push(\"fills\"),f(\"hoveron\",m.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"./attributes\":1130}],1132:[function(t,e,r){\"use strict\";var n=t(\"kdgrass\"),i=t(\"fast-isnumeric\"),a=t(\"../scattergl\"),o=t(\"../scatter/colorscale_calc\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../scatterpolar/hover\").makeHoverPointText,c=t(\"../scatter/subtypes\");e.exports={moduleType:\"trace\",name:\"scatterpolargl\",basePlotModule:t(\"../../plots/polar\"),categories:[\"gl\",\"regl\",\"polar\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:function(t,e){var r=t._fullLayout,n=e.subplot,i=r[n].radialaxis,a=r[n].angularaxis,l=i.makeCalcdata(e,\"r\"),c=a.makeCalcdata(e,\"theta\"),u={};return o(e),u.r=l,u.theta=c,s.expand(i,l,{tozero:!0}),\"linear\"!==a.type&&(a.autorange=!0,s.expand(a,c)),[{x:!1,y:!1,t:u,trace:e}]},plot:function(t,e,r){var o=e.radialAxis,s=e.angularAxis,l=o.range,u=a.sceneUpdate(t,e);return u.clear(),r.forEach(function(f,h){function d(t){return s.c2rad(t,b.thetaunit)}if(f&&f[0]&&f[0].trace){var p,m,g,v,y,x=f[0],b=x.trace,_=x.t,w=_.r,M=_.theta,k=w.slice(),A=M.slice();for(p=0;p<w.length;p++)m=w[p],v=M[p],y=s.c2rad(v,b.thetaunit),e.isPtWithinSector({r:m,rad:y})||(k[p]=NaN,A[p]=NaN);var T=w.length,S=new Array(2*T),E=Array(T),L=Array(T);for(p=0;p<T;p++)m=k[p],v=A[p],i(m)&&i(v)&&m>=0?(g=o.c2r(m)-l[0],y=d(v),E[p]=S[2*p]=g*Math.cos(y),L[p]=S[2*p+1]=g*Math.sin(y)):E[p]=L[p]=S[2*p]=S[2*p+1]=NaN;var C=a.sceneOptions(t,e,b,S);C.fill&&!u.fill2d&&(u.fill2d=!0),C.marker&&!u.scatter2d&&(u.scatter2d=!0),C.line&&!u.line2d&&(u.line2d=!0),!C.errorX&&!C.errorY||u.error2d||(u.error2d=!0),c.hasMarkers(b)&&(C.selected.positions=C.unselected.positions=C.marker.positions),u.lineOptions.push(C.line),u.errorXOptions.push(C.errorX),u.errorYOptions.push(C.errorY),u.fillOptions.push(C.fill),u.markerOptions.push(C.marker),u.selectedOptions.push(C.selected),u.unselectedOptions.push(C.unselected),u.count=r.length,_.scene=u,_.index=h,_.x=E,_.y=L,_.rawx=E,_.rawy=L,_.r=w,_.theta=M,_.positions=S,_.count=T,_.tree=n(S,512)}}),a.plot(t,e,r)},hoverPoints:function(t,e,r,n){var i=t.cd[0].t,o=i.r,s=i.theta,c=a.hoverPoints(t,e,r,n);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var f=t.subplot,h=f.angularAxis,d=u.cd[u.index],p=u.trace;if(d.r=o[u.index],d.theta=s[u.index],d.rad=h.c2rad(d.theta,p.thetaunit),f.isPtWithinSector(d))return u.xLabelVal=void 0,u.yLabelVal=void 0,u.extraText=l(d,p,f),c}},style:a.style,selectPoints:a.selectPoints,meta:{}}},{\"../../plots/cartesian/axes\":789,\"../../plots/polar\":855,\"../scatter/colorscale_calc\":1071,\"../scatter/subtypes\":1088,\"../scattergl\":1115,\"../scatterpolar/hover\":1127,\"./attributes\":1130,\"./defaults\":1131,\"fast-isnumeric\":140,kdgrass:292}],1133:[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,c=n.marker,u=n.line,f=c.line;e.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:l({},n.fill,{values:[\"none\",\"toself\",\"tonext\"]}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:\"calc\"},a(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},a(\"marker\"),{showscale:c.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:n.hoveron}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1134:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=[\"a\",\"b\",\"c\"],c={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};e.exports=function(t,e){var r,u,f,h,d,p,m=t._fullLayout[e.subplot].sum,g=e.sum||m;for(r=0;r<l.length;r++)if(f=l[r],!e[f]){for(d=e[c[f][0]],p=e[c[f][1]],h=new Array(d.length),u=0;u<d.length;u++)h[u]=g-d[u]-p[u];e[f]=h}var v,y,x,b,_,w,M=e.a.length,k=new Array(M);for(r=0;r<M;r++)v=e.a[r],y=e.b[r],x=e.c[r],n(v)&&n(y)&&n(x)?(1!==(b=m/((v=+v)+(y=+y)+(x=+x)))&&(v*=b,y*=b,x*=b),w=v,_=x-y,k[r]={x:_,y:w,a:v,b:y,c:x}):k[r]={x:!1,y:!1};return s(e,M),i(e),a(k,e),o(k,e),k}},{\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1135:[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\"),c=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,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){m&&p<m.length&&(e.a=m.slice(0,p)),g&&p<g.length&&(e.b=g.slice(0,p)),v&&p<v.length&&(e.c=v.slice(0,p)),d(\"sum\"),d(\"text\"),d(\"hovertext\");d(\"mode\",p<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,d),l(t,e,d),d(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,d,{gradient:!0}),a.hasText(e)&&c(t,e,h,d);var y=[];(a.hasMarkers(e)||a.hasText(e))&&(d(\"cliponaxis\"),d(\"marker.maxdisplayed\"),y.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,d),a.hasLines(e)||l(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||y.push(\"fills\"),d(\"hoveron\",y.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1133}],1136:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1137:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\"),i=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r,a){function o(t,e){v.push(t._hovertitle+\": \"+i.tickText(t,e,\"hover\").text)}var s=n(t,e,r,a);if(s&&!1!==s[0].index){var l=s[0];if(void 0===l.index){var c=1-l.y0/t.ya._length,u=t.xa._length,f=u*c/2,h=u-f;return l.x0=Math.max(Math.min(l.x0,h),f),l.x1=Math.max(Math.min(l.x1,h),f),s}var d=l.cd[l.index];l.a=d.a,l.b=d.b,l.c=d.c,l.xLabelVal=void 0,l.yLabelVal=void 0;var p=l.trace,m=l.subplot,g=(d.hi||p.hoverinfo).split(\"+\"),v=[];return-1!==g.indexOf(\"all\")&&(g=[\"a\",\"b\",\"c\"]),-1!==g.indexOf(\"a\")&&o(m.aaxis,d.a),-1!==g.indexOf(\"b\")&&o(m.baxis,d.b),-1!==g.indexOf(\"c\")&&o(m.caxis,d.c),l.extraText=v.join(\"<br>\"),s}}},{\"../../plots/cartesian/axes\":789,\"../scatter/hover\":1077}],1138:[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(\"../scatter/style\").style,n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"../scatter/select\"),n.eventData=t(\"./event_data\"),n.moduleType=\"trace\",n.name=\"scatterternary\",n.basePlotModule=t(\"../../plots/ternary\"),n.categories=[\"ternary\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/ternary\":866,\"../scatter/colorbar\":1070,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1133,\"./calc\":1134,\"./defaults\":1135,\"./event_data\":1136,\"./hover\":1137,\"./plot\":1139}],1139:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null};n(t,a,r)}},{\"../scatter/plot\":1085}],1140:[function(t,e,r){\"use strict\";function n(t){return{show:{valType:\"boolean\",dflt:!1},project:{x:{valType:\"boolean\",dflt:!1},y:{valType:\"boolean\",dflt:!1},z:{valType:\"boolean\",dflt:!1}},color:{valType:\"color\",dflt:i.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:i.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var i=t(\"../../components/color\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll,c=e.exports=l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"data_array\"},surfacecolor:{valType:\"data_array\"},cauto:a.zauto,cmin:a.zmin,cmax:a.zmax,colorscale:a.colorscale,autocolorscale:s({},a.autocolorscale,{dflt:!1}),reversescale:a.reversescale,showscale:a.showscale,colorbar:o,contours:{x:n(),y:n(),z:n()},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05},roughness:{valType:\"number\",min:0,max:1,dflt:.5},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})}},\"calc\",\"nested\");c.x.editType=c.y.editType=c.z.editType=\"calc+clearAxisTypes\"},{\"../../components/color\":618,\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773}],1141:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(e,e.surfacecolor,\"\",\"c\"):n(e,e.z,\"\",\"c\")}},{\"../../components/colorscale/calc\":625}],1142:[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=\"cb\"+r.uid,c=r.cmin,u=r.cmax,f=r.surfacecolor||r.z;if(n(c)||(c=i.aggNums(Math.min,null,f)),n(u)||(u=i.aggNums(Math.max,null,f)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var h=e[0].t.cb=s(t,l),d=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});h.fillcolor(d).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1143:[function(t,e,r){\"use strict\";function n(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.dataScale=1}function i(t){var e=t.shape,r=[e[0]+2,e[1]+2],n=o(new Float32Array(r[0]*r[1]),r);return c.assign(n.lo(1,1).hi(e[0],e[1]),t),c.assign(n.lo(1).hi(e[0],1),t.hi(e[0],1)),c.assign(n.lo(1,r[1]-1).hi(e[0],1),t.lo(0,e[1]-1).hi(e[0],1)),c.assign(n.lo(0,1).hi(1,e[1]),t.hi(1)),c.assign(n.lo(r[0]-1,1).hi(1,e[1]),t.lo(e[0]-1)),n.set(0,0,t.get(0,0)),n.set(0,r[1]-1,t.get(0,e[1]-1)),n.set(r[0]-1,0,t.get(e[0]-1,0)),n.set(r[0]-1,r[1]-1,t.get(e[0]-1,e[1]-1)),n}var a=t(\"gl-surface3d\"),o=t(\"ndarray\"),s=t(\"ndarray-homography\"),l=t(\"ndarray-fill\"),c=t(\"ndarray-ops\"),u=t(\"tinycolor2\"),f=t(\"../../lib/str2rgbarray\"),h=128,d=n.prototype;d.handlePick=function(t){if(t.object===this.surface){var e=t.index=[Math.min(0|Math.round(t.data.index[0]/this.dataScale-1),this.data.z[0].length-1),Math.min(0|Math.round(t.data.index[1]/this.dataScale-1),this.data.z.length-1)],r=[0,0,0];Array.isArray(this.data.x[0])?r[0]=this.data.x[e[1]][e[0]]:r[0]=this.data.x[e[0]],Array.isArray(this.data.y[0])?r[1]=this.data.y[e[1]][e[0]]:r[1]=this.data.y[e[1]],r[2]=this.data.z[e[1]][e[0]],t.traceCoordinate=r;var n=this.scene.fullSceneLayout;t.dataCoordinate=[n.xaxis.d2l(r[0],0,this.data.xcalendar)*this.scene.dataScale[0],n.yaxis.d2l(r[1],0,this.data.ycalendar)*this.scene.dataScale[1],n.zaxis.d2l(r[2],0,this.data.zcalendar)*this.scene.dataScale[2]];var i=this.data.text;return i&&i[e[1]]&&void 0!==i[e[1]][e[0]]?t.textLabel=i[e[1]][e[0]]:t.textLabel=\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}},d.setContourLevels=function(){for(var t=[[],[],[]],e=!1,r=0;r<3;++r)this.showContour[r]&&(e=!0,t[r]=this.scene.contourLevels[r]);e&&this.surface.update({levels:t})},d.update=function(t){var e,r=this.scene,n=r.fullSceneLayout,a=this.surface,c=t.opacity,d=function(t,e){return void 0===e&&(e=1),t.map(function(t){var r=t[0],n=u(t[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,e]}})}(t.colorscale,c),p=t.z,m=t.x,g=t.y,v=n.xaxis,y=n.yaxis,x=n.zaxis,b=r.dataScale,_=p[0].length,w=p.length,M=[o(new Float32Array(_*w),[_,w]),o(new Float32Array(_*w),[_,w]),o(new Float32Array(_*w),[_,w])],k=M[0],A=M[1],T=r.contourLevels;this.data=t;var S=t.xcalendar,E=t.ycalendar,L=t.zcalendar;l(M[2],function(t,e){return x.d2l(p[e][t],0,L)*b[2]}),Array.isArray(m[0])?l(k,function(t,e){return v.d2l(m[e][t],0,S)*b[0]}):l(k,function(t){return v.d2l(m[t],0,S)*b[0]}),Array.isArray(g[0])?l(A,function(t,e){return y.d2l(g[e][t],0,E)*b[1]}):l(A,function(t,e){return y.d2l(g[e],0,E)*b[1]});var C={colormap:d,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:t.opacity};if(C.intensityBounds=[t.cmin,t.cmax],t.surfacecolor){var z=o(new Float32Array(_*w),[_,w]);l(z,function(e,r){return t.surfacecolor[r][e]}),M.push(z)}else C.intensityBounds[0]*=b[2],C.intensityBounds[1]*=b[2];this.dataScale=function(t){var e=Math.max(t[0].shape[0],t[0].shape[1]);if(e<h){for(var r=h/e,n=[0|Math.floor(t[0].shape[0]*r+1),0|Math.floor(t[0].shape[1]*r+1)],a=n[0]*n[1],l=0;l<t.length;++l){var c=i(t[l]),u=o(new Float32Array(a),n);s(u,c,[r,0,0,0,r,0,0,0,1]),t[l]=u}return r}return 1}(M),t.surfacecolor&&(C.intensity=M.pop());var D=[!0,!0,!0],I=[\"x\",\"y\",\"z\"];for(e=0;e<3;++e){var P=t.contours[I[e]];D[e]=P.highlight,C.showContour[e]=P.show||P.highlight,C.showContour[e]&&(C.contourProject[e]=[P.project.x,P.project.y,P.project.z],P.show?(this.showContour[e]=!0,C.levels[e]=T[e],a.highlightColor[e]=C.contourColor[e]=f(P.color),P.usecolormap?a.highlightTint[e]=C.contourTint[e]=0:a.highlightTint[e]=C.contourTint[e]=1,C.contourWidth[e]=P.width):this.showContour[e]=!1,P.highlight&&(C.dynamicColor[e]=f(P.highlightcolor),C.dynamicWidth[e]=P.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(d)&&(C.vertexColor=!0),C.coords=M,a.update(C),a.visible=t.visible,a.enableDynamic=D,a.snapToData=!0,\"lighting\"in t&&(a.ambientLight=t.lighting.ambient,a.diffuseLight=t.lighting.diffuse,a.specularLight=t.lighting.specular,a.roughness=t.lighting.roughness,a.fresnel=t.lighting.fresnel),\"lightposition\"in t&&(a.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z]),c&&c<1&&(a.supportsTransparency=!0)},d.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=a({gl:r}),o=new n(t,i,e.uid);return i._trace=o,o.update(e),t.glplot.add(i),o}},{\"../../lib/str2rgbarray\":765,\"gl-surface3d\":254,ndarray:458,\"ndarray-fill\":448,\"ndarray-homography\":450,\"ndarray-ops\":452,tinycolor2:546}],1144:[function(t,e,r){\"use strict\";function n(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}var i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,n){return a.coerce(t,e,s,r,n)}var u,f,h=c(\"z\");if(h){var d=h[0].length,p=h.length;c(\"x\"),c(\"y\");if(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],l),!Array.isArray(e.x))for(e.x=[],u=0;u<d;++u)e.x[u]=u;if(c(\"text\"),!Array.isArray(e.y))for(e.y=[],u=0;u<p;++u)e.y[u]=u;[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"hidesurface\",\"opacity\"].forEach(function(t){c(t)});var m=c(\"surfacecolor\");c(\"colorscale\");var g=[\"x\",\"y\",\"z\"];for(u=0;u<3;++u){var v=\"contours.\"+g[u],y=c(v+\".show\"),x=c(v+\".highlight\");if(y||x)for(f=0;f<3;++f)c(v+\".project.\"+g[f]);y&&(c(v+\".color\"),c(v+\".width\"),c(v+\".usecolormap\")),x&&(c(v+\".highlightcolor\"),c(v+\".highlightwidth\"))}m||(n(t,\"zmin\",\"cmin\"),n(t,\"zmax\",\"cmax\"),n(t,\"zauto\",\"cauto\")),o(t,e,l,c,{prefix:\"\",cLetter:\"c\"})}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../../registry\":873,\"./attributes\":1140}],1145:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.colorbar=t(\"./colorbar\"),n.calc=t(\"./calc\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"surface\",n.basePlotModule=t(\"../../plots/gl3d\"),n.categories=[\"gl3d\",\"2dMap\",\"noOpacity\"],n.meta={},e.exports=n},{\"../../plots/gl3d\":832,\"./attributes\":1140,\"./calc\":1141,\"./colorbar\":1142,\"./convert\":1143,\"./defaults\":1144}],1146:[function(t,e,r){\"use strict\";var n=t(\"../../components/annotations/attributes\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"../../plot_api/edit_types\").overrideAll,o=t(\"../../plots/font_attributes\"),s=t(\"../../plots/domain_attributes\");e.exports=a({domain:s({name:\"table\",trace:!0}),columnwidth:{valType:\"number\",arrayOk:!0,dflt:null},columnorder:{valType:\"data_array\"},header:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[]},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[]},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))}},\"calc\",\"from-root\")},{\"../../components/annotations/attributes\":601,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1147:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getModuleCalcData,i=t(\"./plot\");r.name=\"table\",r.plot=function(t){var e=n(t.calcdata,\"table\");e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"table\"),a=e._has&&e._has(\"table\");i&&!a&&n._paperdiv.selectAll(\".table\").remove()}},{\"../../plots/get_data\":826,\"./plot\":1154}],1148:[function(t,e,r){\"use strict\";var n=t(\"../../lib/gup\").wrap;e.exports=function(t,e){return n(e)}},{\"../../lib/gup\":740}],1149:[function(t,e,r){\"use strict\";e.exports={maxDimensionCount:60,overdrag:45,cellPad:8,latexCheck:/^\\$.*\\$$/,wrapSplitCharacter:\" \",wrapSpacer:\" \",lineBreaker:\"<br>\",uplift:5,goldenRatio:1.618,columnTitleOffset:28,columnExtentOffset:10,transitionEase:\"cubic-out\",transitionDuration:100,releaseTransitionEase:\"cubic-out\",releaseTransitionDuration:120,scrollbarWidth:8,scrollbarCaptureWidth:18,scrollbarOffset:5,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}},{}],1150:[function(t,e,r){\"use strict\";function n(t){return t.calcdata.columns.reduce(function(e,r){return r.xIndex<t.xIndex?e+r.columnWidth:e},0)}function i(t,e){return Object.keys(t).map(function(r){return s({},t[r],{auxiliaryBlocks:e})})}function a(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<t.length;c++)r=t[c],o.rows.push({rowIndex:c,rowHeight:r}),((a+=r)>=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}var o=t(\"./constants\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"fast-isnumeric\");e.exports=function(t,e){var r=e.header.values.map(function(t){return Array.isArray(t)?t:[t]}),c=e.cells.values,u=e.domain,f=Math.floor(t._fullLayout._size.w*(u.x[1]-u.x[0])),h=Math.floor(t._fullLayout._size.h*(u.y[1]-u.y[0])),d=r.length?r[0].map(function(){return e.header.height}):[],p=c.length?c[0].map(function(){return e.cells.height}):[],m=d.reduce(function(t,e){return t+e},0),g=a(p,h-m+o.uplift),v=i(a(d,m),[]),y=i(g,v),x={},b=e._fullInput.columnorder,_=r.map(function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return l(n)?Number(n):1}),w=_.reduce(function(t,e){return t+e},0);_=_.map(function(t){return t/w*f});var M={key:e.index,translateX:u.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-u.y[1]),size:t._fullLayout._size,width:f,height:h,columnOrder:b,groupHeight:h,rowBlocks:y,headerRowBlocks:v,scrollY:0,cells:e.cells,headerCells:s({},e.header,{values:r}),gdColumns:r.map(function(t){return t[0]}),gdColumnsOriginalOrder:r.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:r.map(function(t,e){var r=x[t];x[t]=(r||0)+1;return{key:t+\"__\"+x[t],label:t,specIndex:e,xIndex:b[e],xScale:n,x:void 0,calcdata:void 0,columnWidth:_[e]}})};return M.columns.forEach(function(t){t.calcdata=M,t.x=n(t)}),M}},{\"../../lib/extend\":732,\"./constants\":1149,\"fast-isnumeric\":140}],1151:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\"header\",type:\"header\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\"cells1\",type:\"cells\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\"cells2\",type:\"cells\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0;return[r,e?r+e.rows.length:0]}(t);return t.values.slice(e[0],e[1]).map(function(r,n){return{keyWithinBlock:n+(\"string\"==typeof r&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}})}},{\"../../lib/extend\":732}],1152:[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)}o(\"domain.x\"),o(\"domain.y\"),o(\"columnwidth\"),o(\"header.values\"),o(\"header.format\"),o(\"header.align\"),o(\"header.prefix\"),o(\"header.suffix\"),o(\"header.height\"),o(\"header.line.width\"),o(\"header.line.color\"),o(\"header.fill.color\"),n.coerceFont(o,\"header.font\",n.extendFlat({},a.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s<n;s++)o.push(s);e(\"columnorder\",o)}(e,o),o(\"cells.values\"),o(\"cells.format\"),o(\"cells.align\"),o(\"cells.prefix\"),o(\"cells.suffix\"),o(\"cells.height\"),o(\"cells.line.width\"),o(\"cells.line.color\"),o(\"cells.fill.color\"),n.coerceFont(o,\"cells.font\",n.extendFlat({},a.font))}},{\"../../lib\":743,\"./attributes\":1146}],1153:[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.moduleType=\"trace\",n.name=\"table\",n.basePlotModule=t(\"./base_plot\"),n.categories=[\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1146,\"./base_plot\":1147,\"./calc\":1148,\"./defaults\":1152,\"./plot\":1154}],1154:[function(t,e,r){\"use strict\";function n(t,e){return\"clip\"+t._fullLayout._uid+\"_scrollAreaBottomClip_\"+e.key}function i(t,e){return\"clip\"+t._fullLayout._uid+\"_columnBoundaryClippath_\"+e.calcdata.key+\"_\"+e.specIndex}function a(t){return[].concat.apply([],t.map(function(t){return t})).map(function(t){return t.__data__})}function o(t,e,r){var n=t.selectAll(\".\"+M.cn.scrollbarKit).data(A.repeat,A.keyFun);n.enter().append(\"g\").classed(M.cn.scrollbarKit,!0).style(\"shape-rendering\",\"geometricPrecision\"),n.each(function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return b(e,e.length-1)+(e.length?_(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-p(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,M.goldenRatio*M.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom}).attr(\"transform\",function(t){return\"translate(\"+(t.width+M.scrollbarWidth/2+M.scrollbarOffset)+\" \"+p(t)+\")\"});var i=n.selectAll(\".\"+M.cn.scrollbar).data(A.repeat,A.keyFun);i.enter().append(\"g\").classed(M.cn.scrollbar,!0);var a=i.selectAll(\".\"+M.cn.scrollbarSlider).data(A.repeat,A.keyFun);a.enter().append(\"g\").classed(M.cn.scrollbarSlider,!0),a.attr(\"transform\",function(t){return\"translate(0 \"+(t.scrollbarState.topY||0)+\")\"});var o=a.selectAll(\".\"+M.cn.scrollbarGlyph).data(A.repeat,A.keyFun);o.enter().append(\"line\").classed(M.cn.scrollbarGlyph,!0).attr(\"stroke\",\"black\").attr(\"stroke-width\",M.scrollbarWidth).attr(\"stroke-linecap\",\"round\").attr(\"y1\",M.scrollbarWidth/2),o.attr(\"y2\",function(t){return t.scrollbarState.barLength-M.scrollbarWidth/2}).attr(\"stroke-opacity\",function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4}),o.transition().delay(0).duration(0),o.transition().delay(M.scrollbarHideDelay).duration(M.scrollbarHideDuration).attr(\"stroke-opacity\",0);var s=i.selectAll(\".\"+M.cn.scrollbarCaptureZone).data(A.repeat,A.keyFun);s.enter().append(\"line\").classed(M.cn.scrollbarCaptureZone,!0).attr(\"stroke\",\"white\").attr(\"stroke-opacity\",.01).attr(\"stroke-width\",M.scrollbarCaptureWidth).attr(\"stroke-linecap\",\"butt\").attr(\"y1\",0).on(\"mousedown\",function(r){var n=k.event.y,i=this.getBoundingClientRect(),a=r.scrollbarState,o=n-i.top,s=k.scale.linear().domain([0,a.scrollableAreaHeight]).range([0,a.totalHeight]).clamp(!0);a.topY<=o&&o<=a.bottomY||g(e,t,null,s(o-a.barLength/2))(r)}).call(k.behavior.drag().origin(function(t){return k.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t}).on(\"drag\",g(e,t)).on(\"dragend\",function(){})),s.attr(\"y2\",function(t){return t.scrollbarState.scrollableAreaHeight})}function s(t,e,r,n){var i=function(t){var e=t.selectAll(\".\"+M.cn.columnCell).data(z.splitToCells,function(t){return t.keyWithinBlock});return e.enter().append(\"g\").classed(M.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(\".\"+M.cn.columnCells).data(A.repeat,A.keyFun);return e.enter().append(\"g\").classed(M.cn.columnCells,!0),e.exit().remove(),e}(r));!function(t){t.each(function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:u(r.size,n,e),color:u(r.color,n,e),family:u(r.family,n,e)};t.rowNumber=t.key,t.align=u(t.calcdata.cells.align,n,e),t.cellBorderWidth=u(t.calcdata.cells.line.width,n,e),t.font=i})}(i);!function(t){t.attr(\"width\",function(t){return t.column.columnWidth}).attr(\"stroke-width\",function(t){return t.cellBorderWidth}).each(function(t){var e=k.select(this);D.stroke(e,u(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),D.fill(e,u(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}(function(t){var e=t.selectAll(\".\"+M.cn.cellRect).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"rect\").classed(M.cn.cellRect,!0),e}(i));var a=function(t){var e=t.selectAll(\".\"+M.cn.cellText).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"text\").classed(M.cn.cellText,!0).style(\"cursor\",function(){return\"auto\"}).on(\"mousedown\",function(){k.event.stopPropagation()}),e}(function(t){var e=t.selectAll(\".\"+M.cn.cellTextHolder).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"g\").classed(M.cn.cellTextHolder,!0).style(\"shape-rendering\",\"geometricPrecision\"),e}(i));!function(t){t.each(function(t){T.font(k.select(this),t.font)})}(a),l(a,e,n,t),x(i)}function l(t,e,r,n){t.text(function(t){var e=t.column.specIndex,r=t.rowNumber,n=t.value,i=\"string\"==typeof n,a=i&&n.match(/<br>/i),o=!i||a;t.mayHaveMarkup=i&&n.match(/[<&>]/);var s=function(t){return\"string\"==typeof t&&t.match(M.latexCheck)}(n);t.latex=s;var l,f=s?\"\":u(t.calcdata.cells.prefix,e,r)||\"\",h=s?\"\":u(t.calcdata.cells.suffix,e,r)||\"\",d=s?null:u(t.calcdata.cells.format,e,r)||null,p=f+(d?k.format(d)(t.value):t.value)+h;t.wrappingNeeded=!t.wrapped&&!o&&!s&&(l=c(p)),t.cellHeightMayIncrease=a||s||t.mayHaveMarkup||(void 0===l?c(p):l),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex;var m;if(t.wrappingNeeded){var g=(\" \"===M.wrapSplitCharacter?p.replace(/<a href=/gi,\"<a_href=\"):p).split(M.wrapSplitCharacter),v=\" \"===M.wrapSplitCharacter?g.map(function(t){return t.replace(/<a_href=/gi,\"<a href=\")}):g;t.fragments=v.map(function(t){return{text:t,width:null}}),t.fragments.push({fragment:M.wrapSpacer,width:null}),m=v.join(M.lineBreaker)+M.lineBreaker+M.wrapSpacer}else delete t.fragments,m=p;return m}).attr(\"dy\",function(t){return t.needsConvertToTspans?0:\"0.75em\"}).each(function(t){var i=k.select(this),a=t.wrappingNeeded?function(t,e,r){return function(){var n=k.select(e.parentNode);n.each(function(t){var e=t.fragments;n.selectAll(\"tspan.line\").each(function(t,r){e[r].width=this.getComputedTextLength()});var r,i,a=e[e.length-1].width,o=e.slice(0,-1),s=[],l=0,c=t.column.columnWidth-2*M.cellPad;for(t.value=\"\";o.length;)r=o.shift(),i=r.width+a,l+i>c&&(t.value+=s.join(M.wrapSpacer)+M.lineBreaker,s=[],l=0),s.push(r.text),l+=i;l&&(t.value+=s.join(M.wrapSpacer)),t.wrapped=!0}),n.selectAll(\"tspan.line\").remove(),l(n.select(\".\"+M.cn.cellText),r,t),k.select(e.parentNode.parentNode).call(x)}}:function(t,e,r,n,i){return function(){if(!i.settledY){var a=k.select(e.parentNode),s=w(i),l=i.key-s.firstRowIndex,c=s.rows[l].rowHeight,u=i.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*M.cellPad:c,f=Math.max(u,c),d=f-s.rows[l].rowHeight;d&&(s.rows[l].rowHeight=f,t.selectAll(\".\"+M.cn.columnCell).call(x),m(null,t.filter(h),0),o(r,n,!0)),a.attr(\"transform\",function(){var t=this.parentNode,e=t.getBoundingClientRect(),r=k.select(this.parentNode).select(\".\"+M.cn.cellRect).node().getBoundingClientRect(),n=this.transform.baseVal.consolidate(),a=r.top-e.top+(n?n.matrix.f:M.cellPad);return\"translate(\"+y(i,k.select(this.parentNode).select(\".\"+M.cn.cellTextHolder).node().getBoundingClientRect().width)+\" \"+a+\")\"}),i.settledY=!0}}};t.needsConvertToTspans?S.convertToTspans(i,n,a(r,this,e,n,t)):k.select(this.parentNode).attr(\"transform\",function(t){return\"translate(\"+y(t)+\" \"+M.cellPad+\")\"}).attr(\"text-anchor\",function(t){return{left:\"start\",center:\"middle\",right:\"end\"}[t.align]})})}function c(t){return-1!==t.indexOf(M.wrapSplitCharacter)}function u(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function f(t,e,r){t.transition().ease(M.releaseTransitionEase).duration(M.releaseTransitionDuration).attr(\"transform\",\"translate(\"+e.x+\" \"+r+\")\")}function h(t){return\"cells\"===t.type}function d(t){return\"header\"===t.type}function p(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(t,e){return t+_(e,1/0)},0)}function m(t,e,r){var n=a(e)[0];if(void 0!==n){var i=n.rowBlocks,s=n.calcdata,l=b(i,i.length),c=n.calcdata.groupHeight-p(n),u=s.scrollY=Math.max(0,Math.min(l-c,s.scrollY)),f=function(t,e,r){for(var n=[],i=0,a=0;a<t.length;a++){for(var o=t[a],s=o.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,e<i+l&&e+r>i&&n.push(a),i+=l}return n}(i,u,c);1===f.length&&(f[0]===i.length-1?f.unshift(f[0]-1):f.push(f[0]+1)),f[0]%2&&f.reverse(),e.each(function(t,e){t.page=f[e],t.scrollY=u}),e.attr(\"transform\",function(t){return\"translate(0 \"+(b(t.rowBlocks,t.page)-t.scrollY)+\")\"}),t&&(v(t,r,e,f,n.prevPages,n,0),v(t,r,e,f,n.prevPages,n,1),o(r,t))}}function g(t,e,r,n){return function(i){var a=i.calcdata?i.calcdata:i,o=e.filter(function(t){return a.key===t.key}),s=r||a.scrollbarState.dragMultiplier;a.scrollY=void 0===n?a.scrollY+s*k.event.dy:n;var l=o.selectAll(\".\"+M.cn.yColumn).selectAll(\".\"+M.cn.columnBlock).filter(h);m(t,l,o)}}function v(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});s(t,e,a,r),i[o]=n[o]}))}function y(t,e){switch(t.align){case\"left\":return M.cellPad;case\"right\":return t.column.columnWidth-(e||0)-M.cellPad;case\"center\":return(t.column.columnWidth-(e||0))/2;default:return M.cellPad}}function x(t){t.attr(\"transform\",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+_(e,1/0)},0);return\"translate(0 \"+(_(w(t),t.key)+e)+\")\"}).selectAll(\".\"+M.cn.cellRect).attr(\"height\",function(t){return function(t,e){return t.rows[e-t.firstRowIndex]}(w(t),t.key).rowHeight})}function b(t,e){for(var r=0,n=e-1;n>=0;n--)r+=function(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n<t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}(t[n]);return r}function _(t,e){for(var r=0,n=0;n<t.rows.length&&t.rows[n].rowIndex<e;n++)r+=t.rows[n].rowHeight;return r}function w(t){return t.rowBlocks[t.page]}var M=t(\"./constants\"),k=t(\"d3\"),A=t(\"../../lib/gup\"),T=t(\"../../components/drawing\"),S=t(\"../../lib/svg_text_utils\"),E=t(\"../../lib\").raiseToTop,L=t(\"../../lib\").cancelTransition,C=t(\"./data_preparation_helper\"),z=t(\"./data_split_helpers\"),D=t(\"../../components/color\");e.exports=function(t,e){var r=t._fullLayout._paper.selectAll(\".\"+M.cn.table).data(e.map(function(e){var r=A.unwrap(e).trace;return C(t,r)}),A.keyFun);r.exit().remove(),r.enter().append(\"g\").classed(M.cn.table,!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\",\"all\"),r.attr(\"width\",function(t){return t.width+t.size.l+t.size.r}).attr(\"height\",function(t){return t.height+t.size.t+t.size.b}).attr(\"transform\",function(t){return\"translate(\"+t.translateX+\",\"+t.translateY+\")\"});var l=r.selectAll(\".\"+M.cn.tableControlView).data(A.repeat,A.keyFun);l.enter().append(\"g\").classed(M.cn.tableControlView,!0).style(\"box-sizing\",\"content-box\").on(\"mousemove\",function(e){l.filter(function(t){return e===t}).call(o,t)}).on(\"mousewheel\",function(e){e.scrollbarState.wheeling||(e.scrollbarState.wheeling=!0,k.event.stopPropagation(),k.event.preventDefault(),g(t,l,null,e.scrollY+k.event.deltaY)(e),e.scrollbarState.wheeling=!1)}).call(o,t,!0),l.attr(\"transform\",function(t){return\"translate(\"+t.size.l+\" \"+t.size.t+\")\"});var c=l.selectAll(\".\"+M.cn.scrollBackground).data(A.repeat,A.keyFun);c.enter().append(\"rect\").classed(M.cn.scrollBackground,!0).attr(\"fill\",\"none\"),c.attr(\"width\",function(t){return t.width}).attr(\"height\",function(t){return t.height}),l.each(function(e){T.setClipUrl(k.select(this),n(t,e))});var u=l.selectAll(\".\"+M.cn.yColumn).data(function(t){return t.columns},A.keyFun);u.enter().append(\"g\").classed(M.cn.yColumn,!0),u.exit().remove(),u.attr(\"transform\",function(t){return\"translate(\"+t.x+\" 0)\"}).call(k.behavior.drag().origin(function(e){return f(k.select(this),e,-M.uplift),E(this),e.calcdata.columnDragInProgress=!0,o(l.filter(function(t){return e.calcdata.key===t.key}),t),e}).on(\"drag\",function(t){var e=k.select(this),r=function(e){return(t===e?k.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-M.overdrag,Math.min(t.calcdata.width+M.overdrag-t.columnWidth,k.event.x));a(u).filter(function(e){return e.calcdata.key===t.calcdata.key}).sort(function(t,e){return r(t)-r(e)}).forEach(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)}),u.filter(function(e){return t!==e}).transition().ease(M.transitionEase).duration(M.transitionDuration).attr(\"transform\",function(t){return\"translate(\"+t.x+\" 0)\"}),e.call(L).attr(\"transform\",\"translate(\"+t.x+\" -\"+M.uplift+\" )\")}).on(\"dragend\",function(e){var r=k.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,f(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort(function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]}),e.columnorder=r,t.emit(\"plotly_restyle\")}(t,n,n.columns.map(function(t){return t.xIndex}))})),u.each(function(e){T.setClipUrl(k.select(this),i(t,e))});var p=u.selectAll(\".\"+M.cn.columnBlock).data(z.splitToPanels,A.keyFun);p.enter().append(\"g\").classed(M.cn.columnBlock,!0).attr(\"id\",function(t){return t.key}),p.style(\"cursor\",function(t){return t.dragHandle?\"ew-resize\":t.calcdata.scrollbarState.barWiggleRoom?\"ns-resize\":\"default\"});var v=p.filter(d),y=p.filter(h);y.call(k.behavior.drag().origin(function(t){return k.event.stopPropagation(),t}).on(\"drag\",g(t,l,-1)).on(\"dragend\",function(){})),s(t,l,v,p),s(t,l,y,p);var x=l.selectAll(\".\"+M.cn.scrollAreaClip).data(A.repeat,A.keyFun);x.enter().append(\"clipPath\").classed(M.cn.scrollAreaClip,!0).attr(\"id\",function(e){return n(t,e)});var b=x.selectAll(\".\"+M.cn.scrollAreaClipRect).data(A.repeat,A.keyFun);b.enter().append(\"rect\").classed(M.cn.scrollAreaClipRect,!0).attr(\"x\",-M.overdrag).attr(\"y\",-M.uplift).attr(\"fill\",\"none\"),b.attr(\"width\",function(t){return t.width+2*M.overdrag}).attr(\"height\",function(t){return t.height+M.uplift});u.selectAll(\".\"+M.cn.columnBoundary).data(A.repeat,A.keyFun).enter().append(\"g\").classed(M.cn.columnBoundary,!0);var _=u.selectAll(\".\"+M.cn.columnBoundaryClippath).data(A.repeat,A.keyFun);_.enter().append(\"clipPath\").classed(M.cn.columnBoundaryClippath,!0),_.attr(\"id\",function(e){return i(t,e)});var w=_.selectAll(\".\"+M.cn.columnBoundaryRect).data(A.repeat,A.keyFun);w.enter().append(\"rect\").classed(M.cn.columnBoundaryRect,!0).attr(\"fill\",\"none\"),w.attr(\"width\",function(t){return t.columnWidth}).attr(\"height\",function(t){return t.calcdata.height+M.uplift}),m(null,y,l)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"../../lib/svg_text_utils\":766,\"./constants\":1149,\"./data_preparation_helper\":1150,\"./data_split_helpers\":1151,d3:128}],1155:[function(t,e,r){\"use strict\";var n=t(\"../box/attributes\"),i=t(\"../../lib/extend\").extendFlat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:n.name,orientation:i({},n.orientation,{}),bandwidth:{valType:\"number\",min:0,editType:\"calc\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},scalemode:{valType:\"enumerated\",values:[\"width\",\"count\"],dflt:\"width\",editType:\"calc\"},spanmode:{valType:\"enumerated\",values:[\"soft\",\"hard\",\"manual\"],dflt:\"soft\",editType:\"calc\"},span:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),marker:n.marker,text:n.text,box:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},width:{valType:\"number\",min:0,max:1,dflt:.25,editType:\"plot\"},fillcolor:{valType:\"color\",editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},editType:\"plot\"},meanline:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"plot\"},side:{valType:\"enumerated\",values:[\"both\",\"positive\",\"negative\"],dflt:\"both\",editType:\"plot\"},selected:n.selected,unselected:n.unselected,hoveron:{valType:\"flaglist\",flags:[\"violins\",\"points\",\"kde\"],dflt:\"violins+points+kde\",extras:[\"all\"],editType:\"style\"}}},{\"../../lib/extend\":732,\"../box/attributes\":896}],1156:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../box/calc\"),o=t(\"./helpers\"),s=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;var l=t._fullLayout,c=i.getFromId(t,e[\"h\"===e.orientation?\"xaxis\":\"yaxis\"]),u=l._violinScaleGroupStats,f=e.scalegroup,h=u[f];h||(h=u[f]={maxWidth:0,maxCount:0});for(var d=0;d<r.length;d++){var p=r[d],m=p.pts.map(o.extractVal),g=m.length,v=function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t.length,-.2)}(m,n.stdev(m,g-1,p.mean),p.q3-p.q1),y=p.bandwidth=e.bandwidth||v,x=p.span=function(t,e,r,n){function a(n){var i=c[n],a=r.d2c(i,0,t[e.valLetter+\"calendar\"]);return a===s?f[n]:a}var o,l=t.spanmode,c=t.span||[],u=[e.min,e.max],f=[e.min-2*n,e.max+2*n],h={type:\"linear\",range:o=\"soft\"===l?f:\"hard\"===l?u:[a(0),a(1)]};return i.setConvert(h),h.cleanRange(),o}(e,p,c,y),b=x[1]-x[0],_=Math.ceil(b/(Math.min(v,y)/3)),w=b/_;if(!isFinite(w)||!isFinite(_))return n.error(\"Something went wrong with computing the violin span\"),r[0].t.empty=!0,r;var M=o.makeKDE(p,e,m);p.density=new Array(_);for(var k=0,A=x[0];A<x[1]+w/2;k++,A+=w){var T=M(A);h.maxWidth=Math.max(h.maxWidth,T),p.density[k]={v:T,t:A}}i.expand(c,x,{padded:!0}),h.maxCount=Math.max(h.maxCount,m.length)}return r[0].t.labels.kde=n._(t,\"kde:\"),r}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../box/calc\":897,\"./helpers\":1158}],1157:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../box/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function c(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(\"bandwidth\"),l(\"scalegroup\",e.name),l(\"scalemode\"),l(\"side\");var u,f=l(\"span\");Array.isArray(f)&&(u=\"manual\"),l(\"spanmode\",u);var h=l(\"line.color\",(t.marker||{}).color||r),d=l(\"line.width\"),p=l(\"fillcolor\",i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:\"\"});var m=c(\"box.width\"),g=c(\"box.fillcolor\",p),v=c(\"box.line.color\",h),y=c(\"box.line.width\",d);l(\"box.visible\",Boolean(m||g||v||y))||delete e.box;var x=c(\"meanline.color\",h),b=c(\"meanline.width\",d);l(\"meanline.visible\",Boolean(x||b))||delete e.meanline}}},{\"../../components/color\":618,\"../../lib\":743,\"../box/defaults\":898,\"./attributes\":1155}],1158:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i<n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;\"h\"===e.orientation?(i=\"y\",a=\"x\"):(i=\"x\",a=\"y\");var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,\"both\"===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{\"../../lib\":743}],1159:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../box/hover\"),o=t(\"./helpers\");e.exports=function(t,e,r,s,l){var c,u,f=t.cd,h=f[0].trace,d=h.hoveron,p=-1!==d.indexOf(\"violins\"),m=-1!==d.indexOf(\"kde\"),g=[];if(p||m){var v=a.hoverOnBoxes(t,e,r,s);if(p&&(g=g.concat(v)),m&&v.length>0){var y,x,b,_,w,M=t.xa,k=t.ya;\"h\"===h.orientation?(w=e,y=\"y\",b=k,x=\"x\",_=M):(w=r,y=\"x\",b=M,x=\"y\",_=k);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,h,w),L=o.getPositionOnKdePath(A,h,S),C=b._offset,z=b._length;T[y+\"0\"]=L[0],T[y+\"1\"]=L[1],T[x+\"0\"]=T[x+\"1\"]=S,T[x+\"Label\"]=x+\": \"+i.hoverLabelText(_,w)+\", \"+f[0].t.labels.kde+\" \"+E.toFixed(3),g.push(T),(u={stroke:t.color})[y+\"1\"]=n.constrain(C+L[0],C,C+z),u[y+\"2\"]=n.constrain(C+L[1],C,C+z),u[x+\"1\"]=u[x+\"2\"]=_._offset+S}}}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var D=l.selectAll(\".violinline-\"+h.uid).data(u?[0]:[]);return D.enter().append(\"line\").classed(\"violinline-\"+h.uid,!0).attr(\"stroke-width\",1.5),D.exit().remove(),D.attr(u),\"closest\"===s?c?[c]:g:c?(g.push(c),g):g}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../box/hover\":899,\"./helpers\":1158}],1160:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),setPositions:t(\"./set_positions\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),selectPoints:t(\"../box/select\"),moduleType:\"trace\",name:\"violin\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":800,\"../box/select\":904,\"./attributes\":1155,\"./calc\":1156,\"./defaults\":1157,\"./hover\":1159,\"./layout_attributes\":1161,\"./layout_defaults\":1162,\"./plot\":1163,\"./set_positions\":1164,\"./style\":1165}],1161:[function(t,e,r){\"use strict\";var n=t(\"../box/layout_attributes\"),i=t(\"../../lib\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\"../../lib\":743,\"../box/layout_attributes\":901}],1162:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"../box/layout_defaults\");e.exports=function(t,e,r){a._supply(t,e,r,function(r,a){return n.coerce(t,e,i,r,a)},\"violin\")}},{\"../../lib\":743,\"../box/layout_defaults\":902,\"./layout_attributes\":1161}],1163:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../box/plot\"),s=t(\"../scatter/line_points\"),l=t(\"./helpers\");e.exports=function(t,e,r){function c(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0});return a.smoothopen(e[0],1)}var u=t._fullLayout,f=e.xaxis,h=e.yaxis;e.plot.select(\".violinlayer\").selectAll(\"g.trace.violins\").data(r).enter().append(\"g\").attr(\"class\",\"trace violins\").each(function(t){var r=t[0],a=r.t,s=r.trace,d=r.node3=n.select(this),p=u._numViolins,m=\"group\"===u.violinmode&&p>1,g=a.bdPos=a.dPos*(1-u.violingap)*(1-u.violingroupgap)/(m?p:1),v=a.bPos=m?2*a.dPos*((a.num+.5)/p-.5)*(1-u.violingap):0;if(!0!==s.visible||a.empty)n.select(this).remove();else{var y=e[a.valLetter+\"axis\"],x=e[a.posLetter+\"axis\"],b=\"both\"===s.side,_=b||\"positive\"===s.side,w=b||\"negative\"===s.side,M=s.box&&s.box.visible,k=s.meanline&&s.meanline.visible,A=u._violinScaleGroupStats[s.scalegroup];if(d.selectAll(\"path.violin\").data(i.identity).enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\").each(function(t){var e,r=n.select(this),i=t.density,o=i.length,l=t.pos+v,u=x.c2p(l);switch(s.scalemode){case\"width\":e=A.maxWidth/g;break;case\"count\":e=A.maxWidth/g*(A.maxCount/t.pts.length)}var f,h,d,p,m,M,k;if(_){for(M=new Array(o),p=0;p<o;p++)(k=M[p]={})[a.posLetter]=l+i[p].v/e,k[a.valLetter]=i[p].t;f=c(M)}if(w){for(M=new Array(o),m=0,p=o-1;m<o;m++,p--)(k=M[m]={})[a.posLetter]=l-i[p].v/e,k[a.valLetter]=i[p].t;h=c(M)}if(b)d=f+\"L\"+h.substr(1)+\"Z\";else{var T=[u,y.c2p(i[0].t)],S=[u,y.c2p(i[o-1].t)];\"h\"===s.orientation&&(T.reverse(),S.reverse()),d=_?\"M\"+T+\"L\"+f.substr(1)+\"L\"+S:\"M\"+S+\"L\"+h.substr(1)+\"L\"+T}r.attr(\"d\",d),t.posCenterPx=u,t.posDensityScale=e*g,t.path=r.node(),t.pathLength=t.path.getTotalLength()/(b?2:1)}),M){var T,S,E=s.box.width,L=s.box.line.width;b?(T=g*E,S=0):_?(T=[0,g*E/2],S=-L):(T=[g*E/2,0],S=L),s.whiskerwidth=0,o.plotBoxAndWhiskers(d,{pos:x,val:y},s,{bPos:v,bdPos:T,bPosPxOffset:S}),k&&o.plotBoxMean(d,{pos:x,val:y},s,{bPos:v,bdPos:T,bPosPxOffset:S})}else k&&d.selectAll(\"path.mean\").data(i.identity).enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}).each(function(t){var e=y.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,s,e);n.select(this).attr(\"d\",\"h\"===s.orientation?\"M\"+e+\",\"+r[0]+\"V\"+r[1]:\"M\"+r[0]+\",\"+e+\"H\"+r[1])});s.points&&o.plotPoints(d,{x:f,y:h},s,a)}})}},{\"../../components/drawing\":643,\"../../lib\":743,\"../box/plot\":903,\"../scatter/line_points\":1080,\"./helpers\":1158,d3:128}],1164:[function(t,e,r){\"use strict\";var n=t(\"../box/set_positions\").setPositionOffset,i=[\"v\",\"h\"];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s<i.length;s++){for(var l=i[s],c=\"h\"===l?o:a,u=[],f=0,h=0,d=0;d<r.length;d++){var p=r[d],m=p[0].t,g=p[0].trace;!0!==g.visible||\"violin\"!==g.type||m.empty||g.orientation!==l||g.xaxis!==a._id||g.yaxis!==o._id||(u.push(d),!1!==g.points&&(f=Math.max(f,g.jitter-g.pointpos-1),h=Math.max(h,g.jitter+g.pointpos-1)))}n(\"violin\",t,u,c,[f,h])}}},{\"../box/set_positions\":905}],1165:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../scatter/style\").stylePoints;e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.violins\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll(\"path.violin\").style(\"stroke-width\",r.line.width+\"px\").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(\"path.box\").style(\"stroke-width\",l.width+\"px\").call(i.stroke,l.color).call(i.fill,s.fillcolor),o.selectAll(\"path.mean\").style({\"stroke-width\":u+\"px\",\"stroke-dasharray\":2*u+\"px,\"+u+\"px\"}).call(i.stroke,c.color),a(o,r,t)})}},{\"../../components/color\":618,\"../scatter/style\":1087,d3:128}],1166:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(n.enabled){for(var c=n.target,u=l.nestedProperty(e,c),h=u.get(),d=function(t,e){var r=t.func,n=e.d2c,s=e.c2d;switch(r){case\"count\":return i;case\"first\":return a;case\"last\":return o;case\"sum\":return function(t,e){for(var r=0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r+=a)}return s(r)};case\"avg\":return function(t,e){for(var r=0,i=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==f&&(r+=o,i++)}return i?s(r/i):f};case\"min\":return function(t,e){for(var r=1/0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r=Math.min(r,a))}return r===1/0?f:s(r)};case\"max\":return function(t,e){for(var r=-1/0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r=Math.max(r,a))}return r===-1/0?f:s(r)};case\"median\":return function(t,e){for(var r=[],i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&r.push(a)}if(!r.length)return f;r.sort();var o=(r.length-1)/2;return s((r[Math.floor(o)]+r[Math.ceil(o)])/2)};case\"mode\":return function(t,e){for(var r={},i=0,a=f,o=0;o<e.length;o++){var l=n(t[e[o]]);if(l!==f){var c=r[l]=(r[l]||0)+1;c>i&&(i=c,a=l)}}return i?s(a):f};case\"rms\":return function(t,e){for(var r=0,i=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==f&&(r+=o*o,i++)}return i?s(Math.sqrt(r/i)):f};case\"stddev\":return function(e,r){var i,a=0,o=0,s=1,l=f;for(i=0;i<r.length&&l===f;i++)l=n(e[r[i]]);if(l===f)return f;for(;i<r.length;i++){var c=n(e[r[i]]);if(c!==f){var u=c-l;a+=u,o+=u*u,s++}}var h=\"sample\"===t.funcmode?s-1:s;return h?Math.sqrt((o-a*a/s)/h):0}}}(n,s.getDataConversions(t,e,c,h)),p=new Array(r.length),m=0;m<r.length;m++)p[m]=d(h,r[m]);u.set(p)}}function i(t,e){return e.length}function a(t,e){return t[e[0]]}function o(t,e){return t[e[e.length-1]]}var s=t(\"../plots/cartesian/axes\"),l=t(\"../lib\"),c=t(\"../plot_api/plot_schema\"),u=t(\"./helpers\").pointsAccessorFunction,f=t(\"../constants/numerical\").BADNUM;r.moduleType=\"transform\",r.name=\"aggregate\";var h=r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},aggregations:{_isLinkedToArray:\"aggregation\",target:{valType:\"string\",editType:\"calc\"},func:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"median\",\"mode\",\"rms\",\"stddev\",\"min\",\"max\",\"first\",\"last\"],dflt:\"first\",editType:\"calc\"},funcmode:{valType:\"enumerated\",values:[\"sample\",\"population\"],dflt:\"sample\",editType:\"calc\"},enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},d=h.aggregations;r.supplyDefaults=function(t,e){function r(e,r){return l.coerce(t,a,h,e,r)}function n(t,e){return l.coerce(p[i],f,d,t,e)}var i,a={};if(!r(\"enabled\"))return a;var o=c.findArrayAttributes(e),s={};for(i=0;i<o.length;i++)s[o[i]]=1;var u=r(\"groups\");if(!Array.isArray(u)){if(!s[u])return void(a.enabled=!1);s[u]=0}var f,p=t.aggregations||[],m=a.aggregations=new Array(p.length);for(i=0;i<p.length;i++){f={_index:i};var g=n(\"target\"),v=n(\"func\");n(\"enabled\")&&g&&(s[g]||\"count\"===v&&void 0===s[g])?(\"stddev\"===v&&n(\"funcmode\"),s[g]=0,m[i]=f):m[i]={enabled:!1,_index:i}}for(i=0;i<o.length;i++)s[o[i]]&&m.push({target:o[i],func:d.func.dflt,enabled:!0,_index:-1});return a},r.calcTransform=function(t,e,r){if(r.enabled){var i=r.groups,a=l.getTargetArray(e,{target:i});if(a){var o,s,c,f,h={},d={},p=[],m=u(e.transforms,r);for(o=0;o<a.length;o++)void 0===(c=h[s=a[o]])?(h[s]=p.length,f=[o],p.push(f),d[h[s]]=m(o)):(p[c].push(o),d[h[s]]=(d[h[s]]||[]).concat(m(o)));r._indexToPoints=d;var g=r.aggregations;for(o=0;o<g.length;o++)n(t,e,p,g[o]);\"string\"==typeof i&&n(t,e,p,{target:i,func:\"first\",enabled:!0})}}}},{\"../constants/numerical\":721,\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plots/cartesian/axes\":789,\"./helpers\":1169}],1167:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../registry\"),a=t(\"../plots/cartesian/axes\"),o=t(\"./helpers\").pointsAccessorFunction,s=[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],l=[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],c=[\"{}\",\"}{\"];r.moduleType=\"transform\",r.name=\"filter\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},operation:{valType:\"enumerated\",values:[].concat(s).concat(l).concat(c),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},preservegaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){function e(e,i){return n.coerce(t,a,r.attributes,e,i)}var a={};if(e(\"enabled\")){e(\"preservegaps\"),e(\"operation\"),e(\"value\"),e(\"target\");var o=i.getComponentMethod(\"calendars\",\"handleDefaults\");o(t,a,\"valuecalendar\",null),o(t,a,\"targetcalendar\",null)}return a},r.calcTransform=function(t,e,r){function i(t,r){for(var i=0;i<p.length;i++){t(n.nestedProperty(e,p[i]),r)}}if(r.enabled){var u=n.getTargetArray(e,r);if(u){var f=r.target,h=u.length,d=r.targetcalendar,p=e._arrayAttrs;if(\"string\"==typeof f){var m=n.nestedProperty(e,f+\"calendar\").get();m&&(d=m)}var g,v,y=function(t,e,r){function n(t){return-1!==t.indexOf(a)}var i,a=t.operation,o=t.value,u=Array.isArray(o),f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};switch(n(s)?i=f(u?o[0]:o):n(l)?i=u?[f(o[0]),f(o[1])]:[f(o),f(o)]:n(c)&&(i=u?o.map(f):[f(o)]),a){case\"=\":return function(t){return h(t)===i};case\"!=\":return function(t){return h(t)!==i};case\"<\":return function(t){return h(t)<i};case\"<=\":return function(t){return h(t)<=i};case\">\":return function(t){return h(t)>i};case\">=\":return function(t){return h(t)>=i};case\"[]\":return function(t){var e=h(t);return e>=i[0]&&e<=i[1]};case\"()\":return function(t){var e=h(t);return e>i[0]&&e<i[1]};case\"[)\":return function(t){var e=h(t);return e>=i[0]&&e<i[1]};case\"(]\":return function(t){var e=h(t);return e>i[0]&&e<=i[1]};case\"][\":return function(t){var e=h(t);return e<=i[0]||e>=i[1]};case\")(\":return function(t){var e=h(t);return e<i[0]||e>i[1]};case\"](\":return function(t){var e=h(t);return e<=i[0]||e>i[1]};case\")[\":return function(t){var e=h(t);return e<i[0]||e>=i[1]};case\"{}\":return function(t){return-1!==i.indexOf(h(t))};case\"}{\":return function(t){return-1===i.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,f,u),d),x={},b={},_=0;r.preservegaps?(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),i(g);for(var w=o(e.transforms,r),M=0;M<h;M++){y(u[M])&&(i(v,M),b[_++]=w(M))}r._indexToPoints=b}}}},{\"../lib\":743,\"../plots/cartesian/axes\":789,\"../registry\":873,\"./helpers\":1169}],1168:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_schema\"),a=t(\"../plots/plots\"),o=t(\"./helpers\").pointsAccessorFunction;r.moduleType=\"transform\",r.name=\"groupby\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"data_array\",dflt:[],editType:\"calc\"},nameformat:{valType:\"string\",editType:\"calc\"},styles:{_isLinkedToArray:\"style\",target:{valType:\"string\",editType:\"calc\"},value:{valType:\"any\",dflt:{},editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t,e,i){function a(e,i){return n.coerce(t,s,r.attributes,e,i)}var o,s={};if(!a(\"enabled\"))return s;a(\"groups\"),a(\"nameformat\",i._dataLength>1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=s.styles=[];if(l)for(o=0;o<l.length;o++)c[o]={},n.coerce(l[o],c[o],r.attributes.styles,\"target\"),n.coerce(l[o],c[o],r.attributes.styles,\"value\");return s},r.transform=function(t,e){var r,s,l,c=[];for(s=0;s<t.length;s++)for(r=function(t,e){var r,s,l,c,u,f,h,d,p,m,g=e.transform,v=t.transforms[e.transformIndex].groups,y=o(t.transforms,g);if(!Array.isArray(v)||0===v.length)return[t];var x=n.filterUnique(v),b=new Array(x.length),_=v.length,w=i.findArrayAttributes(t),M=g.styles||[],k={};for(r=0;r<M.length;r++)k[M[r].target]=M[r].value;g.styles&&(m=n.keyedContainer(g,\"styles\",\"target\",\"value.name\"));var A={},T={};for(r=0;r<x.length;r++){A[f=x[r]]=r,T[f]=0,(h=b[r]=n.extendDeepNoArrays({},t))._group=f,h.transforms[e.transformIndex]._indexToPoints={};var S=null;for(m&&(S=m.get(f)),h.name=S||n.templateString(g.nameformat,{trace:t.name,group:f}),d=h.transforms,h.transforms=[],s=0;s<d.length;s++)h.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s<w.length;s++)n.nestedProperty(h,w[s]).set([])}for(l=0;l<w.length;l++){for(c=w[l],s=0,p=[];s<x.length;s++)p[s]=n.nestedProperty(b[s],c).get();for(u=n.nestedProperty(t,c).get(),s=0;s<_;s++)p[A[v[s]]].push(u[s])}for(s=0;s<_;s++)(h=b[A[v[s]]]).transforms[e.transformIndex]._indexToPoints[T[v[s]]]=y(s),T[v[s]]++;for(r=0;r<x.length;r++)f=x[r],h=b[r],a.clearExpandedTraceDefaultColors(h),h=n.extendDeepNoArrays(h,k[f]||{});return b}(t[s],e),l=0;l<r.length;l++)c.push(r[l]);return c}},{\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plots/plots\":852,\"./helpers\":1169}],1169:[function(t,e,r){\"use strict\";r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(t){return n[t]}:function(t){return[t]}}},{}],1170:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/cartesian/axes\"),a=t(\"./helpers\").pointsAccessorFunction;r.moduleType=\"transform\",r.name=\"sort\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},order:{valType:\"enumerated\",values:[\"ascending\",\"descending\"],dflt:\"ascending\",editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){function e(e,a){return n.coerce(t,i,r.attributes,e,a)}var i={};return e(\"enabled\")&&(e(\"target\"),e(\"order\")),i},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var s,l,c=r.target,u=o.length,f=e._arrayAttrs,h=function(t,e,r){for(var n=e.length,i=new Array(n),a=e.slice().sort(function(t,e){switch(t.order){case\"ascending\":return function(t,r){return e(t)-e(r)};case\"descending\":return function(t,r){return e(r)-e(t)}}}(t,r)),o=0;o<n;o++)for(var s=e[o],l=0;l<n;l++)if(s===a[l]){i[l]=o,a[l]=null;break}return i}(r,o,i.getDataToCoordFunc(t,e,c,o)),d=a(e.transforms,r),p={};for(s=0;s<f.length;s++){var m=n.nestedProperty(e,f[s]),g=m.get(),v=new Array(u);for(l=0;l<u;l++)v[l]=g[h[l]];m.set(v)}for(l=0;l<u;l++)p[l]=d(h[l]);r._indexToPoints=p}}}},{\"../lib\":743,\"../plots/cartesian/axes\":789,\"./helpers\":1169}]},{},[20])(20)});\n", "});require(['plotly'], function(Plotly) {window.Plotly = Plotly;});}</script>" ], "text/vnd.plotly.v1+html": [ "<script type='text/javascript'>if(!window.Plotly){define('plotly', function(require, exports, module) {/**\n", "* plotly.js v1.33.1\n", "* Copyright 2012-2018, Plotly, Inc.\n", "* All rights reserved.\n", "* Licensed under the MIT license\n", "*/\n", "!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).Plotly=t()}}(function(){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 c=new Error(\"Cannot find module '\"+o+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){var r=e[o][1][t];return i(r||t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var a=\"function\"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){\"use strict\";var n=t(\"../src/lib\"),i={\"X,X div\":\"font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\",\"X input,X button\":\"font-family:'Open Sans', verdana, arial, sans-serif;\",\"X input:focus,X button:focus\":\"outline:none;\",\"X a\":\"text-decoration:none;\",\"X a:hover\":\"text-decoration:none;\",\"X .crisp\":\"shape-rendering:crispEdges;\",\"X .user-select-none\":\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\",\"X svg\":\"overflow:hidden;\",\"X svg a\":\"fill:#447adb;\",\"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;\",\"X .cursor-col-resize\":\"cursor:col-resize;\",\"X .cursor-row-resize\":\"cursor:row-resize;\",\"X .cursor-ns-resize\":\"cursor:ns-resize;\",\"X .cursor-ew-resize\":\"cursor:ew-resize;\",\"X .cursor-sw-resize\":\"cursor:sw-resize;\",\"X .cursor-s-resize\":\"cursor:s-resize;\",\"X .cursor-se-resize\":\"cursor:se-resize;\",\"X .cursor-w-resize\":\"cursor:w-resize;\",\"X .cursor-e-resize\":\"cursor:e-resize;\",\"X .cursor-nw-resize\":\"cursor:nw-resize;\",\"X .cursor-n-resize\":\"cursor:n-resize;\",\"X .cursor-ne-resize\":\"cursor:ne-resize;\",\"X .modebar\":\"position:absolute;top:2px;right:2px;z-index:1001;background:rgba(255,255,255,0.7);\",\"X .modebar--hover\":\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\",\"X:hover .modebar--hover\":\"opacity:1;\",\"X .modebar-group\":\"float:left;display:inline-block;box-sizing:border-box;margin-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\",\"X .modebar-group:first-child\":\"margin-left:0px;\",\"X .modebar-btn\":\"position:relative;font-size:16px;padding:3px 4px;cursor:pointer;line-height:normal;box-sizing:border-box;\",\"X .modebar-btn svg\":\"position:relative;top:2px;\",\"X .modebar-btn path\":\"fill:rgba(0,31,95,0.3);\",\"X .modebar-btn.active path,X .modebar-btn:hover path\":\"fill:rgba(0,22,72,0.5);\",\"X .modebar-btn.modebar-btn--logo\":\"padding:3px 1px;\",\"X .modebar-btn.modebar-btn--logo path\":\"fill:#447adb !important;\",\"X [data-title]:before,X [data-title]:after\":\"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;\",\"X [data-title]:hover:before,X [data-title]:hover:after\":\"display:block;opacity:1;\",\"X [data-title]:before\":\"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;\",\"X [data-title]:after\":\"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;\",\"X .select-outline\":\"fill:none;stroke-width:1;shape-rendering:crispEdges;\",\"X .select-outline-1\":\"stroke:white;\",\"X .select-outline-2\":\"stroke:black;stroke-dasharray:2px 2px;\",Y:\"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;\",\"Y p\":\"margin:0;\",\"Y .notifier-note\":\"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;\",\"Y .notifier-close\":\"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;\",\"Y .notifier-close:hover\":\"color:#444;text-decoration:none;cursor:pointer;\"};for(var a in i){var o=a.replace(/^,/,\" ,\").replace(/X/g,\".js-plotly-plot .plotly\").replace(/Y/g,\".plotly-notifier\");n.addStyleRule(o,i[a])}},{\"../src/lib\":743}],2:[function(t,e,r){\"use strict\";e.exports={undo:{width:857.1,path:\"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z\",ascent:850,descent:-150},home:{width:928.6,path:\"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z\",ascent:850,descent:-150},\"camera-retro\":{width:1e3,path:\"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z\",ascent:850,descent:-150},zoombox:{width:1e3,path:\"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z\",ascent:850,descent:-150},pan:{width:1e3,path:\"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z\",ascent:850,descent:-150},zoom_plus:{width:1e3,path:\"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z\",ascent:850,descent:-150},zoom_minus:{width:1e3,path:\"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z\",ascent:850,descent:-150},autoscale:{width:1e3,path:\"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z\",ascent:850,descent:-150},tooltip_basic:{width:1500,path:\"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z\",ascent:850,descent:-150},tooltip_compare:{width:1125,path:\"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z\",ascent:850,descent:-150},plotlylogo:{width:1542,path:\"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z\",ascent:850,descent:-150},\"z-axis\":{width:1e3,path:\"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z\",ascent:850,descent:-150},\"3d_rotate\":{width:1e3,path:\"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z\",ascent:850,descent:-150},camera:{width:1e3,path:\"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z\",ascent:850,descent:-150},movie:{width:1e3,path:\"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z\",ascent:850,descent:-150},question:{width:857.1,path:\"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z\",ascent:850,descent:-150},disk:{width:857.1,path:\"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z\",ascent:850,descent:-150},lasso:{width:1031,path:\"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z\",ascent:850,descent:-150},selectbox:{width:1e3,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:1e3,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}}},{}],3:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/aggregate\")},{\"../src/transforms/aggregate\":1166}],4:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/bar\")},{\"../src/traces/bar\":887}],5:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/box\")},{\"../src/traces/box\":900}],6:[function(t,e,r){\"use strict\";e.exports=t(\"../src/components/calendars\")},{\"../src/components/calendars\":616}],7:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/candlestick\")},{\"../src/traces/candlestick\":909}],8:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/carpet\")},{\"../src/traces/carpet\":930}],9:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/choropleth\")},{\"../src/traces/choropleth\":945}],10:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contour\")},{\"../src/traces/contour\":958}],11:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/contourcarpet\")},{\"../src/traces/contourcarpet\":973}],12:[function(t,e,r){\"use strict\";e.exports=t(\"../src/core\")},{\"../src/core\":724}],13:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/filter\")},{\"../src/transforms/filter\":1167}],14:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/groupby\")},{\"../src/transforms/groupby\":1168}],15:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmap\")},{\"../src/traces/heatmap\":986}],16:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/heatmapgl\")},{\"../src/traces/heatmapgl\":996}],17:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram\")},{\"../src/traces/histogram\":1007}],18:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2d\")},{\"../src/traces/histogram2d\":1013}],19:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/histogram2dcontour\")},{\"../src/traces/histogram2dcontour\":1017}],20:[function(t,e,r){\"use strict\";var n=t(\"./core\");n.register([t(\"./bar\"),t(\"./box\"),t(\"./heatmap\"),t(\"./histogram\"),t(\"./histogram2d\"),t(\"./histogram2dcontour\"),t(\"./pie\"),t(\"./contour\"),t(\"./scatterternary\"),t(\"./violin\"),t(\"./scatter3d\"),t(\"./surface\"),t(\"./mesh3d\"),t(\"./scattergeo\"),t(\"./choropleth\"),t(\"./scattergl\"),t(\"./pointcloud\"),t(\"./heatmapgl\"),t(\"./parcoords\"),t(\"./scattermapbox\"),t(\"./sankey\"),t(\"./table\"),t(\"./carpet\"),t(\"./scattercarpet\"),t(\"./contourcarpet\"),t(\"./ohlc\"),t(\"./candlestick\"),t(\"./scatterpolar\"),t(\"./scatterpolargl\")]),n.register([t(\"./aggregate\"),t(\"./filter\"),t(\"./groupby\"),t(\"./sort\")]),n.register([t(\"./calendars\")]),e.exports=n},{\"./aggregate\":3,\"./bar\":4,\"./box\":5,\"./calendars\":6,\"./candlestick\":7,\"./carpet\":8,\"./choropleth\":9,\"./contour\":10,\"./contourcarpet\":11,\"./core\":12,\"./filter\":13,\"./groupby\":14,\"./heatmap\":15,\"./heatmapgl\":16,\"./histogram\":17,\"./histogram2d\":18,\"./histogram2dcontour\":19,\"./mesh3d\":21,\"./ohlc\":22,\"./parcoords\":23,\"./pie\":24,\"./pointcloud\":25,\"./sankey\":26,\"./scatter3d\":27,\"./scattercarpet\":28,\"./scattergeo\":29,\"./scattergl\":30,\"./scattermapbox\":31,\"./scatterpolar\":32,\"./scatterpolargl\":33,\"./scatterternary\":34,\"./sort\":35,\"./surface\":36,\"./table\":37,\"./violin\":38}],21:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/mesh3d\")},{\"../src/traces/mesh3d\":1023}],22:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/ohlc\")},{\"../src/traces/ohlc\":1028}],23:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/parcoords\")},{\"../src/traces/parcoords\":1037}],24:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pie\")},{\"../src/traces/pie\":1047}],25:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/pointcloud\")},{\"../src/traces/pointcloud\":1056}],26:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/sankey\")},{\"../src/traces/sankey\":1062}],27:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatter3d\")},{\"../src/traces/scatter3d\":1096}],28:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattercarpet\")},{\"../src/traces/scattercarpet\":1102}],29:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergeo\")},{\"../src/traces/scattergeo\":1109}],30:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattergl\")},{\"../src/traces/scattergl\":1115}],31:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scattermapbox\")},{\"../src/traces/scattermapbox\":1121}],32:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolar\")},{\"../src/traces/scatterpolar\":1128}],33:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterpolargl\")},{\"../src/traces/scatterpolargl\":1132}],34:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/scatterternary\")},{\"../src/traces/scatterternary\":1138}],35:[function(t,e,r){\"use strict\";e.exports=t(\"../src/transforms/sort\")},{\"../src/transforms/sort\":1170}],36:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/surface\")},{\"../src/traces/surface\":1145}],37:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/table\")},{\"../src/traces/table\":1153}],38:[function(t,e,r){\"use strict\";e.exports=t(\"../src/traces/violin\")},{\"../src/traces/violin\":1160}],39:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(e,r,i,a){var o=1/t.clientHeight,s=o*(r-m),l=o*(i-g),u=p.flipX?1:-1,h=p.flipY?1:-1,d=Math.PI*p.rotateSpeed,y=n();if(1&e)a.shift?c.rotate(y,0,0,-s*d):c.rotate(y,u*d*s,-h*d*l,0);else if(2&e)c.pan(y,-p.translateSpeed*s*f,p.translateSpeed*l*f,0);else if(4&e){var x=p.zoomSpeed*l/window.innerHeight*(y-c.lastT())*50;c.pan(y,0,0,f*(Math.exp(x)-1))}m=r,g=i,v=a}t=t||document.body;var l=[.01,1/0];\"distanceLimits\"in(e=e||{})&&(l[0]=e.distanceLimits[0],l[1]=e.distanceLimits[1]),\"zoomMin\"in e&&(l[0]=e.zoomMin),\"zoomMax\"in e&&(l[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\"orbit\",distanceLimits:l}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,d=t.clientHeight,p={view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay;c.idle(e-r),c.flush(e-(100+2*r));var i=e-2*r;c.recalcMatrix(i);for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===d;return h=t.clientWidth,d=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(p,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){return c.setMode(t),c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(l)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\"contextmenu\",function(t){return t.preventDefault(),!1});var m=0,g=0,v={shift:!1,control:!1,alt:!1,meta:!1};return a(t,r),t.addEventListener(\"touchstart\",function(e){var n=s(e.changedTouches[0],t);r(0,n[0],n[1],v),r(1,n[0],n[1],v)}),t.addEventListener(\"touchmove\",function(e){var n=s(e.changedTouches[0],t);r(1,n[0],n[1],v)}),t.addEventListener(\"touchend\",function(e){s(e.changedTouches[0],t),r(0,m,g,v)}),o(t,function(t,e,r){var i=p.flipX?1:-1,a=p.flipY?1:-1,o=n();if(Math.abs(t)>Math.abs(e))c.rotate(o,0,0,-t*i*Math.PI*p.rotateSpeed/window.innerWidth);else{var s=p.zoomSpeed*a*e/window.innerHeight*(o-c.lastT())/100;c.pan(o,0,0,f*(Math.exp(s)-1))}},!0),p};var n=t(\"right-now\"),i=t(\"3d-view\"),a=t(\"mouse-change\"),o=t(\"mouse-wheel\"),s=t(\"mouse-event-offset\")},{\"3d-view\":40,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446,\"right-now\":509}],40:[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}e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||\"turntable\",u=i(),f=a(),h=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new n({turntable:u,orbit:f,matrix:h},c)};var i=t(\"turntable-camera-controller\"),a=t(\"orbit-camera-controller\"),o=t(\"matrix-camera-controller\"),s=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<t[1];++n)r.push(\"a\"+n);var i=\"var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i].\"+t[0]+\"(\"+r.join()+\")}\";s[e]=Function.apply(null,r.concat(i))}),s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,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}}},s.getMode=function(){return this._mode}},{\"matrix-camera-controller\":441,\"orbit-camera-controller\":464,\"turntable-camera-controller\":551}],41:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-array\"),t(\"d3-collection\"),t(\"d3-interpolate\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3)}(this,function(t,e,r,n){\"use strict\";t.sankey=function(){function t(){for(var t,e=h,r=0;e.length;)t=[],e.forEach(function(e){e.x=r,e.dx=c,e.sourceLinks.forEach(function(e){t.indexOf(e.target)<0&&t.push(e.target)})}),e=t,++r;!function(t){h.forEach(function(e){e.sourceLinks.length||(e.x=t-1)})}(r),function(t){h.forEach(function(e){e.x*=t})}((f[0]-c)/(r-1))}function i(t){function n(){a.forEach(function(t){var e,r,n,a=0,o=t.length;for(t.sort(i),n=0;n<o;++n)(r=a-(e=t[n]).y)>0&&(e.y+=r),a=e.y+e.dy+u;if((r=a-u-f[1])>0)for(a=e.y-=r,n=o-2;n>=0;--n)(r=(e=t[n]).y+e.dy+u-a)>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(h).map(function(t){return t.values});!function(){var t=e.min(a,function(t){return(f[1]-(t.length-1)*u)/e.sum(t,s)});a.forEach(function(e){e.forEach(function(e,r){e.y=r,e.dy=e.value*t})}),d.forEach(function(e){e.dy=e.value*t})}(),n();for(var l=1;t>0;--t)!function(t){function r(t){return o(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,s);n.y+=(i-o(n))*t}})})}(l*=.99),n(),function(t){function r(t){return o(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,s);n.y+=(i-o(n))*t}})})}(l),n()}function a(){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}h.forEach(function(r){r.sourceLinks.sort(e),r.targetLinks.sort(t)}),h.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 o(t){return t.y+t.dy/2}function s(t){return t.value}var l={},c=24,u=8,f=[1,1],h=[],d=[];return l.nodeWidth=function(t){return arguments.length?(c=+t,l):c},l.nodePadding=function(t){return arguments.length?(u=+t,l):u},l.nodes=function(t){return arguments.length?(h=t,l):h},l.links=function(t){return arguments.length?(d=t,l):d},l.size=function(t){return arguments.length?(f=t,l):f},l.layout=function(r){return h.forEach(function(t){t.sourceLinks=[],t.targetLinks=[]}),d.forEach(function(t,e){var r=t.source,n=t.target;\"number\"==typeof r&&(r=t.source=h[t.source]),\"number\"==typeof n&&(n=t.target=h[t.target]),t.originalIndex=e,r.sourceLinks.push(t),n.targetLinks.push(t)}),h.forEach(function(t){t.value=Math.max(e.sum(t.sourceLinks,s),e.sum(t.targetLinks,s))}),t(),i(r),a(),l},l.relayout=function(){return a(),l},l.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,c=l+t.dy,u=t.target.y+t.ty,f=u+t.dy;return\"M\"+r+\",\"+l+\"C\"+o+\",\"+l+\" \"+s+\",\"+u+\" \"+i+\",\"+u+\"L\"+i+\",\"+f+\"C\"+s+\",\"+f+\" \"+o+\",\"+c+\" \"+r+\",\"+c+\"Z\"}var e=.5;return t.curvature=function(r){return arguments.length?(e=+r,t):e},t},l},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-array\":120,\"d3-collection\":121,\"d3-interpolate\":125}],42:[function(t,e,r){\"use strict\";var n=\"undefined\"==typeof WeakMap?t(\"weak-map\"):WeakMap,i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=new n;e.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},{\"gl-buffer\":165,\"gl-vao\":259,\"weak-map\":573}],43:[function(t,e,r){e.exports=function(t){var e=0,r=0,n=0,i=0;return t.map(function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case\"a\":t[6]+=n,t[7]+=i;break;case\"v\":t[1]+=i;break;case\"h\":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case\"Z\":n=e,i=r;break;case\"H\":n=t[1];break;case\"V\":i=t[1];break;case\"M\":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t})}},{}],44:[function(t,e,r){var n=t(\"pad-left\");e.exports=function(t,e,r){e=\"number\"==typeof e?e:1,r=r||\": \";var i=t.split(/\\r?\\n/),a=String(i.length+e-1).length;return i.map(function(t,i){var o=i+e,s=String(o).length;return n(o,a-s)+r+t}).join(\"\\n\")}},{\"pad-left\":465}],45:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(e+1),n=0;n<t.length;++n)r[n]=t[n];for(n=0;n<=t.length;++n){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-n,s);r[a]=o}if(i.apply(void 0,r))return!0}return!1}e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,i=[t[0]],a=[0],o=1;o<e;++o)if(i.push(t[o]),n(i,r)){if(a.push(o),a.length===r+1)return a}else i.pop();return a};var i=t(\"robust-orientation\")},{\"robust-orientation\":515}],46:[function(t,e,r){\"use strict\";e.exports=function(t,e){return n(e).filter(function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1})};var n=t(\"delaunay-triangulate\"),i=t(\"circumradius\")},{circumradius:92,\"delaunay-triangulate\":130}],47:[function(t,e,r){e.exports=function(t,e){return i(n(t,e))};var n=t(\"alpha-complex\"),i=t(\"simplicial-complex-boundary\")},{\"alpha-complex\":46,\"simplicial-complex-boundary\":523}],48:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(!t||null==t.length)throw Error(\"Argument should be an array\");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},{}],49:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\");e.exports=function(t,e,r){if(!t||null==t.length)throw Error(\"Argument should be an array\");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var c=a-o;for(s=i;s<l;s+=e)t[s]=0===c?.5:(t[s]-o)/c}}return t}},{\"array-bounds\":48}],50:[function(t,e,r){\"use strict\";e.exports=function(){var t={},e=/^rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,.*)?\\)$/,r=/^rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,?\\s*(.*)?\\)$/;return t.isPlainObject=function(t){return!Array.isArray(t)&&null!==t&&\"object\"==typeof t},t.linspace=function(t,e,r){for(var n=(e-t)/Math.max(r-1,1),i=[],a=0;a<r;a++)i.push(t+a*n);return i},t.zip3=function(t,e,r){for(var n=Math.min.apply(null,[t.length,e.length,r.length]),i=[],a=0;a<n;a++)i.push([t[a],e[a],r[a]]);return i},t.sum=function(t){function e(t){for(var n=0;n<t.length;n++)Array.isArray(t[n])?e(t[n]):r+=t[n]}var r=0;return e(t),r},t.zip=function(){for(var t=[].slice.call(arguments),e=t.map(function(t){return t.length}),r=Math.min.apply(null,e),n=[],i=0;i<r;i++){n[i]=[];for(var a=0;a<t.length;++a)n[i][a]=t[a][i]}return n},t.isEqual=function(t,e){if(t.length!==e.length)return!1;for(var r=t.length;r--;)if(t[r]!==e[r])return!1;return!0},t.copy2D=function(t){for(var e=[],r=0;r<t.length;++r){e[r]=[];for(var n=0;n<t[r].length;++n)e[r][n]=t[r][n]}return e},t.copy1D=function(t){for(var e=[],r=0;r<t.length;++r)e[r]=t[r];return e},t.str2RgbArray=function(t,n){var i,a;if(\"string\"!=typeof t)return t;if(i=[],\"#\"===t[0]?(3===(t=t.substr(1)).length&&(t+=t),a=parseInt(t,16),i[0]=a>>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3])),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t.str2RgbaArray=function(t,n){var i,a;if(\"string\"!=typeof t)return t;if(i=[],\"#\"===t[0]?(3===(t=t.substr(1)).length&&(t+=t),a=parseInt(t,16),i[0]=a>>16&255,i[1]=a>>8&255,i[2]=255&a):e.test(t)&&(a=t.match(r),i[0]=parseInt(a[1]),i[1]=parseInt(a[2]),i[2]=parseInt(a[3]),a[4]?i[3]=parseFloat(a[4]):i[3]=1),!n)for(var o=0;o<3;++o)i[o]=i[o]/255;return i},t}()},{}],51:[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<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return r.Buffer&&\"function\"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function a(t){return Object.prototype.toString.call(t)}function o(t){return!i(t)&&(\"function\"==typeof r.ArrayBuffer&&(\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function s(t){if(v.isFunction(t)){if(b)return t.name;var e=t.toString().match(w);return e&&e[1]}}function l(t,e){return\"string\"==typeof t?t.length<e?t:t.slice(0,e):t}function c(t){if(b||!v.isFunction(t))return v.inspect(t);var e=s(t);return\"[Function\"+(e?\": \"+e:\"\")+\"]\"}function u(t,e,r,n,i){throw new _.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function f(t,e){t||u(t,!0,e,\"==\",_.ok)}function h(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(v.isDate(t)&&v.isDate(e))return t.getTime()===e.getTime();if(v.isRegExp(t)&&v.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&\"object\"==typeof t||null!==e&&\"object\"==typeof e){if(o(t)&&o(e)&&a(t)===a(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var l=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(v.isPrimitive(t)||v.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),a=d(e);if(i&&!a||!i&&a)return!1;if(i)return t=x.call(t),e=x.call(e),h(t,e,r);var o,s,l=M(t),c=M(e);if(l.length!==c.length)return!1;for(l.sort(),c.sort(),s=l.length-1;s>=0;s--)if(l[s]!==c[s])return!1;for(s=l.length-1;s>=0;s--)if(o=l[s],!h(t[o],e[o],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function d(t){return\"[object Arguments]\"==Object.prototype.toString.call(t)}function p(t,e,r){h(t,e,!0)&&u(t,e,r,\"notDeepStrictEqual\",p)}function m(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 g(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=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?\" (\"+r.name+\").\":\".\")+(n?\" \"+n:\".\"),t&&!i&&u(i,r,\"Missing expected exception\"+n);var a=\"string\"==typeof n,o=!t&&v.isError(i),s=!t&&i&&!r;if((o&&a&&m(i,r)||s)&&u(i,r,\"Got unwanted exception\"+n),t&&i&&r&&!m(i,r)||!t&&i)throw i}var v=t(\"util/\"),y=Object.prototype.hasOwnProperty,x=Array.prototype.slice,b=\"foo\"===function(){}.name,_=e.exports=f,w=/\\s*function\\s+([^\\(\\s]*)\\s*/;_.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=function(t){return l(c(t.actual),128)+\" \"+t.operator+\" \"+l(c(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||u;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}}},v.inherits(_.AssertionError,Error),_.fail=u,_.ok=f,_.equal=function(t,e,r){t!=e&&u(t,e,r,\"==\",_.equal)},_.notEqual=function(t,e,r){t==e&&u(t,e,r,\"!=\",_.notEqual)},_.deepEqual=function(t,e,r){h(t,e,!1)||u(t,e,r,\"deepEqual\",_.deepEqual)},_.deepStrictEqual=function(t,e,r){h(t,e,!0)||u(t,e,r,\"deepStrictEqual\",_.deepStrictEqual)},_.notDeepEqual=function(t,e,r){h(t,e,!1)&&u(t,e,r,\"notDeepEqual\",_.notDeepEqual)},_.notDeepStrictEqual=p,_.strictEqual=function(t,e,r){t!==e&&u(t,e,r,\"===\",_.strictEqual)},_.notStrictEqual=function(t,e,r){t===e&&u(t,e,r,\"!==\",_.notStrictEqual)},_.throws=function(t,e,r){g(!0,t,e,r)},_.doesNotThrow=function(t,e,r){g(!1,t,e,r)},_.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)y.call(t,r)&&e.push(r);return e}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"util/\":563}],52:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],53:[function(t,e,r){\"use strict\";function n(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}for(a[r]=new Array(r+1),o=0;o<=r;++o)a[r][o]=1;var c=new Array(r+1);for(o=0;o<r;++o)c[o]=e[o];c[r]=1;var u=i(a,c),f=n(u[r+1]);0===f&&(f=1);var h=new Array(r+1);for(o=0;o<=r;++o)h[o]=n(u[o])/f;return h};var i=t(\"robust-linear-solve\")},{\"robust-linear-solve\":514}],54:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],55:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],56:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{\"./lib/rationalize\":64}],57:[function(t,e,r){\"use strict\";function n(t,e){if(i(t))return e?c(t,n(e)):[t[0].clone(),t[1].clone()];var r,u,f=0;if(a(t))r=t.clone();else if(\"string\"==typeof t)r=s(t);else{if(0===t)return[o(0),o(1)];if(t===Math.floor(t))r=o(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),f-=256;r=o(t)}}if(i(e))r.mul(e[1]),u=e[0].clone();else if(a(e))u=e.clone();else if(\"string\"==typeof e)u=s(e);else if(e)if(e===Math.floor(e))u=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),f+=256;u=o(e)}else u=o(1);return f>0?r=r.ushln(f):f<0&&(u=u.ushln(-f)),l(r,u)}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\"),c=t(\"./div\");e.exports=n},{\"./div\":56,\"./is-rat\":58,\"./lib/is-bn\":62,\"./lib/num-to-bn\":63,\"./lib/rationalize\":64,\"./lib/str-to-bn\":65}],58:[function(t,e,r){\"use strict\";var n=t(\"./lib/is-bn\");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{\"./lib/is-bn\":62}],59:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return t.cmp(new n(0))}},{\"bn.js\":73}],60:[function(t,e,r){\"use strict\";var n=t(\"./bn-sign\");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++)i+=r[a]*Math.pow(67108864,a);return n(t)*i}},{\"./bn-sign\":59}],61:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=t(\"bit-twiddle\").countTrailingZeros;e.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));return r>20?52:r+32}},{\"bit-twiddle\":71,\"double-bits\":131}],62:[function(t,e,r){\"use strict\";t(\"bn.js\");e.exports=function(t){return t&&\"object\"==typeof t&&Boolean(t.words)}},{\"bn.js\":73}],63:[function(t,e,r){\"use strict\";var n=t(\"bn.js\"),i=t(\"double-bits\");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{\"bn.js\":73,\"double-bits\":131}],64:[function(t,e,r){\"use strict\";var n=t(\"./num-to-bn\"),i=t(\"./bn-sign\");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},{\"./bn-sign\":59,\"./num-to-bn\":63}],65:[function(t,e,r){\"use strict\";var n=t(\"bn.js\");e.exports=function(t){return new n(t)}},{\"bn.js\":73}],66:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],67:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-sign\");e.exports=function(t){return n(t[0])*n(t[1])}},{\"./lib/bn-sign\":59}],68:[function(t,e,r){\"use strict\";var n=t(\"./lib/rationalize\");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{\"./lib/rationalize\":64}],69:[function(t,e,r){\"use strict\";var n=t(\"./lib/bn-to-num\"),i=t(\"./lib/ctz\");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(h=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?c*h*Math.pow(2,-f):(h*=Math.pow(2,-1023),c*h*Math.pow(2,1023-f))}},{\"./lib/bn-to-num\":60,\"./lib/ctz\":61}],70:[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)}},{}],71:[function(t,e,r){\"use strict\";\"use restrict\";function n(t){var e=32;return(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)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<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<<i&255}}(i),r.reverse=function(t){return i[255&t]<<24|i[t>>>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}},{}],72:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o,s){for(var l=0;l<e;l++){for(var c=0;c<r;c++)n[c]=t[c*e+l];for(i(n,a,o,s,r),c=0;c<r;c++)t[c*e+l]=a[c]}for(c=0;c<r;c++){for(l=0;l<e;l++)n[l]=t[c*e+l];for(i(n,a,o,s,e),l=0;l<e;l++)t[c*e+l]=Math.sqrt(a[l])}}function i(t,e,r,n,i){r[0]=0,n[0]=-o,n[1]=+o;for(var a=1,s=0;a<i;a++){for(var l=(t[a]+a*a-(t[r[s]]+r[s]*r[s]))/(2*a-2*r[s]);l<=n[s];)s--,l=(t[a]+a*a-(t[r[s]]+r[s]*r[s]))/(2*a-2*r[s]);r[++s]=a,n[s]=l,n[s+1]=+o}for(a=0,s=0;a<i;a++){for(;n[s+1]<a;)s++;e[a]=(a-r[s])*(a-r[s])+t[r[s]]}}var a=t(\"clamp\");e.exports=function(t,e){e||(e={});var r,i,s,l,c,u,f,h,d,p,m,g=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error(\"For raw data width and height should be provided by options\");r=e.width,i=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/i)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext(\"2d\"),r=h.width,i=h.height,l=(d=f.getImageData(0,0,r,i)).data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t,r=(h=t.canvas).width,i=h.height,l=(d=f.getImageData(0,0,r,i)).data,u=4):window.ImageData&&t instanceof window.ImageData&&(d=t,r=t.width,i=t.height,l=d.data,u=4);if(s=Math.max(r,i),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*i),p=0,m=c.length;p<m;p++)l[p]=c[p*u+y]/255;else if(1!==u)throw Error(\"Raw data can have only 1 value per pixel\");var x=Array(r*i),b=Array(r*i),_=Array(s),w=Array(s),M=Array(s+1),k=Array(s);for(p=0,m=r*i;p<m;p++){var A=l[p];x[p]=1===A?0:0===A?o:Math.pow(Math.max(0,.5-A),2),b[p]=1===A?o:0===A?0:Math.pow(Math.max(0,A-.5),2)}n(x,r,i,_,w,k,M),n(b,r,i,_,w,k,M);var T=window.Float32Array?new Float32Array(r*i):new Array(r*i);for(p=0,m=r*i;p<m;p++)T[p]=a(1-((x[p]-b[p])/v+g),0,1);return T};var o=1e20},{clamp:93}],73:[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<i;a++){var o=t.charCodeAt(a)-48;n<<=4,n|=o>=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<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}function l(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 c=1;c<n;c++){for(var u=l>>>26,f=67108863&l,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[d])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}function c(t,e,r){return(new u).mulp(t,e,r)}function u(t,e){this.x=t,this.y=e}function f(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 h(){f.call(this,\"k256\",\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\")}function d(){f.call(this,\"p224\",\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\")}function p(){f.call(this,\"p192\",\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\")}function m(){f.call(this,\"25519\",\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\")}function g(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 v(t){g.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 y;try{y=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);var i=0;\"-\"===(t=t.toString().replace(/\\s+/g,\"\"))[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<this.length;i++)this.words[i]=0;var a,o,s=0;if(\"be\"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if(\"le\"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>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<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=t.length-6,n=0;r>=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=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,c=0,u=r;u<l;u+=n)c=s(t,u,u+n,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var f=1;for(c=s(t,u,t.length,e),u=0;u<o;u++)f*=e;this.imuln(f),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&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?\"<BN-R: \":\"<BN: \")+this.toString(16)+\">\"};var x=[\"\",\"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\"],b=[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],_=[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<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!==(a=s>>>24-i&16777215)||o!==this.length-1?x[6-l.length]+l+r:l+r,(i+=2)>=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 c=b[t],u=_[t];r=\"\";var f=this.clone();for(f.negative=0;!f.isZero();){var h=f.modn(u).toString(t);r=(f=f.idivn(u)).isZero()?h+r:x[c-h.length]+h+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!==y),this.toArrayLike(y,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,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();var r,n;this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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<i.length;o++)a=(e=(0|n.words[o])-(0|i.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<n.length;o++)a=(e=(0|n.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var w=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,c=0,u=0|o[0],f=8191&u,h=u>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>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,F=P>>>13,R=0|o[9],N=8191&R,j=R>>>13,B=0|s[0],U=8191&B,V=B>>>13,q=0|s[1],H=8191&q,G=q>>>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,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var yt=(c+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0;var xt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var Mt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(F,U)|0,a=Math.imul(F,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,V))+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(F,H)|0,a=a+Math.imul(F,G)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var At=(c+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((a=a+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,G))+Math.imul(j,H)|0,a=Math.imul(j,G),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,X)|0,n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Tt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,W),i=(i=Math.imul(N,X))+Math.imul(j,W)|0,a=Math.imul(j,X),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(F,J)|0,a=a+Math.imul(F,K)|0,n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((a=a+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,J),i=(i=Math.imul(N,K))+Math.imul(j,J)|0,a=Math.imul(j,K),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((a=a+Math.imul(_,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,tt))+Math.imul(j,$)|0,a=Math.imul(j,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(F,rt)|0,a=a+Math.imul(F,nt)|0,n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Lt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(j,rt)|0,a=Math.imul(j,nt),n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(F,at)|0,a=a+Math.imul(F,ot)|0,n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ct)|0,n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((a=a+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,at),i=(i=Math.imul(N,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(F,lt)|0,a=a+Math.imul(F,ct)|0,n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var zt=(c+(n=n+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((a=a+Math.imul(C,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(F,ft)|0,a=a+Math.imul(F,ht)|0;var Dt=(c+(n=n+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((a=a+Math.imul(I,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(j,ft)|0,a=Math.imul(j,ht);var It=(c+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(F,pt)|0))<<13)|0;c=((a=a+Math.imul(F,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(c+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,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!==c&&(l[19]=c,r.length++),r};Math.imul||(w=l),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?w(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=l;c++){var u=a-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):c(this,t,e)},u.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},u.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},u.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},u.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var f=l,h=c,d=0;d<o;d++){var p=r[u+d],m=n[u+d],g=r[u+d+o],v=n[u+d+o],y=f*g-h*v;v=f*v+h*g,g=y,r[u+d]=p+g,n[u+d]=m+v,r[u+d+o]=p-g,n[u+d+o]=m-v,d!==s&&(y=l*f-c*h,h=l*h+c*f,f=y)}},u.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},u.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},u.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},u.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},u.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},u.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,c,n),this.transform(o,a,s,l,n,i),this.transform(c,a,u,f,n,i);for(var d=0;d<n;d++){var p=s[d]*u[d]-l[d]*f[d];l[d]=s[d]*f[d]+l[d]*u[d],s[d]=p}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),c(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n(\"number\"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=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=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n(\"number\"==typeof t&&t>=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<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>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<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){n(\"number\"==typeof t&&t>=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<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),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<<e;if(this.length<=r)return!1;return!!(this.words[r]&i)},a.prototype.imaskn=function(t){n(\"number\"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n(\"number\"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a=t.length+r;this._expand(a);var o,s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>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)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}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),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),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(u),l.isub(f)),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(c)}},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,c=1;0==(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var u=0,f=1;0==(r.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(r.iushrn(u);u-- >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 h;return(h=0===e.cmpn(1)?i:o).cmpn(0)<0&&h.iadd(t),h},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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>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:i<t?-1:1}return 0!==this.negative?0|-r:r},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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 g(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 M={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},f.prototype.split=function(t,e){t.iushrn(this.n,0,e)},f.prototype.imulK=function(t){return t.imul(this.k)},i(h,f),h.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},h.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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(d,f),i(p,f),i(m,f),m.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(M[t])return M[t];var e;if(\"k256\"===t)e=new h;else if(\"p224\"===t)e=new d;else if(\"p192\"===t)e=new p;else{if(\"p25519\"!==t)throw new Error(\"Unknown prime \"+t);e=new m}return M[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,\"red works only with positives\"),n(t.red,\"red works only with red numbers\")},g.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\")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.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)},g.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},g.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)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.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(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=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<p);var v=this.pow(f,new a(1).iushln(p-g-1));h=h.redMul(v),f=v.redSqr(),d=d.redMul(f),p=g}return h},g.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},g.prototype.pow=function(t,e){if(e.isZero())return new a(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new v(t)},i(v,g),v.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},v.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},v.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)},v.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)},v.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],74:[function(t,e,r){\"use strict\";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],c=l.length;for(r=0;r<c;++r){var u=o[s++]=new Array(c-1),f=0;for(n=0;n<c;++n)n!==r&&(u[f++]=l[n]);if(1&r){var h=u[1];u[1]=u[0],u[0]=h}}}return o}},{}],75:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function i(t,e,r,i){for(var a=0,o=0,s=0,l=t.length;s<l;++s){var c=t[s];if(!n(e,c)){for(var u=0;u<2*e;++u)r[a++]=c[u];i[o++]=s}}return o}function a(t,e,r,n){var a=t.length,o=e.length;if(!(a<=0||o<=0)){var s=t[0].length>>>1;if(!(s<=0)){var f,h=l.mallocDouble(2*s*a),d=l.mallocInt32(a);if((a=i(t,s,h,d))>0){if(1===s&&n)c.init(a),f=c.sweepComplete(s,r,0,a,h,d,0,a,h,d);else{var p=l.mallocDouble(2*s*o),m=l.mallocInt32(o);(o=i(e,s,p,m))>0&&(c.init(a+o),f=1===s?c.sweepBipartite(s,r,0,a,h,d,0,o,p,m):u(s,r,n,a,h,d,o,p,m),l.free(p),l.free(m))}l.free(h),l.free(d)}return f}}}function o(t,e){s.push([t,e])}e.exports=function(t,e,r){switch(arguments.length){case 1:return function(t){return s=[],a(t,t,o,!0),s}(t);case 2:return\"function\"==typeof e?a(t,t,e,!0):function(t,e){return s=[],a(t,e,o,!1),s}(t,e);case 3:return a(t,e,r,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}};var s,l=t(\"typedarray-pool\"),c=t(\"./lib/sweep\"),u=t(\"./lib/intersect\")},{\"./lib/intersect\":77,\"./lib/sweep\":81,\"typedarray-pool\":554}],76:[function(t,e,r){\"use strict\";function n(t){function e(e,r){var s=function(t,e,r){var n=\"bruteForce\"+(t?\"Red\":\"Blue\")+(e?\"Flip\":\"\")+(r?\"Full\":\"\"),s=[\"function \",n,\"(\",_.join(),\"){\",\"var \",l,\"=2*\",i,\";\"],w=\"for(var i=\"+c+\",\"+d+\"=\"+l+\"*\"+c+\";i<\"+u+\";++i,\"+d+\"+=\"+l+\"){var x0=\"+f+\"[\"+a+\"+\"+d+\"],x1=\"+f+\"[\"+a+\"+\"+d+\"+\"+i+\"],xi=\"+h+\"[i];\",M=\"for(var j=\"+p+\",\"+y+\"=\"+l+\"*\"+p+\";j<\"+m+\";++j,\"+y+\"+=\"+l+\"){var y0=\"+g+\"[\"+a+\"+\"+y+\"],\"+(r?\"y1=\"+g+\"[\"+a+\"+\"+y+\"+\"+i+\"],\":\"\")+\"yi=\"+v+\"[j];\";return t?s.push(w,b,\":\",M):s.push(M,b,\":\",w),r?s.push(\"if(y1<x0||x1<y0)continue;\"):e?s.push(\"if(y0<=x0||x1<y0)continue;\"):s.push(\"if(y0<x0||x1<y0)continue;\"),s.push(\"for(var k=\"+a+\"+1;k<\"+i+\";++k){var r0=\"+f+\"[k+\"+d+\"],r1=\"+f+\"[k+\"+i+\"+\"+d+\"],b0=\"+g+\"[k+\"+y+\"],b1=\"+g+\"[k+\"+i+\"+\"+y+\"];if(r1<b0||b1<r0)continue \"+b+\";}var \"+x+\"=\"+o+\"(\"),e?s.push(\"yi,xi\"):s.push(\"xi,yi\"),s.push(\");if(\"+x+\"!==void 0)return \"+x+\";}}}\"),{name:n,code:s.join(\"\")}}(e,r,t);n.push(s.code),M.push(\"return \"+s.name+\"(\"+_.join()+\");\")}var r=\"bruteForce\"+(t?\"Full\":\"Partial\"),n=[],w=_.slice();t||w.splice(3,0,s);var M=[\"function \"+r+\"(\"+w.join()+\"){\"];M.push(\"if(\"+u+\"-\"+c+\">\"+m+\"-\"+p+\"){\"),t?(e(!0,!1),M.push(\"}else{\"),e(!1,!1)):(M.push(\"if(\"+s+\"){\"),e(!0,!0),M.push(\"}else{\"),e(!0,!1),M.push(\"}}else{if(\"+s+\"){\"),e(!1,!0),M.push(\"}else{\"),e(!1,!1),M.push(\"}\")),M.push(\"}}return \"+r);var k=n.join(\"\")+M.join(\"\");return new Function(k)()}var i=\"d\",a=\"ax\",o=\"vv\",s=\"fp\",l=\"es\",c=\"rs\",u=\"re\",f=\"rb\",h=\"ri\",d=\"rp\",p=\"bs\",m=\"be\",g=\"bb\",v=\"bi\",y=\"bp\",x=\"rv\",b=\"Q\",_=[i,a,o,c,u,f,h,p,m,g,v];r.partial=n(!1),r.full=n(!0)},{}],77:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l){var c=M*t;A[c]=e,A[c+1]=r,A[c+2]=n,A[c+3]=i,A[c+4]=a,A[c+5]=o;var u=k*t;T[u]=s,T[u+1]=l}function i(t,e,r,n,i,a,o,s,l,c,u){var f=2*t,h=l*f,d=c[h+e];t:for(var p=i,m=i*f;p<a;++p,m+=f){var g=o[m+e],v=o[m+e+t];if(!(d<g||v<d)&&(!n||d!==g)){for(var y=s[p],x=e+1;x<t;++x){g=o[m+x],v=o[m+x+t];var b=c[h+x],_=c[h+x+t];if(v<b||_<g)continue t}var w;if(void 0!==(w=n?r(u,y):r(y,u)))return w}}}function a(t,e,r,n,i,a,o,s,l,c){var u=2*t,f=s*u,h=l[f+e];t:for(var d=n,p=n*u;d<i;++d,p+=u){var m=o[d];if(m!==c){var g=a[p+e],v=a[p+e+t];if(!(h<g||v<h)){for(var y=e+1;y<t;++y){g=a[p+y],v=a[p+y+t];var x=l[f+y],b=l[f+y+t];if(v<x||b<g)continue t}var _=r(m,c);if(void 0!==_)return _}}}}e.exports=function(t,e,r,l,d,S,E,L,C){!function(t,e){var r=8*s.log2(e+1)*(t+1)|0,n=s.nextPow2(M*r);A.length<n&&(o.free(A),A=o.mallocInt32(n));var i=s.nextPow2(k*r);T<i&&(o.free(T),T=o.mallocDouble(i))}(t,l+E);var z,D=0,I=2*t;for(n(D++,0,0,l,0,E,r?16:0,-1/0,1/0),r||n(D++,0,0,E,0,l,1,-1/0,1/0);D>0;){var P=(D-=1)*M,O=A[P],F=A[P+1],R=A[P+2],N=A[P+3],j=A[P+4],B=A[P+5],U=D*k,V=T[U],q=T[U+1],H=1&B,G=!!(16&B),Y=d,W=S,X=L,Z=C;if(H&&(Y=L,W=C,X=d,Z=S),!(2&B&&(R=x(t,O,F,R,Y,W,q),F>=R)||4&B&&(F=b(t,O,F,R,Y,W,V))>=R)){var J=R-F,K=j-N;if(G){if(t*J*(J+K)<g){if(void 0!==(z=f.scanComplete(t,O,e,F,R,Y,W,N,j,X,Z)))return z;continue}}else{if(t*Math.min(J,K)<p){if(void 0!==(z=c(t,O,e,H,F,R,Y,W,N,j,X,Z)))return z;continue}if(t*J*K<m){if(void 0!==(z=f.scanBipartite(t,O,e,H,F,R,Y,W,N,j,X,Z)))return z;continue}}var Q=v(t,O,F,R,Y,W,V,q);if(F<Q)if(t*(Q-F)<p){if(void 0!==(z=u(t,O+1,e,F,Q,Y,W,N,j,X,Z)))return z}else if(O===t-2){if(void 0!==(z=H?f.sweepBipartite(t,e,N,j,X,Z,F,Q,Y,W):f.sweepBipartite(t,e,F,Q,Y,W,N,j,X,Z)))return z}else n(D++,O+1,F,Q,N,j,H,-1/0,1/0),n(D++,O+1,N,j,F,Q,1^H,-1/0,1/0);if(Q<R){var $=h(t,O,N,j,X,Z),tt=X[I*$+O],et=y(t,O,$,j,X,Z,tt);if(et<j&&n(D++,O,Q,R,et,j,(4|H)+(G?16:0),tt,q),N<$&&n(D++,O,Q,R,N,$,(2|H)+(G?16:0),V,tt),$+1===et){if(void 0!==(z=G?a(t,O,e,Q,R,Y,W,$,X,Z[$]):i(t,O,e,H,Q,R,Y,W,$,X,Z[$])))return z}else if($<et){var rt;if(G){if(rt=_(t,O,Q,R,Y,W,tt),Q<rt){var nt=y(t,O,Q,rt,Y,W,tt);if(O===t-2){if(Q<nt&&void 0!==(z=f.sweepComplete(t,e,Q,nt,Y,W,$,et,X,Z)))return z;if(nt<rt&&void 0!==(z=f.sweepBipartite(t,e,nt,rt,Y,W,$,et,X,Z)))return z}else Q<nt&&n(D++,O+1,Q,nt,$,et,16,-1/0,1/0),nt<rt&&(n(D++,O+1,nt,rt,$,et,0,-1/0,1/0),n(D++,O+1,$,et,nt,rt,1,-1/0,1/0))}}else Q<(rt=H?w(t,O,Q,R,Y,W,tt):_(t,O,Q,R,Y,W,tt))&&(O===t-2?z=H?f.sweepBipartite(t,e,$,et,X,Z,Q,rt,Y,W):f.sweepBipartite(t,e,Q,rt,Y,W,$,et,X,Z):(n(D++,O+1,Q,rt,$,et,H,-1/0,1/0),n(D++,O+1,$,et,Q,rt,1^H,-1/0,1/0)))}}}}};var o=t(\"typedarray-pool\"),s=t(\"bit-twiddle\"),l=t(\"./brute\"),c=l.partial,u=l.full,f=t(\"./sweep\"),h=t(\"./median\"),d=t(\"./partition\"),p=128,m=1<<22,g=1<<22,v=d(\"!(lo>=p0)&&!(p1>=hi)\",[\"p0\",\"p1\"]),y=d(\"lo===p0\",[\"p0\"]),x=d(\"lo<p0\",[\"p0\"]),b=d(\"hi<=p0\",[\"p0\"]),_=d(\"lo<=p0&&p0<=hi\",[\"p0\"]),w=d(\"lo<p0&&p0<=hi\",[\"p0\"]),M=6,k=2,A=o.mallocInt32(1024),T=o.mallocDouble(1024)},{\"./brute\":76,\"./median\":78,\"./partition\":79,\"./sweep\":81,\"bit-twiddle\":71,\"typedarray-pool\":554}],78:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var c=i[s],u=l,f=o*(l-1);u>r&&i[f+e]>c;--u,f-=o){for(var h=f,d=f+o,p=0;p<o;++p,++h,++d){var m=i[h];i[h]=i[d],i[d]=m}var g=a[u];a[u]=a[u-1],a[u-1]=g}}e.exports=function(t,e,r,o,s,l){if(o<=r+1)return r;for(var c=r,u=o,f=o+r>>>1,h=2*t,d=f,p=s[h*f+e];c<u;){if(u-c<a){n(t,e,c,u,s,l),p=s[h*f+e];break}var m=u-c,g=Math.random()*m+c|0,v=s[h*g+e],y=Math.random()*m+c|0,x=s[h*y+e],b=Math.random()*m+c|0,_=s[h*b+e];v<=x?_>=x?(d=y,p=x):v>=_?(d=g,p=v):(d=b,p=_):x>=_?(d=y,p=x):_>=v?(d=g,p=v):(d=b,p=_);for(var w=h*(u-1),M=h*d,k=0;k<h;++k,++w,++M){var A=s[w];s[w]=s[M],s[M]=A}var T=l[u-1];for(l[u-1]=l[d],l[d]=T,w=h*(u-1),M=h*(d=i(t,e,c,u-1,s,l,p)),k=0;k<h;++k,++w,++M)A=s[w],s[w]=s[M],s[M]=A;if(T=l[u-1],l[u-1]=l[d],l[d]=T,f<d){for(u=d-1;c<u&&s[h*(u-1)+e]===p;)u-=1;u+=1}else{if(!(d<f))break;for(c=d+1;c<u&&s[h*c+e]===p;)c+=1}}return i(t,e,r,f,s,l,s[h*f+e])};var i=t(\"./partition\")(\"lo<p0\",[\"p0\"]),a=8},{\"./partition\":79}],79:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=\"abcdef\".split(\"\").concat(e),i=[];return t.indexOf(\"lo\")>=0&&i.push(\"lo=e[k+n]\"),t.indexOf(\"hi\")>=0&&i.push(\"hi=e[k+o]\"),r.push(n.replace(\"_\",i.join()).replace(\"$\",t)),Function.apply(void 0,r)};var n=\"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\"},{}],80:[function(t,e,r){\"use strict\";function n(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 c=r[l-2],u=r[l-1];if(c<a)break;if(c===a&&u<o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=a,r[l+1]=o}}function i(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function a(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function o(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function s(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function l(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function c(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}function u(t,e,r){var h=(e-t+1)/6|0,d=t+h,p=e-h,m=t+e>>1,g=m-h,v=m+h,y=d,x=g,b=m,_=v,w=p,M=t+1,k=e-1,A=0;l(y,x,r)&&(A=y,y=x,x=A),l(_,w,r)&&(A=_,_=w,w=A),l(y,b,r)&&(A=y,y=b,b=A),l(x,b,r)&&(A=x,x=b,b=A),l(y,_,r)&&(A=y,y=_,_=A),l(b,_,r)&&(A=b,b=_,_=A),l(x,w,r)&&(A=x,x=w,w=A),l(x,b,r)&&(A=x,x=b,b=A),l(_,w,r)&&(A=_,_=w,w=A);for(var T=r[2*x],S=r[2*x+1],E=r[2*_],L=r[2*_+1],C=2*y,z=2*b,D=2*w,I=2*d,P=2*m,O=2*p,F=0;F<2;++F){var R=r[C+F],N=r[z+F],j=r[D+F];r[I+F]=R,r[P+F]=N,r[O+F]=j}a(g,t,r),a(v,e,r);for(var B=M;B<=k;++B)if(c(B,T,S,r))B!==M&&i(B,M,r),++M;else if(!c(B,E,L,r))for(;;){if(c(k,E,L,r)){c(k,T,S,r)?(o(B,M,k,r),++M,--k):(i(B,k,r),--k);break}if(--k<B)break}s(t,M-1,T,S,r),s(e,k+1,E,L,r),M-2-t<=f?n(t,M-2,r):u(t,M-2,r),e-(k+2)<=f?n(k+2,e,r):u(k+2,e,r),k-M<=f?n(M,k,r):u(M,k,r)}e.exports=function(t,e){e<=4*f?n(0,e-1,t):u(0,e-1,t)};var f=32},{}],81:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function i(t,e,r,n){t[r]=n,e[n]=r}e.exports={init:function(t){var e=o.nextPow2(t);c.length<e&&(a.free(c),c=a.mallocInt32(e)),u.length<e&&(a.free(u),u=a.mallocInt32(e)),f.length<e&&(a.free(f),f=a.mallocInt32(e)),h.length<e&&(a.free(h),h=a.mallocInt32(e)),d.length<e&&(a.free(d),d=a.mallocInt32(e)),p.length<e&&(a.free(p),p=a.mallocInt32(e));var r=8*e;m.length<r&&(a.free(m),m=a.mallocDouble(r))},sweepBipartite:function(t,e,r,a,o,d,p,g,v,y){for(var x=0,b=2*t,_=t-1,w=b-1,M=r;M<a;++M){var k=d[M],A=b*M;m[x++]=o[A+_],m[x++]=-(k+1),m[x++]=o[A+w],m[x++]=k}for(M=p;M<g;++M){k=y[M]+l;var T=b*M;m[x++]=v[T+_],m[x++]=-k,m[x++]=v[T+w],m[x++]=k}var S=x>>>1;s(m,S);var E=0,L=0;for(M=0;M<S;++M){var C=0|m[2*M+1];if(C>=l)n(f,h,L--,C=C-l|0);else if(C>=0)n(c,u,E--,C);else if(C<=-l){C=-C-l|0;for(var z=0;z<E;++z)if(void 0!==(D=e(c[z],C)))return D;i(f,h,L++,C)}else{for(C=-C-1|0,z=0;z<L;++z){var D;if(void 0!==(D=e(C,f[z])))return D}i(c,u,E++,C)}}},sweepComplete:function(t,e,r,a,o,l,g,v,y,x){for(var b=0,_=2*t,w=t-1,M=_-1,k=r;k<a;++k){var A=l[k]+1<<1,T=_*k;m[b++]=o[T+w],m[b++]=-A,m[b++]=o[T+M],m[b++]=A}for(k=g;k<v;++k){A=x[k]+1<<1;var S=_*k;m[b++]=y[S+w],m[b++]=1|-A,m[b++]=y[S+M],m[b++]=1|A}var E=b>>>1;s(m,E);var L=0,C=0,z=0;for(k=0;k<E;++k){var D=0|m[2*k+1],I=1&D;if(k<E-1&&D>>1==m[2*k+3]>>1&&(I=2,k+=1),D<0){for(var P=-(D>>1)-1,O=0;O<z;++O)if(void 0!==(F=e(d[O],P)))return F;if(0!==I)for(O=0;O<L;++O)if(void 0!==(F=e(c[O],P)))return F;if(1!==I)for(O=0;O<C;++O){var F;if(void 0!==(F=e(f[O],P)))return F}0===I?i(c,u,L++,P):1===I?i(f,h,C++,P):2===I&&i(d,p,z++,P)}else P=(D>>1)-1,0===I?n(c,u,L--,P):1===I?n(f,h,C--,P):2===I&&n(d,p,z--,P)}},scanBipartite:function(t,e,r,a,o,f,h,d,p,g,v,y){var x=0,b=2*t,_=e,w=e+t,M=1,k=1;a?k=l:M=l;for(var A=o;A<f;++A){var T=A+M,S=b*A;m[x++]=h[S+_],m[x++]=-T,m[x++]=h[S+w],m[x++]=T}for(A=p;A<g;++A){T=A+k;var E=b*A;m[x++]=v[E+_],m[x++]=-T}var L=x>>>1;s(m,L);var C=0;for(A=0;A<L;++A){var z=0|m[2*A+1];if(z<0){var D=!1;if((T=-z)>=l?(D=!a,T-=l):(D=!!a,T-=1),D)i(c,u,C++,T);else{var I=y[T],P=b*T,O=v[P+e+1],F=v[P+e+1+t];t:for(var R=0;R<C;++R){var N=c[R],j=b*N;if(!(F<h[j+e+1]||h[j+e+1+t]<O)){for(var B=e+2;B<t;++B)if(v[P+B+t]<h[j+B]||h[j+B+t]<v[P+B])continue t;var U,V=d[N];if(void 0!==(U=a?r(I,V):r(V,I)))return U}}}}else n(c,u,C--,z-M)}},scanComplete:function(t,e,r,n,i,a,o,u,f,h,d){for(var p=0,g=2*t,v=e,y=e+t,x=n;x<i;++x){var b=x+l,_=g*x;m[p++]=a[_+v],m[p++]=-b,m[p++]=a[_+y],m[p++]=b}for(x=u;x<f;++x){b=x+1;var w=g*x;m[p++]=h[w+v],m[p++]=-b}var M=p>>>1;s(m,M);var k=0;for(x=0;x<M;++x){var A=0|m[2*x+1];if(A<0)if((b=-A)>=l)c[k++]=b-l;else{var T=d[b-=1],S=g*b,E=h[S+e+1],L=h[S+e+1+t];t:for(var C=0;C<k;++C){var z=c[C],D=o[z];if(D===T)break;var I=g*z;if(!(L<a[I+e+1]||a[I+e+1+t]<E)){for(var P=e+2;P<t;++P)if(h[S+P+t]<a[I+P]||a[I+P+t]<h[S+P])continue t;var O=r(D,T);if(void 0!==O)return O}}}else{for(b=A-l,C=k-1;C>=0;--C)if(c[C]===b){for(P=C+1;P<k;++P)c[P-1]=c[P];break}--k}}}};var a=t(\"typedarray-pool\"),o=t(\"bit-twiddle\"),s=t(\"./sort\"),l=1<<28,c=a.mallocInt32(1024),u=a.mallocInt32(1024),f=a.mallocInt32(1024),h=a.mallocInt32(1024),d=a.mallocInt32(1024),p=a.mallocInt32(1024),m=a.mallocDouble(8192)},{\"./sort\":80,\"bit-twiddle\":71,\"typedarray-pool\":554}],82:[function(t,e,r){\"use strict\";function n(t){if(t>P)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 s(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?function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<e+(r||0))throw new RangeError(\"'length' is out of bounds\");var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=i.prototype,n}(t,e,r):\"string\"==typeof t?function(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!i.isEncoding(e))throw new TypeError('\"encoding\" must be a valid string encoding');var r=0|u(t,e),a=n(r),o=a.write(t,e);o!==r&&(a=a.slice(0,o));return a}(t,e):function(t){if(i.isBuffer(t)){var e=0|c(t.length),r=n(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(t){if(C(t)||\"length\"in t)return\"number\"!=typeof t.length||z(t.length)?n(0):l(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return l(t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(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){return o(t),n(t<0?0:0|c(t))}function l(t){for(var e=t.length<0?0:0|c(t.length),r=n(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function c(t){if(t>=P)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+P.toString(16)+\" bytes\");return 0|t}function u(t,e){if(i.isBuffer(t))return t.length;if(C(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 S(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return E(t).length;default:if(n)return S(t).length;e=(\"\"+e).toLowerCase(),n=!0}}function f(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 function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||r>n)&&(r=n);for(var i=\"\",a=e;a<r;++a)i+=function(t){return t<16?\"0\"+t.toString(16):t.toString(16)}(t[a]);return i}(this,e,r);case\"utf8\":case\"utf-8\":return _(this,e,r);case\"ascii\":return function(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case\"latin1\":case\"binary\":return function(t,e,r){var n=\"\";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case\"base64\":return function(t,e,r){return 0===e&&r===t.length?D.fromByteArray(t):D.fromByteArray(t.slice(e,r))}(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return function(t,e,r){for(var n=t.slice(e,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function h(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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,z(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:p(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):p(t,[e],r,n,a);throw new TypeError(\"val must be string, number or Buffer\")}function p(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 c;if(i){var u=-1;for(c=r;c<s;c++)if(a(t,c)===a(e,-1===u?0:c-u)){if(-1===u&&(u=c),c-u+1===l)return u*o}else-1!==u&&(c-=c-u),u=-1}else for(r+l>s&&(r=s-l),c=r;c>=0;c--){for(var f=!0,h=0;h<l;h++)if(a(t,c+h)!==a(e,h)){f=!1;break}if(f)return c}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(z(s))return o;t[r+o]=s}return o}function g(t,e,r,n){return L(S(e,t.length-r),t,r,n)}function v(t,e,r,n){return L(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function y(t,e,r,n){return v(t,e,r,n)}function x(t,e,r,n){return L(E(e),t,r,n)}function b(t,e,r,n){return L(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var l,c,u,f;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],c=t[i+2],128==(192&l)&&128==(192&c)&&(f=(15&a)<<12|(63&l)<<6|63&c)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],c=t[i+2],u=t[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(f=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&f<1114112&&(o=f)}}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 function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r=\"\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}function w(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function M(t,e,r,n,a,o){if(!i.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>a||e<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function k(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 A(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,4),I.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,i){return e=+e,r>>>=0,i||k(t,0,r,8),I.write(t,e,r,n,52,8),r+8}function S(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&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 E(t){return D.toByteArray(function(t){if((t=t.trim().replace(F,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function L(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function C(t){return\"function\"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function z(t){return t!=t}var D=t(\"base64-js\"),I=t(\"ieee754\");r.Buffer=i,r.SlowBuffer=function(t){return+t!=t&&(t=0),i.alloc(+t)},r.INSPECT_MAX_BYTES=50;var P=2147483647;r.kMaxLength=P,(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}}())||\"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 function(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)}(t,e,r)},i.allocUnsafe=function(t){return s(t)},i.allocUnsafeSlow=function(t){return s(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);a<o;++a)if(t[a]!==e[a]){r=t[a],n=e[a];break}return r<n?-1:n<r?1:0},i.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},i.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return i.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=i.allocUnsafe(e),a=0;for(r=0;r<t.length;++r){var o=t[r];if(!i.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},i.byteLength=u,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var e=0;e<t;e+=2)h(this,e,e+1);return this},i.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var e=0;e<t;e+=4)h(this,e,e+3),h(this,e+1,e+2);return this},i.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var e=0;e<t;e+=8)h(this,e,e+7),h(this,e+1,e+6),h(this,e+2,e+5),h(this,e+3,e+4);return this},i.prototype.toString=function(){var t=this.length;return 0===t?\"\":0===arguments.length?_(this,0,t):f.apply(this,arguments)},i.prototype.equals=function(t){if(!i.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===i.compare(this,t)},i.prototype.inspect=function(){var t=\"\",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString(\"hex\",0,e).match(/.{2}/g).join(\" \"),this.length>e&&(t+=\" ... \")),\"<Buffer \"+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),c=this.slice(n,a),u=t.slice(e,r),f=0;f<l;++f)if(c[f]!==u[f]){o=c[f],s=u[f];break}return o<s?-1:s<o?1:0},i.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},i.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},i.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},i.prototype.write=function(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=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 m(this,t,e,r);case\"utf8\":case\"utf-8\":return g(this,t,e,r);case\"ascii\":return v(this,t,e,r);case\"latin1\":case\"binary\":return y(this,t,e,r);case\"base64\":return x(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return b(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 O=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<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=i.prototype,n},i.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},i.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(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||w(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(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||w(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||w(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(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||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){t>>>=0,e||w(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||w(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||w(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||w(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||w(t,4,this.length),I.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),I.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),I.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){M(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},i.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){M(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||M(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||M(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||M(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||M(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||M(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);M(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(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.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);M(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||M(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||M(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||M(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||M(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||M(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 A(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return T(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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},i.prototype.fill=function(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),1===t.length){var a=t.charCodeAt(0);a<256&&(t=a)}if(void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!i.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n)}else\"number\"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if(\"number\"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=i.isBuffer(t)?t:new i(t,n),l=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%l]}return this};var F=/[^+/0-9A-Za-z-_]/g},{\"base64-js\":83,ieee754:277}],83:[function(t,e,r){\"use strict\";function n(t){var e=t.length;if(e%4>0)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 o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function a(t,e,r){for(var n,a=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],a.push(i(n));return a.join(\"\")}r.byteLength=function(t){return 3*t.length/4-n(t)},r.toByteArray=function(t){var e,r,i,a,o,c,u=t.length;o=n(t),c=new l(3*u/4-o),i=o>0?u-4:u;var f=0;for(e=0,r=0;e<i;e+=4,r+=3)a=s[t.charCodeAt(e)]<<18|s[t.charCodeAt(e+1)]<<12|s[t.charCodeAt(e+2)]<<6|s[t.charCodeAt(e+3)],c[f++]=a>>16&255,c[f++]=a>>8&255,c[f++]=255&a;return 2===o?(a=s[t.charCodeAt(e)]<<2|s[t.charCodeAt(e+1)]>>4,c[f++]=255&a):1===o&&(a=s[t.charCodeAt(e)]<<10|s[t.charCodeAt(e+1)]<<4|s[t.charCodeAt(e+2)]>>2,c[f++]=a>>8&255,c[f++]=255&a),c},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,i=\"\",s=[],l=0,c=r-n;l<c;l+=16383)s.push(a(t,l,l+16383>c?c:l+16383));return 1===n?(e=t[r-1],i+=o[e>>2],i+=o[e<<4&63],i+=\"==\"):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=o[e>>10],i+=o[e>>4&63],i+=o[e<<2&63],i+=\"=\"),s.push(i),s.join(\"\")};for(var o=[],s=[],l=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,c=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",u=0,f=c.length;u<f;++u)o[u]=c[u],s[c.charCodeAt(u)]=u;s[\"-\".charCodeAt(0)]=62,s[\"_\".charCodeAt(0)]=63},{}],84:[function(t,e,r){\"use strict\";function n(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function i(t,e){return t[0]-e[0]||t[1]-e[1]}function a(t,e,r){return e in t?t[e]:r}var o=t(\"./lib/monotone\"),s=t(\"./lib/triangulation\"),l=t(\"./lib/delaunay\"),c=t(\"./lib/filter\");e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!a(r,\"delaunay\",!0),f=!!a(r,\"interior\",!0),h=!!a(r,\"exterior\",!0),d=!!a(r,\"infinity\",!1);if(!f&&!h||0===t.length)return[];var p=o(t,e);if(u||f!==h||d){for(var m=s(t.length,function(t){return t.map(n).sort(i)}(e)),g=0;g<p.length;++g){var v=p[g];m.addTriangle(v[0],v[1],v[2])}return u&&l(t,m),h?f?d?c(m,0,d):m.cells():c(m,1,d):c(m,-1)}return p}},{\"./lib/delaunay\":85,\"./lib/filter\":86,\"./lib/monotone\":87,\"./lib/triangulation\":88}],85:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o){var s=e.opposite(n,a);if(!(s<0)){if(a<n){var l=n;n=a,a=l,l=o,o=s,s=l}e.isConstraint(n,a)||i(t[n],t[a],t[o],t[s])<0&&r.push(n,a)}}var i=t(\"robust-in-sphere\")[4];t(\"binary-search-bounds\");e.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],c=1;c<l.length;c+=2)if(!((d=l[c])<s||e.isConstraint(s,d))){for(var u=l[c-1],f=-1,h=1;h<l.length;h+=2)if(l[h-1]===d){f=l[h];break}f<0||i(t[s],t[d],t[u],t[f])<0&&r.push(s,d)}for(;r.length>0;){for(var d=r.pop(),p=(u=-1,f=-1,l=o[s=r.pop()],1);p<l.length;p+=2){var m=l[p-1],g=l[p];m===d?f=g:g===d&&(u=m)}u<0||f<0||i(t[s],t[d],t[u],t[f])>=0||(e.flip(s,d),n(t,e,r,u,s,f),n(t,e,r,s,f,u),n(t,e,r,f,d,u),n(t,e,r,d,u,f))}}},{\"binary-search-bounds\":89,\"robust-in-sphere\":513}],86:[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]}var a=t(\"binary-search-bounds\");e.exports=function(t,e,r){var a=function(t,e){for(var r=t.cells(),a=r.length,o=0;o<a;++o){var s=(v=r[o])[0],l=v[1],c=v[2];l<c?l<s&&(v[0]=l,v[1]=c,v[2]=s):c<s&&(v[0]=c,v[1]=s,v[2]=l)}r.sort(i);var u=new Array(a);for(o=0;o<u.length;++o)u[o]=0;var f=[],h=[],d=new Array(3*a),p=new Array(3*a),m=null;e&&(m=[]);var g=new n(r,d,p,u,f,h,m);for(o=0;o<a;++o)for(var v=r[o],y=0;y<3;++y){s=v[y],l=v[(y+1)%3];var x=d[3*o+y]=g.locate(l,s,t.opposite(l,s)),b=p[3*o+y]=t.isConstraint(s,l);x<0&&(b?h.push(o):(f.push(o),u[o]=1),e&&m.push([l,s,-1]))}return g}(t,r);if(0===e)return r?a.cells.concat(a.boundary):a.cells;for(var o=1,s=a.active,l=a.next,c=a.flags,u=a.cells,f=a.constraint,h=a.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var d=s.pop();if(c[d]!==-o){c[d]=o,u[d];for(var p=0;p<3;++p){var m=h[3*d+p];m>=0&&0===c[m]&&(f[3*d+p]?l.push(m):(s.push(m),c[m]=o))}}}var g=l;l=s,s=g,l.length=0,o=-o}var v=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(u,c,e);return r?v.concat(a.boundary):v};n.prototype.locate=function(){var t=[0,0,0];return function(e,r,n){var o=e,s=r,l=n;return r<n?r<e&&(o=r,s=n,l=e):n<e&&(o=n,s=e,l=r),o<0?-1:(t[0]=o,t[1]=s,t[2]=l,a.eq(this.cells,t,i))}}()},{\"binary-search-bounds\":89}],87:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function i(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function a(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(t.type!==d&&(r=h(t.a,t.b,e.b))?r:t.idx-e.idx)}function o(t,e){return h(t.a,t.b,e)}function s(t,e,r,n,i){for(var a=f.lt(e,n,o),s=f.gt(e,n,o),l=a;l<s;++l){for(var c=e[l],u=c.lowerIds,d=u.length;d>1&&h(r[u[d-2]],r[u[d-1]],n)>0;)t.push([u[d-1],u[d-2],i]),d-=1;u.length=d,u.push(i);var p=c.upperIds;for(d=p.length;d>1&&h(r[p[d-2]],r[p[d-1]],n)<0;)t.push([p[d-2],p[d-1],i]),d-=1;p.length=d,p.push(i)}}function l(t,e){var r;return(r=t.a[0]<e.a[0]?h(t.a,t.b,e.a):h(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?h(t.a,t.b,e.b):h(e.b,e.a,t.b))||t.idx-e.idx}function c(t,e,r){var i=f.le(t,r,l),a=t[i],o=a.upperIds,s=o[o.length-1];a.upperIds=[s],t.splice(i+1,0,new n(r.a,r.b,r.idx,[s],o))}function u(t,e,r){var n=r.a;r.a=r.b,r.b=n;var i=f.eq(t,r,l),a=t[i];t[i-1].upperIds=a.upperIds,t.splice(i,1)}var f=t(\"binary-search-bounds\"),h=t(\"robust-orientation\")[3],d=0,p=1,m=2;e.exports=function(t,e){for(var r=t.length,o=e.length,l=[],f=0;f<r;++f)l.push(new i(t[f],null,d,f));for(f=0;f<o;++f){var h=e[f],g=t[h[0]],v=t[h[1]];g[0]<v[0]?l.push(new i(g,v,m,f),new i(v,g,p,f)):g[0]>v[0]&&l.push(new i(v,g,m,f),new i(g,v,p,f))}l.sort(a);for(var y=l[0].a[0]-(1+Math.abs(l[0].a[0]))*Math.pow(2,-52),x=[new n([y,1],[y,0],-1,[],[],[],[])],b=[],_=(f=0,l.length);f<_;++f){var w=l[f],M=w.type;M===d?s(b,x,t,w.a,w.idx):M===m?c(x,0,w):u(x,0,w)}return b}},{\"binary-search-bounds\":89,\"robust-orientation\":515}],88:[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<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}var a=t(\"binary-search-bounds\");e.exports=function(t,e){for(var r=new Array(t),i=0;i<t;++i)r[i]=[];return new n(r,e)};var o=n.prototype;o.isConstraint=function(){function t(t,e){return t[0]-e[0]||t[1]-e[1]}var e=[0,0];return function(r,n){return e[0]=Math.min(r,n),e[1]=Math.max(r,n),a.eq(this.edges,e,t)>=0}}(),o.removeTriangle=function(t,e,r){var n=this.stars;i(n[t],e,r),i(n[e],r,t),i(n[r],t,e)},o.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},o.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},o.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},o.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},o.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},{\"binary-search-bounds\":89}],89:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=[\"function \",t,\"(a,l,h,\",n.join(\",\"),\"){\",i?\"\":\"var i=\",r?\"l-1\":\"h+1\",\";while(l<=h){var m=(l+h)>>>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)}},{}],90:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},{}],91:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function i(t){var e=t.length;if(0===e)return[];t[0].length;var r=o([t.length+1,t.length+1],1),i=o([t.length+1],1);r[e][e]=0;for(var a=0;a<e;++a){for(var l=0;l<=a;++l)r[l][a]=r[a][l]=2*n(t[a],t[l]);i[a]=n(t[a],t[a])}var c=s(r,i),u=0,f=c[e+1];for(a=0;a<f.length;++a)u+=f[a];var h=new Array(e);for(a=0;a<e;++a){f=c[a];var d=0;for(l=0;l<f.length;++l)d+=f[l];h[a]=d/u}return h}function a(t){if(0===t.length)return[];for(var e=t[0].length,r=o([e]),n=i(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*n[a];return r}var o=t(\"dup\"),s=t(\"robust-linear-solve\");a.barycenetric=i,e.exports=a},{dup:134,\"robust-linear-solve\":514}],92:[function(t,e,r){e.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=t(\"circumcenter\")},{circumcenter:91}],93:[function(t,e,r){e.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},{}],94:[function(t,e,r){\"use strict\";function n(t){var e=m(t);return[v(e,-1/0),v(e,1/0)]}function i(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[v(n[0],-1/0),v(n[1],-1/0),v(n[0],1/0),v(n[1],1/0)]}return e}function a(t,e,r){for(var i=e.length,a=new u(i),o=[],s=0;s<e.length;++s){var l=e[s],c=n(l[0]),h=n(l[1]);o.push([v(c[0],-1/0),v(h[0],-1/0),v(c[1],1/0),v(h[1],1/0)])}f(o,function(t,e){a.link(t,e)});var d=!0,p=new Array(i);for(s=0;s<i;++s){(g=a.find(s))!==s&&(d=!1,t[g]=[Math.min(t[s][0],t[g][0]),Math.min(t[s][1],t[g][1])])}if(d)return null;var m=0;for(s=0;s<i;++s){var g;(g=a.find(s))===s?(p[s]=m,t[m++]=t[s]):p[s]=-1}t.length=m;for(s=0;s<i;++s)p[s]<0&&(p[s]=p[a.find(s)]);return p}function o(t,e){return t[0]-e[0]||t[1]-e[1]}function s(t,e){var r=t[0]-e[0]||t[1]-e[1];return r||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function l(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(l=t[n])[0]],a=e[l[1]];l[0]=Math.min(i,a),l[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var l;i=(l=t[n])[0],a=l[1];l[0]=Math.min(i,a),l[1]=Math.max(i,a)}r?t.sort(s):t.sort(o);var c=1;for(n=1;n<t.length;++n){var u=t[n-1],f=t[n];(f[0]!==u[0]||f[1]!==u[1]||r&&f[2]!==u[2])&&(t[c++]=f)}t.length=c}}function c(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[v(Math.min(a[0],o[0]),-1/0),v(Math.min(a[1],o[1]),-1/0),v(Math.max(a[0],o[0]),1/0),v(Math.max(a[1],o[1]),1/0)]}return r}(t,e),o=function(t,e,r){var n=[];return f(r,function(r,i){var a=e[r],o=e[i];if(a[0]!==o[0]&&a[0]!==o[1]&&a[1]!==o[0]&&a[1]!==o[1]){var s=t[a[0]],l=t[a[1]],c=t[o[0]],u=t[o[1]];h(s,l,c,u)&&n.push([r,i])}}),n}(t,e,n),s=i(t),c=function(t,e,r,n){var i=[];return f(r,n,function(r,n){var a=e[r];if(a[0]!==n&&a[1]!==n){var o=t[n],s=t[a[0]],l=t[a[1]];h(s,l,o,o)&&i.push([r,n])}}),i}(t,e,n,s),u=a(t,function(t,e,r,n,i){var a,o,s=t.map(function(t){return[d(t[0]),d(t[1])]});for(a=0;a<r.length;++a){var l=r[a];o=l[0];var c=l[1],u=e[o],f=e[c],h=y(g(t[u[0]]),g(t[u[1]]),g(t[f[0]]),g(t[f[1]]));if(h){var v=t.length;t.push([m(h[0]),m(h[1])]),s.push(h),n.push([o,v],[c,v])}}for(n.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=s[t[1]],n=s[e[1]];return p(r[0],n[0])||p(r[1],n[1])}),a=n.length-1;a>=0;--a){var x=e[o=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],M=t[_];if((w[0]-M[0]||w[1]-M[1])<0){var k=b;b=_,_=k}x[0]=b;var A,T=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===o;){var S,E=(S=n[--a])[1];i?e.push([T,E,A]):e.push([T,E]),T=E}i?e.push([T,_,A]):e.push([T,_])}return s}(t,e,o,c,r));return l(e,u,r),!!u||(o.length>0||c.length>0)}e.exports=function(t,e,r){var n;if(r){n=e;for(var o=new Array(e.length),s=0;s<e.length;++s){var u=e[s];o[s]=[u[0],u[1],r[s]]}e=o}for(var f=function(t,e,r){var n=a(t,[],i(t));return l(e,n,r),!!n}(t,e,!!r);c(t,e,!!r);)f=!0;if(r&&f)for(n.length=0,r.length=0,s=0;s<e.length;++s)u=e[s],n.push([u[0],u[1]]),r.push(u[2]);return f};var u=t(\"union-find\"),f=t(\"box-intersect\"),h=t(\"robust-segment-intersect\"),d=t(\"big-rat\"),p=t(\"big-rat/cmp\"),m=t(\"big-rat/to-float\"),g=t(\"rat-vec\"),v=t(\"nextafter\"),y=t(\"./lib/rat-seg-intersect\")},{\"./lib/rat-seg-intersect\":95,\"big-rat\":57,\"big-rat/cmp\":55,\"big-rat/to-float\":69,\"box-intersect\":75,nextafter:459,\"rat-vec\":496,\"robust-segment-intersect\":518,\"union-find\":555}],95:[function(t,e,r){\"use strict\";function n(t,e){return o(i(t[0],e[1]),i(t[1],e[0]))}e.exports=function(t,e,r,i){var o=l(e,t),f=l(i,r),h=n(o,f);if(0===s(h))return null;var d=n(f,l(t,r)),p=a(d,h),m=u(o,p);return c(t,m)};var i=t(\"big-rat/mul\"),a=t(\"big-rat/div\"),o=t(\"big-rat/sub\"),s=t(\"big-rat/sign\"),l=t(\"rat-vec/sub\"),c=t(\"rat-vec/add\"),u=t(\"rat-vec/muls\")},{\"big-rat/div\":56,\"big-rat/mul\":66,\"big-rat/sign\":67,\"big-rat/sub\":68,\"rat-vec/add\":495,\"rat-vec/muls\":497,\"rat-vec/sub\":498}],96:[function(t,e,r){(function(t){var r=function(){\"use strict\";function e(r,i,a,o){function s(r,a){if(null===r)return null;if(0==a)return r;var f,h;if(\"object\"!=typeof r)return r;if(e.__isArray(r))f=[];else if(e.__isRegExp(r))f=new RegExp(r.source,n(r)),r.lastIndex&&(f.lastIndex=r.lastIndex);else if(e.__isDate(r))f=new Date(r.getTime());else{if(u&&t.isBuffer(r))return f=new t(r.length),r.copy(f),f;void 0===o?(h=Object.getPrototypeOf(r),f=Object.create(h)):(f=Object.create(o),h=o)}if(i){var d=l.indexOf(r);if(-1!=d)return c[d];l.push(r),c.push(f)}for(var p in r){var m;h&&(m=Object.getOwnPropertyDescriptor(h,p)),m&&null==m.set||(f[p]=s(r[p],a-1))}return f}\"object\"==typeof i&&(a=i.depth,o=i.prototype,i.filter,i=i.circular);var l=[],c=[],u=void 0!==t;return void 0===i&&(i=!0),void 0===a&&(a=1/0),s(r,a)}function r(t){return Object.prototype.toString.call(t)}function n(t){var e=\"\";return t.global&&(e+=\"g\"),t.ignoreCase&&(e+=\"i\"),t.multiline&&(e+=\"m\"),e}return e.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},e.__objToStr=r,e.__isDate=function(t){return\"object\"==typeof t&&\"[object Date]\"===r(t)},e.__isArray=function(t){return\"object\"==typeof t&&\"[object Array]\"===r(t)},e.__isRegExp=function(t){return\"object\"==typeof t&&\"[object RegExp]\"===r(t)},e.__getRegExpFlags=n,e}();\"object\"==typeof e&&e.exports&&(e.exports=r)}).call(this,t(\"buffer\").Buffer)},{buffer:82}],97:[function(t,e,r){\"use strict\";function n(t,e){null==e&&(e=!0);var r=t[0],n=t[1],a=t[2],o=t[3];null==o&&(o=e?1:255),e&&(r*=255,n*=255,a*=255,o*=255);return 16777216*(r=255&i(r,0,255))+((n=255&i(n,0,255))<<16)+((a=255&i(a,0,255))<<8)+(o=255&i(o,0,255))}var i=t(\"clamp\");e.exports=n,e.exports.to=n,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:93}],98:[function(t,e,r){\"use strict\";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],99:[function(t,e,r){\"use strict\";var n=t(\"color-rgba\"),i=t(\"clamp\"),a=t(\"dtype\");e.exports=function(t,e){\"float\"!==e&&e||(e=\"array\"),\"uint\"===e&&(e=\"uint8\"),\"uint_clamped\"===e&&(e=\"uint8_clamped\");var r=a(e),o=new r(4);if(t instanceof r)return Array.isArray(t)?t.slice():(o.set(t),o);var s=\"uint8\"!==e&&\"uint8_clamped\"!==e;return t instanceof Uint8Array||t instanceof Uint8ClampedArray?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255),o):(t.length&&\"string\"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),s?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:1):(o[0]=i(Math.round(255*t[0]),0,255),o[1]=i(Math.round(255*t[1]),0,255),o[2]=i(Math.round(255*t[2]),0,255),o[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),o)}},{clamp:93,\"color-rgba\":101,dtype:133}],100:[function(t,e,r){(function(r){\"use strict\";var n=t(\"color-name\"),i=t(\"is-plain-obj\"),a=t(\"defined\");e.exports=function(t){var e,s,l=[],c=1;if(\"string\"==typeof t)if(n[t])l=n[t].slice(),s=\"rgb\";else if(\"transparent\"===t)c=0,s=\"rgb\",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=t.slice(1);c=1,(h=u.length)<=4?(l=[parseInt(u[0]+u[0],16),parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16)],4===h&&(c=parseInt(u[3]+u[3],16)/255)):(l=[parseInt(u[0]+u[1],16),parseInt(u[2]+u[3],16),parseInt(u[4]+u[5],16)],8===h&&(c=parseInt(u[6]+u[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s=\"rgb\"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\\s*\\(([^\\)]*)\\)/.exec(t)){var f=e[1];s=u=f.replace(/a$/,\"\");var h=\"cmyk\"===u?4:\"gray\"===u?1:3;l=e[2].trim().split(/\\s*,\\s*/).map(function(t,e){if(/%$/.test(t))return e===h?parseFloat(t)/100:\"rgb\"===u?255*parseFloat(t)/100:parseFloat(t);if(\"h\"===u[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)}),f===u&&l.push(1),c=void 0===l[h]?1:l[h],l=l.slice(0,h)}else t.length>10&&/[0-9](?:\\s|\\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),s=t.match(/([a-z])/gi).join(\"\").toLowerCase());else if(\"number\"==typeof t)s=\"rgb\",l=[t>>>16,(65280&t)>>>8,255&t];else if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s=\"rgb\",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s=\"hsl\",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s=\"rgb\",c=4===t.length?t[3]:1);return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"color-name\":98,defined:129,\"is-plain-obj\":286}],101:[function(t,e,r){\"use strict\";var n=t(\"color-parse\"),i=t(\"color-space/hsl\"),a=t(\"clamp\");e.exports=function(t){var e;if(\"string\"!=typeof t)throw Error(\"Argument should be a string\");var r=n(t);return r.space?(e=Array(3),e[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),\"h\"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:93,\"color-parse\":100,\"color-space/hsl\":102}],102:[function(t,e,r){\"use strict\";var n=t(\"./rgb\");e.exports={name:\"hsl\",min:[0,0,0],max:[360,100,100],channel:[\"hue\",\"saturation\",\"lightness\"],alias:[\"HSL\"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return a=255*l,[a,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&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[c]=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),c=l-s;return l===s?e=0:i===l?e=(a-o)/c:a===l?e=2+(o-i)/c:o===l&&(e=4+(i-a)/c),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+l)/2,r=l===s?0:n<=.5?c/(l+s):c/(2-l-s),[e,100*r,100*n]}},{\"./rgb\":103}],103:[function(t,e,r){\"use strict\";e.exports={name:\"rgb\",min:[0,0,0],max:[255,255,255],channel:[\"red\",\"green\",\"blue\"],alias:[\"RGB\"]}},{}],104:[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]}]}},{}],105:[function(t,e,r){\"use strict\";function n(t){for(var e,r=\"#\",n=0;n<3;++n)r+=(\"00\"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function i(t){return\"rgba(\"+t.join(\",\")+\")\"}var a=t(\"arraytools\"),o=t(\"clone\"),s=t(\"./colorScales\");e.exports=function(t){var e,r,l,c,u,f,h,d,p,m,g,v,y,x=[],b=[],_=[],w=[];if(a.isPlainObject(t)||(t={}),p=t.nshades||72,d=t.format||\"hex\",(h=t.colormap)||(h=\"jet\"),\"string\"==typeof h){if(h=h.toLowerCase(),!s[h])throw Error(h+\" not a supported colorscale\");f=o(s[h])}else{if(!Array.isArray(h))throw Error(\"unsupported colormap option\",h);f=o(h)}if(f.length>p)throw new Error(h+\" map requires nshades to be at least size \"+f.length);for(g=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:o(t.alpha):\"number\"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=f.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<e.length;++y)v=f[y].index,4===(r=f[y].rgb).length&&r[3]>=0&&r[3]<=1||(r[3]=g[0]+(g[1]-g[0])*v);for(y=0;y<e.length-1;++y)u=e[y+1]-e[y],l=f[y].rgb,c=f[y+1].rgb,x=x.concat(a.linspace(l[0],c[0],u)),b=b.concat(a.linspace(l[1],c[1],u)),_=_.concat(a.linspace(l[2],c[2],u)),w=w.concat(a.linspace(l[3],c[3],u));return x=x.map(Math.round),b=b.map(Math.round),_=_.map(Math.round),m=a.zip(x,b,_,w),\"hex\"===d&&(m=m.map(n)),\"rgbaString\"===d&&(m=m.map(i)),m}},{\"./colorScales\":104,arraytools:50,clone:96}],106:[function(t,e,r){\"use strict\";function n(t,e,r){var n=o(t[0],-e[0]),i=o(t[1],-e[1]),a=o(r[0],-e[0]),c=o(r[1],-e[1]),u=l(s(n,a),s(i,c));return u[u.length-1]>=0}e.exports=function(t,e,r,o){var s=i(e,r,o);if(0===s){var l=a(i(t,e,r)),c=a(i(t,e,o));if(l===c){if(0===l){var u=n(t,e,r);return u===n(t,e,o)?0:u?1:-1}return 0}return 0===c?l>0?-1:n(t,e,o)?-1:1:0===l?c>0?1:n(t,e,r)?1:-1:a(c-l)}var f=i(t,e,r);return f>0?s>0&&i(t,e,o)>0?1:-1:f<0?s>0||i(t,e,o)>0?1:-1:i(t,e,o)>0?1:n(t,e,r)?1:-1};var i=t(\"robust-orientation\"),a=t(\"signum\"),o=t(\"two-sum\"),s=t(\"robust-product\"),l=t(\"robust-sum\")},{\"robust-orientation\":515,\"robust-product\":516,\"robust-sum\":520,signum:522,\"two-sum\":553}],107:[function(t,e,r){function n(t,e){return t-e}e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=i(t[0],t[1]),c=i(e[0],e[1]);return i(l,t[2])-i(c,e[2])||i(l+t[2],o)-i(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],d=t[3],p=e[0],m=e[1],g=e[2],v=e[3];return u+f+h+d-(p+m+g+v)||i(u,f,h,d)-i(p,m,g,v,p)||i(u+f,u+h,u+d,f+h,f+d,h+d)-i(p+m,p+g,p+v,m+g,m+v,g+v)||i(u+f+h,u+f+d,u+h+d,f+h+d)-i(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=t.slice().sort(n),x=e.slice().sort(n),b=0;b<r;++b)if(a=y[b]-x[b])return a;return 0}};var i=Math.min},{}],108:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"cell-orientation\");e.exports=function(t,e){return n(t,e)||i(t)-i(e)}},{\"cell-orientation\":90,\"compare-cell\":107}],109:[function(t,e,r){\"use strict\";var n=t(\"./lib/ch1d\"),i=t(\"./lib/ch2d\"),a=t(\"./lib/chnd\");e.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;return 0===r?[]:1===r?n(t):2===r?i(t):a(t,r)}},{\"./lib/ch1d\":110,\"./lib/ch2d\":111,\"./lib/chnd\":112}],110:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},{}],111:[function(t,e,r){\"use strict\";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=t(\"monotone-convex-hull-2d\")},{\"monotone-convex-hull-2d\":442}],112:[function(t,e,r){\"use strict\";e.exports=function(t,e){try{return n(t,!0)}catch(o){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];var a=e.length;for(i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t(\"incremental-convex-hull\"),i=t(\"affine-hull\")},{\"affine-hull\":45,\"incremental-convex-hull\":278}],113:[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\"}},{}],114:[function(t,e,r){function n(t){return(t=Math.round(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 c)return c[e].slice();if(\"#\"===e[0]){if(4===e.length){return(r=parseInt(e.substr(1),16))>=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;return(r=parseInt(e.substr(1),16))>=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 u=e.substr(0,i),f=e.substr(i+1,l-(i+1)).split(\",\"),h=1;switch(u){case\"rgba\":if(4!==f.length)return null;h=o(f.pop());case\"rgb\":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case\"hsla\":if(4!==f.length)return null;h=o(f.pop());case\"hsl\":if(3!==f.length)return null;var d=(parseFloat(f[0])%360+360)%360/360,p=o(f[1]),m=o(f[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)),h];default:return null}}return null}var c={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){}},{}],115:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=c*t[d]+u*e[d]+f*r[d]+h*n[d];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(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,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],116:[function(t,e,r){\"use strict\";var n=t(\"./lib/thunk.js\");e.exports=function(t){var e=new function(){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};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;i<r.length;++i){var a=r[i];if(\"array\"===a||\"object\"==typeof a&&a.blockIndices){if(e.argTypes[i]=\"array\",e.arrayArgs.push(i),e.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),e.shimArgs.push(\"array\"+i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error(\"cwise: pre() block may not reference array args\");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error(\"cwise: post() block may not reference array args\")}else if(\"scalar\"===a)e.scalarArgs.push(i),e.shimArgs.push(\"scalar\"+i);else if(\"index\"===a){if(e.indexArgs.push(i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error(\"cwise: pre() block may not reference array index\");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error(\"cwise: body() block may not write to array index\");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error(\"cwise: post() block may not reference array index\")}else if(\"shape\"===a){if(e.shapeArgs.push(i),i<e.pre.args.length&&e.pre.args[i].lvalue)throw new Error(\"cwise: pre() block may not write to array shape\");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error(\"cwise: body() block may not write to array shape\");if(i<e.post.args.length&&e.post.args[i].lvalue)throw new Error(\"cwise: post() block may not write to array shape\")}else{if(\"object\"!=typeof a||!a.offset)throw new Error(\"cwise: Unknown argument type \"+r[i]);e.argTypes[i]=\"offset\",e.offsetArgs.push({array:a.array,offset:a.offset}),e.offsetArgIndex.push(i)}}if(e.arrayArgs.length<=0)throw new Error(\"cwise: No array arguments specified\");if(e.pre.args.length>r.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,n(e)}},{\"./lib/thunk.js\":118}],117:[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=[],c=[],u=0,f=0;for(n=0;n<a;++n)c.push([\"i\",n,\"=0\"].join(\"\"));for(i=0;i<o;++i)for(n=0;n<a;++n)f=u,u=t[n],0===n?c.push([\"d\",i,\"s\",n,\"=t\",i,\"p\",u].join(\"\")):c.push([\"d\",i,\"s\",n,\"=(t\",i,\"p\",u,\"-s\",f,\"*t\",i,\"p\",f,\")\"].join(\"\"));for(l.push(\"var \"+c.join(\",\")),n=a-1;n>=0;--n)u=t[n],l.push([\"for(i\",n,\"=0;i\",n,\"<s\",u,\";++i\",n,\"){\"].join(\"\"));for(l.push(r),n=0;n<a;++n){for(f=u,u=t[n],i=0;i<o;++i)l.push([\"p\",i,\"+=d\",i,\"s\",n].join(\"\"));s&&(n>0&&l.push([\"index[\",f,\"]-=s\",f].join(\"\")),l.push([\"++index[\",u,\"]\"].join(\"\"))),l.push(\"}\")}return l.join(\"\\n\")}function i(t,e,r){for(var n=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,\"g\"),c=\"\",u=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case\"offset\":var f=e.offsetArgIndex.indexOf(o);u=e.offsetArgs[f].array,c=\"+q\"+f;case\"array\":c=\"p\"+u+c;var h=\"l\"+o,d=\"a\"+u;if(0===e.arrayBlockIndices[u])1===s.count?\"generic\"===r[u]?s.lvalue?(i.push([\"var \",h,\"=\",d,\".get(\",c,\")\"].join(\"\")),n=n.replace(l,h),a.push([d,\".set(\",c,\",\",h,\")\"].join(\"\"))):n=n.replace(l,[d,\".get(\",c,\")\"].join(\"\")):n=n.replace(l,[d,\"[\",c,\"]\"].join(\"\")):\"generic\"===r[u]?(i.push([\"var \",h,\"=\",d,\".get(\",c,\")\"].join(\"\")),n=n.replace(l,h),s.lvalue&&a.push([d,\".set(\",c,\",\",h,\")\"].join(\"\"))):(i.push([\"var \",h,\"=\",d,\"[\",c,\"]\"].join(\"\")),n=n.replace(l,h),s.lvalue&&a.push([d,\"[\",c,\"]=\",h].join(\"\")));else{for(var p=[s.name],m=[c],g=0;g<Math.abs(e.arrayBlockIndices[u]);g++)p.push(\"\\\\s*\\\\[([^\\\\]]+)\\\\]\"),m.push(\"$\"+(g+1)+\"*t\"+u+\"b\"+g);if(l=new RegExp(p.join(\"\"),\"g\"),c=m.join(\"+\"),\"generic\"===r[u])throw new Error(\"cwise: Generic arrays not supported in combination with blocks!\");n=n.replace(l,[d,\"[\",c,\"]\"].join(\"\"))}break;case\"scalar\":n=n.replace(l,\"Y\"+e.scalarArgs.indexOf(o));break;case\"index\":n=n.replace(l,\"index\");break;case\"shape\":n=n.replace(l,\"shape\")}}}return[i.join(\"\\n\"),n,a.join(\"\\n\")].join(\"\\n\").trim()}var a=t(\"uniq\");e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),l=0;l<t.arrayArgs.length;++l)s[l]=e[2*l],o[l]=e[2*l+1];var c=[],u=[],f=[],h=[],d=[];for(l=0;l<t.arrayArgs.length;++l){t.arrayBlockIndices[l]<0?(f.push(0),h.push(r),c.push(r),u.push(r+t.arrayBlockIndices[l])):(f.push(t.arrayBlockIndices[l]),h.push(t.arrayBlockIndices[l]+r),c.push(0),u.push(t.arrayBlockIndices[l]));for(var p=[],m=0;m<o[l].length;m++)f[l]<=o[l][m]&&o[l][m]<h[l]&&p.push(o[l][m]-f[l]);d.push(p)}var g=[\"SS\"],v=[\"'use strict'\"],y=[];for(m=0;m<r;++m)y.push([\"s\",m,\"=SS[\",m,\"]\"].join(\"\"));for(l=0;l<t.arrayArgs.length;++l){for(g.push(\"a\"+l),g.push(\"t\"+l),g.push(\"p\"+l),m=0;m<r;++m)y.push([\"t\",l,\"p\",m,\"=t\",l,\"[\",f[l]+m,\"]\"].join(\"\"));for(m=0;m<Math.abs(t.arrayBlockIndices[l]);++m)y.push([\"t\",l,\"b\",m,\"=t\",l,\"[\",c[l]+m,\"]\"].join(\"\"))}for(l=0;l<t.scalarArgs.length;++l)g.push(\"Y\"+l);if(t.shapeArgs.length>0&&y.push(\"shape=SS.slice(0)\"),t.indexArgs.length>0){var x=new Array(r);for(l=0;l<r;++l)x[l]=\"0\";y.push([\"index=[\",x.join(\",\"),\"]\"].join(\"\"))}for(l=0;l<t.offsetArgs.length;++l){var b=t.offsetArgs[l],_=[];for(m=0;m<b.offset.length;++m)0!==b.offset[m]&&(1===b.offset[m]?_.push([\"t\",b.array,\"p\",m].join(\"\")):_.push([b.offset[m],\"*t\",b.array,\"p\",m].join(\"\")));0===_.length?y.push(\"q\"+l+\"=0\"):y.push([\"q\",l,\"=\",_.join(\"+\")].join(\"\"))}var w=a([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for(y=y.concat(w),v.push(\"var \"+y.join(\",\")),l=0;l<t.arrayArgs.length;++l)v.push(\"p\"+l+\"|=0\");t.pre.body.length>3&&v.push(i(t.pre,t,s));var M=i(t.body,t,s),k=function(t){for(var e=0,r=t[0].length;e<r;){for(var n=1;n<t.length;++n)if(t[n][e]!==t[0][e])return e;++e}return e}(d);k<r?v.push(function(t,e,r,i){for(var a=e.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,c=[],u=0;u<o;++u)c.push([\"var offset\",u,\"=p\",u].join(\"\"));for(u=t;u<a;++u)c.push([\"for(var j\"+u+\"=SS[\",e[u],\"]|0;j\",u,\">0;){\"].join(\"\")),c.push([\"if(j\",u,\"<\",s,\"){\"].join(\"\")),c.push([\"s\",e[u],\"=j\",u].join(\"\")),c.push([\"j\",u,\"=0\"].join(\"\")),c.push([\"}else{s\",e[u],\"=\",s].join(\"\")),c.push([\"j\",u,\"-=\",s,\"}\"].join(\"\")),l&&c.push([\"index[\",e[u],\"]=j\",u].join(\"\"));for(u=0;u<o;++u){for(var f=[\"offset\"+u],h=t;h<a;++h)f.push([\"j\",h,\"*t\",u,\"p\",e[h]].join(\"\"));c.push([\"p\",u,\"=(\",f.join(\"+\"),\")\"].join(\"\"))}for(c.push(n(e,r,i)),u=t;u<a;++u)c.push(\"}\");return c.join(\"\\n\")}(k,d[0],t,M)):v.push(n(d[0],t,M)),t.post.body.length>3&&v.push(i(t.post,t,s)),t.debug&&console.log(\"-----Generated cwise routine for \",e,\":\\n\"+v.join(\"\\n\")+\"\\n----------\");var A=[t.funcName||\"unnamed\",\"_cwise_loop_\",o[0].join(\"s\"),\"m\",k,function(t){for(var e=new Array(t.length),r=!0,n=0;n<t.length;++n){var i=t[n],a=i.match(/\\d+/);a=a?a[0]:\"\",0===i.charAt(0)?e[n]=\"u\"+i.charAt(1)+a:e[n]=i.charAt(0)+a,n>0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join(\"\")}(s)].join(\"\");return new Function([\"function \",A,\"(\",g.join(\",\"),\"){\",v.join(\"\\n\"),\"} return \",A].join(\"\"))()}},{uniq:556}],118:[function(t,e,r){\"use strict\";var n=t(\"./compile.js\");e.exports=function(t){var e=[\"'use strict'\",\"var CACHED={}\"],r=[],i=t.funcName+\"_cwise_thunk\";e.push([\"return function \",i,\"(\",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=[],c=[],u=0;u<t.arrayArgs.length;++u){var f=t.arrayArgs[u];r.push([\"t\",f,\"=array\",f,\".dtype,\",\"r\",f,\"=array\",f,\".order\"].join(\"\")),a.push(\"t\"+f),a.push(\"r\"+f),o.push(\"t\"+f),o.push(\"r\"+f+\".join()\"),s.push(\"array\"+f+\".data\"),s.push(\"array\"+f+\".stride\"),s.push(\"array\"+f+\".offset|0\"),u>0&&(l.push(\"array\"+t.arrayArgs[0]+\".shape.length===array\"+f+\".shape.length+\"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push(\"array\"+t.arrayArgs[0]+\".shape[shapeIndex+\"+Math.max(0,t.arrayBlockIndices[0])+\"]===array\"+f+\".shape[shapeIndex+\"+Math.max(0,t.arrayBlockIndices[u])+\"]\"))}for(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 (!(\"+c.join(\" && \")+\")) throw new Error('cwise: Arrays do not all have the same shape!')\"),e.push(\"}\")),u=0;u<t.scalarArgs.length;++u)s.push(\"scalar\"+t.scalarArgs[u]);return r.push([\"type=[\",o.join(\",\"),\"].join()\"].join(\"\")),r.push(\"proc=CACHED[type]\"),e.push(\"var \"+r.join(\",\")),e.push([\"if(!proc){\",\"CACHED[type]=proc=compile([\",a.join(\",\"),\"])}\",\"return proc(\",s.join(\",\"),\")}\"].join(\"\")),t.debug&&console.log(\"-----Generated thunk:\\n\"+e.join(\"\\n\")+\"\\n----------\"),new Function(\"compile\",e.join(\"\\n\"))(n.bind(void 0,t))}},{\"./compile.js\":117}],119:[function(t,e,r){e.exports=t(\"cwise-compiler\")},{\"cwise-compiler\":116}],120:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(t,e){return[t,e]}function r(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=b?10:a>=_?5:a>=w?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=b?10:a>=_?5:a>=w?2:1)}function n(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=b?i*=10:a>=_?i*=5:a>=w&&(i*=2),e<t?-i:i}function i(t){return t.length}var a=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},o=function(t){return 1===t.length&&(t=function(t){return function(e,r){return a(t(e),r)}}(t)),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n<i;){var a=n+i>>>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<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}},s=o(a),l=s.right,c=s.left,u=function(t){return null===t?NaN:+t},f=function(t,e){var r,n,i=t.length,a=0,o=-1,s=0,l=0;if(null==e)for(;++o<i;)isNaN(r=u(t[o]))||(l+=(n=r-s)*(r-(s+=n/++a)));else for(;++o<i;)isNaN(r=u(e(t[o],o,t)))||(l+=(n=r-s)*(r-(s+=n/++a)));if(a>1)return l/(a-1)},h=function(t,e){var r=f(t,e);return r?Math.sqrt(r):r},d=function(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(r=t[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=e(t[o],o,t))&&r>=r)for(n=i=r;++o<a;)null!=(r=e(t[o],o,t))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]},p=Array.prototype,m=p.slice,g=p.map,v=function(t){return function(){return t}},y=function(t){return t},x=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a},b=Math.sqrt(50),_=Math.sqrt(10),w=Math.sqrt(2),M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},k=function(t,e,r){if(null==r&&(r=u),n=t.length){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=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)}},A=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&n>r&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&n>r&&(n=r);return n},T=function(t){if(!(a=t.length))return[];for(var e=-1,r=A(t,i),n=new Array(r);++e<r;)for(var a,o=-1,s=n[e]=new Array(a);++o<a;)s[o]=t[o][e];return n};t.bisect=l,t.bisectRight=l,t.bisectLeft=c,t.ascending=a,t.bisector=o,t.cross=function(t,r,n){var i,a,o,s,l=t.length,c=r.length,u=new Array(l*c);for(null==n&&(n=e),i=o=0;i<l;++i)for(s=t[i],a=0;a<c;++a,++o)u[o]=n(s,r[a]);return u},t.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},t.deviation=h,t.extent=d,t.histogram=function(){function t(t){var a,o,s=t.length,c=new Array(s);for(a=0;a<s;++a)c[a]=e(t[a],a,t);var u=r(c),f=u[0],h=u[1],d=i(c,f,h);Array.isArray(d)||(d=n(f,h,d),d=x(Math.ceil(f/d)*d,Math.floor(h/d)*d,d));for(var p=d.length;d[0]<=f;)d.shift(),--p;for(;d[p-1]>h;)d.pop(),--p;var m,g=new Array(p+1);for(a=0;a<=p;++a)(m=g[a]=[]).x0=a>0?d[a-1]:f,m.x1=a<p?d[a]:h;for(a=0;a<s;++a)f<=(o=c[a])&&o<=h&&g[l(d,o,0,p)].push(t[a]);return g}var e=y,r=d,i=M;return t.value=function(r){return arguments.length?(e=\"function\"==typeof r?r:v(r),t):e},t.domain=function(e){return arguments.length?(r=\"function\"==typeof e?e:v([e[0],e[1]]),t):r},t.thresholds=function(e){return arguments.length?(i=\"function\"==typeof e?e:v(Array.isArray(e)?m.call(e):e),t):i},t},t.thresholdFreedmanDiaconis=function(t,e,r){return t=g.call(t,u).sort(a),Math.ceil((r-e)/(2*(k(t,.75)-k(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,e,r){return Math.ceil((r-e)/(3.5*h(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=M,t.max=function(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(r=t[a])&&r>=r)for(n=r;++a<i;)null!=(r=t[a])&&r>n&&(n=r)}else for(;++a<i;)if(null!=(r=e(t[a],a,t))&&r>=r)for(n=r;++a<i;)null!=(r=e(t[a],a,t))&&r>n&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a<n;)isNaN(r=u(t[a]))?--i:o+=r;else for(;++a<n;)isNaN(r=u(e(t[a],a,t)))?--i:o+=r;if(i)return o/i},t.median=function(t,e){var r,n=t.length,i=-1,o=[];if(null==e)for(;++i<n;)isNaN(r=u(t[i]))||o.push(r);else for(;++i<n;)isNaN(r=u(e(t[i],i,t)))||o.push(r);return k(o.sort(a),.5)},t.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=A,t.pairs=function(t,r){null==r&&(r=e);for(var n=0,i=t.length-1,a=t[0],o=new Array(i<0?0:i);n<i;)o[n]=r(a,a=t[++n]);return o},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.quantile=k,t.range=x,t.scan=function(t,e){if(r=t.length){var r,n,i=0,o=0,s=t[o];for(null==e&&(e=a);++i<r;)(e(n=t[i],s)<0||0!==e(s,s))&&(s=n,o=i);return 0===e(s,s)?o:void 0}},t.shuffle=function(t,e,r){for(var n,i,a=(null==r?t.length:r)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.sum=function(t,e){var r,n=t.length,i=-1,a=0;if(null==e)for(;++i<n;)(r=+t[i])&&(a+=r);else for(;++i<n;)(r=+e(t[i],i,t))&&(a+=r);return a},t.ticks=function(t,e,n){var i,a,o,s=e<t,l=-1;if(s&&(i=t,t=e,e=i),0===(o=r(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return s&&a.reverse(),a},t.tickIncrement=r,t.tickStep=n,t.transpose=T,t.variance=f,t.zip=function(){return T(arguments)},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],121:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){}function r(t,r){var n=new e;if(t instanceof e)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,a=-1,o=t.length;if(null==r)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(r(i=t[a],a,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}function n(){return{}}function i(t,e,r){t[e]=r}function a(){return r()}function o(t,e,r){t.set(e,r)}function s(){}function l(t,e){var r=new s;if(t instanceof s)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n<i;)r.add(t[n]);else for(;++n<i;)r.add(e(t[n],n,t))}return r}e.prototype=r.prototype={constructor:e,has:function(t){return\"$\"+t in this},get:function(t){return this[\"$\"+t]},set:function(t,e){return this[\"$\"+t]=e,this},remove:function(t){var e=\"$\"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)\"$\"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)\"$\"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)\"$\"===e[0]&&++t;return t},empty:function(){for(var t in this)if(\"$\"===t[0])return!1;return!0},each:function(t){for(var e in this)\"$\"===e[0]&&t(this[e],e.slice(1),this)}};var 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};t.nest=function(){function t(e,n,i,a){if(n>=u.length)return null!=l?l(e):null!=s?e.sort(s):e;for(var o,c,f,h=-1,d=e.length,p=u[n++],m=r(),g=i();++h<d;)(f=m.get(o=p(c=e[h])+\"\"))?f.push(c):m.set(o,[c]);return m.each(function(e,r){a(g,r,t(e,n,i,a))}),g}function e(t,r){if(++r>u.length)return t;var n,i=f[r-1];return null!=l&&r>=u.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,c,u=[],f=[];return c={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 u.push(t),c},sortKeys:function(t){return f[u.length-1]=t,c},sortValues:function(t){return s=t,c},rollup:function(t){return l=t,c}}},t.set=l,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],122:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.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=E.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=L.exec(t))?i(parseInt(e[1],16)):(e=C.exec(t))?new l(e[1],e[2],e[3],1):(e=z.exec(t))?new l(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=D.exec(t))?a(e[1],e[2],e[3],e[4]):(e=I.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=P.exec(t))?c(e[1],e[2]/100,e[3]/100,1):(e=O.exec(t))?c(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?i(F[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 c(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 u(t,e,i,a){return 1===arguments.length?function(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;var e=(t=t.rgb()).r/255,i=t.g/255,a=t.b/255,o=Math.min(e,i,a),s=Math.max(e,i,a),l=NaN,c=s-o,u=(s+o)/2;return c?(l=e===s?(i-a)/c+6*(i<a):i===s?(a-e)/c+2:(e-i)/c+4,c/=u<.5?s+o:2-s-o,l*=60):c=u>0&&u<1?0:l,new f(l,c,u,t.opacity)}(t):new f(t,e,i,null==a?1:a)}function f(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function h(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 d(t){if(t instanceof m)return new m(t.l,t.a,t.b,t.opacity);if(t instanceof _){var e=t.h*R;return new m(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=g((.4124564*r+.3575761*n+.1804375*i)/j),s=g((.2126729*r+.7151522*n+.072175*i)/B);return new m(116*s-16,500*(a-s),200*(s-g((.0193339*r+.119192*n+.9503041*i)/U)),t.opacity)}function p(t,e,r,n){return 1===arguments.length?d(t):new m(t,e,r,null==n?1:n)}function m(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function g(t){return t>G?Math.pow(t,1/3):t/H+V}function v(t){return t>q?t*t*t:H*(t-V)}function y(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 b(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof _)return new _(t.h,t.c,t.l,t.opacity);t instanceof m||(t=d(t));var e=Math.atan2(t.b,t.a)*N;return new _(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new _(t,e,r,null==n?1:n)}function _(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function w(t,e,r,n){return 1===arguments.length?function(t){if(t instanceof M)return new M(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=(K*n+Z*e-J*r)/(K+Z-J),a=n-i,s=(X*(r-i)-Y*a)/W,c=Math.sqrt(s*s+a*a)/(X*i*(1-i)),u=c?Math.atan2(s,a)*N-120:NaN;return new M(u<0?u+360:u,c,i,t.opacity)}(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}var k=function(t,e,r){t.prototype=e.prototype=r,r.constructor=t},A=\"\\\\s*([+-]?\\\\d+)\\\\s*\",T=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",S=\"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",E=/^#([0-9a-f]{3})$/,L=/^#([0-9a-f]{6})$/,C=new RegExp(\"^rgb\\\\(\"+[A,A,A]+\"\\\\)$\"),z=new RegExp(\"^rgb\\\\(\"+[S,S,S]+\"\\\\)$\"),D=new RegExp(\"^rgba\\\\(\"+[A,A,A,T]+\"\\\\)$\"),I=new RegExp(\"^rgba\\\\(\"+[S,S,S,T]+\"\\\\)$\"),P=new RegExp(\"^hsl\\\\(\"+[T,S,S]+\"\\\\)$\"),O=new RegExp(\"^hsla\\\\(\"+[T,S,S,T]+\"\\\\)$\"),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};k(r,n,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+\"\"}}),k(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(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?\"rgb(\":\"rgba(\")+Math.max(0,Math.min(255,Math.round(this.r)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.g)||0))+\", \"+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?\")\":\", \"+t+\")\")}})),k(f,u,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(h(t>=240?t-240:t+120,i,n),h(t,i,n),h(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 R=Math.PI/180,N=180/Math.PI,j=.95047,B=1,U=1.08883,V=4/29,q=6/29,H=3*q*q,G=q*q*q;k(m,p,e(r,{brighter:function(t){return new m(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new m(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=B*v(t),e=j*v(e),r=U*v(r),new l(y(3.2404542*e-1.5371385*t-.4985314*r),y(-.969266*e+1.8760108*t+.041556*r),y(.0556434*e-.2040259*t+1.0572252*r),this.opacity)}})),k(_,b,e(r,{brighter:function(t){return new _(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new _(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return d(this).rgb()}}));var Y=-.29227,W=-.90649,X=1.97294,Z=X*W,J=1.78277*X,K=1.78277*Y- -.14861*W;k(M,w,e(r,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*R,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*(-.14861*n+1.78277*i)),255*(e+r*(Y*n+W*i)),255*(e+r*(X*n)),this.opacity)}})),t.color=n,t.rgb=s,t.hsl=u,t.lab=p,t.hcl=b,t.cubehelix=w,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],123:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+\"\")||t in i)throw new Error(\"illegal type: \"+t);i[t]=[]}return new r(i)}function r(t){this._=t}function n(t,e,r){for(var n=0,a=t.length;n<a;++n)if(t[n].name===e){t[n]=i,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}var i={value:function(){}};r.prototype=e.prototype={constructor:r,on:function(t,e){var r,i=this._,a=function(t,e){return t.trim().split(/^|\\s+/).map(function(t){var r=\"\",n=t.indexOf(\".\");if(n>=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}})}(t+\"\",i),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&\"function\"!=typeof e)throw new Error(\"invalid callback: \"+e);for(;++o<s;)if(r=(t=a[o]).type)i[r]=n(i[r],t.name,e);else if(null==e)for(r in i)i[r]=n(i[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=function(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new r(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}},t.dispatch=e,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],124:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-quadtree\"),t(\"d3-collection\"),t(\"d3-dispatch\"),t(\"d3-timer\")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)}(this,function(t,e,r,n,i){\"use strict\";function a(t){return t.x+t.vx}function o(t){return t.y+t.vy}function s(t){return t.index}function l(t,e){var r=t.get(e);if(!r)throw new Error(\"missing: \"+e);return r}function c(t){return t.x}function u(t){return t.y}var f=function(t){return function(){return t}},h=function(){return 1e-6*(Math.random()-.5)},d=10,p=Math.PI*(3-Math.sqrt(5));t.forceCenter=function(t,e){function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}var n;return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},t.forceCollide=function(t){function r(){function t(t,e,r,n,i){var a=t.data,o=t.r,s=m+o;if(!a)return e>d+s||n<d-s||r>p+s||i<p-s;if(a.index>f.index){var l=d-a.x-a.vx,u=p-a.y-a.vy,v=l*l+u*u;v<s*s&&(0===l&&(l=h(),v+=l*l),0===u&&(u=h(),v+=u*u),v=(s-(v=Math.sqrt(v)))/v*c,f.vx+=(l*=v)*(s=(o*=o)/(g+o)),f.vy+=(u*=v)*s,a.vx-=l*(s=1-s),a.vy-=u*s)}}for(var r,i,f,d,p,m,g,v=s.length,y=0;y<u;++y)for(i=e.quadtree(s,a,o).visitAfter(n),r=0;r<v;++r)f=s[r],m=l[f.index],g=m*m,d=f.x+f.vx,p=f.y+f.vy,i.visit(t)}function n(t){if(t.data)return t.r=l[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function i(){if(s){var e,r,n=s.length;for(l=new Array(n),e=0;e<n;++e)r=s[e],l[r.index]=+t(r,e,s)}}var s,l,c=1,u=1;return\"function\"!=typeof t&&(t=f(null==t?1:+t)),r.initialize=function(t){s=t,i()},r.iterations=function(t){return arguments.length?(u=+t,r):u},r.strength=function(t){return arguments.length?(c=+t,r):c},r.radius=function(e){return arguments.length?(t=\"function\"==typeof e?e:f(+e),i(),r):t},r},t.forceLink=function(t){function e(e){for(var r=0,n=t.length;r<y;++r)for(var i,a,s,l,u,f,d,m=0;m<n;++m)a=(i=t[m]).source,l=(s=i.target).x+s.vx-a.x-a.vx||h(),u=s.y+s.vy-a.y-a.vy||h(),l*=f=((f=Math.sqrt(l*l+u*u))-c[m])/f*e*o[m],u*=f,s.vx-=l*(d=p[m]),s.vy-=u*d,a.vx+=l*(d=1-d),a.vy+=u*d}function n(){if(u){var e,n,s=u.length,f=t.length,h=r.map(u,m);for(e=0,d=new Array(s);e<f;++e)(n=t[e]).index=e,\"object\"!=typeof n.source&&(n.source=l(h,n.source)),\"object\"!=typeof n.target&&(n.target=l(h,n.target)),d[n.source.index]=(d[n.source.index]||0)+1,d[n.target.index]=(d[n.target.index]||0)+1;for(e=0,p=new Array(f);e<f;++e)n=t[e],p[e]=d[n.source.index]/(d[n.source.index]+d[n.target.index]);o=new Array(f),i(),c=new Array(f),a()}}function i(){if(u)for(var e=0,r=t.length;e<r;++e)o[e]=+g(t[e],e,t)}function a(){if(u)for(var e=0,r=t.length;e<r;++e)c[e]=+v(t[e],e,t)}var o,c,u,d,p,m=s,g=function(t){return 1/Math.min(d[t.source.index],d[t.target.index])},v=f(30),y=1;return null==t&&(t=[]),e.initialize=function(t){u=t,n()},e.links=function(r){return arguments.length?(t=r,n(),e):t},e.id=function(t){return arguments.length?(m=t,e):m},e.iterations=function(t){return arguments.length?(y=+t,e):y},e.strength=function(t){return arguments.length?(g=\"function\"==typeof t?t:f(+t),i(),e):g},e.distance=function(t){return arguments.length?(v=\"function\"==typeof t?t:f(+t),a(),e):v},e},t.forceManyBody=function(){function t(t){var r,l=a.length,f=e.quadtree(a,c,u).visitAfter(n);for(s=t,r=0;r<l;++r)o=a[r],f.visit(i)}function r(){if(a){var t,e,r=a.length;for(l=new Array(r),t=0;t<r;++t)e=a[t],l[e.index]=+d(e,t,a)}}function n(t){var e,r,n,i,a,o=0;if(t.length){for(n=i=a=0;a<4;++a)(e=t[a])&&(r=e.value)&&(o+=r,n+=r*e.x,i+=r*e.y);t.x=n/o,t.y=i/o}else{(e=t).x=e.data.x,e.y=e.data.y;do{o+=l[e.data.index]}while(e=e.next)}t.value=o}function i(t,e,r,n){if(!t.value)return!0;var i=t.x-o.x,a=t.y-o.y,c=n-e,u=i*i+a*a;if(c*c/g<u)return u<m&&(0===i&&(i=h(),u+=i*i),0===a&&(a=h(),u+=a*a),u<p&&(u=Math.sqrt(p*u)),o.vx+=i*t.value*s/u,o.vy+=a*t.value*s/u),!0;if(!(t.length||u>=m)){(t.data!==o||t.next)&&(0===i&&(i=h(),u+=i*i),0===a&&(a=h(),u+=a*a),u<p&&(u=Math.sqrt(p*u)));do{t.data!==o&&(c=l[t.data.index]*s/u,o.vx+=i*c,o.vy+=a*c)}while(t=t.next)}}var a,o,s,l,d=f(-30),p=1,m=1/0,g=.81;return t.initialize=function(t){a=t,r()},t.strength=function(e){return arguments.length?(d=\"function\"==typeof e?e:f(+e),r(),t):d},t.distanceMin=function(e){return arguments.length?(p=e*e,t):Math.sqrt(p)},t.distanceMax=function(e){return arguments.length?(m=e*e,t):Math.sqrt(m)},t.theta=function(e){return arguments.length?(g=e*e,t):Math.sqrt(g)},t},t.forceSimulation=function(t){function e(){a(),y.call(\"tick\",l),c<u&&(v.stop(),y.call(\"end\",l))}function a(){var e,r,n=t.length;for(c+=(h-c)*f,g.each(function(t){t(c)}),e=0;e<n;++e)null==(r=t[e]).fx?r.x+=r.vx*=m:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=m:(r.y=r.fy,r.vy=0)}function o(){for(var e,r=0,n=t.length;r<n;++r){if(e=t[r],e.index=r,isNaN(e.x)||isNaN(e.y)){var i=d*Math.sqrt(r),a=r*p;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function s(e){return e.initialize&&e.initialize(t),e}var l,c=1,u=.001,f=1-Math.pow(u,1/300),h=0,m=.6,g=r.map(),v=i.timer(e),y=n.dispatch(\"tick\",\"end\");return null==t&&(t=[]),o(),l={tick:a,restart:function(){return v.restart(e),l},stop:function(){return v.stop(),l},nodes:function(e){return arguments.length?(t=e,o(),g.each(s),l):t},alpha:function(t){return arguments.length?(c=+t,l):c},alphaMin:function(t){return arguments.length?(u=+t,l):u},alphaDecay:function(t){return arguments.length?(f=+t,l):+f},alphaTarget:function(t){return arguments.length?(h=+t,l):h},velocityDecay:function(t){return arguments.length?(m=1-t,l):1-m},force:function(t,e){return arguments.length>1?(null==e?g.remove(t):g.set(t,s(e)),l):g.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c<u;++c)(o=(i=e-(s=t[c]).x)*i+(a=r-s.y)*a)<n&&(l=s,n=o);return l},on:function(t,e){return arguments.length>1?(y.on(t,e),l):y.on(t)}}},t.forceX=function(t){function e(t){for(var e,r=0,o=n.length;r<o;++r)(e=n[r]).vx+=(a[r]-e.x)*i[r]*t}function r(){if(n){var e,r=n.length;for(i=new Array(r),a=new Array(r),e=0;e<r;++e)i[e]=isNaN(a[e]=+t(n[e],e,n))?0:+o(n[e],e,n)}}var n,i,a,o=f(.1);return\"function\"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){n=t,r()},e.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:f(+t),r(),e):o},e.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:f(+n),r(),e):t},e},t.forceY=function(t){function e(t){for(var e,r=0,o=n.length;r<o;++r)(e=n[r]).vy+=(a[r]-e.y)*i[r]*t}function r(){if(n){var e,r=n.length;for(i=new Array(r),a=new Array(r),e=0;e<r;++e)i[e]=isNaN(a[e]=+t(n[e],e,n))?0:+o(n[e],e,n)}}var n,i,a,o=f(.1);return\"function\"!=typeof t&&(t=f(null==t?0:+t)),e.initialize=function(t){n=t,r()},e.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:f(+t),r(),e):o},e.y=function(n){return arguments.length?(t=\"function\"==typeof n?n:f(+n),r(),e):t},e},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-collection\":121,\"d3-dispatch\":123,\"d3-quadtree\":126,\"d3-timer\":127}],125:[function(t,e,r){!function(n,i){\"object\"==typeof r&&void 0!==e?i(r,t(\"d3-color\")):i(n.d3=n.d3||{},n.d3)}(this,function(t,e){\"use strict\";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t,e){return function(r){return t+r*e}}function i(t,e){var r=e-t;return r?n(t,r>180||r<-180?r-360*Math.round(r/360):r):x(isNaN(t)?e:t)}function a(t){return 1==(t=+t)?o:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):x(isNaN(e)?r:e)}}function o(t,e){var r=e-t;return r?n(t,r):x(isNaN(t)?e:t)}function s(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;n<a;++n)i=e.rgb(r[n]),o[n]=i.r||0,s[n]=i.g||0,l[n]=i.b||0;return o=t(o),s=t(s),l=t(l),i.opacity=1,function(t){return i.r=o(t),i.g=s(t),i.b=l(t),i+\"\"}}}function l(t,e,r,n){function i(t){return t.length?t.pop()+\" \":\"\"}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push(\"translate(\",null,e,null,r);s.push({i:l-4,x:A(t,i)},{i:l-2,x:A(n,a)})}else(i||a)&&o.push(\"translate(\"+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+\"rotate(\",null,n)-2,x:A(t,e)})):e&&r.push(i(r)+\"rotate(\"+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+\"skewX(\",null,n)-2,x:A(t,e)}):e&&r.push(i(r)+\"skewX(\"+e+n)}(a.skewX,o.skewX,s,l),function(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:A(t,r)},{i:s-2,x:A(e,n)})}else 1===r&&1===n||a.push(i(a)+\"scale(\"+r+\",\"+n+\")\")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join(\"\")}}}function c(t){return((t=Math.exp(t))+1/t)/2}function u(t){return function(r,n){var i=t((r=e.hsl(r)).h,(n=e.hsl(n)).h),a=o(r.s,n.s),s=o(r.l,n.l),l=o(r.opacity,n.opacity);return function(t){return r.h=i(t),r.s=a(t),r.l=s(t),r.opacity=l(t),r+\"\"}}}function f(t){return function(r,n){var i=t((r=e.hcl(r)).h,(n=e.hcl(n)).h),a=o(r.c,n.c),s=o(r.l,n.l),l=o(r.opacity,n.opacity);return function(t){return r.h=i(t),r.c=a(t),r.l=s(t),r.opacity=l(t),r+\"\"}}}function h(t){return function r(n){function i(r,i){var a=t((r=e.cubehelix(r)).h,(i=e.cubehelix(i)).h),s=o(r.s,i.s),l=o(r.l,i.l),c=o(r.opacity,i.opacity);return function(t){return r.h=a(t),r.s=s(t),r.l=l(Math.pow(t,n)),r.opacity=c(t),r+\"\"}}return n=+n,i.gamma=r,i}(1)}var d,p,m,g,v=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=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=i<e-1?t[i+2]:2*o-a;return r((n-i/e)*e,s,a,o,l)}},y=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],l=t[(i+2)%e];return r((n-i/e)*e,a,o,s,l)}},x=function(t){return function(){return t}},b=function t(r){function n(t,r){var n=i((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=i(t.g,r.g),s=i(t.b,r.b),l=o(t.opacity,r.opacity);return function(e){return t.r=n(e),t.g=a(e),t.b=s(e),t.opacity=l(e),t+\"\"}}var i=a(r);return n.gamma=t,n}(1),_=s(v),w=s(y),M=function(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(n),o=new Array(n);for(r=0;r<i;++r)a[r]=C(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}},k=function(t,e){var r=new Date;return t=+t,e-=t,function(n){return r.setTime(t+e*n),r}},A=function(t,e){return t=+t,e-=t,function(r){return t+e*r}},T=function(t,e){var r,n={},i={};null!==t&&\"object\"==typeof t||(t={}),null!==e&&\"object\"==typeof e||(e={});for(r in e)r in t?n[r]=C(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}},S=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,E=new RegExp(S.source,\"g\"),L=function(t,e){var r,n,i,a=S.lastIndex=E.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=S.exec(t))&&(n=E.exec(e));)(i=n.index)>a&&(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:A(r,n)})),a=E.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+\"\"}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})},C=function(t,r){var n,i=typeof r;return null==r||\"boolean\"===i?x(r):(\"number\"===i?A:\"string\"===i?(n=e.color(r))?(r=n,b):L:r instanceof e.color?b:r instanceof Date?k:Array.isArray(r)?M:isNaN(r)?T:A)(t,r)},z=180/Math.PI,D={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},I=function(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*z,skewX:Math.atan(l)*z,scaleX:o,scaleY:s}},P=l(function(t){return\"none\"===t?D:(d||(d=document.createElement(\"DIV\"),p=document.documentElement,m=document.defaultView),d.style.transform=t,t=m.getComputedStyle(p.appendChild(d),null).getPropertyValue(\"transform\"),p.removeChild(d),t=t.slice(7,-1).split(\",\"),I(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},\"px, \",\"px)\",\"deg)\"),O=l(function(t){return null==t?D:(g||(g=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),g.setAttribute(\"transform\",t),(t=g.transform.baseVal.consolidate())?(t=t.matrix,I(t.a,t.b,t.c,t.d,t.e,t.f)):D)},\", \",\")\",\")\"),F=Math.SQRT2,R=u(i),N=u(o),j=f(i),B=f(o),U=h(i),V=h(o);t.interpolate=C,t.interpolateArray=M,t.interpolateBasis=v,t.interpolateBasisClosed=y,t.interpolateDate=k,t.interpolateNumber=A,t.interpolateObject=T,t.interpolateRound=function(t,e){return t=+t,e-=t,function(r){return Math.round(t+e*r)}},t.interpolateString=L,t.interpolateTransformCss=P,t.interpolateTransformSvg=O,t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],f=s-i,h=l-a,d=f*f+h*h;if(d<1e-12)n=Math.log(u/o)/F,r=function(t){return[i+t*f,a+t*h,o*Math.exp(F*t*n)]};else{var p=Math.sqrt(d),m=(u*u-o*o+4*d)/(2*o*2*p),g=(u*u-o*o-4*d)/(2*u*2*p),v=Math.log(Math.sqrt(m*m+1)-m),y=Math.log(Math.sqrt(g*g+1)-g);n=(y-v)/F,r=function(t){var e=t*n,r=c(v),s=o/(2*p)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(F*e+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+s*f,a+s*h,o*r/c(F*e+v)]}}return r.duration=1e3*n,r},t.interpolateRgb=b,t.interpolateRgbBasis=_,t.interpolateRgbBasisClosed=w,t.interpolateHsl=R,t.interpolateHslLong=N,t.interpolateLab=function(t,r){var n=o((t=e.lab(t)).l,(r=e.lab(r)).l),i=o(t.a,r.a),a=o(t.b,r.b),s=o(t.opacity,r.opacity);return function(e){return t.l=n(e),t.a=i(e),t.b=a(e),t.opacity=s(e),t+\"\"}},t.interpolateHcl=j,t.interpolateHclLong=B,t.interpolateCubehelix=U,t.interpolateCubehelixLong=V,t.quantize=function(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r},Object.defineProperty(t,\"__esModule\",{value:!0})})},{\"d3-color\":122}],126:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,d=t._root,p={data:n},m=t._x0,g=t._y0,v=t._x1,y=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o,i=d,!(d=d[f=u<<1|c]))return i[f]=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[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}function r(t,e,r){var i=new n(null==e?function(t){return t[0]}:e,null==r?function(t){return t[1]}:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function n(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function i(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var a=function(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i},o=r.prototype=n.prototype;o.copy=function(){var t,e,r=new n(this._x,this._y,this._x0,this._y0,this._x1,this._y1),a=this._root;if(!a)return r;if(!a.length)return r._root=i(a),r;for(t=[{source:a,target:r._root=new Array(4)}];a=t.pop();)for(var o=0;o<4;++o)(e=a.source[o])&&(e.length?t.push({source:e,target:a.target[o]=new Array(4)}):a.target[o]=i(e));return r},o.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},o.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,r=t[n]))||isNaN(a=+this._y.call(null,r))||(s[n]=i,l[n]=a,i<c&&(c=i),i>f&&(f=i),a<u&&(u=a),a>h&&(h=a));for(f<c&&(c=this._x0,f=this._x1),h<u&&(u=this._y0,h=this._y1),this.cover(c,u).cover(f,h),n=0;n<o;++n)e(this,s[n],l[n],t[n]);return this},o.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{if(!(r>t||t>i||n>e||e>a))return this;var o,s,l=i-r,c=this._root;switch(s=(e<(n+a)/2)<<1|t<(r+i)/2){case 0:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,a=n+l,t>i||e>a);break;case 1:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,a=n+l,r>t||e>a);break;case 2:do{o=new Array(4),o[s]=c,c=o}while(l*=2,i=r+l,n=a-l,t>i||n>e);break;case 3:do{o=new Array(4),o[s]=c,c=o}while(l*=2,r=i-l,n=a-l,r>t||n>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this},o.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},o.extent=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]]},o.find=function(t,e,r){var n,i,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new a(g,f,h,d,p)),null==r?r=1/0:(f=t-r,h=e-r,d=t+r,p=e+r,r*=r);c=m.pop();)if(!(!(g=c.node)||(i=c.x0)>d||(o=c.y0)>p||(s=c.x1)<f||(l=c.y1)<h))if(g.length){var v=(i+s)/2,y=(o+l)/2;m.push(new a(g[3],v,y,s,l),new a(g[2],i,y,v,l),new a(g[1],v,o,s,y),new a(g[0],i,o,v,y)),(u=(e>=y)<<1|t>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_<r){var w=Math.sqrt(r=_);f=t-w,h=e-w,d=t+w,p=e+w,n=g.data}}return n},o.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,r,n,i,a,o,s,l,c,u,f,h,d=this._root,p=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,e=d,!(d=d[f=u<<1|c]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}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[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(r?r[h]=d:this._root=d),this):(this._root=i,this)},o.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},o.root=function(){return this._root},o.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},o.visit=function(t){var e,r,n,i,o,s,l=[],c=this._root;for(c&&l.push(new a(c,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(c=e.node,n=e.x0,i=e.y0,o=e.x1,s=e.y1)&&c.length){var u=(n+o)/2,f=(i+s)/2;(r=c[3])&&l.push(new a(r,u,f,o,s)),(r=c[2])&&l.push(new a(r,n,f,u,s)),(r=c[1])&&l.push(new a(r,u,i,o,f)),(r=c[0])&&l.push(new a(r,n,i,u,f))}return this},o.visitAfter=function(t){var e,r=[],n=[];for(this._root&&r.push(new a(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var i=e.node;if(i.length){var o,s=e.x0,l=e.y0,c=e.x1,u=e.y1,f=(s+c)/2,h=(l+u)/2;(o=i[0])&&r.push(new a(o,s,l,f,h)),(o=i[1])&&r.push(new a(o,f,l,c,h)),(o=i[2])&&r.push(new a(o,s,h,f,u)),(o=i[3])&&r.push(new a(o,f,h,c,u))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},o.x=function(t){return arguments.length?(this._x=t,this):this._x},o.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=r,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],127:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.d3=t.d3||{})}(this,function(t){\"use strict\";function e(){return g||(x(r),g=y.now()+v)}function r(){g=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=g-r._time)>=0&&r._call.call(null,t),r=r._next;--f}function o(){g=(m=y.now())+v,f=h=0;try{a()}finally{f=0,function(){var t,e,r=c,n=1/0;for(;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);u=t,l(n)}(),g=0}}function s(){var t=y.now(),e=t-m;e>p&&(v-=e,m=t)}function l(t){if(!f){h&&(h=clearTimeout(h));var e=t-g;e>24?(t<1/0&&(h=setTimeout(o,e)),d&&(d=clearInterval(d))):(d||(m=g,d=setInterval(s,p)),f=1,x(o))}}var c,u,f=0,h=0,d=0,p=1e3,m=0,g=0,v=0,y=\"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||u===this||(u?u._next=this:c=this,u=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}};t.now=e,t.timer=i,t.timerFlush=a,t.timeout=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},t.interval=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)},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],128:[function(t,e,r){!function(){function t(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 n(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function i(t){return null===t?NaN:+t}function a(t){return!isNaN(t)}function o(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>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<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}function s(t){return t.length}function l(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function c(){this._=Object.create(null)}function u(t){return(t+=\"\")===oa||t[0]===sa?sa+t:t}function f(t){return(t+=\"\")[0]===sa?t.slice(1):t}function h(t){return u(t)in this._}function d(t){return(t=u(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(f(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(t){return t}function x(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=la.length;r<n;++r){var i=la[r]+e;if(i in t)return i}}function b(){}function _(){}function w(t){function e(){for(var e,n=r,i=-1,a=n.length;++i<a;)(e=n[i].on)&&e.apply(this,arguments);return t}var r=[],n=new c;return e.on=function(e,i){var a,o=n.get(e);return arguments.length<2?o&&o.on:(o&&(o.on=null,r=r.slice(0,a=r.indexOf(o)).concat(r.slice(a+1)),n.remove(e)),i&&r.push(n.set(e,{on:i})),t)},e}function M(){Zi.event.preventDefault()}function k(){for(var t,e=Zi.event;t=e.sourceEvent;)e=t;return e}function A(t){for(var e=new _,r=0,n=arguments.length;++r<n;)e[arguments[r]]=w(e);return e.of=function(r,n){return function(i){try{var a=i.sourceEvent=Zi.event;i.target=t,Zi.event=i,e[i.type].apply(r,n)}finally{Zi.event=a}}},e}function T(t){return ua(t,pa),t}function S(t){return\"function\"==typeof t?t:function(){return fa(t,this)}}function E(t){return\"function\"==typeof t?t:function(){return ha(t,this)}}function L(t,e){return t=Zi.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:\"function\"==typeof e?t.local?function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}:function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function C(t){return t.trim().replace(/\\s+/g,\" \")}function z(t){return new RegExp(\"(?:^|\\\\s+)\"+Zi.requote(t)+\"(?:\\\\s+|$)\",\"g\")}function D(t){return(t+\"\").trim().split(/^|\\s+/)}function I(t,e){var r=(t=D(t).map(P)).length;return\"function\"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function P(t){var e=z(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute(\"class\")||\"\";n?(e.lastIndex=0,e.test(i)||r.setAttribute(\"class\",C(i+\" \"+t))):r.setAttribute(\"class\",C(i.replace(e,\" \")))}}function O(t,e,r){return null==e?function(){this.style.removeProperty(t)}:\"function\"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function F(t,e){return null==e?function(){delete this[t]}:\"function\"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function R(t){return\"function\"==typeof t?t:(t=Zi.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===ma&&e.documentElement.namespaceURI===ma?e.createElement(t):e.createElementNS(r,t)}}function N(){var t=this.parentNode;t&&t.removeChild(this)}function j(t){return{__data__:t}}function B(t){return function(){return da(this,t)}}function U(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function V(t){return ua(t,va),t}function q(t,e,r){function n(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}var i=\"__on\"+t,a=t.indexOf(\".\"),o=H;a>0&&(t=t.slice(0,a));var s=ya.get(t);return s&&(t=s,o=G),a?e?function(){var a=o(e,Ki(arguments));n.call(this),this.addEventListener(t,this[i]=a,a.$=r),a._=e}:n:e?b:function(){var e,r=new RegExp(\"^__on([^.]+)\"+Zi.requote(t)+\"$\");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}function H(t,e){return function(r){var n=Zi.event;Zi.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{Zi.event=n}}}function G(t,e){var r=H(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||r.call(this,t)}}function Y(e){var n=\".dragsuppress-\"+ ++ba,i=\"click\"+n,a=Zi.select(r(e)).on(\"touchmove\"+n,M).on(\"dragstart\"+n,M).on(\"selectstart\"+n,M);if(null==xa&&(xa=!(\"onselectstart\"in e)&&x(e.style,\"userSelect\")),xa){var o=t(e).style,s=o[xa];o[xa]=\"none\"}return function(t){if(a.on(n,null),xa&&(o[xa]=s),t){var e=function(){a.on(i,null)};a.on(i,function(){M(),e()},!0),setTimeout(e,0)}}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(_a<0){var a=r(t);if(a.scrollX||a.scrollY){var o=(n=Zi.select(\"body\").append(\"svg\").style({position:\"absolute\",top:0,left:0,margin:0,padding:0,border:\"none\"},\"important\"))[0][0].getScreenCTM();_a=!(o.f||o.e),n.remove()}}return _a?(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 X(){return Zi.event.changedTouches[0].identifier}function Z(t){return t>0?1:t<0?-1:0}function J(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function K(t){return t>1?0:t<-1?ka:Math.acos(t)}function Q(t){return t>1?Sa:t<-1?-Sa:Math.asin(t)}function $(t){return((t=Math.exp(t))+1/t)/2}function tt(t){return(t=Math.sin(t/2))*t}function et(){}function rt(t,e,r){return this instanceof rt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof rt?new rt(t.h,t.s,t.l):gt(\"\"+t,vt,rt):new rt(t,e,r)}function nt(t,e,r){function n(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i}(t))}var i,a;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,a=r<=.5?r*(1+e):r+e-r*e,i=2*r-a,new ht(n(t+120),n(t),n(t-120))}function it(t,e,r){return this instanceof it?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof it?new it(t.h,t.c,t.l):t instanceof ot?lt(t.l,t.a,t.b):lt((t=yt((t=Zi.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new it(t,e,r)}function at(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ot(r,Math.cos(t*=Ea)*e,Math.sin(t)*e)}function ot(t,e,r){return this instanceof ot?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof ot?new ot(t.l,t.a,t.b):t instanceof it?at(t.h,t.c,t.l):yt((t=ht(t)).r,t.g,t.b):new ot(t,e,r)}function st(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return i=ct(i)*Ra,n=ct(n)*Na,a=ct(a)*ja,new ht(ft(3.2404542*i-1.5371385*n-.4985314*a),ft(-.969266*i+1.8760108*n+.041556*a),ft(.0556434*i-.2040259*n+1.0572252*a))}function lt(t,e,r){return t>0?new it(Math.atan2(r,e)*La,Math.sqrt(e*e+r*r),t):new it(NaN,NaN,t)}function ct(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ut(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ft(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ht(t,e,r){return this instanceof ht?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ht?new ht(t.r,t.g,t.b):gt(\"\"+t,ht,nt):new ht(t,e,r)}function dt(t){return new ht(t>>16,t>>8&255,255&t)}function pt(t){return dt(t)+\"\"}function mt(t){return t<16?\"0\"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function gt(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(bt(i[0]),bt(i[1]),bt(i[2]))}return(a=Va.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 vt(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+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new rt(n,i,l)}function yt(t,e,r){var n=ut((.4124564*(t=xt(t))+.3575761*(e=xt(e))+.1804375*(r=xt(r)))/Ra),i=ut((.2126729*t+.7151522*e+.072175*r)/Na);return ot(116*i-16,500*(n-i),200*(i-ut((.0193339*t+.119192*e+.9503041*r)/ja)))}function xt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function bt(t){var e=parseFloat(t);return\"%\"===t.charAt(t.length-1)?Math.round(2.55*e):e}function _t(t){return\"function\"==typeof t?t:function(){return t}}function wt(t){return function(e,r,n){return 2===arguments.length&&\"function\"==typeof r&&(n=r,r=null),Mt(e,r,t,n)}}function Mt(t,e,r,n){function i(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&\"text\"!==e?t.response:t.responseText}(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=Zi.dispatch(\"beforesend\",\"progress\",\"load\",\"error\"),s={},l=new XMLHttpRequest,c=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=Zi.event;Zi.event=t;try{o.progress.call(a,l)}finally{Zi.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?(c=t,a):c},a.response=function(t){return r=t,a},[\"get\",\"post\"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Ki(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 u in s)l.setRequestHeader(u,s[u]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),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},Zi.rebind(a,o,\"on\"),null==n?a:a.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}function kt(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return Ha?Ha.n=i:qa=i,Ha=i,Ga||(Ya=clearTimeout(Ya),Ga=1,Wa(At)),i}function At(){var t=Tt(),e=St()-t;e>24?(isFinite(e)&&(clearTimeout(Ya),Ya=setTimeout(At,e)),Ga=0):(Ga=1,Wa(At))}function Tt(){for(var t=Date.now(),e=qa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function St(){for(var t,e=qa,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:qa=e.n;return Ha=t,r}function Et(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Lt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ct(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r<n-e?r:n}function i(r){return e(r=t(new Qa(r-1)),1),r}function a(t,r){return e(t=new Qa(+t),r),t}function o(t,n,a){var o=i(t),s=[];if(a>1)for(;o<n;)r(o)%a||s.push(new Date(+o)),e(o,1);else for(;o<n;)s.push(new Date(+o)),e(o,1);return s}t.floor=t,t.round=n,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=zt(t);return s.floor=s,s.round=zt(n),s.ceil=zt(i),s.offset=zt(a),s.range=function(t,e,r){try{Qa=Lt;var n=new Lt;return n._=t,o(n,e,r)}finally{Qa=Date}},t}function zt(t){return function(e,r){try{Qa=Lt;var n=new Lt;return n._=e,t(n,r)._}finally{Qa=Date}}}function Dt(t,e,r){var n=t<0?\"-\":\"\",i=(n?-t:t)+\"\",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function It(t){return new RegExp(\"^(?:\"+t.map(Zi.requote).join(\"|\")+\")\",\"i\")}function Pt(t){for(var e=new c,r=-1,n=t.length;++r<n;)e.set(t[r].toLowerCase(),r);return e}function Ot(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Ft(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r));return n?(t.U=+n[0],r+n[0].length):-1}function Rt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r));return n?(t.W=+n[0],r+n[0].length):-1}function Nt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function jt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.y=function(t){return t+(t>68?1900:2e3)}(+n[0]),r+n[0].length):-1}function Bt(t,e,r){return/^[+-]\\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ut(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Vt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function qt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function Ht(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Gt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Yt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Wt(t,e,r){eo.lastIndex=0;var n=eo.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Xt(t){var e=t.getTimezoneOffset(),r=e>0?\"-\":\"+\",n=aa(e)/60|0,i=aa(e)%60;return r+Dt(n,\"0\",2)+Dt(i,\"0\",2)}function Zt(t,e,r){ro.lastIndex=0;var n=ro.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Jt(t){for(var e=t.length,r=-1;++r<e;)t[r][0]=this(t[r][0]);return function(e){for(var r=0,n=t[r];!n[1](e);)n=t[++r];return n[0](e)}}function Kt(){}function Qt(t,e,r){var n=r.s=t+e,i=n-t,a=n-i;r.t=t-a+(e-i)}function $t(t,e){t&&oo.hasOwnProperty(t.type)&&oo[t.type](t,e)}function te(t,e,r){var n,i=-1,a=t.length-r;for(e.lineStart();++i<a;)n=t[i],e.point(n[0],n[1],n[2]);e.lineEnd()}function ee(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)te(t[r],e,1);e.polygonEnd()}function re(){function t(t,e){e=e*Ea/2+ka/4;var r=(t*=Ea)-n,o=r>=0?1:-1,s=o*r,l=Math.cos(e),c=Math.sin(e),u=a*c,f=i*l+u*Math.cos(s),h=u*o*Math.sin(s);lo.add(Math.atan2(h,f)),n=t,i=l,a=c}var e,r,n,i,a;co.point=function(o,s){co.point=t,n=(e=o)*Ea,i=Math.cos(s=(r=s)*Ea/2+ka/4),a=Math.sin(s)},co.lineEnd=function(){t(e,r)}}function ne(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 ie(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ae(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 oe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function se(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function le(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 ce(t){return[Math.atan2(t[1],t[0]),Q(t[2])]}function ue(t,e){return aa(t[0]-e[0])<wa&&aa(t[1]-e[1])<wa}function fe(t,e){t*=Ea;var r=Math.cos(e*=Ea);he(r*Math.cos(t),r*Math.sin(t),Math.sin(e))}function he(t,e,r){ho+=(t-ho)/++uo,po+=(e-po)/uo,mo+=(r-mo)/uo}function de(){function t(t,i){t*=Ea;var a=Math.cos(i*=Ea),o=a*Math.cos(t),s=a*Math.sin(t),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=r*l-n*s)*c+(c=n*o-e*l)*c+(c=e*s-r*o)*c),e*o+r*s+n*l);fo+=c,go+=c*(e+(e=o)),vo+=c*(r+(r=s)),yo+=c*(n+(n=l)),he(e,r,n)}var e,r,n;wo.point=function(i,a){i*=Ea;var o=Math.cos(a*=Ea);e=o*Math.cos(i),r=o*Math.sin(i),n=Math.sin(a),wo.point=t,he(e,r,n)}}function pe(){wo.point=fe}function me(){function t(t,e){t*=Ea;var r=Math.cos(e*=Ea),o=r*Math.cos(t),s=r*Math.sin(t),l=Math.sin(e),c=i*l-a*s,u=a*o-n*l,f=n*s-i*o,h=Math.sqrt(c*c+u*u+f*f),d=n*o+i*s+a*l,p=h&&-K(d)/h,m=Math.atan2(h,d);xo+=p*c,bo+=p*u,_o+=p*f,fo+=m,go+=m*(n+(n=o)),vo+=m*(i+(i=s)),yo+=m*(a+(a=l)),he(n,i,a)}var e,r,n,i,a;wo.point=function(o,s){e=o,r=s,wo.point=t,o*=Ea;var l=Math.cos(s*=Ea);n=l*Math.cos(o),i=l*Math.sin(o),a=Math.sin(s),he(n,i,a)},wo.lineEnd=function(){t(e,r),wo.lineEnd=pe,wo.point=fe}}function ge(t,e){function r(r,n){return r=t(r,n),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,n){return(r=e.invert(r,n))&&t.invert(r[0],r[1])}),r}function ve(){return!0}function ye(t,e,r,n,i){var a=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r=t[0],n=t[e];if(ue(r,n)){i.lineStart();for(var s=0;s<e;++s)i.point((r=t[s])[0],r[1]);i.lineEnd()}else{var l=new be(r,t,null,!0),c=new be(r,null,l,!1);l.o=c,a.push(l),o.push(c),c=new be(n,null,l=new be(n,t,null,!1),!0),l.o=c,a.push(l),o.push(c)}}}),o.sort(e),xe(a),xe(o),a.length){for(var s=0,l=r,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,f,h=a[0];;){for(var d=h,p=!0;d.v;)if((d=d.n)===h)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else n(d.x,d.n.x,1,i);d=d.n}else{if(p)for(s=(u=d.p.z).length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else n(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function xe(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n<e;)i.n=r=t[n],r.p=i,i=r;i.n=r=t[0],r.p=i}}function be(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function _e(t,e,r,n){return function(i,a){function o(e,r){var n=i(e,r);t(e=n[0],r=n[1])&&a.point(e,r)}function s(t,e){var r=i(t,e);g.point(r[0],r[1])}function l(){y.point=s,g.lineStart()}function c(){y.point=o,g.lineEnd()}function u(t,e){m.push([t,e]);var r=i(t,e);b.point(r[0],r[1])}function f(){b.lineStart(),m=[]}function h(){u(m[0][0],m[0][1]),b.lineEnd();var t,e=b.clean(),r=x.buffer(),n=r.length;if(m.pop(),p.push(m),m=null,n)if(1&e){var i,o=-1;if((n=(t=r[0]).length-1)>0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o<n;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else n>1&&2&e&&r.push(r.pop().concat(r.shift())),d.push(r.filter(we))}var d,p,m,g=e(a),v=i.invert(n[0],n[1]),y={point:o,lineStart:l,lineEnd:c,polygonStart:function(){y.point=u,y.lineStart=f,y.lineEnd=h,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=c,d=Zi.merge(d);var t=function(t,e){var r=t[0],n=t[1],i=[Math.sin(r),-Math.cos(r),0],a=0,o=0;lo.reset();for(var s=0,l=e.length;s<l;++s){var c=e[s],u=c.length;if(u)for(var f=c[0],h=f[0],d=f[1]/2+ka/4,p=Math.sin(d),m=Math.cos(d),g=1;;){g===u&&(g=0);var v=(t=c[g])[0],y=t[1]/2+ka/4,x=Math.sin(y),b=Math.cos(y),_=v-h,w=_>=0?1:-1,M=w*_,k=M>ka,A=p*x;if(lo.add(Math.atan2(A*w*Math.sin(M),m*b+A*Math.cos(M))),a+=k?_+w*Aa:_,k^h>=r^v>=r){var T=ae(ne(f),ne(t));le(T);var S=ae(i,T);le(S);var E=(k^_>=0?-1:1)*Q(S[2]);(n>E||n===E&&(T[0]||T[1]))&&(o+=k^_>=0?1:-1)}if(!g++)break;h=v,p=x,m=b,f=t}}return(a<-wa||a<wa&&lo<-wa)^1&o}(v,p);d.length?(_||(a.polygonStart(),_=!0),ye(d,ke,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()}},x=Me(),b=e(x),_=!1;return y}}function we(t){return t.length>1}function Me(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:b,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function ke(t,e){return((t=t.x)[0]<0?t[1]-Sa-wa:Sa-t[1])-((e=e.x)[0]<0?e[1]-Sa-wa:Sa-e[1])}function Ae(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,d=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<f&&(f=a)}if(a=e-c,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<f&&(f=a)}else if(d>0){if(a>f)return;a>u&&(u=a)}if(a=n-c,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<f&&(f=a)}return u>0&&(i.a={x:l+u*h,y:c+u*d}),f<1&&(i.b={x:l+f*h,y:c+f*d}),i}}}}}}function Te(t,e,r,n){function i(n,i){return aa(n[0]-t)<wa?i>0?0:3:aa(n[0]-r)<wa?i>0?2:1:aa(n[1]-e)<wa?i>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(a,s,l,c){var u=0,f=0;if(null==a||(u=i(a,l))!==(f=i(s,l))||o(a,s)<0^l>0)do{c.point(0===u||3===u?t:r,u>1?n:e)}while((u=(u+l+4)%4)!==f);else c.point(s[0],s[1])}function c(i,a){return t<=i&&i<=r&&e<=a&&a<=n}function u(t,e){c(t,e)&&s.point(t,e)}function f(t,e){var r=c(t=Math.max(-ko,Math.min(ko,t)),e=Math.max(-ko,Math.min(ko,e)));if(d&&p.push([t,e]),_)m=t,g=e,v=r,_=!1,r&&(s.lineStart(),s.point(t,e));else if(r&&b)s.point(t,e);else{var n={a:{x:y,y:x},b:{x:t,y:e}};A(n)?(b||(s.lineStart(),s.point(n.a.x,n.a.y)),s.point(n.b.x,n.b.y),r||s.lineEnd(),w=!1):r&&(s.lineStart(),s.point(t,e),w=!1)}y=t,x=e,b=r}var h,d,p,m,g,v,y,x,b,_,w,M=s,k=Me(),A=Ae(t,e,r,n),T={point:u,lineStart:function(){T.point=f,d&&d.push(p=[]),_=!0,b=!1,y=x=NaN},lineEnd:function(){h&&(f(m,g),v&&b&&k.rejoin(),h.push(k.buffer())),T.point=u,b&&s.lineEnd()},polygonStart:function(){s=k,h=[],d=[],w=!0},polygonEnd:function(){s=M,h=Zi.merge(h);var e=function(t){for(var e=0,r=d.length,n=t[1],i=0;i<r;++i)for(var a,o=1,s=d[i],l=s.length,c=s[0];o<l;++o)a=s[o],c[1]<=n?a[1]>n&&J(c,a,t)>0&&++e:a[1]<=n&&J(c,a,t)<0&&--e,c=a;return 0!==e}([t,n]),r=w&&e,i=h.length;(r||i)&&(s.polygonStart(),r&&(s.lineStart(),l(null,null,1,s),s.lineEnd()),i&&ye(h,a,e,l,s),s.polygonEnd()),h=d=p=null}};return T}}function Se(t){var e=0,r=ka/3,n=je(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*ka/180,r=t[1]*ka/180):[e/ka*180,r/ka*180]},i}function Ee(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,Q((a-(t*t+r*r)*i*i)/(2*i))]},r}function Le(){function t(t,e){To+=i*t-n*e,n=t,i=e}var e,r,n,i;zo.point=function(a,o){zo.point=t,e=n=a,r=i=o},zo.lineEnd=function(){t(e,r)}}function Ce(t){return\"m0,\"+t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+-2*t+\"a\"+t+\",\"+t+\" 0 1,1 0,\"+2*t+\"z\"}function ze(t,e){ho+=t,po+=e,++mo}function De(){function t(t,n){var i=t-e,a=n-r,o=Math.sqrt(i*i+a*a);go+=o*(e+t)/2,vo+=o*(r+n)/2,yo+=o,ze(e=t,r=n)}var e,r;Io.point=function(n,i){Io.point=t,ze(e=n,r=i)}}function Ie(){Io.point=ze}function Pe(){function t(t,e){var r=t-n,a=e-i,o=Math.sqrt(r*r+a*a);go+=o*(n+t)/2,vo+=o*(i+e)/2,yo+=o,xo+=(o=i*t-n*e)*(n+t),bo+=o*(i+e),_o+=3*o,ze(n=t,i=e)}var e,r,n,i;Io.point=function(a,o){Io.point=t,ze(e=n=a,r=i=o)},Io.lineEnd=function(){t(e,r)}}function Oe(t){function e(e){return(a?function(e){function n(r,n){r=t(r,n),e.point(r[0],r[1])}function i(){x=NaN,k.point=o,e.lineStart()}function o(n,i){var o=ne([n,i]),s=t(n,i);r(x,b,y,_,w,M,x=s[0],b=s[1],y=n,_=o[0],w=o[1],M=o[2],a,e),e.point(x,b)}function s(){k.point=n,e.lineEnd()}function l(){i(),k.point=c,k.lineEnd=u}function c(t,e){o(f=t,h=e),d=x,p=b,m=_,g=w,v=M,k.point=o}function u(){r(x,b,y,_,w,M,d,p,f,m,g,v,a,e),k.lineEnd=s,s()}var f,h,d,p,m,g,v,y,x,b,_,w,M,k={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=i}};return k}:function(e){return Re(e,function(r,n){r=t(r,n),e.point(r[0],r[1])})})(e)}function r(e,a,o,s,l,c,u,f,h,d,p,m,g,v){var y=u-e,x=f-a,b=y*y+x*x;if(b>4*n&&g--){var _=s+d,w=l+p,M=c+m,k=Math.sqrt(_*_+w*w+M*M),A=Math.asin(M/=k),T=aa(aa(M)-1)<wa||aa(o-h)<wa?(o+h)/2:Math.atan2(w,_),S=t(T,A),E=S[0],L=S[1],C=E-e,z=L-a,D=x*C-y*z;(D*D/b>n||aa((y*C+x*z)/b-.5)>.3||s*d+l*p+c*m<i)&&(r(e,a,o,s,l,c,E,L,T,_/=k,w/=k,M,g,v),v.point(E,L),r(E,L,T,_,w,M,u,f,h,d,p,m,g,v))}}var n=.5,i=Math.cos(30*Ea),a=16;return e.precision=function(t){return arguments.length?(a=(n=t*t)>0&&16,e):Math.sqrt(n)},e}function Fe(t){this.stream=t}function Re(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 Ne(t){return je(function(){return t})()}function je(t){function e(t){return t=o(t[0]*Ea,t[1]*Ea),[t[0]*f+s,l-t[1]*f]}function r(){o=ge(a=qe(g,v,x),i);var t=i(p,m);return s=h-t[0]*f,l=d+t[1]*f,n()}function n(){return c&&(c.valid=!1,c=null),e}var i,a,o,s,l,c,u=Oe(function(t,e){return t=i(t,e),[t[0]*f+s,l-t[1]*f]}),f=150,h=480,d=250,p=0,m=0,g=0,v=0,x=0,b=Mo,_=y,w=null,M=null;return e.stream=function(t){return c&&(c.valid=!1),c=Be(b(a,u(_(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(b=null==t?(w=t,Mo):function(t){function e(t,e){return Math.cos(t)*Math.cos(e)>i}function r(t,e,r){var n=[1,0,0],a=ae(ne(t),ne(e)),o=ie(a,a),s=a[0],l=o-s*s;if(!l)return!r&&t;var c=i*o/l,u=-i*s/l,f=ae(n,a),h=se(n,c);oe(h,se(a,u));var d=f,p=ie(h,d),m=ie(d,d),g=p*p-m*(ie(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=se(d,(-p-v)/m);if(oe(y,h),y=ce(y),!r)return y;var x,b=t[0],_=e[0],w=t[1],M=e[1];_<b&&(x=b,b=_,_=x);var k=_-b,A=aa(k-ka)<wa;if(!A&&M<w&&(x=w,w=M,M=x),A||k<wa?A?w+M>0^y[1]<(aa(y[0]-b)<wa?w:M):w<=y[1]&&y[1]<=M:k>ka^(b<=y[0]&&y[0]<=_)){var T=se(d,(-p+v)/m);return oe(T,h),[y,ce(T)]}}}function n(e,r){var n=a?t:ka-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}var i=Math.cos(t),a=i>0,o=aa(i)>wa;return _e(e,function(t){var i,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var d,p=[f,h],m=e(f,h),g=a?m?0:n(f,h):m?n(f+(f<0?ka:-ka),h):0;if(!i&&(c=l=m)&&t.lineStart(),m!==l&&(d=r(i,p),(ue(i,d)||ue(p,d))&&(p[0]+=wa,p[1]+=wa,m=e(p[0],p[1]))),m!==l)u=0,m?(t.lineStart(),d=r(p,i),t.point(d[0],d[1])):(d=r(i,p),t.point(d[0],d[1]),t.lineEnd()),i=d;else if(o&&i&&a^m){var v;g&s||!(v=r(p,i,!0))||(u=0,a?(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||i&&ue(i,p)||t.point(p[0],p[1]),i=p,l=m,s=g},lineEnd:function(){l&&t.lineEnd(),i=null},clean:function(){return u|(c&&l)<<1}}},We(t,6*Ea),a?[0,-t]:[-ka,t-ka])}((w=+t)*Ea),n()):w},e.clipExtent=function(t){return arguments.length?(M=t,_=t?Te(t[0][0],t[0][1],t[1][0],t[1][1]):y,n()):M},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],r()):[h,d]},e.center=function(t){return arguments.length?(p=t[0]%360*Ea,m=t[1]%360*Ea,r()):[p*La,m*La]},e.rotate=function(t){return arguments.length?(g=t[0]%360*Ea,v=t[1]%360*Ea,x=t.length>2?t[2]%360*Ea:0,r()):[g*La,v*La,x*La]},Zi.rebind(e,u,\"precision\"),function(){return i=t.apply(this,arguments),e.invert=i.invert&&function(t){return(t=o.invert((t[0]-s)/f,(l-t[1])/f))&&[t[0]*La,t[1]*La]},r()}}function Be(t){return Re(t,function(e,r){t.point(e*Ea,r*Ea)})}function Ue(t,e){return[t,e]}function Ve(t,e){return[t>ka?t-Aa:t<-ka?t+Aa:t,e]}function qe(t,e,r){return t?e||r?ge(Ge(t),Ye(e,r)):Ge(t):e||r?Ye(e,r):Ve}function He(t){return function(e,r){return e+=t,[e>ka?e-Aa:e<-ka?e+Aa:e,r]}}function Ge(t){var e=He(t);return e.invert=He(-t),e}function Ye(t,e){function r(t,e){var r=Math.cos(e),s=Math.cos(t)*r,l=Math.sin(t)*r,c=Math.sin(e),u=c*n+s*i;return[Math.atan2(l*a-u*o,s*n-c*i),Q(u*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,c=Math.sin(e),u=c*a-l*o;return[Math.atan2(l*a+c*o,s*n+u*i),Q(u*n-s*i)]},r}function We(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Xe(r,i),a=Xe(r,a),(o>0?i<a:i>a)&&(i+=o*Aa)):(i=t+o*Aa,a=t-.5*l);for(var c,u=i;o>0?u>a:u<a;u-=l)s.point((c=ce([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Xe(t,e){var r=ne(e);r[0]-=t,le(r);var n=K(-r[1]);return((-r[2]<0?-n:n)+2*Math.PI-wa)%(2*Math.PI)}function Ze(t,e,r){var n=Zi.range(t,e-wa,r).concat(e);return function(t){return n.map(function(e){return[t,e]})}}function Je(t,e,r){var n=Zi.range(t,e-wa,r).concat(e);return function(t){return n.map(function(e){return[e,t]})}}function Ke(t){return t.source}function Qe(t){return t.target}function $e(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}function tr(t,e){function r(t,e){o>0?e<-Sa+wa&&(e=-Sa+wa):e>Sa-wa&&(e=Sa-wa);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(ka/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=Z(a)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/a,2*Math.atan(Math.pow(o/n,1/a))-Sa]},r):rr}function er(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 aa(i)<wa?Ue:(r.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/i,a-Z(i)*Math.sqrt(t*t+r*r)]},r)}function rr(t,e){return[t,Math.log(Math.tan(ka/4+e/2))]}function nr(t){var e,r=Ne(t),n=r.scale,i=r.translate,a=r.clipExtent;return r.scale=function(){var t=n.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.translate=function(){var t=i.apply(r,arguments);return t===r?e?r.clipExtent(null):r:t},r.clipExtent=function(t){var o=a.apply(r,arguments);if(o===r){if(e=null==t){var s=ka*n(),l=i();a([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else e&&(o=null);return o},r.clipExtent(null)}function ir(t,e){return[Math.log(Math.tan(ka/4+e/2)),-t]}function ar(t){return t[0]}function or(t){return t[1]}function sr(t){for(var e=t.length,r=[0,1],n=2,i=2;i<e;i++){for(;n>1&&J(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function lr(t,e){return t[0]-e[0]||t[1]-e[1]}function cr(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function ur(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],c=r[1],u=e[1]-l,f=n[1]-c,h=(s*(l-c)-f*(i-a))/(f*o-s*u);return[i+h*o,l+h*u]}function fr(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}function hr(t){var e=Wo.pop()||new function(){Sr(this),this.edge=this.site=this.circle=null};return e.site=t,e}function dr(t){_r(t),Ho.remove(t),Wo.push(t),Sr(t)}function pr(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];dr(t);for(var l=a;l.circle&&aa(r-l.circle.x)<wa&&aa(n-l.circle.cy)<wa;)a=l.P,s.unshift(l),dr(l),l=a;s.unshift(l),_r(l);for(var c=o;c.circle&&aa(r-c.circle.x)<wa&&aa(n-c.circle.cy)<wa;)o=c.N,s.push(c),dr(c),c=o;s.push(c),_r(c);var u,f=s.length;for(u=1;u<f;++u)c=s[u],l=s[u-1],kr(c.edge,l.site,c.site,i);l=s[0],(c=s[f-1]).edge=Mr(l.site,c.site,null,i),br(l),br(c)}function mr(t){for(var e,r,n,i,a=t.x,o=t.y,s=Ho._;s;)if((n=gr(s,o)-a)>wa)s=s.L;else{if(!((i=a-function(t,e){var r=t.N;if(r)return gr(r,e);var n=t.site;return n.y===e?n.x:1/0}(s,o))>wa)){n>-wa?(e=s.P,r=s):i>-wa?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=hr(t);if(Ho.insert(e,l),e||r){if(e===r)return _r(e),r=hr(e.site),Ho.insert(l,r),l.edge=r.edge=Mr(e.site,l.site),br(e),void br(r);if(r){_r(e),_r(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,d=t.y-f,p=r.site,m=p.x-u,g=p.y-f,v=2*(h*g-d*m),y=h*h+d*d,x=m*m+g*g,b={x:(g*y-d*x)/v+u,y:(h*x-m*y)/v+f};kr(r.edge,c,p,b),l.edge=Mr(c,t,null,b),r.edge=Mr(t,p,null,b),br(e),br(r)}else l.edge=Mr(e.site,l.site)}}function gr(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;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function vr(t){this.site=t,this.edges=[]}function yr(t){for(var e,r,n,i,a,o,s,l,c,u,f=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],m=qo,g=m.length;g--;)if((a=m[g])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(u=s[o].end()).x,i=u.y,e=(c=s[++o%l].start()).x,r=c.y,(aa(n-e)>wa||aa(i-r)>wa)&&(s.splice(o,0,new Ar(function(t,e,r){var n=new wr(t,null);return n.a=e,n.b=r,Vo.push(n),n}(a.site,u,aa(n-f)<wa&&p-i>wa?{x:f,y:aa(e-f)<wa?r:p}:aa(i-p)<wa&&h-n>wa?{x:aa(r-p)<wa?e:h,y:p}:aa(n-h)<wa&&i-d>wa?{x:h,y:aa(e-h)<wa?r:d}:aa(i-d)<wa&&n-f>wa?{x:aa(r-d)<wa?e:f,y:d}:null),a.site,null)),++l)}function xr(t,e){return e.angle-t.angle}function br(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(g=a.y-s)-c*u);if(!(f>=-Ma)){var h=l*l+c*c,d=u*u+g*g,p=(g*h-c*d)/f,m=(l*d-u*h)/f,g=m+s,v=Xo.pop()||new function(){Sr(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=t,v.site=i,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,t.circle=v;for(var y=null,x=Yo._;x;)if(v.y<x.y||v.y===x.y&&v.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Yo.insert(y,v),y||(Go=v)}}}}function _r(t){var e=t.circle;e&&(e.P||(Go=e.N),Yo.remove(e),Xo.push(e),Sr(e),t.circle=null)}function wr(t,e){this.l=t,this.r=e,this.a=this.b=null}function Mr(t,e,r,n){var i=new wr(t,e);return Vo.push(i),r&&kr(i,t,e,r),n&&kr(i,e,t,n),qo[t.i].edges.push(new Ar(i,t,e)),qo[e.i].edges.push(new Ar(i,e,t)),i}function kr(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function Ar(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function Tr(){this._=null}function Sr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Er(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function Lr(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Cr(t){for(;t.L;)t=t.L;return t}function zr(t,e){var r,n,i,a=t.sort(Dr).pop();for(Vo=[],qo=new Array(t.length),Ho=new Tr,Yo=new Tr;;)if(i=Go,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(qo[a.i]=new vr(a),mr(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;pr(i.arc)}e&&(function(t){for(var e,r=Vo,n=Ae(t[0][0],t[0][1],t[1][0],t[1][1]),i=r.length;i--;)(!function(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],c=e[1][1],u=t.l,f=t.r,h=u.x,d=u.y,p=f.x,m=f.y,g=(h+p)/2,v=(d+m)/2;if(m===d){if(g<o||g>=s)return;if(h>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y<l)return}else a={x:g,y:c};r={x:g,y:l}}}else if(n=(h-p)/(m-d),i=v-n*g,n<-1||n>1)if(h>p){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y<l)return}else a={x:(c-i)/n,y:c};r={x:(l-i)/n,y:l}}else if(d<m){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}(e=r[i],t)||!n(e)||aa(e.a.x-e.b.x)<wa&&aa(e.a.y-e.b.y)<wa)&&(e.a=e.b=null,r.splice(i,1))}(e),yr(e));var o={cells:qo,edges:Vo};return Ho=Yo=Vo=qo=null,o}function Dr(t,e){return e.y-t.y||e.x-t.x}function Ir(t){return t.x}function Pr(t){return t.y}function Or(t,e,r,n,i,a){if(!t(e,r,n,i,a)){var o=.5*(r+i),s=.5*(n+a),l=e.nodes;l[0]&&Or(t,l[0],r,n,o,s),l[1]&&Or(t,l[1],o,n,i,s),l[2]&&Or(t,l[2],r,s,o,a),l[3]&&Or(t,l[3],o,s,i,a)}}function Fr(t,e){t=Zi.rgb(t),e=Zi.rgb(e);var r=t.r,n=t.g,i=t.b,a=e.r-r,o=e.g-n,s=e.b-i;return function(t){return\"#\"+mt(Math.round(r+a*t))+mt(Math.round(n+o*t))+mt(Math.round(i+s*t))}}function Rr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Br(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function Nr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function jr(t,e){var r,n,i,a=Jo.lastIndex=Ko.lastIndex=0,o=-1,s=[],l=[];for(t+=\"\",e+=\"\";(r=Jo.exec(t))&&(n=Ko.exec(e));)(i=n.index)>a&&(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:Nr(r,n)})),a=Ko.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+\"\"}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join(\"\")})}function Br(t,e){for(var r,n=Zi.interpolators.length;--n>=0&&!(r=Zi.interpolators[n](t,e)););return r}function Ur(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Br(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}function Vr(t){return function(e){return 1-t(1-e)}}function qr(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Hr(t){return t*t}function Gr(t){return t*t*t}function Yr(t){return 1-Math.cos(t*Sa)}function Wr(t){return Math.pow(2,10*(t-1))}function Xr(t){return 1-Math.sqrt(1-t*t)}function Zr(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 Jr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Kr(t){var e=[t.a,t.b],r=[t.c,t.d],n=$r(e),i=Qr(e,r),a=$r(function(t,e,r){return t[0]+=r*e[0],t[1]+=r*e[1],t}(r,e,-i))||0;e[0]*r[1]<r[0]*e[1]&&(e[0]*=-1,e[1]*=-1,n*=-1,i*=-1),this.rotate=(n?Math.atan2(e[1],e[0]):Math.atan2(-r[0],r[1]))*La,this.translate=[t.e,t.f],this.scale=[n,a],this.skew=a?Math.atan2(i,a)*La:0}function Qr(t,e){return t[0]*e[0]+t[1]*e[1]}function $r(t){var e=Math.sqrt(Qr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function tn(t){return t.length?t.pop()+\",\":\"\"}function en(t,e){var r=[],n=[];return t=Zi.transform(t),e=Zi.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(\"translate(\",null,\",\",null,\")\");n.push({i:i-4,x:Nr(t[0],e[0])},{i:i-2,x:Nr(t[1],e[1])})}else(e[0]||e[1])&&r.push(\"translate(\"+e+\")\")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(tn(r)+\"rotate(\",null,\")\")-2,x:Nr(t,e)})):e&&r.push(tn(r)+\"rotate(\"+e+\")\")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(tn(r)+\"skewX(\",null,\")\")-2,x:Nr(t,e)}):e&&r.push(tn(r)+\"skewX(\"+e+\")\")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(tn(r)+\"scale(\",null,\",\",null,\")\");n.push({i:i-4,x:Nr(t[0],e[0])},{i:i-2,x:Nr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(tn(r)+\"scale(\"+e+\")\")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i<a;)r[(e=n[i]).i]=e.x(t);return r.join(\"\")}}function rn(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;var r=nn(t),n=nn(e),i=r.pop(),a=n.pop(),o=null;for(;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function nn(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function an(t){t.fixed|=2}function on(t){t.fixed&=-7}function sn(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ln(t){t.fixed&=-5}function cn(t,e,r){var n=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)null!=(a=o[l])&&(cn(a,e,r),t.charge+=a.charge,n+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=e*r[t.point.index];t.charge+=t.pointCharge=c,n+=c*t.point.x,i+=c*t.point.y}t.cx=n/t.charge,t.cy=i/t.charge}function un(t,e){return Zi.rebind(t,e,\"sort\",\"children\",\"value\"),t.nodes=t,t.links=gn,t}function fn(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function hn(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;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function dn(t){return t.children}function pn(t){return t.value}function mn(t,e){return e.value-t.value}function gn(t){return Zi.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function vn(t){return t.x}function yn(t){return t.y}function xn(t,e,r){t.y0=e,t.y=r}function bn(t){return Zi.range(t.length)}function _n(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function wn(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function Mn(t){return t.reduce(kn,0)}function kn(t,e){return t+e[1]}function An(t,e){return Tn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Tn(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 Sn(t){return[Zi.min(t),Zi.max(t)]}function En(t,e){return t.value-e.value}function Ln(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Cn(t,e){t._pack_next=e,e._pack_prev=t}function zn(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 Dn(t){function e(t){u=Math.min(t.x-t.r,u),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((r=t.children)&&(c=r.length)){var r,n,i,a,o,s,l,c,u=1/0,f=-1/0,h=1/0,d=-1/0;if(r.forEach(In),n=r[0],n.x=-n.r,n.y=0,e(n),c>1&&(i=r[1],i.x=i.r,i.y=0,e(i),c>2))for(Fn(n,i,a=r[2]),e(a),Ln(n,a),n._pack_prev=a,Ln(a,i),i=n._pack_next,o=3;o<c;o++){Fn(n,i,a=r[o]);var p=0,m=1,g=1;for(s=i._pack_next;s!==i;s=s._pack_next,m++)if(zn(s,a)){p=1;break}if(1==p)for(l=n._pack_prev;l!==s._pack_prev&&!zn(l,a);l=l._pack_prev,g++);p?(m<g||m==g&&i.r<n.r?Cn(n,i=s):Cn(n=l,i),o--):(Ln(n,a),i=a,e(a))}var v=(u+f)/2,y=(h+d)/2,x=0;for(o=0;o<c;o++)(a=r[o]).x-=v,a.y-=y,x=Math.max(x,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=x,r.forEach(Pn)}}function In(t){t._pack_next=t._pack_prev=t}function Pn(t){delete t._pack_next,delete t._pack_prev}function On(t,e,r,n){var i=t.children;if(t.x=e+=n*t.x,t.y=r+=n*t.y,t.r*=n,i)for(var a=-1,o=i.length;++a<o;)On(i[a],e,r,n)}function Fn(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+c*a,r.y=t.y+l*a-c*i}else r.x=t.x+n,r.y=t.y}function Rn(t,e){return t.parent==e.parent?1:2}function Nn(t){var e=t.children;return e.length?e[0]:t.t}function jn(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function Bn(t){var e=t.children;return e&&e.length?Bn(e[0]):t}function Un(t){var e,r=t.children;return r&&(e=r.length)?Un(r[e-1]):t}function Vn(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qn(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 Hn(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function Gn(t){return t.rangeExtent?t.rangeExtent():Hn(t.range())}function Yn(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function Wn(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:ls}function Xn(t,e,r,n){function i(){var i=Math.min(t.length,e.length)>2?function(t,e,r,n){var i=[],a=[],o=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<=s;)i.push(r(t[o-1],t[o])),a.push(n(e[o-1],e[o]));return function(e){var r=Zi.bisect(t,e,1,s)-1;return a[r](i[r](e))}}:function(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}},l=n?function(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}:function(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}};return o=i(t,e,l,r),s=i(e,t,l,Br),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(Jr)},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 Qn(t,e)},a.tickFormat=function(e,r){return $n(t,e,r)},a.nice=function(e){return Jn(t,e),i()},a.copy=function(){return Xn(t,e,r,n)},i()}function Zn(t,e){return Zi.rebind(t,e,\"range\",\"rangeRound\",\"interpolate\",\"clamp\")}function Jn(t,e){return Yn(t,Wn(Kn(t,e)[2])),Yn(t,Wn(Kn(t,e)[2])),t}function Kn(t,e){null==e&&(e=10);var r=Hn(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 Qn(t,e){return Zi.range.apply(Zi,Kn(t,e))}function $n(t,e,r){var n=Kn(t,e);if(r){var i=Za.exec(r);if(i.shift(),\"s\"===i[8]){var a=Zi.formatPrefix(Math.max(aa(n[0]),aa(n[1])));return i[7]||(i[7]=\".\"+ti(a.scale(n[2]))),i[8]=\"f\",r=Zi.format(i.join(\"\")),function(t){return r(a.scale(t))+a.symbol}}i[7]||(i[7]=\".\"+function(t,e){var r=ti(e[2]);return t in cs?Math.abs(r-ti(Math.max(aa(e[0]),aa(e[1]))))+ +(\"e\"!==t):r-2*(\"%\"===t)}(i[8],n)),r=i.join(\"\")}else r=\",.\"+ti(n[2])+\"f\";return Zi.format(r)}function ti(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ei(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=Yn(n.map(i),r?Math:fs);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Hn(n),o=[],s=t[0],l=t[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(u-c)){if(r){for(;c<u;c++)for(var h=1;h<f;h++)o.push(a(c)*h);o.push(a(c))}else for(o.push(a(c));c++<u;)for(h=f-1;h>0;h--)o.push(a(c)*h);for(c=0;o[c]<s;c++);for(u=o.length;o[u-1]>l;u--);o=o.slice(c,u)}return o},o.tickFormat=function(t,r){if(!arguments.length)return us;arguments.length<2?r=us:\"function\"!=typeof r&&(r=Zi.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*e<e-.5&&(o*=e),o<=n?r(t):\"\"}},o.copy=function(){return ei(t.copy(),e,r,n)},Zn(o,t)}function ri(t,e,r){function n(e){return t(i(e))}var i=ni(e),a=ni(1/e);return n.invert=function(e){return a(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(i)),n):r},n.ticks=function(t){return Qn(r,t)},n.tickFormat=function(t,e){return $n(r,t,e)},n.nice=function(t){return n.domain(Jn(r,t))},n.exponent=function(o){return arguments.length?(i=ni(e=o),a=ni(1/e),t.domain(r.map(i)),n):e},n.copy=function(){return ri(t.copy(),e,r)},Zn(n,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){function r(r){return a[((i.get(r)||(\"range\"===e.t?i.set(r,t.push(r)):NaN))-1)%a.length]}function n(e,r){return Zi.range(t.length).map(function(t){return e+r*t})}var i,a,o;return r.domain=function(n){if(!arguments.length)return t;t=[],i=new c;for(var a,o=-1,s=n.length;++o<s;)i.has(a=n[o])||i.set(a,t.push(a));return r[e.t].apply(r,e.a)},r.range=function(t){return arguments.length?(a=t,o=0,e={t:\"range\",a:arguments},r):a},r.rangePoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],c=i[1],u=t.length<2?(l=(l+c)/2,0):(c-l)/(t.length-1+s);return a=n(l+u*s/2,u),o=0,e={t:\"rangePoints\",a:arguments},r},r.rangeRoundPoints=function(i,s){arguments.length<2&&(s=0);var l=i[0],c=i[1],u=t.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(t.length-1+s)|0;return a=n(l+Math.round(u*s/2+(c-l-(t.length-1+s)*u)/2),u),o=0,e={t:\"rangeRoundPoints\",a:arguments},r},r.rangeBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=i[1]<i[0],u=i[c-0],f=(i[1-c]-u)/(t.length-s+2*l);return a=n(u+f*l,f),c&&a.reverse(),o=f*(1-s),e={t:\"rangeBands\",a:arguments},r},r.rangeRoundBands=function(i,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=i[1]<i[0],u=i[c-0],f=i[1-c],h=Math.floor((f-u)/(t.length-s+2*l));return a=n(u+Math.round((f-u-(t.length-s)*h)/2),h),c&&a.reverse(),o=Math.round(h*(1-s)),e={t:\"rangeRoundBands\",a:arguments},r},r.rangeBand=function(){return o},r.rangeExtent=function(){return Hn(e.a[0])},r.copy=function(){return ii(t,e)},r.domain(t)}function ai(t,e){function r(){var r=0,n=e.length;for(s=[];++r<n;)s[r-1]=Zi.quantile(t,r/n);return o}function o(t){if(!isNaN(t=+t))return e[Zi.bisect(s,t)]}var s;return o.domain=function(e){return arguments.length?(t=e.map(i).filter(a).sort(n),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.quantiles=function(){return s},o.invertExtent=function(r){return(r=e.indexOf(r))<0?[NaN,NaN]:[r>0?s[r-1]:t[0],r<s.length?s[r]:t[t.length-1]]},o.copy=function(){return ai(t,e)},r()}function oi(t,e,r){function n(e){return r[Math.max(0,Math.min(o,Math.floor(a*(e-t))))]}function i(){return a=r.length/(e-t),o=r.length-1,n}var a,o;return n.domain=function(r){return arguments.length?(t=+r[0],e=+r[r.length-1],i()):[t,e]},n.range=function(t){return arguments.length?(r=t,i()):r},n.invertExtent=function(e){return e=r.indexOf(e),e=e<0?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return oi(t,e,r)},i()}function si(t,e){function r(r){if(r<=r)return e[Zi.bisect(t,r)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(t){return arguments.length?(e=t,r):e},r.invertExtent=function(r){return r=e.indexOf(r),[t[r-1],t[r]]},r.copy=function(){return si(t,e)},r}function li(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=r.map(e),e):t},e.ticks=function(e){return Qn(t,e)},e.tickFormat=function(e,r){return $n(t,e,r)},e.copy=function(){return li(t)},e}function ci(){return 0}function ui(t){return t.innerRadius}function fi(t){return t.outerRadius}function hi(t){return t.startAngle}function di(t){return t.endAngle}function pi(t){return t&&t.padAngle}function mi(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function gi(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,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,d=e[1]+c,p=(u+h)/2,m=(f+d)/2,g=h-u,v=d-f,y=g*g+v*v,x=r-n,b=u*d-h*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,M=(-b*g-v*_)/y,k=(b*v+g*_)/y,A=(-b*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-c],[w*r/x,M*r/x]]}function vi(t){function e(e){function o(){c.push(\"M\",a(t(u),s))}for(var l,c=[],u=[],f=-1,h=e.length,d=_t(r),p=_t(n);++f<h;)i.call(this,l=e[f],f)?u.push([+d.call(this,l,f),+p.call(this,l,f)]):u.length&&(o(),u=[]);return u.length&&o(),c.length?c.join(\"\"):null}var r=ar,n=or,i=ve,a=yi,o=a.key,s=.7;return e.x=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(n=t,e):n},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(o=\"function\"==typeof t?a=t:(a=vs.get(t)||yi).key,e):o},e.tension=function(t){return arguments.length?(s=t,e):s},e}function yi(t){return t.length>1?t.join(\"L\"):t+\"Z\"}function xi(t){return t.join(\"L\")+\"Z\"}function bi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"V\",(n=t[e])[1],\"H\",n[0]);return i.join(\"\")}function _i(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n=t[e])[0],\"V\",n[1]);return i.join(\"\")}function wi(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return yi(t);var r=t.length!=e.length,n=\"\",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+=\"Q\"+(a[0]-2*o[0]/3)+\",\"+(a[1]-2*o[1]/3)+\",\"+a[0]+\",\"+a[1],i=t[1],l=2),e.length>1){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 c=2;c<e.length;c++,l++)a=t[l],s=e[c],n+=\"S\"+(a[0]-s[0])+\",\"+(a[1]-s[1])+\",\"+a[0]+\",\"+a[1]}if(r){var u=t[l];n+=\"Q\"+(a[0]+2*s[0]/3)+\",\"+(a[1]+2*s[1]/3)+\",\"+u[0]+\",\"+u[1]}return n}function Mi(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function ki(t){if(t.length<3)return yi(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,\",\",a,\"L\",Ai(bs,o),\",\",Ai(bs,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Ti(l,o,s);return t.pop(),l.push(\"L\",n),l.join(\"\")}function Ai(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Ti(t,e,r){t.push(\"C\",Ai(ys,e),\",\",Ai(ys,r),\",\",Ai(xs,e),\",\",Ai(xs,r),\",\",Ai(bs,e),\",\",Ai(bs,r))}function Si(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ei(t){for(var e,r,n,i,a=[],o=function(t){for(var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=Si(i,a);++e<r;)n[e]=(o+(o=Si(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;++s<l;)e=Si(t[s],t[s+1]),aa(e)<wa?o[s]=o[s+1]=0:(i=(r=o[s]/e)*r+(n=o[s+1]/e)*n)>9&&(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 Li(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Sa,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function Ci(t){function e(e){function l(){m.push(\"M\",s(t(v),f),u,c(t(g.reverse()),f),\"Z\")}for(var h,d,p,m=[],g=[],v=[],y=-1,x=e.length,b=_t(r),_=_t(i),w=r===n?function(){return d}:_t(n),M=i===a?function(){return p}:_t(a);++y<x;)o.call(this,h=e[y],y)?(g.push([d=+b.call(this,h,y),p=+_.call(this,h,y)]),v.push([+w.call(this,h,y),+M.call(this,h,y)])):g.length&&(l(),g=[],v=[]);return g.length&&l(),m.length?m.join(\"\"):null}var r=ar,n=ar,i=0,a=or,o=ve,s=yi,l=s.key,c=s,u=\"L\",f=.7;return e.x=function(t){return arguments.length?(r=n=t,e):n},e.x0=function(t){return arguments.length?(r=t,e):r},e.x1=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=a=t,e):a},e.y0=function(t){return arguments.length?(i=t,e):i},e.y1=function(t){return arguments.length?(a=t,e):a},e.defined=function(t){return arguments.length?(o=t,e):o},e.interpolate=function(t){return arguments.length?(l=\"function\"==typeof t?s=t:(s=vs.get(t)||yi).key,c=s.reverse||s,u=s.closed?\"M\":\"L\",e):l},e.tension=function(t){return arguments.length?(f=t,e):f},e}function zi(t){return t.radius}function Di(t){return[t.x,t.y]}function Ii(){return 64}function Pi(){return\"circle\"}function Oi(t){var e=Math.sqrt(t/ka);return\"M0,\"+e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+-e+\"A\"+e+\",\"+e+\" 0 1,1 0,\"+e+\"Z\"}function Fi(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Ri(t,e,r){return ua(t,Ss),t.namespace=e,t.id=r,t}function Ni(t,e,r,n){var i=t.id,a=t.namespace;return U(t,\"function\"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function ji(t){return null==t&&(t=\"\"),function(){this.textContent=t}}function Bi(t){return null==t?\"__transition__\":\"__transition_\"+t+\"__\"}function Ui(t,e,r,n,i){function a(t){var e=m.delay;if(u.t=e+l,e<=t)return o(t-e);u.c=o}function o(r){var i=p.active,a=p[i];a&&(a.timer.c=null,a.timer.t=NaN,--p.count,delete p[i],a.event&&a.event.interrupt.call(t,t.__data__,a.index));for(var o in p)if(+o<n){var c=p[o];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[o]}u.c=s,kt(function(){return u.c&&s(r||1)&&(u.c=null,u.t=NaN),1},0,l),p.active=n,m.event&&m.event.start.call(t,t.__data__,e),d=[],m.tween.forEach(function(r,n){(n=n.call(t,t.__data__,e))&&d.push(n)}),h=m.ease,f=m.duration}function s(i){for(var a=i/f,o=h(a),s=d.length;s>0;)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,f,h,d,p=t[r]||(t[r]={active:0,count:0}),m=p[n];m||(l=i.time,u=kt(a,0,l),m=p[n]={tween:new c,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function Vi(t,e,r){t.attr(\"transform\",function(t){var n=e(t);return\"translate(\"+(isFinite(n)?n:r(t))+\",0)\"})}function qi(t,e,r){t.attr(\"transform\",function(t){var n=e(t);return\"translate(0,\"+(isFinite(n)?n:r(t))+\")\"})}function Hi(t){return t.toISOString()}function Gi(t,e,r){function n(e){return t(e)}function i(t,r){var n=(t[1]-t[0])/r,i=Zi.bisect(Fs,n);return i==Fs.length?[e.year,Kn(t.map(function(t){return t/31536e6}),r)[2]]:i?e[n/Fs[i-1]<Fs[i]/n?i-1:i]:[js,Kn(t,r)[2]]}return n.invert=function(e){return Yi(t.invert(e))},n.domain=function(e){return arguments.length?(t.domain(e),n):t.domain().map(Yi)},n.nice=function(t,e){function r(r){return!isNaN(r)&&!t.range(r,Yi(+r+1),e).length}var a=n.domain(),o=Hn(a),s=null==t?i(o,10):\"number\"==typeof t&&i(o,t);return s&&(t=s[0],e=s[1]),n.domain(Yn(a,e>1?{floor:function(e){for(;r(e=t.floor(e));)e=Yi(e-1);return e},ceil:function(e){for(;r(e=t.ceil(e));)e=Yi(+e+1);return e}}:t))},n.ticks=function(t,e){var r=Hn(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],Yi(+r[1]+1),e<1?1:e)},n.tickFormat=function(){return r},n.copy=function(){return Gi(t.copy(),e,r)},Zn(n,t)}function Yi(t){return new Date(t)}function Wi(t){return JSON.parse(t.responseText)}function Xi(t){var e=Qi.createRange();return e.selectNode(Qi.body),e.createContextualFragment(t.responseText)}var Zi={version:\"3.5.17\"},Ji=[].slice,Ki=function(t){return Ji.call(t)},Qi=this.document;if(Qi)try{Ki(Qi.documentElement.childNodes)[0].nodeType}catch(t){Ki=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}),Qi)try{Qi.createElement(\"DIV\").style.setProperty(\"opacity\",0,\"\")}catch(t){var $i=this.Element.prototype,ta=$i.setAttribute,ea=$i.setAttributeNS,ra=this.CSSStyleDeclaration.prototype,na=ra.setProperty;$i.setAttribute=function(t,e){ta.call(this,t,e+\"\")},$i.setAttributeNS=function(t,e,r){ea.call(this,t,e,r+\"\")},ra.setProperty=function(t,e,r){na.call(this,t,e+\"\",r)}}Zi.ascending=n,Zi.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Zi.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},Zi.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},Zi.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},Zi.sum=function(t,e){var r,n=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)a(r=+t[o])&&(n+=r);else for(;++o<i;)a(r=+e.call(t,t[o],o))&&(n+=r);return n},Zi.mean=function(t,e){var r,n=0,o=t.length,s=-1,l=o;if(1===arguments.length)for(;++s<o;)a(r=i(t[s]))?n+=r:--l;else for(;++s<o;)a(r=i(e.call(t,t[s],s)))?n+=r:--l;if(l)return n/l},Zi.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},Zi.median=function(t,e){var r,o=[],s=t.length,l=-1;if(1===arguments.length)for(;++l<s;)a(r=i(t[l]))&&o.push(r);else for(;++l<s;)a(r=i(e.call(t,t[l],l)))&&o.push(r);if(o.length)return Zi.quantile(o.sort(n),.5)},Zi.variance=function(t,e){var r,n,o=t.length,s=0,l=0,c=-1,u=0;if(1===arguments.length)for(;++c<o;)a(r=i(t[c]))&&(l+=(n=r-s)*(r-(s+=n/++u)));else for(;++c<o;)a(r=i(e.call(t,t[c],c)))&&(l+=(n=r-s)*(r-(s+=n/++u)));if(u>1)return l/(u-1)},Zi.deviation=function(){var t=Zi.variance.apply(this,arguments);return t?Math.sqrt(t):t};var ia=o(n);Zi.bisectLeft=ia.left,Zi.bisect=Zi.bisectRight=ia.right,Zi.bisector=function(t){return o(1===t.length?function(e,r){return n(t(e),r)}:t)},Zi.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},Zi.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},Zi.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},Zi.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,r=Zi.min(t,s),n=new Array(r);++e<r;)for(var i,a=-1,o=n[e]=new Array(i);++a<i;)o[a]=t[a][e];return n},Zi.zip=function(){return Zi.transpose(arguments)},Zi.keys=function(t){var e=[];for(var r in t)e.push(r);return e},Zi.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},Zi.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Zi.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var aa=Math.abs;Zi.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=function(t){for(var e=1;t*e%1;)e*=10;return e}(aa(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},Zi.map=function(t,e){var r=new c;if(t instanceof c)t.forEach(function(t,e){r.set(t,e)});else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var oa=\"__proto__\",sa=\"\\0\";l(c,{has:h,get:function(t){return this._[u(t)]},set:function(t,e){return this._[u(t)]=e},remove:d,keys:p,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:f(e),value:this._[e]});return t},size:m,empty:g,forEach:function(t){for(var e in this._)t.call(this,f(e),this._[e])}}),Zi.nest=function(){function t(e,o,s){if(s>=a.length)return n?n.call(i,o):r?o.sort(r):o;for(var l,u,f,h,d=-1,p=o.length,m=a[s++],g=new c;++d<p;)(h=g.get(l=m(u=o[d])))?h.push(u):g.set(l,[u]);return e?(u=e(),f=function(r,n){u.set(r,t(e,n,s))}):(u={},f=function(r,n){u[r]=t(e,n,s)}),g.forEach(f),u}function e(t,r){if(r>=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(Zi.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},Zi.set=function(t){var e=new v;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},l(v,{has:h,add:function(t){return this._[u(t+=\"\")]=!0,t},remove:d,values:p,size:m,empty:g,forEach:function(t){for(var e in this._)t.call(this,f(e))}}),Zi.behavior={},Zi.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=function(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}(t,e,e[r]);return t};var la=[\"webkit\",\"ms\",\"moz\",\"Moz\",\"o\",\"O\"];Zi.dispatch=function(){for(var t=new _,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t},_.prototype.on=function(t,e){var r=t.indexOf(\".\"),n=\"\";if(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}},Zi.event=null,Zi.requote=function(t){return t.replace(ca,\"\\\\$&\")};var ca=/[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g,ua={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]},fa=function(t,e){return e.querySelector(t)},ha=function(t,e){return e.querySelectorAll(t)},da=function(t,e){var r=t.matches||t[x(t,\"matchesSelector\")];return(da=function(t,e){return r.call(t,e)})(t,e)};\"function\"==typeof Sizzle&&(fa=function(t,e){return Sizzle(t,e)[0]||null},ha=Sizzle,da=Sizzle.matchesSelector),Zi.selection=function(){return Zi.select(Qi.documentElement)};var pa=Zi.selection.prototype=[];pa.select=function(t){var e,r,n,i,a=[];t=S(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l<c;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&\"__data__\"in i&&(r.__data__=i.__data__)):e.push(null)}return T(a)},pa.selectAll=function(t){var e,r,n=[];t=E(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],s=-1,l=o.length;++s<l;)(r=o[s])&&(n.push(e=Ki(t.call(r,r.__data__,s,i))),e.parentNode=r);return T(n)};var ma=\"http://www.w3.org/1999/xhtml\",ga={svg:\"http://www.w3.org/2000/svg\",xhtml:ma,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};Zi.ns={prefix:ga,qualify:function(t){var e=t.indexOf(\":\"),r=t;return e>=0&&\"xmlns\"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),ga.hasOwnProperty(r)?{space:ga[r],local:t}:t}},pa.attr=function(t,e){if(arguments.length<2){if(\"string\"==typeof t){var r=this.node();return(t=Zi.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(L(e,t[e]));return this}return this.each(L(t,e))},pa.classed=function(t,e){if(arguments.length<2){if(\"string\"==typeof t){var r=this.node(),n=(t=D(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute(\"class\");++i<n;)if(!z(t[i]).test(e))return!1;return!0}for(e in t)this.each(I(e,t[e]));return this}return this.each(I(t,e))},pa.style=function(t,e,n){var i=arguments.length;if(i<3){if(\"string\"!=typeof t){i<2&&(e=\"\");for(n in t)this.each(O(n,t[n],e));return this}if(i<2){var a=this.node();return r(a).getComputedStyle(a,null).getPropertyValue(t)}n=\"\"}return this.each(O(t,e,n))},pa.property=function(t,e){if(arguments.length<2){if(\"string\"==typeof t)return this.node()[t];for(e in t)this.each(F(e,t[e]));return this}return this.each(F(t,e))},pa.text=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?\"\":e}:null==t?function(){this.textContent=\"\"}:function(){this.textContent=t}):this.node().textContent},pa.html=function(t){return arguments.length?this.each(\"function\"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?\"\":e}:null==t?function(){this.innerHTML=\"\"}:function(){this.innerHTML=t}):this.node().innerHTML},pa.append=function(t){return t=R(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},pa.insert=function(t,e){return t=R(t),e=S(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},pa.remove=function(){return this.each(N)},pa.data=function(t,e){function r(t,r){var n,i,a,o=t.length,f=r.length,h=Math.min(o,f),d=new Array(f),p=new Array(f),m=new Array(o);if(e){var g,v=new c,y=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(v.has(g=e.call(i,i.__data__,n))?m[n]=i:v.set(g,i),y[n]=g);for(n=-1;++n<f;)(i=v.get(g=e.call(r,a=r[n],n)))?!0!==i&&(d[n]=i,i.__data__=a):p[n]=j(a),v.set(g,!0);for(n=-1;++n<o;)n in y&&!0!==v.get(y[n])&&(m[n]=t[n])}else{for(n=-1;++n<h;)i=t[n],a=r[n],i?(i.__data__=a,d[n]=i):p[n]=j(a);for(;n<f;++n)p[n]=j(r[n]);for(;n<o;++n)m[n]=t[n]}p.update=d,p.parentNode=d.parentNode=m.parentNode=t.parentNode,s.push(p),l.push(d),u.push(m)}var n,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(n=this[0]).length);++a<o;)(i=n[a])&&(t[a]=i.__data__);return t}var s=V([]),l=T([]),u=T([]);if(\"function\"==typeof t)for(;++a<o;)r(n=this[a],t.call(n,n.parentNode.__data__,a));else for(;++a<o;)r(n=this[a],t);return l.enter=function(){return s},l.exit=function(){return u},l},pa.datum=function(t){return arguments.length?this.property(\"__data__\",t):this.property(\"__data__\")},pa.filter=function(t){var e,r,n,i=[];\"function\"!=typeof t&&(t=B(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return T(i)},pa.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},pa.sort=function(t){t=function(t){return arguments.length||(t=n),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},pa.each=function(t){return U(this,function(e,r,n){t.call(e,e.__data__,r,n)})},pa.call=function(t){var e=Ki(arguments);return t.apply(e[0]=this,e),this},pa.empty=function(){return!this.node()},pa.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},pa.size=function(){var t=0;return U(this,function(){++t}),t};var va=[];Zi.selection.enter=V,Zi.selection.enter.prototype=va,va.append=pa.append,va.empty=pa.empty,va.node=pa.node,va.call=pa.call,va.size=pa.size,va.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(a=i[c])?(e.push(n[c]=r=t.call(i.parentNode,a.__data__,c,s)),r.__data__=a.__data__):e.push(null)}return T(o)},va.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,r;return function(n,i,a){var o,s=t[a].update,l=s.length;for(a!=r&&(r=a,e=0),i>=e&&(e=i+1);!(o=s[e])&&++e<l;);return o}}(this)),pa.insert.call(this,t,e)},Zi.select=function(e){var r;return\"string\"==typeof e?(r=[fa(e,Qi)]).parentNode=Qi.documentElement:(r=[e]).parentNode=t(e),T([r])},Zi.selectAll=function(t){var e;return\"string\"==typeof t?(e=Ki(ha(t,Qi))).parentNode=Qi.documentElement:(e=Ki(t)).parentNode=null,T([e])},pa.on=function(t,e,r){var n=arguments.length;if(n<3){if(\"string\"!=typeof t){n<2&&(e=!1);for(r in t)this.each(q(r,t[r],e));return this}if(n<2)return(n=this.node()[\"__on\"+t])&&n._;r=!1}return this.each(q(t,e,r))};var ya=Zi.map({mouseenter:\"mouseover\",mouseleave:\"mouseout\"});Qi&&ya.forEach(function(t){\"on\"+t in Qi&&ya.remove(t)});var xa,ba=0;Zi.mouse=function(t){return W(t,k())};var _a=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;Zi.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=k().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return W(t,n)},Zi.behavior.drag=function(){function t(){this.on(\"mousedown.drag\",a).on(\"touchstart.drag\",o)}function e(t,e,r,a,o){return function(){var s,l=Zi.event.target.correspondingElement||Zi.event.target,c=this.parentNode,u=n.of(this,arguments),f=0,h=t(),d=\".drag\"+(null==h?\"\":\"-\"+h),p=Zi.select(r(l)).on(a+d,function(){var t,r,n=e(c,h);n&&(t=n[0]-g[0],r=n[1]-g[1],f|=t|r,g=n,u({type:\"drag\",x:n[0]+s[0],y:n[1]+s[1],dx:t,dy:r}))}).on(o+d,function(){e(c,h)&&(p.on(a+d,null).on(o+d,null),m(f),u({type:\"dragend\"}))}),m=Y(l),g=e(c,h);s=i?[(s=i.apply(this,arguments)).x-g[0],s.y-g[1]]:[0,0],u({type:\"dragstart\"})}}var n=A(t,\"drag\",\"dragstart\",\"dragend\"),i=null,a=e(b,Zi.mouse,r,\"mousemove\",\"mouseup\"),o=e(X,Zi.touch,y,\"touchmove\",\"touchend\");return t.origin=function(e){return arguments.length?(i=e,t):i},Zi.rebind(t,n,\"on\")},Zi.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?Ki(e).map(function(e){var r=W(t,e);return r.identifier=e.identifier,r}):[]};var wa=1e-6,Ma=wa*wa,ka=Math.PI,Aa=2*ka,Ta=Aa-wa,Sa=ka/2,Ea=ka/180,La=180/ka,Ca=Math.SQRT2;Zi.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<Ma)n=Math.log(c/o)/Ca,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Ca*t*n)]};else{var d=Math.sqrt(h),p=(c*c-o*o+4*h)/(2*o*2*d),m=(c*c-o*o-4*h)/(2*c*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Ca,r=function(t){var e=t*n,r=$(g),s=o/(2*d)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Ca*e+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+s*u,a+s*f,o*r/$(Ca*e+g)]}}return r.duration=1e3*n,r},Zi.behavior.zoom=function(){function t(t){t.on(C,u).on(Da+\".zoom\",h).on(\"dblclick.zoom\",d).on(I,f)}function e(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function n(t){k.k=Math.max(S[0],Math.min(S[1],t))}function i(t,e){e=function(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function a(e,r,a,o){e.__chart__={x:k.x,y:k.y,k:k.k},n(Math.pow(2,o)),i(m=r,a),e=Zi.select(e),E>0&&(e=e.transition().duration(E)),e.call(t.event)}function o(){b&&b.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(t){return(t-k.y)/k.k}).map(_.invert))}function s(t){L++||t({type:\"zoomstart\"})}function l(t){o(),t({type:\"zoom\",scale:k.k,translate:[k.x,k.y]})}function c(t){--L||(t({type:\"zoomend\"}),m=null)}function u(){var t=this,n=P.of(t,arguments),a=0,o=Zi.select(r(t)).on(z,function(){a=1,i(Zi.mouse(t),u),l(n)}).on(D,function(){o.on(z,null).on(D,null),f(a),c(n)}),u=e(Zi.mouse(t)),f=Y(t);Ts.call(t),s(n)}function f(){function t(){var t=Zi.touches(p);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function r(){var e=Zi.event.target;Zi.select(e).on(b,o).on(_,h),w.push(e);for(var r=Zi.event.changedTouches,n=0,i=r.length;n<i;++n)g[r[n].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(l-y<500){var c=s[0];a(p,c,g[c.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),M()}y=l}else if(s.length>1){c=s[0];var u=s[1],f=c[0]-u[0],d=c[1]-u[1];v=f*f+d*d}}function o(){var t,e,r,a,o=Zi.touches(p);Ts.call(p);for(var s=0,c=o.length;s<c;++s,a=null)if(r=o[s],a=g[r.identifier]){if(e)break;t=r,e=a}if(a){var u=(u=r[0]-t[0])*u+(u=r[1]-t[1])*u,f=v&&Math.sqrt(u/v);t=[(t[0]+r[0])/2,(t[1]+r[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],n(f*d)}y=null,i(t,e),l(m)}function h(){if(Zi.event.touches.length){for(var e=Zi.event.changedTouches,r=0,n=e.length;r<n;++r)delete g[e[r].identifier];for(var i in g)return void t()}Zi.selectAll(w).on(x,null),A.on(C,u).on(I,f),T(),c(m)}var d,p=this,m=P.of(p,arguments),g={},v=0,x=\".zoom-\"+Zi.event.changedTouches[0].identifier,b=\"touchmove\"+x,_=\"touchend\"+x,w=[],A=Zi.select(p),T=Y(p);r(),s(m),A.on(C,null).on(I,r)}function h(){var t=P.of(this,arguments);v?clearTimeout(v):(Ts.call(this),p=e(m=g||Zi.mouse(this)),s(t)),v=setTimeout(function(){v=null,c(t)},50),M(),n(Math.pow(2,.002*za())*k.k),i(m,p),l(t)}function d(){var t=Zi.mouse(this),r=Math.log(k.k)/Math.LN2;a(this,t,e(t),Zi.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}var p,m,g,v,y,x,b,_,w,k={x:0,y:0,k:1},T=[960,500],S=Ia,E=250,L=0,C=\"mousedown.zoom\",z=\"mousemove.zoom\",D=\"mouseup.zoom\",I=\"touchstart.zoom\",P=A(t,\"zoomstart\",\"zoom\",\"zoomend\");return Da||(Da=\"onwheel\"in Qi?(za=function(){return-Zi.event.deltaY*(Zi.event.deltaMode?120:1)},\"wheel\"):\"onmousewheel\"in Qi?(za=function(){return Zi.event.wheelDelta},\"mousewheel\"):(za=function(){return-Zi.event.detail},\"MozMousePixelScroll\")),t.event=function(t){t.each(function(){var t=P.of(this,arguments),e=k;ks?Zi.select(this).transition().each(\"start.zoom\",function(){k=this.__chart__||{x:0,y:0,k:1},s(t)}).tween(\"zoom:zoom\",function(){var r=T[0],n=T[1],i=m?m[0]:r/2,a=m?m[1]:n/2,o=Zi.interpolateZoom([(i-k.x)/k.k,(a-k.y)/k.k,r/k.k],[(i-e.x)/e.k,(a-e.y)/e.k,r/e.k]);return function(e){var n=o(e),s=r/n[2];this.__chart__=k={x:i-n[0]*s,y:a-n[1]*s,k:s},l(t)}}).each(\"interrupt.zoom\",function(){c(t)}).each(\"end.zoom\",function(){c(t)}):(this.__chart__=k,s(t),l(t),c(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},o(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:null},n(+e),o(),t):k.k},t.scaleExtent=function(e){return arguments.length?(S=null==e?Ia:[+e[0],+e[1]],t):S},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(T=e&&[+e[0],+e[1]],t):T},t.duration=function(e){return arguments.length?(E=+e,t):E},t.x=function(e){return arguments.length?(b=e,x=e.copy(),k={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(w=e,_=e.copy(),k={x:0,y:0,k:1},t):w},Zi.rebind(t,P,\"on\")};var za,Da,Ia=[0,1/0];Zi.color=et,et.prototype.toString=function(){return this.rgb()+\"\"},Zi.hsl=rt;var Pa=rt.prototype=new et;Pa.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new rt(this.h,this.s,this.l/t)},Pa.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new rt(this.h,this.s,t*this.l)},Pa.rgb=function(){return nt(this.h,this.s,this.l)},Zi.hcl=it;var Oa=it.prototype=new et;Oa.brighter=function(t){return new it(this.h,this.c,Math.min(100,this.l+Fa*(arguments.length?t:1)))},Oa.darker=function(t){return new it(this.h,this.c,Math.max(0,this.l-Fa*(arguments.length?t:1)))},Oa.rgb=function(){return at(this.h,this.c,this.l).rgb()},Zi.lab=ot;var Fa=18,Ra=.95047,Na=1,ja=1.08883,Ba=ot.prototype=new et;Ba.brighter=function(t){return new ot(Math.min(100,this.l+Fa*(arguments.length?t:1)),this.a,this.b)},Ba.darker=function(t){return new ot(Math.max(0,this.l-Fa*(arguments.length?t:1)),this.a,this.b)},Ba.rgb=function(){return st(this.l,this.a,this.b)},Zi.rgb=ht;var Ua=ht.prototype=new et;Ua.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b;return e||r||n?(e&&e<30&&(e=30),r&&r<30&&(r=30),n&&n<30&&(n=30),new ht(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ht(30,30,30)},Ua.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ht(t*this.r,t*this.g,t*this.b)},Ua.hsl=function(){return vt(this.r,this.g,this.b)},Ua.toString=function(){return\"#\"+mt(this.r)+mt(this.g)+mt(this.b)};var Va=Zi.map({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});Va.forEach(function(t,e){Va.set(t,dt(e))}),Zi.functor=_t,Zi.xhr=wt(y),Zi.dsv=function(t,e){function r(t,r,a){arguments.length<3&&(a=r,r=null);var o=Mt(t,e,null==r?n:i(r),a);return o.row=function(t){return arguments.length?o.response(null==(r=t)?n:i(t)):r},o}function n(t){return r.parse(t.responseText)}function i(t){return function(e){return r.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return s.test(t)?'\"'+t.replace(/\\\"/g,'\"\"')+'\"':t}var s=new RegExp('[\"'+t+\"\\n]\"),l=t.charCodeAt(0);return r.parse=function(t,e){var n;return r.parseRows(t,function(t,r){if(n)return n(t,r-1);var i=new Function(\"d\",\"return {\"+t.map(function(t,e){return JSON.stringify(t)+\": d[\"+e+\"]\"}).join(\",\")+\"}\");n=e?function(t,r){return e(i(t),r)}:i})},r.parseRows=function(t,e){function r(){if(u>=c)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++<c;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}u=r+2;return 13===(n=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++u):10===n&&(i=!0),t.slice(e+1,r).replace(/\"\"/g,'\"')}for(;u<c;){var n,s=1;if(10===(n=t.charCodeAt(u++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(u)&&(++u,++s);else if(n!==l)continue;return t.slice(e,u-s)}return t.slice(e)}for(var n,i,a={},o={},s=[],c=t.length,u=0,f=0;(n=r())!==o;){for(var h=[];n!==a&&n!==o;)h.push(n),n=r();e&&null==(h=e(h,f++))||s.push(h)}return s},r.format=function(e){if(Array.isArray(e[0]))return r.formatRows(e);var n=new v,i=[];return e.forEach(function(t){for(var e in t)n.has(e)||i.push(n.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join(\"\\n\")},r.formatRows=function(t){return t.map(a).join(\"\\n\")},r},Zi.csv=Zi.dsv(\",\",\"text/csv\"),Zi.tsv=Zi.dsv(\"\\t\",\"text/tab-separated-values\");var qa,Ha,Ga,Ya,Wa=this[x(this,\"requestAnimationFrame\")]||function(t){setTimeout(t,17)};Zi.timer=function(){kt.apply(this,arguments)},Zi.timer.flush=function(){Tt(),St()},Zi.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Xa=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\\xb5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(function(t,e){var r=Math.pow(10,3*aa(8-e));return{scale:e>8?function(t){return t/r}:function(t){return t*r},symbol:t}});Zi.formatPrefix=function(t,e){var r=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=Zi.round(t,Et(t,e))),r=1+Math.floor(1e-12+Math.log(t)/Math.LN10),r=Math.max(-24,Math.min(24,3*Math.floor((r-1)/3)))),Xa[8+r/3]};var Za=/(?:([^{])?([<>=^]))?([+\\- ])?([$#])?(0)?(\\d+)?(,)?(\\.-?\\d+)?([a-z%])?/i,Ja=Zi.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=Zi.round(t,Et(t,e))).toFixed(Math.max(0,Math.min(20,Et(t*(1+1e-15),e))))}}),Ka=Zi.time={},Qa=Date;Lt.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(){$a.setUTCDate.apply(this._,arguments)},setDay:function(){$a.setUTCDay.apply(this._,arguments)},setFullYear:function(){$a.setUTCFullYear.apply(this._,arguments)},setHours:function(){$a.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){$a.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){$a.setUTCMinutes.apply(this._,arguments)},setMonth:function(){$a.setUTCMonth.apply(this._,arguments)},setSeconds:function(){$a.setUTCSeconds.apply(this._,arguments)},setTime:function(){$a.setTime.apply(this._,arguments)}};var $a=Date.prototype;Ka.year=Ct(function(t){return(t=Ka.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),Ka.years=Ka.year.range,Ka.years.utc=Ka.year.utc.range,Ka.day=Ct(function(t){var e=new Qa(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}),Ka.days=Ka.day.range,Ka.days.utc=Ka.day.utc.range,Ka.dayOfYear=function(t){var e=Ka.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=Ka[t]=Ct(function(t){return(t=Ka.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=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)-(r!==e)});Ka[t+\"s\"]=r.range,Ka[t+\"s\"].utc=r.utc.range,Ka[t+\"OfYear\"]=function(t){var r=Ka.year(t).getDay();return Math.floor((Ka.dayOfYear(t)+(r+e)%7)/7)}}),Ka.week=Ka.sunday,Ka.weeks=Ka.sunday.range,Ka.weeks.utc=Ka.sunday.utc.range,Ka.weekOfYear=Ka.sundayOfYear;var to={\"-\":\"\",_:\" \",0:\"0\"},eo=/^\\s*\\d+/,ro=/^%/;Zi.locale=function(t){return{numberFormat:function(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)}:y;return function(t){var r=Za.exec(t),n=r[1]||\" \",o=r[2]||\">\",s=r[3]||\"-\",l=r[4]||\"\",c=r[5],u=+r[6],f=r[7],h=r[8],d=r[9],p=1,m=\"\",g=\"\",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(c||\"0\"===n&&\"=\"===o)&&(c=n=\"0\",o=\"=\"),d){case\"n\":f=!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,h=0;break;case\"s\":p=-1,d=\"r\"}\"$\"===l&&(m=i[0],g=i[1]),\"r\"!=d||h||(d=\"g\"),null!=h&&(\"g\"==d?h=Math.max(1,Math.min(21,h)):\"e\"!=d&&\"f\"!=d||(h=Math.max(0,Math.min(20,h)))),d=Ja.get(d)||function(t){return t+\"\"};var x=c&&f;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=Zi.formatPrefix(t,h);t=l.scale(t),r=l.symbol+g}else t*=p;var b,_,w=(t=d(t,h)).lastIndexOf(\".\");if(w<0){var M=y?t.lastIndexOf(\"e\"):-1;M<0?(b=t,_=\"\"):(b=t.substring(0,M),_=t.substring(M))}else b=t.substring(0,w),_=e+t.substring(w+1);!c&&f&&(b=a(b,1/0));var k=m.length+b.length+_.length+(x?0:i.length),A=k<u?new Array(k=u-k+1).join(n):\"\";return x&&(b=a(A+b,A.length?u-_.length:1/0)),i+=m,t=b+_,(\"<\"===o?i+t+A:\">\"===o?A+i+t:\"^\"===o?A.substring(0,k>>=1)+i+t+A.substring(k):i+(x?t:A+t))+r}}}(t),timeFormat:function(t){function e(t){function e(e){for(var r,i,a,o=[],s=-1,l=0;++s<n;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=to[r=t.charAt(++s)])&&(r=t.charAt(++s)),(a=b[r])&&(r=a(e,null==i?\"e\"===r?\" \":\"0\":i)),o.push(r),l=s+1);return o.push(t.slice(l,s)),o.join(\"\")}var n=t.length;return e.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(r(n,t,e,0)!=e.length)return null;\"p\"in n&&(n.H=n.H%12+12*n.p);var i=null!=n.Z&&Qa!==Lt,a=new(i?Lt:Qa);return\"j\"in n?a.setFullYear(n.y,0,n.j):\"W\"in n||\"U\"in n?(\"w\"in n||(n.w=\"W\"in n?1:0),a.setFullYear(n.y,0,1),a.setFullYear(n.y,0,\"W\"in n?(n.w+6)%7+7*n.W-(a.getDay()+5)%7:n.w+7*n.U-(a.getDay()+6)%7)):a.setFullYear(n.y,n.m,n.d),a.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),i?a._:a},e.toString=function(){return t},e}function r(t,e,r,n){for(var i,a,o,s=0,l=e.length,c=r.length;s<l;){if(n>=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=_[o in to?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}var n=t.dateTime,i=t.date,a=t.time,o=t.periods,s=t.days,l=t.shortDays,c=t.months,u=t.shortMonths;e.multi=(e.utc=function(t){function r(t){try{var e=new(Qa=Lt);return e._=t,n(e)}finally{Qa=Date}}var n=e(t);return r.parse=function(t){try{Qa=Lt;var e=n.parse(t);return e&&e._}finally{Qa=Date}},r.toString=n.toString,r}).multi=Jt;var f=Zi.map(),h=It(s),d=Pt(s),p=It(l),m=Pt(l),g=It(c),v=Pt(c),y=It(u),x=Pt(u);o.forEach(function(t,e){f.set(t.toLowerCase(),e)});var b={a:function(t){return l[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return c[t.getMonth()]},c:e(n),d:function(t,e){return Dt(t.getDate(),e,2)},e:function(t,e){return Dt(t.getDate(),e,2)},H:function(t,e){return Dt(t.getHours(),e,2)},I:function(t,e){return Dt(t.getHours()%12||12,e,2)},j:function(t,e){return Dt(1+Ka.dayOfYear(t),e,3)},L:function(t,e){return Dt(t.getMilliseconds(),e,3)},m:function(t,e){return Dt(t.getMonth()+1,e,2)},M:function(t,e){return Dt(t.getMinutes(),e,2)},p:function(t){return o[+(t.getHours()>=12)]},S:function(t,e){return Dt(t.getSeconds(),e,2)},U:function(t,e){return Dt(Ka.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Dt(Ka.mondayOfYear(t),e,2)},x:e(i),X:e(a),y:function(t,e){return Dt(t.getFullYear()%100,e,2)},Y:function(t,e){return Dt(t.getFullYear()%1e4,e,4)},Z:Xt,\"%\":function(){return\"%\"}},_={a:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){h.lastIndex=0;var n=h.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){y.lastIndex=0;var n=y.exec(e.slice(r));return n?(t.m=x.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,n){return r(t,b.c.toString(),e,n)},d:Vt,e:Vt,H:Ht,I:Ht,j:qt,L:Wt,m:Ut,M:Gt,p:function(t,e,r){var n=f.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:Yt,U:Ft,w:Ot,W:Rt,x:function(t,e,n){return r(t,b.x.toString(),e,n)},X:function(t,e,n){return r(t,b.X.toString(),e,n)},y:jt,Y:Nt,Z:Bt,\"%\":Zt};return e}(t)}};var no=Zi.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\"]});Zi.format=no.numberFormat,Zi.geo={},Kt.prototype={s:0,t:0,add:function(t){Qt(t,this.t,io),Qt(io.s,this.s,this),this.s?this.t+=io.t:this.s=io.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var io=new Kt;Zi.geo.stream=function(t,e){t&&ao.hasOwnProperty(t.type)?ao[t.type](t,e):$t(t,e)};var ao={Feature:function(t,e){$t(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)$t(r[n].geometry,e)}},oo={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){te(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)te(r[n],e,0)},Polygon:function(t,e){ee(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)ee(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)$t(r[n],e)}};Zi.geo.area=function(t){return so=0,Zi.geo.stream(t,co),so};var so,lo=new Kt,co={sphere:function(){so+=4*ka},point:b,lineStart:b,lineEnd:b,polygonStart:function(){lo.reset(),co.lineStart=re},polygonEnd:function(){var t=2*lo;so+=t<0?4*ka+t:t,co.lineStart=co.lineEnd=co.point=b}};Zi.geo.bounds=function(){function t(t,e){x.push(b=[u=t,h=t]),e<f&&(f=e),e>d&&(d=e)}function e(e,r){var n=ne([e*Ea,r*Ea]);if(v){var i=ae(v,n),a=ae([i[1],-i[0],0],i);le(a),a=ce(a);var o=e-p,l=o>0?1:-1,c=a[0]*La*l,m=aa(o)>180;if(m^(l*p<c&&c<l*e)){(g=a[1]*La)>d&&(d=g)}else if(c=(c+360)%360-180,m^(l*p<c&&c<l*e)){var g;(g=-a[1]*La)<f&&(f=g)}else r<f&&(f=r),r>d&&(d=r);m?e<p?s(u,e)>s(u,h)&&(h=e):s(e,h)>s(u,h)&&(u=e):h>=u?(e<u&&(u=e),e>h&&(h=e)):e>p?s(u,e)>s(u,h)&&(h=e):s(e,h)>s(u,h)&&(u=e)}else t(e,r);v=n,p=e}function r(){_.point=e}function n(){b[0]=u,b[1]=h,_.point=t,v=null}function i(t,r){if(v){var n=t-p;y+=aa(n)>180?n+(n>0?360:-360):n}else m=t,g=r;co.point(t,r),e(t,r)}function a(){co.lineStart()}function o(){i(m,g),co.lineEnd(),aa(y)>wa&&(u=-(h=180)),b[0]=u,b[1]=h,v=null}function s(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var u,f,h,d,p,m,g,v,y,x,b,_={point:t,lineStart:r,lineEnd:n,polygonStart:function(){_.point=i,_.lineStart=a,_.lineEnd=o,y=0,co.polygonStart()},polygonEnd:function(){co.polygonEnd(),_.point=t,_.lineStart=r,_.lineEnd=n,lo<0?(u=-(h=180),f=-(d=90)):y>wa?d=90:y<-wa&&(f=-90),b[0]=u,b[1]=h}};return function(t){d=h=-(u=f=1/0),x=[],Zi.geo.stream(t,_);if(i=x.length){x.sort(l);for(var e=1,r=[p=x[0]];e<i;++e)c((a=x[e])[0],p)||c(a[1],p)?(s(p[0],a[1])>s(p[0],p[1])&&(p[1]=a[1]),s(a[0],p[1])>s(p[0],p[1])&&(p[0]=a[0])):r.push(p=a);for(var n,i,a,o=-1/0,p=(e=0,r[i=r.length-1]);e<=i;p=a,++e)a=r[e],(n=s(p[1],a[0]))>o&&(o=n,u=a[0],h=p[1])}return x=b=null,u===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[u,f],[h,d]]}}(),Zi.geo.centroid=function(t){uo=fo=ho=po=mo=go=vo=yo=xo=bo=_o=0,Zi.geo.stream(t,wo);var e=xo,r=bo,n=_o,i=e*e+r*r+n*n;return i<Ma&&(e=go,r=vo,n=yo,fo<wa&&(e=ho,r=po,n=mo),(i=e*e+r*r+n*n)<Ma)?[NaN,NaN]:[Math.atan2(r,e)*La,Q(n/Math.sqrt(i))*La]};var uo,fo,ho,po,mo,go,vo,yo,xo,bo,_o,wo={sphere:b,point:fe,lineStart:de,lineEnd:pe,polygonStart:function(){wo.lineStart=me},polygonEnd:function(){wo.lineStart=de}},Mo=_e(ve,function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?ka:-ka,l=aa(a-r);aa(l-ka)<wa?(t.point(r,n=(n+o)/2>0?Sa:-Sa),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=ka&&(aa(r-i)<wa&&(r-=i*wa),aa(a-s)<wa&&(a-=s*wa),n=function(t,e,r,n){var i,a,o=Math.sin(t-r);return aa(o)>wa?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}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var i;if(null==t)i=r*Sa,n.point(-ka,i),n.point(0,i),n.point(ka,i),n.point(ka,0),n.point(ka,-i),n.point(0,-i),n.point(-ka,-i),n.point(-ka,0),n.point(-ka,i);else if(aa(t[0]-e[0])>wa){var a=t[0]<e[0]?ka:-ka;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])},[-ka,-ka/2]),ko=1e9;Zi.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(s){return arguments.length?(a=Te(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(Zi.geo.conicEqualArea=function(){return Se(Ee)}).raw=Ee,Zi.geo.albers=function(){return Zi.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Zi.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}var e,r,n,i,a=Zi.geo.albers(),o=Zi.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Zi.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};return t.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;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 c=a.scale(),u=+e[0],f=+e[1];return r=a.translate(e).clipExtent([[u-.455*c,f-.238*c],[u+.455*c,f+.238*c]]).stream(l).point,n=o.translate([u-.307*c,f+.201*c]).clipExtent([[u-.425*c+wa,f+.12*c+wa],[u-.214*c-wa,f+.234*c-wa]]).stream(l).point,i=s.translate([u-.205*c,f+.212*c]).clipExtent([[u-.214*c+wa,f+.166*c+wa],[u-.115*c-wa,f+.234*c-wa]]).stream(l).point,t},t.scale(1070)};var Ao,To,So,Eo,Lo,Co,zo={point:b,lineStart:b,lineEnd:b,polygonStart:function(){To=0,zo.lineStart=Le},polygonEnd:function(){zo.lineStart=zo.lineEnd=zo.point=b,Ao+=aa(To/2)}},Do={point:function(t,e){t<So&&(So=t),t>Lo&&(Lo=t),e<Eo&&(Eo=e),e>Co&&(Co=e)},lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Io={point:ze,lineStart:De,lineEnd:Ie,polygonStart:function(){Io.lineStart=Pe},polygonEnd:function(){Io.point=ze,Io.lineStart=De,Io.lineEnd=Ie}};Zi.geo.path=function(){function t(t){return t&&(\"function\"==typeof s&&a.pointRadius(+s.apply(this,arguments)),o&&o.valid||(o=i(a)),Zi.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 Ao=0,Zi.geo.stream(t,i(zo)),Ao},t.centroid=function(t){return ho=po=mo=go=vo=yo=xo=bo=_o=0,Zi.geo.stream(t,i(Io)),_o?[xo/_o,bo/_o]:yo?[go/yo,vo/yo]:mo?[ho/mo,po/mo]:[NaN,NaN]},t.bounds=function(t){return Lo=Co=-(So=Eo=1/0),Zi.geo.stream(t,i(Do)),[[So,Eo],[Lo,Co]]},t.projection=function(t){return arguments.length?(i=(r=t)?t.stream||function(t){var e=Oe(function(e,r){return t([e*La,r*La])});return function(t){return Be(e(t))}}(t):y,e()):r},t.context=function(t){return arguments.length?(a=null==(n=t)?new function(){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=Ce(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=Ce(t),s},result:function(){if(o.length){var t=o.join(\"\");return o=[],t}}};return s}:new function(t){function e(e,r){t.moveTo(e+o,r),t.arc(e,r,o,0,Aa)}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:b};return s}(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(Zi.geo.albersUsa()).context(null)},Zi.geo.transform=function(t){return{stream:function(e){var r=new Fe(e);for(var n in t)r[n]=t[n];return r}}},Fe.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()}},Zi.geo.projection=Ne,Zi.geo.projectionMutator=je,(Zi.geo.equirectangular=function(){return Ne(Ue)}).raw=Ue.invert=Ue,Zi.geo.rotation=function(t){function e(e){return e=t(e[0]*Ea,e[1]*Ea),e[0]*=La,e[1]*=La,e}return t=qe(t[0]%360*Ea,t[1]*Ea,t.length>2?t[2]*Ea:0),e.invert=function(e){return e=t.invert(e[0]*Ea,e[1]*Ea),e[0]*=La,e[1]*=La,e},e},Ve.invert=Ue,Zi.geo.circle=function(){function t(){var t=\"function\"==typeof n?n.apply(this,arguments):n,e=qe(-t[0]*Ea,-t[1]*Ea,0).invert,i=[];return r(null,null,1,{point:function(t,r){i.push(t=e(t,r)),t[0]*=La,t[1]*=La}}),{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=We((e=+n)*Ea,i*Ea),t):e},t.precision=function(n){return arguments.length?(r=We(e*Ea,(i=+n)*Ea),t):i},t.angle(90)},Zi.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Ea,i=t[1]*Ea,a=e[1]*Ea,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},Zi.geo.graticule=function(){function t(){return{type:\"MultiLineString\",coordinates:e()}}function e(){return Zi.range(Math.ceil(a/g)*g,i,g).map(h).concat(Zi.range(Math.ceil(c/v)*v,l,v).map(d)).concat(Zi.range(Math.ceil(n/p)*p,r,p).filter(function(t){return aa(t%g)>wa}).map(u)).concat(Zi.range(Math.ceil(s/m)*m,o,m).filter(function(t){return aa(t%v)>wa}).map(f))}var r,n,i,a,o,s,l,c,u,f,h,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:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).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],c=+e[0][1],l=+e[1][1],a>i&&(e=a,a=i,i=e),c>l&&(e=c,c=l,l=e),t.precision(y)):[[a,c],[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,u=Ze(s,o,90),f=Je(n,r,y),h=Ze(c,l,90),d=Je(a,i,y),t):y},t.majorExtent([[-180,-90+wa],[180,90-wa]]).minorExtent([[-180,-80-wa],[180,80+wa]])},Zi.geo.greatArc=function(){function t(){return{type:\"LineString\",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}var e,r,n=Ke,i=Qe;return t.distance=function(){return Zi.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},Zi.geo.interpolate=function(t,e){return function(t,e,r,n){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),l=i*Math.cos(t),c=i*Math.sin(t),u=o*Math.cos(r),f=o*Math.sin(r),h=2*Math.asin(Math.sqrt(tt(n-e)+i*o*tt(r-t))),d=1/Math.sin(h),p=h?function(t){var e=Math.sin(t*=h)*d,r=Math.sin(h-t)*d,n=r*l+e*u,i=r*c+e*f,o=r*a+e*s;return[Math.atan2(i,n)*La,Math.atan2(o,Math.sqrt(n*n+i*i))*La]}:function(){return[t*La,e*La]};return p.distance=h,p}(t[0]*Ea,t[1]*Ea,e[0]*Ea,e[1]*Ea)},Zi.geo.length=function(t){return Po=0,Zi.geo.stream(t,Oo),Po};var Po,Oo={sphere:b,point:b,lineStart:function(){function t(t,i){var a=Math.sin(i*=Ea),o=Math.cos(i),s=aa((t*=Ea)-e),l=Math.cos(s);Po+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=n*a-r*o*l)*s),r*a+n*o*l),e=t,r=a,n=o}var e,r,n;Oo.point=function(i,a){e=i*Ea,r=Math.sin(a*=Ea),n=Math.cos(a),Oo.point=t},Oo.lineEnd=function(){Oo.point=Oo.lineEnd=b}},lineEnd:b,polygonStart:b,polygonEnd:b},Fo=$e(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Zi.geo.azimuthalEqualArea=function(){return Ne(Fo)}).raw=Fo;var Ro=$e(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},y);(Zi.geo.azimuthalEquidistant=function(){return Ne(Ro)}).raw=Ro,(Zi.geo.conicConformal=function(){return Se(tr)}).raw=tr,(Zi.geo.conicEquidistant=function(){return Se(er)}).raw=er;var No=$e(function(t){return 1/t},Math.atan);(Zi.geo.gnomonic=function(){return Ne(No)}).raw=No,rr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Sa]},(Zi.geo.mercator=function(){return nr(rr)}).raw=rr;var jo=$e(function(){return 1},Math.asin);(Zi.geo.orthographic=function(){return Ne(jo)}).raw=jo;var Bo=$e(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Zi.geo.stereographic=function(){return Ne(Bo)}).raw=Bo,ir.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Sa]},(Zi.geo.transverseMercator=function(){var t=nr(ir),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=ir,Zi.geom={},Zi.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=_t(r),a=_t(n),o=t.length,s=[],l=[];for(e=0;e<o;e++)s.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(s.sort(lr),e=0;e<o;e++)l.push([s[e][0],-s[e][1]]);var c=sr(s),u=sr(l),f=u[0]===c[0],h=u[u.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[s[c[e]][2]]);for(e=+f;e<u.length-h;++e)d.push(t[s[u[e]][2]]);return d}var r=ar,n=or;return arguments.length?e(t):(e.x=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(n=t,e):n},e)},Zi.geom.polygon=function(t){return ua(t,Uo),t};var Uo=Zi.geom.polygon.prototype=[];Uo.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},Uo.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},Uo.clip=function(t){for(var e,r,n,i,a,o,s=fr(t),l=-1,c=this.length-fr(this),u=this[c-1];++l<c;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)cr(o=e[r],u,i)?(cr(a,u,i)||t.push(ur(a,o,u,i)),t.push(o)):cr(a,u,i)&&t.push(ur(a,o,u,i)),a=o;s&&t.push(t[0]),u=i}return t};var Vo,qo,Ho,Go,Yo,Wo=[],Xo=[];vr.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(xr),e.length},Ar.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Tr.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Cr(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(Er(this,r),r=(t=r).U),r.C=!1,n.C=!0,Lr(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(Lr(this,r),r=(t=r).U),r.C=!1,n.C=!0,Er(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?Cr(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Er(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Lr(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Er(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Lr(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Er(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Lr(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},Zi.geom.voronoi=function(t){function e(t){var e=new Array(t.length),n=s[0][0],i=s[0][1],a=s[1][0],o=s[1][1];return zr(r(t),s).cells.forEach(function(r,s){var l=r.edges,c=r.site;(e[s]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=n&&c.x<=a&&c.y>=i&&c.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)/wa)*wa,y:Math.round(o(t,e)/wa)*wa,i:e}})}var n=ar,i=or,a=n,o=i,s=Zo;return t?e(t):(e.links=function(t){return zr(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 zr(r(t)).cells.forEach(function(r,n){for(var i,a=r.site,o=r.edges.sort(xr),s=-1,l=o.length,c=o[l-1].edge,u=c.l===a?c.r:c.l;++s<l;)c,i=u,u=(c=o[s].edge).l===a?c.r:c.l,n<i.i&&n<u.i&&function(t,e,r){return(t.x-r.x)*(e.y-t.y)-(t.x-e.x)*(r.y-t.y)}(a,i,u)<0&&e.push([t[n],t[i.i],t[u.i]])}),e},e.x=function(t){return arguments.length?(a=_t(n=t),e):n},e.y=function(t){return arguments.length?(o=_t(i=t),e):i},e.clipExtent=function(t){return arguments.length?(s=null==t?Zo:t,e):s===Zo?null:s},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):s===Zo?null:s&&s[1]},e)};var Zo=[[-1e6,-1e6],[1e6,1e6]];Zi.geom.delaunay=function(t){return Zi.geom.voronoi().triangles(t)},Zi.geom.quadtree=function(t,e,r,n,i){function a(t){function a(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(aa(l-r)+aa(u-n)<.01)c(t,e,r,n,i,a,o,s);else{var f=t.point;t.x=t.y=t.point=null,c(t,f,l,u,i,a,o,s),c(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else c(t,e,r,n,i,a,o,s)}function c(t,e,r,n,i,o,s,l){var c=.5*(i+s),u=.5*(o+l),f=r>=c,h=n>=u,d=h<<1|f;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),f?i=c:s=c,h?o=u:l=u,a(t,e,r,n,i,o,s,l)}var u,f,h,d,p,m,g,v,y,x=_t(s),b=_t(l);if(null!=e)m=e,g=r,v=n,y=i;else if(v=y=-(m=g=1/0),f=[],h=[],p=t.length,o)for(d=0;d<p;++d)(u=t[d]).x<m&&(m=u.x),u.y<g&&(g=u.y),u.x>v&&(v=u.x),u.y>y&&(y=u.y),f.push(u.x),h.push(u.y);else for(d=0;d<p;++d){var _=+x(u=t[d],d),w=+b(u,d);_<m&&(m=_),w<g&&(g=w),_>v&&(v=_),w>y&&(y=w),f.push(_),h.push(w)}var M=v-m,k=y-g;M>k?y=g+M:v=m+k;var A={leaf:!0,nodes:[],point:null,x:null,y:null};if(A.add=function(t){a(A,t,+x(t,++d),+b(t,d),m,g,v,y)},A.visit=function(t){Or(t,A,m,g,v,y)},A.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(c,u,f,h,d){if(!(u>a||f>o||h<n||d<i)){if(p=c.point){var p,m=e-c.x,g=r-c.y,v=m*m+g*g;if(v<l){var y=Math.sqrt(l=v);n=e-y,i=r-y,a=e+y,o=r+y,s=p}}for(var x=c.nodes,b=.5*(u+h),_=.5*(f+d),w=(r>=_)<<1|e>=b,M=w+4;w<M;++w)if(c=x[3&w])switch(3&w){case 0:t(c,u,f,b,_);break;case 1:t(c,b,f,h,_);break;case 2:t(c,u,_,b,d);break;case 3:t(c,b,_,h,d)}}}(t,n,i,a,o),s}(A,t[0],t[1],m,g,v,y)},d=-1,null==e){for(;++d<p;)a(A,t[d],f[d],h[d],m,g,v,y);--d}else t.forEach(A.add);return f=h=t=u=null,A}var o,s=ar,l=or;return(o=arguments.length)?(s=Ir,l=Pr,3===o&&(i=r,n=e,r=e=0),a(t)):(a.x=function(t){return arguments.length?(s=t,a):s},a.y=function(t){return arguments.length?(l=t,a):l},a.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),a):null==e?null:[[e,r],[n,i]]},a.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),a):null==e?null:[n-e,i-r]},a)},Zi.interpolateRgb=Fr,Zi.interpolateObject=Rr,Zi.interpolateNumber=Nr,Zi.interpolateString=jr;var Jo=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Ko=new RegExp(Jo.source,\"g\");Zi.interpolate=Br,Zi.interpolators=[function(t,e){var r=typeof e;return(\"string\"===r?Va.has(e.toLowerCase())||/^(#|rgb\\(|hsl\\()/i.test(e)?Fr:jr:e instanceof et?Fr:Array.isArray(e)?Ur:\"object\"===r&&isNaN(e)?Rr:Nr)(t,e)}],Zi.interpolateArray=Ur;var Qo=function(){return y},$o=Zi.map({linear:Qo,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Hr},cubic:function(){return Gr},sin:function(){return Yr},exp:function(){return Wr},circle:function(){return Xr},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Aa*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Aa/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return Zr}}),ts=Zi.map({in:y,out:Vr,\"in-out\":qr,\"out-in\":function(t){return qr(Vr(t))}});Zi.ease=function(t){var e=t.indexOf(\"-\"),r=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):\"in\";return r=$o.get(r)||Qo,n=ts.get(n)||y,function(t){return function(e){return e<=0?0:e>=1?1:t(e)}}(n(r.apply(null,Ji.call(arguments,1))))},Zi.interpolateHcl=function(t,e){t=Zi.hcl(t),e=Zi.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 at(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateHsl=function(t,e){t=Zi.hsl(t),e=Zi.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 nt(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateLab=function(t,e){t=Zi.lab(t),e=Zi.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 st(r+a*t,n+o*t,i+s*t)+\"\"}},Zi.interpolateRound=Jr,Zi.transform=function(t){var e=Qi.createElementNS(Zi.ns.prefix.svg,\"g\");return(Zi.transform=function(t){if(null!=t){e.setAttribute(\"transform\",t);var r=e.transform.baseVal.consolidate()}return new Kr(r?r.matrix:es)})(t)},Kr.prototype.toString=function(){return\"translate(\"+this.translate+\")rotate(\"+this.rotate+\")skewX(\"+this.skew+\")scale(\"+this.scale+\")\"};var es={a:1,b:0,c:0,d:1,e:0,f:0};Zi.interpolateTransform=en,Zi.layout={},Zi.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(rn(t[r]));return e}},Zi.layout.chord=function(){function t(){var t,c,f,h,d,p={},m=[],g=Zi.range(a),v=[];for(r=[],n=[],t=0,h=-1;++h<a;){for(c=0,d=-1;++d<a;)c+=i[h][d];m.push(c),v.push(Zi.range(a)),t+=c}for(o&&g.sort(function(t,e){return o(m[t],m[e])}),s&&v.forEach(function(t,e){t.sort(function(t,r){return s(i[e][t],i[e][r])})}),t=(Aa-u*a)/t,c=0,h=-1;++h<a;){for(f=c,d=-1;++d<a;){var y=g[h],x=v[y][d],b=i[y][x],_=c,w=c+=b*t;p[y+\"-\"+x]={index:y,subindex:x,startAngle:_,endAngle:w,value:b}}n[y]={index:y,startAngle:f,endAngle:c,value:m[y]},c+=u}for(h=-1;++h<a;)for(d=h-1;++d<a;){var M=p[h+\"-\"+d],k=p[d+\"-\"+h];(M.value||k.value)&&r.push(M.value<k.value?{source:k,target:M}:{source:M,target:k})}l&&e()}function e(){r.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var r,n,i,a,o,s,l,c={},u=0;return c.matrix=function(t){return arguments.length?(a=(i=t)&&i.length,r=n=null,c):i},c.padding=function(t){return arguments.length?(u=t,r=n=null,c):u},c.sortGroups=function(t){return arguments.length?(o=t,r=n=null,c):o},c.sortSubgroups=function(t){return arguments.length?(s=t,r=null,c):s},c.sortChords=function(t){return arguments.length?(l=t,r&&e(),c):l},c.chords=function(){return r||t(),r},c.groups=function(){return n||t(),n},c},Zi.layout.force=function(){function t(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/v<l){if(l<m){var c=e.charge/l;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&l&&l<m){c=e.pointCharge/l;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Zi.event.x,t.py=Zi.event.y,l.resume()}var r,n,i,a,o,s,l={},c=Zi.dispatch(\"start\",\"tick\",\"end\"),u=[1,1],f=.9,h=rs,d=ns,p=-30,m=is,g=.1,v=.64,x=[],b=[];return l.tick=function(){if((i*=.99)<.005)return r=null,c.end({type:\"end\",alpha:i=0}),!0;var e,n,l,h,d,m,v,y,_,w=x.length,M=b.length;for(n=0;n<M;++n)h=(l=b[n]).source,(m=(y=(d=l.target).x-h.x)*y+(_=d.y-h.y)*_)&&(y*=m=i*o[n]*((m=Math.sqrt(m))-a[n])/m,_*=m,d.x-=y*(v=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=_*v,h.x+=y*(v=1-v),h.y+=_*v);if((v=i*g)&&(y=u[0]/2,_=u[1]/2,n=-1,v))for(;++n<w;)(l=x[n]).x+=(y-l.x)*v,l.y+=(_-l.y)*v;if(p)for(cn(e=Zi.geom.quadtree(x),i,s),n=-1;++n<w;)(l=x[n]).fixed||e.visit(t(l));for(n=-1;++n<w;)(l=x[n]).fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:\"tick\",alpha:i})},l.nodes=function(t){return arguments.length?(x=t,l):x},l.links=function(t){return arguments.length?(b=t,l):b},l.size=function(t){return arguments.length?(u=t,l):u},l.linkDistance=function(t){return arguments.length?(h=\"function\"==typeof t?t:+t,l):h},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(d=\"function\"==typeof t?t:+t,l):d},l.friction=function(t){return arguments.length?(f=+t,l):f},l.charge=function(t){return arguments.length?(p=\"function\"==typeof t?t:+t,l):p},l.chargeDistance=function(t){return arguments.length?(m=t*t,l):Math.sqrt(m)},l.gravity=function(t){return arguments.length?(g=+t,l):g},l.theta=function(t){return arguments.length?(v=t*t,l):Math.sqrt(v)},l.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(r.c=null,r.t=NaN,r=null,c.end({type:\"end\",alpha:i=0})):t>0&&(c.start({type:\"start\",alpha:i=t}),r=kt(l.tick)),l):i},l.start=function(){function t(t,n){if(!r){for(r=new Array(i),l=0;l<i;++l)r[l]=[];for(l=0;l<c;++l){var a=b[l];r[a.source.index].push(a.target),r[a.target.index].push(a.source)}}for(var o,s=r[e],l=-1,u=s.length;++l<u;)if(!isNaN(o=s[l][t]))return o;return Math.random()*n}var e,r,n,i=x.length,c=b.length,f=u[0],m=u[1];for(e=0;e<i;++e)(n=x[e]).index=e,n.weight=0;for(e=0;e<c;++e)\"number\"==typeof(n=b[e]).source&&(n.source=x[n.source]),\"number\"==typeof n.target&&(n.target=x[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<i;++e)n=x[e],isNaN(n.x)&&(n.x=t(\"x\",f)),isNaN(n.y)&&(n.y=t(\"y\",m)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(a=[],\"function\"==typeof h)for(e=0;e<c;++e)a[e]=+h.call(this,b[e],e);else for(e=0;e<c;++e)a[e]=h;if(o=[],\"function\"==typeof d)for(e=0;e<c;++e)o[e]=+d.call(this,b[e],e);else for(e=0;e<c;++e)o[e]=d;if(s=[],\"function\"==typeof p)for(e=0;e<i;++e)s[e]=+p.call(this,x[e],e);else for(e=0;e<i;++e)s[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(n||(n=Zi.behavior.drag().origin(y).on(\"dragstart.force\",an).on(\"drag.force\",e).on(\"dragend.force\",on)),!arguments.length)return n;this.on(\"mouseover.force\",sn).on(\"mouseout.force\",ln).call(n)},Zi.rebind(l,c,\"on\")};var rs=20,ns=1,is=1/0;Zi.layout.hierarchy=function(){function t(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(c=r.call(t,a,a.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;n&&(a.value=0),a.children=c}else n&&(a.value=+n.call(t,a,a.depth)||0),delete a.children;return hn(i,function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)}),s}var e=mn,r=dn,n=pn;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&&(fn(e,function(t){t.children&&(t.value=0)}),hn(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},Zi.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,c=-1;for(n=e.value?n/e.value:0;++c<o;)t(s=a[c],r,l=s.value*n,i),r+=l}}function e(t){var r=t.children,n=0;if(r&&(i=r.length))for(var i,a=-1;++a<i;)n=Math.max(n,e(r[a]));return 1+n}function r(r,a){var o=n.call(this,r,a);return t(o[0],0,i[0],i[1]/e(o[0])),o}var n=Zi.layout.hierarchy(),i=[1,1];return r.size=function(t){return arguments.length?(i=t,r):i},un(r,n)},Zi.layout.pie=function(){function t(o){var s,l=o.length,c=o.map(function(r,n){return+e.call(t,r,n)}),u=+(\"function\"==typeof n?n.apply(this,arguments):n),f=(\"function\"==typeof i?i.apply(this,arguments):i)-u,h=Math.min(Math.abs(f)/l,+(\"function\"==typeof a?a.apply(this,arguments):a)),d=h*(f<0?-1:1),p=Zi.sum(c),m=p?(f-l*d)/p:0,g=Zi.range(l),v=[];return null!=r&&g.sort(r===as?function(t,e){return c[e]-c[t]}:function(t,e){return r(o[t],o[e])}),g.forEach(function(t){v[t]={data:o[t],value:s=c[t],startAngle:u,endAngle:u+=s*m+d,padAngle:h}}),v}var e=Number,r=as,n=0,i=Aa,a=0;return t.value=function(r){return arguments.length?(e=r,t):e},t.sort=function(e){return arguments.length?(r=e,t):r},t.startAngle=function(e){return arguments.length?(n=e,t):n},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(a=e,t):a},t};var as={};Zi.layout.stack=function(){function t(s,l){if(!(h=s.length))return s;var c=s.map(function(r,n){return e.call(t,r,n)}),u=c.map(function(e){return e.map(function(e,r){return[a.call(t,e,r),o.call(t,e,r)]})}),f=r.call(t,u,l);c=Zi.permute(c,f),u=Zi.permute(u,f);var h,d,p,m,g=n.call(t,u,l),v=c[0].length;for(p=0;p<v;++p)for(i.call(t,c[0][p],m=g[p],u[0][p][1]),d=1;d<h;++d)i.call(t,c[d][p],m+=u[d-1][p][1],u[d][p][1]);return s}var e=y,r=bn,n=_n,i=xn,a=vn,o=yn;return t.values=function(r){return arguments.length?(e=r,t):e},t.order=function(e){return arguments.length?(r=\"function\"==typeof e?e:os.get(e)||bn,t):r},t.offset=function(e){return arguments.length?(n=\"function\"==typeof e?e:ss.get(e)||_n,t):n},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var os=Zi.map({\"inside-out\":function(t){var e,r,n=t.length,i=t.map(wn),a=t.map(Mn),o=Zi.range(n).sort(function(t,e){return i[t]-i[e]}),s=0,l=0,c=[],u=[];for(e=0;e<n;++e)r=o[e],s<l?(s+=a[r],c.push(r)):(l+=a[r],u.push(r));return u.reverse().concat(c)},reverse:function(t){return Zi.range(t.length).reverse()},default:bn}),ss=Zi.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,c,u=t.length,f=t[0],h=f.length,d=[];for(d[0]=l=c=0,r=1;r<h;++r){for(e=0,i=0;e<u;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<u;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}d[r]=l-=i?a/i*s:0,l<c&&(c=l)}for(r=0;r<h;++r)d[r]-=c;return d},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:_n});Zi.layout.histogram=function(){function t(t,a){for(var o,s,l=[],c=t.map(r,this),u=n.call(this,c,a),f=i.call(this,u,c,a),h=(a=-1,c.length),d=f.length-1,p=e?1:1/h;++a<d;)(o=l[a]=[]).dx=f[a+1]-(o.x=f[a]),o.y=0;if(d>0)for(a=-1;++a<h;)(s=c[a])>=u[0]&&s<=u[1]&&((o=l[Zi.bisect(f,s,1,d)-1]).y+=p,o.push(t[a]));return l}var e=!0,r=Number,n=Sn,i=An;return t.value=function(e){return arguments.length?(r=e,t):r},t.range=function(e){return arguments.length?(n=_t(e),t):n},t.bins=function(e){return arguments.length?(i=\"number\"==typeof e?function(t){return Tn(t,e)}:_t(e),t):i},t.frequency=function(r){return arguments.length?(e=!!r,t):e},t},Zi.layout.pack=function(){function t(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:\"function\"==typeof e?e:function(){return e};if(s.x=s.y=0,hn(s,function(t){t.r=+u(t.value)}),hn(s,Dn),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;hn(s,function(t){t.r+=f}),hn(s,Dn),hn(s,function(t){t.r-=f})}return On(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),o}var e,r=Zi.layout.hierarchy().sort(En),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},un(t,r)},Zi.layout.tree=function(){function t(t,l){var c=i.call(this,t,l),u=c[0],f=function(t){var e,r={A:null,children:[t]},n=[r];for(;null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(u);if(hn(f,e),f.parent.m=-f.z,fn(f,r),s)fn(u,n);else{var h=u,d=u,p=u;fn(u,function(t){t.x<h.x&&(h=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)});var m=a(h,d)/2-h.x,g=o[0]/(d.x+a(d,h)/2+m),v=o[1]/(p.depth||1);fn(u,function(t){t.x=(t.x+m)*g,t.y=t.depth*v})}return c}function e(t){var e=t.children,r=t.parent.children,n=t.i?r[t.i-1]:null;if(e.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var i=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+a(t._,n._),t.m=t.z-i):t.z=i}else n&&(t.z=n.z+a(t._,n._));t.parent.A=function(t,e,r){if(e){for(var n,i=t,o=t,s=e,l=i.parent.children[0],c=i.m,u=o.m,f=s.m,h=l.m;s=jn(s),i=Nn(i),s&&i;)l=Nn(l),(o=jn(o)).a=t,(n=s.z+f-i.z-c+a(s._,i._))>0&&(!function(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}(function(t,e,r){return t.a.parent===e.parent?t.a:r}(s,t,r),t,n),c+=n,u+=n),f+=s.m,c+=i.m,h+=l.m,u+=o.m;s&&!jn(o)&&(o.t=s,o.m+=f-u),i&&!Nn(l)&&(l.t=i,l.m+=c-h,r=t)}return r}(t,n,t.parent.A||r[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function n(t){t.x*=o[0],t.y=t.depth*o[1]}var i=Zi.layout.hierarchy().sort(null).value(null),a=Rn,o=[1,1],s=null;return t.separation=function(e){return arguments.length?(a=e,t):a},t.size=function(e){return arguments.length?(s=null==(o=e)?n:null,t):s?null:o},t.nodeSize=function(e){return arguments.length?(s=null==(o=e)?null:n,t):s?o:null},un(t,i)},Zi.layout.cluster=function(){function t(t,a){var o,s=e.call(this,t,a),l=s[0],c=0;hn(l,function(t){var e=t.children;e&&e.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(e),t.y=function(t){return 1+Zi.max(t,function(t){return t.y})}(e)):(t.x=o?c+=r(t,o):0,t.y=0,o=t)});var u=Bn(l),f=Un(l),h=u.x-r(u,f)/2,d=f.x+r(f,u)/2;return hn(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-h)/(d-h)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),s}var e=Zi.layout.hierarchy().sort(null).value(null),r=Rn,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},un(t,e)},Zi.layout.treemap=function(){function t(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function e(r){var i=r.children;if(i&&i.length){var a,o,s,l=u(r),c=[],f=i.slice(),p=1/0,m=\"slice\"===h?l.dx:\"dice\"===h?l.dy:\"slice-dice\"===h?1&r.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(f,l.dx*l.dy/r.value),c.area=0;(s=f.length)>0;)c.push(a=f[s-1]),c.area+=a.area,\"squarify\"!==h||(o=function(t,e){var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;for(;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return n*=n,e*=e,n?Math.max(e*i*d/n,n/(e*a*d)):1/0}(c,m))<=p?(f.pop(),p=o):(c.area-=c.pop().area,n(c,m,l,!1),m=Math.min(l.dx,l.dy),c.length=c.area=0,p=1/0);c.length&&(n(c,m,l,!0),c.length=c.area=0),i.forEach(e)}}function r(e){var i=e.children;if(i&&i.length){var a,o=u(e),s=i.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&&(n(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);i.forEach(r)}}function n(t,e,r,n){var i,a=-1,o=t.length,l=r.x,c=r.y,u=e?s(t.area/e):0;if(e==r.dx){for((n||u>r.dy)&&(u=r.dy);++a<o;)(i=t[a]).x=l,i.y=c,i.dy=u,l+=i.dx=Math.min(r.x+r.dx-l,u?s(i.area/u):0);i.z=!0,i.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((n||u>r.dx)&&(u=r.dx);++a<o;)(i=t[a]).x=l,i.y=c,i.dx=u,c+=i.dy=Math.min(r.y+r.dy-c,u?s(i.area/u):0);i.z=!1,i.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function i(n){var i=a||o(n),s=i[0];return s.x=s.y=0,s.value?(s.dx=l[0],s.dy=l[1]):s.dx=s.dy=0,a&&o.revalue(s),t([s],s.dx*s.dy/s.value),(a?r:e)(s),f&&(a=i),i}var a,o=Zi.layout.hierarchy(),s=Math.round,l=[1,1],c=null,u=Vn,f=!1,h=\"squarify\",d=.5*(1+Math.sqrt(5));return i.size=function(t){return arguments.length?(l=t,i):l},i.padding=function(t){function e(e){return qn(e,t)}if(!arguments.length)return c;var r;return u=null==(c=t)?Vn:\"function\"==(r=typeof t)?function(e){var r=t.call(i,e,e.depth);return null==r?Vn(e):qn(e,\"number\"==typeof r?[r,r,r,r]:r)}:\"number\"===r?(t=[t,t,t,t],e):e,i},i.round=function(t){return arguments.length?(s=t?Math.round:Number,i):s!=Number},i.sticky=function(t){return arguments.length?(f=t,a=null,i):f},i.ratio=function(t){return arguments.length?(d=t,i):d},i.mode=function(t){return arguments.length?(h=t+\"\",i):h},un(i,o)},Zi.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Zi.random.normal.apply(Zi,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Zi.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},Zi.scale={};var ls={floor:y,ceil:y};Zi.scale.linear=function(){return Xn([0,1],[0,1],Br,!1)};var cs={s:1,g:1,p:1,r:1,e:1};Zi.scale.log=function(){return ei(Zi.scale.linear().domain([0,1]),10,!0,[1,10])};var us=Zi.format(\".0e\"),fs={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Zi.scale.pow=function(){return ri(Zi.scale.linear(),1,[0,1])},Zi.scale.sqrt=function(){return Zi.scale.pow().exponent(.5)},Zi.scale.ordinal=function(){return ii([],{t:\"range\",a:[[]]})},Zi.scale.category10=function(){return Zi.scale.ordinal().range(hs)},Zi.scale.category20=function(){return Zi.scale.ordinal().range(ds)},Zi.scale.category20b=function(){return Zi.scale.ordinal().range(ps)},Zi.scale.category20c=function(){return Zi.scale.ordinal().range(ms)};var hs=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(pt),ds=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(pt),ps=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(pt),ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(pt);Zi.scale.quantile=function(){return ai([],[])},Zi.scale.quantize=function(){return oi(0,1,[0,1])},Zi.scale.threshold=function(){return si([.5],[0,1])},Zi.scale.identity=function(){return li([0,1])},Zi.svg={},Zi.svg.arc=function(){function t(){var t=Math.max(0,+r.apply(this,arguments)),c=Math.max(0,+n.apply(this,arguments)),u=o.apply(this,arguments)-Sa,f=s.apply(this,arguments)-Sa,h=Math.abs(f-u),d=u>f?0:1;if(c<t&&(p=c,c=t,t=p),h>=Ta)return e(c,d)+(t?e(t,1-d):\"\")+\"Z\";var p,m,g,v,y,x,b,_,w,M,k,A,T=0,S=0,E=[];if((v=(+l.apply(this,arguments)||0)/2)&&(g=a===gs?Math.sqrt(t*t+c*c):+a.apply(this,arguments),d||(S*=-1),c&&(S=Q(g/c*Math.sin(v))),t&&(T=Q(g/t*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var L=Math.abs(f-u-2*S)<=ka?0:1;if(S&&mi(y,x,b,_)===d^L){var C=(u+f)/2;y=c*Math.cos(C),x=c*Math.sin(C),b=_=null}}else y=x=0;if(t){w=t*Math.cos(f-T),M=t*Math.sin(f-T),k=t*Math.cos(u+T),A=t*Math.sin(u+T);var z=Math.abs(u-f+2*T)<=ka?0:1;if(T&&mi(w,M,k,A)===1-d^z){var D=(u+f)/2;w=t*Math.cos(D),M=t*Math.sin(D),k=A=null}}else w=M=0;if(h>wa&&(p=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){m=t<c^d?0:1;var I=p,P=p;if(h<ka){var O=null==k?[w,M]:null==b?[y,x]:ur([y,x],[k,A],[b,_],[w,M]),F=y-O[0],R=x-O[1],N=b-O[0],j=_-O[1],B=1/Math.sin(Math.acos((F*N+R*j)/(Math.sqrt(F*F+R*R)*Math.sqrt(N*N+j*j)))/2),U=Math.sqrt(O[0]*O[0]+O[1]*O[1]);P=Math.min(p,(t-U)/(B-1)),I=Math.min(p,(c-U)/(B+1))}if(null!=b){var V=gi(null==k?[w,M]:[k,A],[y,x],c,I,d),q=gi([b,_],[w,M],c,I,d);p===I?E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 0,\",m,\" \",V[1],\"A\",c,\",\",c,\" 0 \",1-d^mi(V[1][0],V[1][1],q[1][0],q[1][1]),\",\",d,\" \",q[1],\"A\",I,\",\",I,\" 0 0,\",m,\" \",q[0]):E.push(\"M\",V[0],\"A\",I,\",\",I,\" 0 1,\",m,\" \",q[0])}else E.push(\"M\",y,\",\",x);if(null!=k){var H=gi([y,x],[k,A],t,-P,d),G=gi([w,M],null==b?[y,x]:[b,_],t,-P,d);p===P?E.push(\"L\",G[0],\"A\",P,\",\",P,\" 0 0,\",m,\" \",G[1],\"A\",t,\",\",t,\" 0 \",d^mi(G[1][0],G[1][1],H[1][0],H[1][1]),\",\",1-d,\" \",H[1],\"A\",P,\",\",P,\" 0 0,\",m,\" \",H[0]):E.push(\"L\",G[0],\"A\",P,\",\",P,\" 0 0,\",m,\" \",H[0])}else E.push(\"L\",w,\",\",M)}else E.push(\"M\",y,\",\",x),null!=b&&E.push(\"A\",c,\",\",c,\" 0 \",L,\",\",d,\" \",b,\",\",_),E.push(\"L\",w,\",\",M),null!=k&&E.push(\"A\",t,\",\",t,\" 0 \",z,\",\",1-d,\" \",k,\",\",A);return E.push(\"Z\"),E.join(\"\")}function e(t,e){return\"M0,\"+t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+-t+\"A\"+t+\",\"+t+\" 0 1,\"+e+\" 0,\"+t}var r=ui,n=fi,i=ci,a=gs,o=hi,s=di,l=pi;return t.innerRadius=function(e){return arguments.length?(r=_t(e),t):r},t.outerRadius=function(e){return arguments.length?(n=_t(e),t):n},t.cornerRadius=function(e){return arguments.length?(i=_t(e),t):i},t.padRadius=function(e){return arguments.length?(a=e==gs?gs:_t(e),t):a},t.startAngle=function(e){return arguments.length?(o=_t(e),t):o},t.endAngle=function(e){return arguments.length?(s=_t(e),t):s},t.padAngle=function(e){return arguments.length?(l=_t(e),t):l},t.centroid=function(){var t=(+r.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-Sa;return[Math.cos(e)*t,Math.sin(e)*t]},t};var gs=\"auto\";Zi.svg.line=function(){return vi(y)};var vs=Zi.map({linear:yi,\"linear-closed\":xi,step:function(t){for(var e=0,r=t.length,n=t[0],i=[n[0],\",\",n[1]];++e<r;)i.push(\"H\",(n[0]+(n=t[e])[0])/2,\"V\",n[1]);return r>1&&i.push(\"H\",n[0]),i.join(\"\")},\"step-before\":bi,\"step-after\":_i,basis:ki,\"basis-open\":function(t){if(t.length<4)return yi(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ai(bs,a)+\",\"+Ai(bs,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ti(r,a,o);return r.join(\"\")},\"basis-closed\":function(t){for(var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);for(e=[Ai(bs,o),\",\",Ai(bs,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Ti(e,o,s);return e.join(\"\")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,c=-1;++c<=r;)i=c/r,(n=t[c])[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return ki(t)},cardinal:function(t,e){return t.length<3?yi(t):t[0]+wi(t,Mi(t,e))},\"cardinal-open\":function(t,e){return t.length<4?yi(t):t[1]+wi(t.slice(1,-1),Mi(t,e))},\"cardinal-closed\":function(t,e){return t.length<3?xi(t):t[0]+wi((t.push(t[0]),t),Mi([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?yi(t):t[0]+wi(t,Ei(t))}});vs.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var ys=[0,2/3,1/3,0],xs=[0,1/3,2/3,0],bs=[0,1/6,2/3,1/6];Zi.svg.line.radial=function(){var t=vi(Li);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},bi.reverse=_i,_i.reverse=bi,Zi.svg.area=function(){return Ci(y)},Zi.svg.area.radial=function(){var t=Ci(Li);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Zi.svg.chord=function(){function t(t,o){var s=e(this,i,t,o),l=e(this,a,t,o);return\"M\"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(s,l)?n(s.r,s.p1,s.r,s.p0):n(s.r,s.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+n(l.r,l.p1,s.r,s.p0))+\"Z\"}function e(t,e,r,n){var i=e.call(t,r,n),a=o.call(t,i,n),c=s.call(t,i,n)-Sa,u=l.call(t,i,n)-Sa;return{r:a,a0:c,a1:u,p0:[a*Math.cos(c),a*Math.sin(c)],p1:[a*Math.cos(u),a*Math.sin(u)]}}function r(t,e,r){return\"A\"+t+\",\"+t+\" 0 \"+ +(r>ka)+\",1 \"+e}function n(t,e,r,n){return\"Q 0,0 \"+n}var i=Ke,a=Qe,o=zi,s=hi,l=di;return t.radius=function(e){return arguments.length?(o=_t(e),t):o},t.source=function(e){return arguments.length?(i=_t(e),t):i},t.target=function(e){return arguments.length?(a=_t(e),t):a},t.startAngle=function(e){return arguments.length?(s=_t(e),t):s},t.endAngle=function(e){return arguments.length?(l=_t(e),t):l},t},Zi.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\"M\"+(l=l.map(n))[0]+\"C\"+l[1]+\" \"+l[2]+\" \"+l[3]}var e=Ke,r=Qe,n=Di;return t.source=function(r){return arguments.length?(e=_t(r),t):e},t.target=function(e){return arguments.length?(r=_t(e),t):r},t.projection=function(e){return arguments.length?(n=e,t):n},t},Zi.svg.diagonal.radial=function(){var t=Zi.svg.diagonal(),e=Di,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Sa;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},Zi.svg.symbol=function(){function t(t,n){return(_s.get(e.call(this,t,n))||Oi)(r.call(this,t,n))}var e=Pi,r=Ii;return t.type=function(r){return arguments.length?(e=_t(r),t):e},t.size=function(e){return arguments.length?(r=_t(e),t):r},t};var _s=Zi.map({circle:Oi,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*Ms)),r=e*Ms;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/ws),r=e*ws/2;return\"M0,\"+r+\"L\"+e+\",\"+-r+\" \"+-e+\",\"+-r+\"Z\"},\"triangle-up\":function(t){var e=Math.sqrt(t/ws),r=e*ws/2;return\"M0,\"+-r+\"L\"+e+\",\"+r+\" \"+-e+\",\"+r+\"Z\"}});Zi.svg.symbolTypes=_s.keys();var ws=Math.sqrt(3),Ms=Math.tan(30*Ea);pa.transition=function(t){for(var e,r,n=ks||++Es,i=Bi(t),a=[],o=As||{time:Date.now(),ease:function(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)},delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(r=c[u])&&Ui(r,u,i,n,o),e.push(r)}return Ri(a,i,n)},pa.interrupt=function(t){return this.each(null==t?Ts:Fi(Bi(t)))};var ks,As,Ts=Fi(Bi()),Ss=[],Es=0;Ss.call=pa.call,Ss.empty=pa.empty,Ss.node=pa.node,Ss.size=pa.size,Zi.transition=function(t,e){return t&&t.transition?ks?t.transition(e):t:Zi.selection().transition(t)},Zi.transition.prototype=Ss,Ss.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=S(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var c=this[s],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=t.call(n,n.__data__,u,s))?(\"__data__\"in n&&(r.__data__=n.__data__),Ui(r,u,a,i,n[a][i]),e.push(r)):e.push(null)}return Ri(o,a,i)},Ss.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=E(t);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],h=-1,d=f.length;++h<d;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,c),l.push(e=[]);for(var p=-1,m=r.length;++p<m;)(i=r[p])&&Ui(i,p,s,o,a),e.push(i)}return Ri(l,s,o)},Ss.filter=function(t){var e,r,n=[];\"function\"!=typeof t&&(t=B(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return Ri(n,this.namespace,this.id)},Ss.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):U(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},Ss.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var r=\"transform\"==t?en:Br,n=Zi.ns.qualify(t);return Ni(this,\"attr.\"+t,e,n.local?function(t){return null==t?function(){this.removeAttributeNS(n.space,n.local)}:(t+=\"\",function(){var e,i=this.getAttributeNS(n.space,n.local);return i!==t&&(e=r(i,t),function(t){this.setAttributeNS(n.space,n.local,e(t))})})}:function(t){return null==t?function(){this.removeAttribute(n)}:(t+=\"\",function(){var e,i=this.getAttribute(n);return i!==t&&(e=r(i,t),function(t){this.setAttribute(n,e(t))})})})},Ss.attrTween=function(t,e){var r=Zi.ns.qualify(t);return this.tween(\"attr.\"+t,r.local?function(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}:function(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}})},Ss.style=function(t,e,n){var i=arguments.length;if(i<3){if(\"string\"!=typeof t){i<2&&(e=\"\");for(n in t)this.style(n,t[n],e);return this}n=\"\"}return Ni(this,\"style.\"+t,e,function(e){return null==e?function(){this.style.removeProperty(t)}:(e+=\"\",function(){var i,a=r(this).getComputedStyle(this,null).getPropertyValue(t);return a!==e&&(i=Br(a,e),function(e){this.style.setProperty(t,i(e),n)})})})},Ss.styleTween=function(t,e,n){return arguments.length<3&&(n=\"\"),this.tween(\"style.\"+t,function(i,a){var o=e.call(this,i,a,r(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}})},Ss.text=function(t){return Ni(this,\"text\",t,ji)},Ss.remove=function(){var t=this.namespace;return this.each(\"end.transition\",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Ss.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:(\"function\"!=typeof t&&(t=Zi.ease.apply(Zi,arguments)),U(this,function(n){n[r][e].ease=t}))},Ss.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:U(this,\"function\"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},Ss.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:U(this,\"function\"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},Ss.each=function(t,e){var r=this.id,n=this.namespace;if(arguments.length<2){var i=As,a=ks;try{ks=r,U(this,function(e,i,a){As=e[n][r],t.call(e,e.__data__,i,a)})}finally{As=i,ks=a}}else U(this,function(i){var a=i[n][r];(a.event||(a.event=Zi.dispatch(\"start\",\"end\",\"interrupt\"))).on(t,e)});return this},Ss.transition=function(){for(var t,e,r,n=this.id,i=++Es,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var c,u=0,f=(c=this[s]).length;u<f;u++)(e=c[u])&&Ui(e,u,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return Ri(o,a,i)},Zi.svg.axis=function(){function t(t){t.each(function(){var t,c=Zi.select(this),u=this.__chart__||r,f=this.__chart__=r.copy(),h=null==l?f.ticks?f.ticks.apply(f,s):f.domain():l,d=null==e?f.tickFormat?f.tickFormat.apply(f,s):y:e,p=c.selectAll(\".tick\").data(h,f),m=p.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",wa),g=Zi.transition(p.exit()).style(\"opacity\",wa).remove(),v=Zi.transition(p.order()).style(\"opacity\",1),x=Math.max(i,0)+o,b=Gn(f),_=c.selectAll(\".domain\").data([0]),w=(_.enter().append(\"path\").attr(\"class\",\"domain\"),Zi.transition(_));m.append(\"line\"),m.append(\"text\");var M,k,A,T,S=m.select(\"line\"),E=v.select(\"line\"),L=p.select(\"text\").text(d),C=m.select(\"text\"),z=v.select(\"text\"),D=\"top\"===n||\"left\"===n?-1:1;if(\"bottom\"===n||\"top\"===n?(t=Vi,M=\"x\",A=\"y\",k=\"x2\",T=\"y2\",L.attr(\"dy\",D<0?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),w.attr(\"d\",\"M\"+b[0]+\",\"+D*a+\"V0H\"+b[1]+\"V\"+D*a)):(t=qi,M=\"y\",A=\"x\",k=\"y2\",T=\"x2\",L.attr(\"dy\",\".32em\").style(\"text-anchor\",D<0?\"end\":\"start\"),w.attr(\"d\",\"M\"+D*a+\",\"+b[0]+\"H0V\"+b[1]+\"H\"+D*a)),S.attr(T,D*i),C.attr(A,D*x),E.attr(k,0).attr(T,D*i),z.attr(M,0).attr(A,D*x),f.rangeBand){var I=f,P=I.rangeBand()/2;u=f=function(t){return I(t)+P}}else u.rangeBand?u=f:g.call(t,f,u);m.call(t,u,f),v.call(t,f,f)})}var e,r=Zi.scale.linear(),n=Ls,i=6,a=6,o=3,s=[10],l=null;return t.scale=function(e){return arguments.length?(r=e,t):r},t.orient=function(e){return arguments.length?(n=e in Cs?e+\"\":Ls,t):n},t.ticks=function(){return arguments.length?(s=Ki(arguments),t):s},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(r){return arguments.length?(e=r,t):e},t.tickSize=function(e){var r=arguments.length;return r?(i=+e,a=+arguments[r-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ls=\"bottom\",Cs={top:1,right:1,bottom:1,left:1};Zi.svg.brush=function(){function t(r){r.each(function(){var r=Zi.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",a).on(\"touchstart.brush\",a),o=r.selectAll(\".background\").data([0]);o.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),r.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var s=r.selectAll(\".resize\").data(m,y);s.exit().remove(),s.enter().append(\"g\").attr(\"class\",function(t){return\"resize \"+t}).style(\"cursor\",function(t){return zs[t]}).append(\"rect\").attr(\"x\",function(t){return/[ew]$/.test(t)?-3:null}).attr(\"y\",function(t){return/^[ns]/.test(t)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),s.style(\"display\",t.empty()?\"none\":null);var l,f=Zi.transition(r),h=Zi.transition(o);c&&(l=Gn(c),h.attr(\"x\",l[0]).attr(\"width\",l[1]-l[0]),n(f)),u&&(l=Gn(u),h.attr(\"y\",l[0]).attr(\"height\",l[1]-l[0]),i(f)),e(f)})}function e(t){t.selectAll(\".resize\").attr(\"transform\",function(t){return\"translate(\"+f[+/e$/.test(t)]+\",\"+h[+/^s/.test(t)]+\")\"})}function n(t){t.select(\".extent\").attr(\"x\",f[0]),t.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",f[1]-f[0])}function i(t){t.select(\".extent\").attr(\"y\",h[0]),t.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",h[1]-h[0])}function a(){function a(){var t=Zi.mouse(x),r=!1;y&&(t[0]+=y[0],t[1]+=y[1]),S||(Zi.event.altKey?(v||(v=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(t[0]<v[0])],L[1]=h[+(t[1]<v[1])]):v=null),A&&m(t,c,0)&&(n(w),r=!0),T&&m(t,u,1)&&(i(w),r=!0),r&&(e(w),_({type:\"brush\",mode:S?\"move\":\"resize\"}))}function m(t,e,r){var n,i,a=Gn(e),l=a[0],c=a[1],u=L[r],m=r?h:f,g=m[1]-m[0];if(S&&(l-=u,c-=g+u),n=(r?p:d)?Math.max(l,Math.min(c,t[r])):t[r],S?i=(n+=u)+g:(v&&(u=Math.max(l,Math.min(c,2*v[r]-n))),u<n?(i=n,n=u):i=u),m[0]!=n||m[1]!=i)return r?s=null:o=null,m[0]=n,m[1]=i,!0}function g(){a(),w.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",t.empty()?\"none\":null),Zi.select(\"body\").style(\"cursor\",null),C.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),E(),_({type:\"brushend\"})}var v,y,x=this,b=Zi.select(Zi.event.target),_=l.of(x,arguments),w=Zi.select(x),k=b.datum(),A=!/^(n|s)$/.test(k)&&c,T=!/^(e|w)$/.test(k)&&u,S=b.classed(\"extent\"),E=Y(x),L=Zi.mouse(x),C=Zi.select(r(x)).on(\"keydown.brush\",function(){32==Zi.event.keyCode&&(S||(v=null,L[0]-=f[1],L[1]-=h[1],S=2),M())}).on(\"keyup.brush\",function(){32==Zi.event.keyCode&&2==S&&(L[0]+=f[1],L[1]+=h[1],S=0,M())});if(Zi.event.changedTouches?C.on(\"touchmove.brush\",a).on(\"touchend.brush\",g):C.on(\"mousemove.brush\",a).on(\"mouseup.brush\",g),w.interrupt().selectAll(\"*\").interrupt(),S)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(k){var z=+/w$/.test(k),D=+/^n/.test(k);y=[f[1-z]-L[0],h[1-D]-L[1]],L[0]=f[z],L[1]=h[D]}else Zi.event.altKey&&(v=L.slice());w.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),Zi.select(\"body\").style(\"cursor\",b.style(\"cursor\")),_({type:\"brushstart\"}),a()}var o,s,l=A(t,\"brushstart\",\"brush\",\"brushend\"),c=null,u=null,f=[0,0],h=[0,0],d=!0,p=!0,m=Ds[0];return t.event=function(t){t.each(function(){var t=l.of(this,arguments),e={x:f,y:h,i:o,j:s},r=this.__chart__||e;this.__chart__=e,ks?Zi.select(this).transition().each(\"start.brush\",function(){o=r.i,s=r.j,f=r.x,h=r.y,t({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var r=Ur(f,e.x),n=Ur(h,e.y);return o=s=null,function(i){f=e.x=r(i),h=e.y=n(i),t({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){o=e.i,s=e.j,t({type:\"brush\",mode:\"resize\"}),t({type:\"brushend\"})}):(t({type:\"brushstart\"}),t({type:\"brush\",mode:\"resize\"}),t({type:\"brushend\"}))})},t.x=function(e){return arguments.length?(c=e,m=Ds[!c<<1|!u],t):c},t.y=function(e){return arguments.length?(u=e,m=Ds[!c<<1|!u],t):u},t.clamp=function(e){return arguments.length?(c&&u?(d=!!e[0],p=!!e[1]):c?d=!!e:u&&(p=!!e),t):c&&u?[d,p]:c?d:u?p:null},t.extent=function(e){var r,n,i,a,l;return arguments.length?(c&&(r=e[0],n=e[1],u&&(r=r[0],n=n[0]),o=[r,n],c.invert&&(r=c(r),n=c(n)),n<r&&(l=r,r=n,n=l),r==f[0]&&n==f[1]||(f=[r,n])),u&&(i=e[0],a=e[1],c&&(i=i[1],a=a[1]),s=[i,a],u.invert&&(i=u(i),a=u(a)),a<i&&(l=i,i=a,a=l),i==h[0]&&a==h[1]||(h=[i,a])),t):(c&&(o?(r=o[0],n=o[1]):(r=f[0],n=f[1],c.invert&&(r=c.invert(r),n=c.invert(n)),n<r&&(l=r,r=n,n=l))),u&&(s?(i=s[0],a=s[1]):(i=h[0],a=h[1],u.invert&&(i=u.invert(i),a=u.invert(a)),a<i&&(l=i,i=a,a=l))),c&&u?[[r,i],[n,a]]:c?[r,n]:u&&[i,a])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],o=s=null),t},t.empty=function(){return!!c&&f[0]==f[1]||!!u&&h[0]==h[1]},Zi.rebind(t,l,\"on\")};var zs={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},Ds=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]],Is=Ka.format=no.timeFormat,Ps=Is.utc,Os=Ps(\"%Y-%m-%dT%H:%M:%S.%LZ\");Is.iso=Date.prototype.toISOString&&+new Date(\"2000-01-01T00:00:00.000Z\")?Hi:Os,Hi.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Hi.toString=Os.toString,Ka.second=Ct(function(t){return new Qa(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),Ka.seconds=Ka.second.range,Ka.seconds.utc=Ka.second.utc.range,Ka.minute=Ct(function(t){return new Qa(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),Ka.minutes=Ka.minute.range,Ka.minutes.utc=Ka.minute.utc.range,Ka.hour=Ct(function(t){var e=t.getTimezoneOffset()/60;return new Qa(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),Ka.hours=Ka.hour.range,Ka.hours.utc=Ka.hour.utc.range,Ka.month=Ct(function(t){return(t=Ka.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),Ka.months=Ka.month.range,Ka.months.utc=Ka.month.utc.range;var Fs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Rs=[[Ka.second,1],[Ka.second,5],[Ka.second,15],[Ka.second,30],[Ka.minute,1],[Ka.minute,5],[Ka.minute,15],[Ka.minute,30],[Ka.hour,1],[Ka.hour,3],[Ka.hour,6],[Ka.hour,12],[Ka.day,1],[Ka.day,2],[Ka.week,1],[Ka.month,1],[Ka.month,3],[Ka.year,1]],Ns=Is.multi([[\".%L\",function(t){return t.getMilliseconds()}],[\":%S\",function(t){return t.getSeconds()}],[\"%I:%M\",function(t){return t.getMinutes()}],[\"%I %p\",function(t){return t.getHours()}],[\"%a %d\",function(t){return t.getDay()&&1!=t.getDate()}],[\"%b %d\",function(t){return 1!=t.getDate()}],[\"%B\",function(t){return t.getMonth()}],[\"%Y\",ve]]),js={range:function(t,e,r){return Zi.range(Math.ceil(t/r)*r,+e,r).map(Yi)},floor:y,ceil:y};Rs.year=Ka.year,Ka.scale=function(){return Gi(Zi.scale.linear(),Rs,Ns)};var Bs=Rs.map(function(t){return[t[0].utc,t[1]]}),Us=Ps.multi([[\".%L\",function(t){return t.getUTCMilliseconds()}],[\":%S\",function(t){return t.getUTCSeconds()}],[\"%I:%M\",function(t){return t.getUTCMinutes()}],[\"%I %p\",function(t){return t.getUTCHours()}],[\"%a %d\",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],[\"%b %d\",function(t){return 1!=t.getUTCDate()}],[\"%B\",function(t){return t.getUTCMonth()}],[\"%Y\",ve]]);Bs.year=Ka.year.utc,Ka.scale.utc=function(){return Gi(Zi.scale.linear(),Bs,Us)},Zi.text=wt(function(t){return t.responseText}),Zi.json=function(t,e){return Mt(t,\"application/json\",Wi,e)},Zi.html=function(t,e){return Mt(t,\"text/html\",Xi,e)},Zi.xml=wt(function(t){return t.responseXML}),\"object\"==typeof e&&e.exports?e.exports=Zi:this.d3=Zi}()},{}],129:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],130:[function(t,e,r){\"use strict\";function n(t,e){this.point=t,this.index=e}function i(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}var a=t(\"incremental-convex-hull\"),o=t(\"uniq\");e.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map(function(t,e){return[t[0],e]});n.sort(function(t,e){return t[0]-e[0]});for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}return r&&i.push([-1,i[0][1]],[i[t-1][1],-1]),i}(r,t,e);for(var l=new Array(r),c=1,u=0;u<r;++u){for(var f=t[u],h=new Array(s+1),d=0,p=0;p<s;++p){var m=f[p];h[p]=m,d+=m*m}h[s]=d,l[u]=new n(h,u),c=Math.max(d,c)}o(l,i),r=l.length;var g=new Array(r+s+1),v=new Array(r+s+1),y=(s+1)*(s+1)*c,x=new Array(s+1);for(u=0;u<=s;++u)x[u]=0;for(x[s]=y,g[0]=x.slice(),v[0]=-1,u=0;u<=s;++u)(h=x.slice())[u]=1,g[u+1]=h,v[u+1]=-1;for(u=0;u<r;++u){var b=l[u];g[u+s+1]=b.point,v[u+s+1]=b.index}var _=a(g,!1);if(_=e?_.filter(function(t){for(var e=0,r=0;r<=s;++r){var n=v[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&s)for(u=0;u<_.length;++u)h=(b=_[u])[0],b[0]=b[1],b[1]=h;return _}},{\"incremental-convex-hull\":278,uniq:556}],131:[function(t,e,r){(function(t){var r=!1;if(\"undefined\"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]};function a(t,e){return i[0]=t,i[1]=e,n[0]}e.exports.pack=a;function o(t){return n[0]=t,i[0]}e.exports.lo=o;function s(t){return n[0]=t,i[1]}e.exports.hi=s}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]};function l(t,e){return i[1]=t,i[0]=e,n[0]}e.exports.pack=l;function c(t){return n[0]=t,i[1]}e.exports.lo=c;function u(t){return n[0]=t,i[0]}e.exports.hi=u}else r=!1}if(!r){var f=new t(8);e.exports=function(t){return f.writeDoubleLE(t,0,!0),[f.readUInt32LE(0,!0),f.readUInt32LE(4,!0)]};function h(t,e){return f.writeUInt32LE(t,0,!0),f.writeUInt32LE(e,4,!0),f.readDoubleLE(0,!0)}e.exports.pack=h;function d(t){return f.writeDoubleLE(t,0,!0),f.readUInt32LE(0,!0)}e.exports.lo=d;function p(t){return f.writeDoubleLE(t,0,!0),f.readUInt32LE(4,!0)}e.exports.hi=p}e.exports.sign=function(t){return e.exports.hi(t)>>>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:82}],132:[function(t,e,r){var n=t(\"abs-svg-path\"),i=t(\"normalize-svg-path\"),a={M:\"moveTo\",C:\"bezierCurveTo\"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach(function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)}),t.closePath()}},{\"abs-svg-path\":43,\"normalize-svg-path\":460}],133:[function(t,e,r){e.exports=function(t){switch(t){case\"int8\":return Int8Array;case\"int16\":return Int16Array;case\"int32\":return Int32Array;case\"uint8\":return Uint8Array;case\"uint16\":return Uint16Array;case\"uint32\":return Uint32Array;case\"float32\":return Float32Array;case\"float64\":return Float64Array;case\"array\":return Array;case\"uint8_clamped\":return Uint8ClampedArray}}},{}],134:[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;a<i;++a)o[a]=e;else for(a=0;a<i;++a)o[a]=n(t,e,r+1);return o}e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case\"number\":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,e);break;case\"object\":if(\"number\"==typeof t.length)return n(t,e,0)}return[]}},{}],135:[function(t,e,r){\"use strict\";function n(t,e,r){r=r||2;var n=e&&e.length,l=n?e[0]*r:t.length,u=i(t,0,l,r,!0),f=[];if(!u)return f;var h,m,g,v,y,x,b;if(n&&(u=function(t,e,r,n){var o,l,u,f,h,m=[];for(o=0,l=e.length;o<l;o++)u=e[o]*n,f=o<l-1?e[o+1]*n:t.length,(h=i(t,u,f,n,!1))===h.next&&(h.steiner=!0),m.push(function(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}(h));for(m.sort(s),o=0;o<m.length;o++)!function(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=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.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r.prev;var l,u=r,f=r.x,h=r.y,p=1/0;for(n=r.next;n!==u;)i>=n.x&&n.x>=f&&c(a<h?i:o,a,f,h,a<h?o:i,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(i-n.x))<p||l===p&&n.x>r.x)&&d(n,t)&&(r=n,p=l),n=n.next;return r}(t,e)){var r=p(e,t);a(r,r.next)}}(m[o],r),r=a(r,r.next);return r}(t,e,u,r)),t.length>80*r){h=g=t[0],m=v=t[1];for(var _=r;_<l;_+=r)y=t[_],x=t[_+1],y<h&&(h=y),x<m&&(m=x),y>g&&(g=y),x>v&&(v=x);b=Math.max(g-h,v-m)}return o(u,f,r,h,m,b),f}function i(t,e,r,n,i){var a,o;if(i===y(t,e,r,n)>0)for(a=e;a<r;a+=n)o=m(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=m(a,t[a],t[a+1],o);return o&&f(o,o.next)&&(g(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||!f(n,n.next)&&0!==u(n.prev,n,n.next))n=n.next;else{if(g(n),(n=e=n.prev)===n.next)return null;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,s,m){if(t){!m&&s&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=l(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,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<c&&(s++,n=n.nextZ);e++);for(l=c;s>0||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,c*=2}while(o>1)}(i)}(t,n,i,s);for(var v,y,x=t;t.prev!==t.next;)if(v=t.prev,y=t.next,s?function(t,e,r,n){var i=t.prev,a=t,o=t.next;if(u(i,a,o)>=0)return!1;var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,f=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,h=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,d=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,p=l(s,f,e,r,n),m=l(h,d,e,r,n),g=t.nextZ;for(;g&&g.z<=m;){if(g!==t.prev&&g!==t.next&&c(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&u(g.prev,g,g.next)>=0)return!1;g=g.nextZ}g=t.prevZ;for(;g&&g.z>=p;){if(g!==t.prev&&g!==t.next&&c(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&u(g.prev,g,g.next)>=0)return!1;g=g.prevZ}return!0}(t,n,i,s):function(t){var e=t.prev,r=t,n=t.next;if(u(e,r,n)>=0)return!1;var i=t.next.next;for(;i!==t.prev;){if(c(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&u(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}(t))e.push(v.i/r),e.push(t.i/r),e.push(y.i/r),g(t),t=y.next,x=y.next;else if((t=y)===x){m?1===m?o(t=function(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!f(i,a)&&h(i,n,n.next,a)&&d(i,a)&&d(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),g(n),g(n.next),n=t=a),n=n.next}while(n!==t);return n}(t,e,r),e,r,n,i,s,2):2===m&&function(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(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&&h(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&d(t,e)&&d(e,t)&&function(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}(t,e)}(l,c)){var u=p(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}(t,e,r,n,i,s):o(a(t),e,r,n,i,s,1);break}}}function s(t,e){return t.x-e.x}function l(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 c(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function u(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function f(t,e){return t.x===e.x&&t.y===e.y}function h(t,e,r,n){return!!(f(t,e)&&f(r,n)||f(t,n)&&f(r,e))||u(t,e,r)>0!=u(t,e,n)>0&&u(r,n,t)>0!=u(r,n,e)>0}function d(t,e){return u(t.prev,t,t.next)<0?u(t,e,t.next)>=0&&u(t,t.prev,e)>=0:u(t,e,t.prev)<0||u(t,t.next,e)<0}function p(t,e){var r=new v(t.i,t.x,t.y),n=new v(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 m(t,e,r,n){var i=new v(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 g(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 v(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 y(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}e.exports=n,n.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(y(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var c=e[s]*r,u=s<l-1?e[s+1]*r:t.length;o-=Math.abs(y(t,c,u,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;f+=Math.abs((t[h]-t[p])*(t[d+1]-t[h+1])-(t[h]-t[d])*(t[p+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],136:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t.length;if(\"number\"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;var o=new Array(e);for(i=0;i<e;++i)o[i]=[];for(i=0;i<r;++i)o[(a=t[i])[0]].push(a[1]),o[a[1]].push(a[0]);for(var s=0;s<e;++s)n(o[s],function(t,e){return t-e});return o};var n=t(\"uniq\")},{uniq:556}],137:[function(t,e,r){(function(n,i){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.ES6Promise=n()}(this,function(){\"use strict\";function e(t){return\"function\"==typeof t}function r(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<A;t+=2){(0,P[t])(P[t+1]),P[t]=void 0,P[t+1]=void 0}A=0}function o(){try{var e=t(\"vertx\");return T=e.runOnLoop||e.runOnContext,function(){T(a)}}catch(t){return r()}}function s(t,e){var r=arguments,n=this,i=new this.constructor(c);void 0===i[F]&&b(i);var a=n._state;return a?function(){var t=r[a-1];E(function(){return x(a,i,t,n._result)})}():g(n,i,t,e),i}function l(t){if(t&&\"object\"==typeof t&&t.constructor===this)return t;var e=new this(c);return h(e,t),e}function c(){}function u(t){try{return t.then}catch(t){return B.error=t,B}}function f(t,r,n){r.constructor===t.constructor&&n===s&&r.constructor.resolve===l?function(t,e){e._state===N?p(t,e._result):e._state===j?m(t,e._result):g(e,void 0,function(e){return h(t,e)},function(e){return m(t,e)})}(t,r):n===B?m(t,B.error):void 0===n?p(t,r):e(n)?function(t,e,r){E(function(t){var n=!1,i=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?h(t,r):p(t,r))},function(e){n||(n=!0,m(t,e))},t._label);!n&&i&&(n=!0,m(t,i))},t)}(t,r,n):p(t,r)}function h(t,e){t===e?m(t,new TypeError(\"You cannot resolve a promise with itself\")):!function(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}(e)?p(t,e):f(t,e,u(e))}function d(t){t._onerror&&t._onerror(t._result),v(t)}function p(t,e){t._state===R&&(t._result=e,t._state=N,0!==t._subscribers.length&&E(v,t))}function m(t,e){t._state===R&&(t._state=j,t._result=e,E(d,t))}function g(t,e,r,n){var i=t._subscribers,a=i.length;t._onerror=null,i[a]=e,i[a+N]=r,i[a+j]=n,0===a&&t._state&&E(v,t)}function v(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,i=void 0,a=t._result,o=0;o<e.length;o+=3)n=e[o],i=e[o+r],n?x(r,n,i,a):i(a);t._subscribers.length=0}}function y(){this.error=null}function x(t,r,n,i){var a=e(n),o=void 0,s=void 0,l=void 0,c=void 0;if(a){if((o=function(t,e){try{return t(e)}catch(t){return U.error=t,U}}(n,i))===U?(c=!0,s=o.error,o=null):l=!0,r===o)return void m(r,new TypeError(\"A promises callback cannot return that same promise.\"))}else o=i,l=!0;r._state!==R||(a&&l?h(r,o):c?m(r,s):t===N?p(r,o):t===j&&m(r,o))}function b(t){t[F]=V++,t._state=void 0,t._result=void 0,t._subscribers=[]}function _(t,e){this._instanceConstructor=t,this.promise=new t(c),this.promise[F]||b(this.promise),k(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?p(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&p(this.promise,this._result))):m(this.promise,new Error(\"Array Methods must be provided an Array\"))}function w(t){this[F]=V++,this._result=this._state=void 0,this._subscribers=[],c!==t&&(\"function\"!=typeof t&&function(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}(),this instanceof w?function(t,e){try{e(function(e){h(t,e)},function(e){m(t,e)})}catch(e){m(t,e)}}(this,t):function(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}())}function M(){var t=void 0;if(void 0!==i)t=i;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(t){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(\"[object Promise]\"===r&&!e.cast)return}t.Promise=w}var k=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)},A=0,T=void 0,S=void 0,E=function(t,e){P[A]=t,P[A+1]=e,2===(A+=2)&&(S?S(a):O())},L=\"undefined\"!=typeof window?window:void 0,C=L||{},z=C.MutationObserver||C.WebKitMutationObserver,D=\"undefined\"==typeof self&&void 0!==n&&\"[object process]\"==={}.toString.call(n),I=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel,P=new Array(1e3),O=void 0;O=D?function(){return n.nextTick(a)}:z?function(){var t=0,e=new z(a),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}():I?function(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}():void 0===L&&\"function\"==typeof t?o():r();var F=Math.random().toString(36).substring(16),R=void 0,N=1,j=2,B=new y,U=new y,V=0;return _.prototype._enumerate=function(){for(var t=this.length,e=this._input,r=0;this._state===R&&r<t;r++)this._eachEntry(e[r],r)},_.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===l){var i=u(t);if(i===s&&t._state!==R)this._settledAt(t._state,e,t._result);else if(\"function\"!=typeof i)this._remaining--,this._result[e]=t;else if(r===w){var a=new r(c);f(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},_.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===R&&(this._remaining--,t===j?m(n,r):this._result[e]=r),0===this._remaining&&p(n,this._result)},_.prototype._willSettleAt=function(t,e){var r=this;g(t,void 0,function(t){return r._settledAt(N,e,t)},function(t){return r._settledAt(j,e,t)})},w.all=function(t){return new _(this,t).promise},w.race=function(t){var e=this;return new e(k(t)?function(r,n){for(var i=t.length,a=0;a<i;a++)e.resolve(t[a]).then(r,n)}:function(t,e){return e(new TypeError(\"You must pass an array to race.\"))})},w.resolve=l,w.reject=function(t){var e=new this(c);return m(e,t),e},w._setScheduler=function(t){S=t},w._setAsap=function(t){E=t},w._asap=E,w.prototype={constructor:w,then:s,catch:function(t){return this.then(null,t)}},M(),w.polyfill=M,w.Promise=w,w})}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{_process:488}],138:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return\"function\"==typeof t}function a(t){return\"object\"==typeof t&&null!==t}function o(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!function(t){return\"number\"==typeof t}(t)||t<0||isNaN(t))throw TypeError(\"n must be a positive number\");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,s,l,c;if(this._events||(this._events={}),\"error\"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var u=new Error('Uncaught, unspecified \"error\" event. ('+e+\")\");throw u.context=e,u}if(r=this._events[t],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,l=0;l<n;l++)c[l].apply(this,s);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&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,o,s;if(!i(e))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=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(a(r)){for(s=o;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)}},{}],139:[function(t,e,r){\"use strict\";e.exports=function(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]]]}},{}],140:[function(t,e,r){\"use strict\";e.exports=function(t){var e=typeof t;if(\"string\"===e){var r=t;if(0===(t=+t)&&function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&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}(r))return!1}else if(\"number\"!==e)return!1;return t-t<1}},{}],141:[function(t,e,r){\"use strict\";function n(t){if(!t)return\"true\";var e=t[0];if(t.length<=1)return\"any\"===e?\"false\":\"true\";return\"(\"+(\"==\"===e?a(t[1],t[2],\"===\",!1):\"!=\"===e?a(t[1],t[2],\"!==\",!1):\"<\"===e||\">\"===e||\"<=\"===e||\">=\"===e?a(t[1],t[2],e,!0):\"any\"===e?o(t.slice(1),\"||\"):\"all\"===e?o(t.slice(1),\"&&\"):\"none\"===e?c(o(t.slice(1),\"||\")):\"in\"===e?s(t[1],t.slice(2)):\"!in\"===e?c(s(t[1],t.slice(2))):\"has\"===e?l(t[1]):\"!has\"===e?c(l([t[1]])):\"true\")+\")\"}function i(t){return\"$type\"===t?\"f.type\":\"$id\"===t?\"f.id\":\"p[\"+JSON.stringify(t)+\"]\"}function a(t,e,r,n){var a=i(t),o=\"$type\"===t?f.indexOf(e):JSON.stringify(e);return(n?\"typeof \"+a+\"=== typeof \"+o+\"&&\":\"\")+a+r+o}function o(t,e){return t.map(n).join(e)}function s(t,e){\"$type\"===t&&(e=e.map(function(t){return f.indexOf(t)}));var r=JSON.stringify(e.sort(u)),n=i(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 l(t){return JSON.stringify(t)+\" in p\"}function c(t){return\"!(\"+t+\")\"}function u(t,e){return t<e?-1:t>e?1:0}e.exports=function(t){return new Function(\"f\",\"var p = (f && f.properties || {}); return \"+n(t))};var f=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"]},{}],142:[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<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}function a(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}e.exports=function(t,e,r){switch(arguments.length){case 0:return new i([0],[0],0);case 1:return\"number\"==typeof t?new i(n=a(t),n,0):new i(t,a(t.length),0);case 2:if(\"number\"==typeof e){var n;return new i(t,n=a(t.length),+e)}r=0;case 3:if(t.length!==e.length)throw new Error(\"state and velocity lengths must match\");return new i(t,e,r)}};var o=t(\"cubic-hermite\"),s=t(\"binary-search-bounds\"),l=i.prototype;l.flush=function(t){var e=s.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},l.curve=function(t){var e=this._time,r=e.length,i=s.le(e,t),a=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,f=this.bounds;if(i<0)for(var h=u-1,d=0;d<u;++d,--h)a[d]=l[h];else if(i>=r-1){h=l.length-1;var p=t-e[r-1];for(d=0;d<u;++d,--h)a[d]=l[h]+p*c[h]}else{h=u*(i+1)-1;var m=e[i],g=e[i+1]-m||1,v=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(d=0;d<u;++d,--h)v[d]=l[h],x[d]=c[h]*g,y[d]=l[h+u],b[d]=c[h+u]*g,_=_&&v[d]===y[d]&&x[d]===b[d]&&0===x[d];if(_)for(d=0;d<u;++d)a[d]=v[d];else o(v,x,y,b,(t-m)/g,a)}var w=f[0],M=f[1];for(d=0;d<u;++d)a[d]=n(w[d],M[d],a[d]);return a},l.dcurve=function(t){var e=this._time,r=e.length,n=s.le(e,t),i=this._scratch[0],a=this._state,l=this._velocity,c=this.dimension;if(n>=r-1)for(var u=a.length-1,f=(e[r-1],0);f<c;++f,--u)i[f]=l[u];else{u=c*(n+1)-1;var h=e[n],d=e[n+1]-h||1,p=this._scratch[1],m=this._scratch[2],g=this._scratch[3],v=this._scratch[4],y=!0;for(f=0;f<c;++f,--u)p[f]=a[u],g[f]=l[u]*d,m[f]=a[u+c],v[f]=l[u+c]*d,y=y&&p[f]===m[f]&&g[f]===v[f]&&0===g[f];if(y)for(f=0;f<c;++f)i[f]=0;else{o.derivative(p,g,m,v,(t-h)/d,i);for(f=0;f<c;++f)i[f]/=d}}return i},l.lastT=function(){var t=this._time;return t[t.length-1]},l.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},l.jump=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],c=s[1];this._time.push(e,t);for(var u=0;u<2;++u)for(var f=0;f<r;++f)i.push(i[o++]),a.push(0);this._time.push(t);for(f=r;f>0;--f)i.push(n(l[f-1],c[f-1],arguments[f])),a.push(0)}},l.push=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=t-e,l=this.bounds,c=l[0],u=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var d=n(c[h-1],u[h-1],arguments[h]);i.push(d),a.push((d-i[o++])*f)}}},l.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,i=this._velocity,a=this.bounds,o=a[0],s=a[1];this._time.push(t);for(var l=e;l>0;--l)r.push(n(o[l-1],s[l-1],arguments[l])),i.push(0)}},l.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],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var d=arguments[h];i.push(n(l[h-1],c[h-1],i[o++]+d)),a.push(d*f)}}},l.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,i=this._state,a=this._velocity,o=i.length-r,s=this.bounds,l=s[0],c=s[1],u=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)i.push(n(l[f],c[f],i[o]+u*a[o])),a.push(0),o+=1}}},{\"binary-search-bounds\":70,\"cubic-hermite\":115}],143:[function(t,e,r){var n=t(\"dtype\");e.exports=function(t,e,r){if(!t)throw new TypeError(\"must specify data as first parameter\");if(r=0|+(r||0),Array.isArray(t)&&Array.isArray(t[0])){var i=t[0].length,a=t.length*i;e&&\"string\"!=typeof e||(e=new(n(e||\"float32\"))(a+r));var o=e.length-r;if(a!==o)throw new Error(\"source length \"+a+\" (\"+i+\"x\"+t.length+\") does not match destination length \"+o);for(var s=0,l=r;s<t.length;s++)for(var c=0;c<i;c++)e[l++]=t[s][c]}else if(e&&\"string\"!=typeof e)e.set(t,r);else{var u=n(e||\"float32\");0===r?e=new u(t):(e=new u(t.length+r)).set(t,r)}return e}},{dtype:133}],144:[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){if(r=l(t,e.left))return r}var r;return(r=t(e.key,e.value))||(e.right?l(t,e.right):void 0)}function c(t,e,r,n){if(e(t,n.key)<=0){if(n.left){if(i=c(t,e,r,n.left))return i}var i;if(i=r(n.key,n.value))return i}if(n.right)return c(t,e,r,n.right)}function u(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=u(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 u(t,e,r,n,i.right)}function f(t,e){this.tree=t,this._stack=e}function h(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}e.exports=function(t){return new s(t||function(t,e){return t<e?-1:t>e?1:0},null)};var d=0,p=1,m=s.prototype;Object.defineProperty(m,\"keys\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(m,\"values\",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(m,\"length\",{get:function(){return this.root?this.root._count:0}}),m.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],c=[];i;){var u=r(t,i.key);l.push(i),c.push(u),i=u<=0?i.left:i.right}l.push(new n(d,t,e,null,null,1));for(var f=l.length-2;f>=0;--f){i=l[f];c[f]<=0?l[f]=new n(i._color,i.key,i.value,l[f+1],i.right,i._count+1):l[f]=new n(i._color,i.key,i.value,i.left,l[f+1],i._count+1)}for(f=l.length-1;f>1;--f){var h=l[f-1];i=l[f];if(h._color===p||i._color===p)break;var m=l[f-2];if(m.left===h)if(h.left===i){if(!(g=m.right)||g._color!==d){if(m._color=d,m.left=h.right,h._color=p,h.right=m,l[f-2]=h,l[f-1]=i,o(m),o(h),f>=3){(v=l[f-3]).left===m?v.left=h:v.right=h}break}h._color=p,m.right=a(p,g),m._color=d,f-=1}else{if(!(g=m.right)||g._color!==d){if(h.right=i.left,m._color=d,m.left=i.right,i._color=p,i.left=h,i.right=m,l[f-2]=i,l[f-1]=h,o(m),o(h),o(i),f>=3){(v=l[f-3]).left===m?v.left=i:v.right=i}break}h._color=p,m.right=a(p,g),m._color=d,f-=1}else if(h.right===i){if(!(g=m.left)||g._color!==d){if(m._color=d,m.right=h.left,h._color=p,h.left=m,l[f-2]=h,l[f-1]=i,o(m),o(h),f>=3){(v=l[f-3]).right===m?v.right=h:v.left=h}break}h._color=p,m.left=a(p,g),m._color=d,f-=1}else{var g;if(!(g=m.left)||g._color!==d){if(h.left=i.right,m._color=d,m.right=i.left,i._color=p,i.right=h,i.left=m,l[f-2]=i,l[f-1]=h,o(m),o(h),o(i),f>=3){var v;(v=l[f-3]).right===m?v.right=i:v.left=i}break}h._color=p,m.left=a(p,g),m._color=d,f-=1}}return l[0]._color=p,new s(r,l[0])},m.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return l(t,this.root);case 2:return c(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return u(e,r,this._compare,t,this.root)}},Object.defineProperty(m,\"begin\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(m,\"end\",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),m.at=function(t){if(t<0)return new f(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new f(this,[])},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n)},m.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 f(this,n);r=i<=0?r.left:r.right}return new f(this,[])},m.remove=function(t){var e=this.find(t);return e?e.remove():this},m.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 g=f.prototype;Object.defineProperty(g,\"valid\",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,\"node\",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new f(this.tree,this._stack.slice())},g.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 l=t.length-2;l>=0;--l){(r=t[l]).left===t[l+1]?e[l]=new n(r._color,r.key,r.value,e[l+1],r.right,r._count):e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count)}if((r=e[e.length-1]).left&&r.right){var c=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var u=e[c-1];e.push(new n(r._color,u.key,u.value,r.left,r.right,r._count)),e[c-1].key=r.key,e[c-1].value=r.value;for(l=e.length-2;l>=c;--l)r=e[l],e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);e[c-1].left=e[c]}if((r=e[e.length-1])._color===d){var f=e[e.length-2];f.left===r?f.left=null:f.right===r&&(f.right=null),e.pop();for(l=0;l<e.length;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(r.left||r.right){r.left?h(r,r.left):r.right&&h(r,r.right),r._color=p;for(l=0;l<e.length-1;++l)e[l]._count--;return new s(this.tree._compare,e[0])}if(1===e.length)return new s(this.tree._compare,null);for(l=0;l<e.length;++l)e[l]._count--;var m=e[e.length-2];return function(t){for(var e,r,n,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=p);if((r=t[l-1]).left===e){if((n=r.right).right&&n.right._color===d)return 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=p,r._color=p,s._color=p,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),void(t[l-1]=n);if(n.left&&n.left._color===d)return 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=p,n._color=p,e._color=p,o(r),o(n),o(s),l>1&&((c=t[l-2]).left===r?c.left=s:c.right=s),void(t[l-1]=s);if(n._color===p){if(r._color===d)return r._color=p,void(r.right=a(d,n));r.right=a(d,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=d,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}else{if((n=r.left).left&&n.left._color===d)return n=r.left=i(n),s=n.left=i(n.left),r.left=n.right,n.right=r,n.left=s,n._color=r._color,e._color=p,r._color=p,s._color=p,o(r),o(n),l>1&&((c=t[l-2]).right===r?c.right=n:c.left=n),void(t[l-1]=n);if(n.right&&n.right._color===d)return 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=p,n._color=p,e._color=p,o(r),o(n),o(s),l>1&&((c=t[l-2]).right===r?c.right=s:c.left=s),void(t[l-1]=s);if(n._color===p){if(r._color===d)return r._color=p,void(r.left=a(d,n));r.left=a(d,n);continue}if(n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=d,o(r),o(n),l>1){var c;(c=t[l-2]).right===r?c.right=n:c.left=n}t[l-1]=n,t[l]=r,l+1<t.length?t[l+1]=e:t.push(e),l+=2}}}(e),m.left===r?m.left=null:m.right=null,new s(this.tree._compare,e[0])},Object.defineProperty(g,\"key\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,\"value\",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,\"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}),g.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(g,\"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}}),g.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]).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])},g.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(g,\"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}})},{}],145:[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},{}],146:[function(t,e,r){function n(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(i(t[r]))}return e}function i(t){var e=0;if(t.length>2){for(var r,n,i=0;i<t.length-1;i++)r=t[i],e+=a((n=t[i+1])[0]-r[0])*(2+Math.sin(a(r[1]))+Math.sin(a(n[1])));e=e*o.RADIUS*o.RADIUS/2}return e}function a(t){return t*Math.PI/180}var o=t(\"wgs84\");e.exports.geometry=function(t){if(\"Polygon\"===t.type)return n(t.coordinates);if(\"MultiPolygon\"===t.type){for(var e=0,r=0;r<t.coordinates.length;r++)e+=n(t.coordinates[r]);return e}return null},e.exports.ring=i},{wgs84:579}],147:[function(t,e,r){function n(t,e){switch(t&&t.type||null){case\"FeatureCollection\":return t.features=t.features.map(i(n,e)),t;case\"Feature\":return t.geometry=n(t.geometry,e),t;case\"Polygon\":case\"MultiPolygon\":return function(t,e){\"Polygon\"===t.type?t.coordinates=a(t.coordinates,e):\"MultiPolygon\"===t.type&&(t.coordinates=t.coordinates.map(i(a,e)));return t}(t,e);default:return t}}function i(t,e){return function(r){return t(r,e)}}function a(t,e){e=!!e,t[0]=o(t[0],!e);for(var r=1;r<t.length;r++)t[r]=o(t[r],e);return t}function o(t,e){return function(t){return s.ring(t)>=0}(t)===e?t:t.reverse()}var s=t(\"geojson-area\");e.exports=n},{\"geojson-area\":146}],148:[function(t,e,r){\"use strict\";function n(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=function(t,e,r,a,o,s,l,c){if(r/=e,a/=e,l>=r&&c<=a)return t;if(l>a||c<r)return null;for(var u=[],f=0;f<t.length;f++){var h,d,p=t[f],m=p.geometry,g=p.type;if(h=p.min[o],d=p.max[o],h>=r&&d<=a)u.push(p);else if(!(h>a||d<r)){var v=1===g?function(t,e,r,n){for(var i=[],a=0;a<t.length;a++){var o=t[a],s=o[n];s>=e&&s<=r&&i.push(o)}return i}(m,r,a,o):function(t,e,r,i,a,o){for(var s=[],l=0;l<t.length;l++){var c,u,f,h=0,d=0,p=null,m=t[l],g=m.area,v=m.dist,y=m.outer,x=m.length,b=[];for(u=0;u<x-1;u++)c=p||m[u],p=m[u+1],h=d||c[i],d=p[i],h<e?d>r?(b.push(a(c,p,e),a(c,p,r)),o||(b=n(s,b,g,v,y))):d>=e&&b.push(a(c,p,e)):h>r?d<e?(b.push(a(c,p,r),a(c,p,e)),o||(b=n(s,b,g,v,y))):d<=r&&b.push(a(c,p,r)):(b.push(c),d<e?(b.push(a(c,p,e)),o||(b=n(s,b,g,v,y))):d>r&&(b.push(a(c,p,r)),o||(b=n(s,b,g,v,y))));c=m[x-1],(h=c[i])>=e&&h<=r&&b.push(c),f=b[b.length-1],o&&f&&(b[0][0]!==f[0]||b[0][1]!==f[1])&&b.push(b[0]),n(s,b,g,v,y)}return s}(m,r,a,o,s,3===g);v.length&&u.push(i(p.tags,g,v,p.id))}}return u.length?u:null};var i=t(\"./feature\")},{\"./feature\":150}],149:[function(t,e,r){\"use strict\";function n(t,e,r){if(null!==e.geometry){var o,l,c,u,f=e.geometry,h=f.type,d=f.coordinates,p=e.properties,m=e.id;if(\"Point\"===h)t.push(s(p,1,[a(d)],m));else if(\"MultiPoint\"===h)t.push(s(p,1,i(d),m));else if(\"LineString\"===h)t.push(s(p,2,[i(d,r)],m));else if(\"MultiLineString\"===h||\"Polygon\"===h){for(c=[],o=0;o<d.length;o++)u=i(d[o],r),\"Polygon\"===h&&(u.outer=0===o),c.push(u);t.push(s(p,\"Polygon\"===h?3:2,c,m))}else if(\"MultiPolygon\"===h){for(c=[],o=0;o<d.length;o++)for(l=0;l<d[o].length;l++)(u=i(d[o][l],r)).outer=0===l,c.push(u);t.push(s(p,3,c,m))}else{if(\"GeometryCollection\"!==h)throw new Error(\"Input data is not a valid GeoJSON object.\");for(o=0;o<f.geometries.length;o++)n(t,{geometry:f.geometries[o],properties:p},r)}}}function i(t,e){for(var r=[],n=0;n<t.length;n++)r.push(a(t[n]));return e&&(o(r,e),function(t){for(var e,r,n=0,i=0,a=0;a<t.length-1;a++)e=r||t[a],r=t[a+1],n+=e[0]*r[1]-r[0]*e[1],i+=Math.abs(r[0]-e[0])+Math.abs(r[1]-e[1]);t.area=Math.abs(n/2),t.dist=i}(r)),r}function a(t){var e=Math.sin(t[1]*Math.PI/180),r=t[0]/360+.5,n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n=n<0?0:n>1?1:n,[r,n,0]}e.exports=function(t,e){var r=[];if(\"FeatureCollection\"===t.type)for(var i=0;i<t.features.length;i++)n(r,t.features[i],e);else\"Feature\"===t.type?n(r,t,e):n(r,{geometry:t},e);return r};var o=t(\"./simplify\"),s=t(\"./feature\")},{\"./feature\":150,\"./simplify\":152}],150:[function(t,e,r){\"use strict\";function n(t,e,r){for(var n,i=0;i<r.length;i++)n=r[i],t[0]=Math.min(n[0],t[0]),e[0]=Math.max(n[0],e[0]),t[1]=Math.min(n[1],t[1]),e[1]=Math.max(n[1],e[1])}e.exports=function(t,e,r,i){var a={id:i||null,type:e,geometry:r,tags:t||null,min:[1/0,1/0],max:[-1/0,-1/0]};return function(t){var e=t.geometry,r=t.min,i=t.max;if(1===t.type)n(r,i,e);else for(var a=0;a<e.length;a++)n(r,i,e[a])}(a),a}},{}],151:[function(t,e,r){\"use strict\";function n(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;r&&console.time(\"preprocess data\");var n=1<<e.maxZoom,i=l(t,e.tolerance/(n*e.extent));this.tiles={},this.tileCoords=[],r&&(console.timeEnd(\"preprocess data\"),console.log(\"index: maxZoom: %d, maxPoints: %d\",e.indexMaxZoom,e.indexMaxPoints),console.time(\"generate tiles\"),this.stats={},this.total=0),(i=f(i,e.buffer/e.extent,a)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log(\"features: %d, points: %d\",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd(\"generate tiles\"),console.log(\"tiles generated:\",this.total,JSON.stringify(this.stats)))}function i(t,e,r){return 32*((1<<t)*r+e)+t}function a(t,e,r){return[r,(r-t[0])*(e[1]-t[1])/(e[0]-t[0])+t[1],1]}function o(t,e,r){return[(r-t[1])*(e[0]-t[0])/(e[1]-t[1])+t[0],r,1]}function s(t,e,r){var n=t.source;if(1!==n.length)return!1;var i=n[0];if(3!==i.type||i.geometry.length>1)return!1;var a=i.geometry[0].length;if(5!==a)return!1;for(var o=0;o<a;o++){var s=c.point(i.geometry[0][o],e,t.z2,t.x,t.y);if(s[0]!==-r&&s[0]!==e+r||s[1]!==-r&&s[1]!==e+r)return!1}return!0}e.exports=function(t,e){return new n(t,e)};var l=t(\"./convert\"),c=t(\"./transform\"),u=t(\"./clip\"),f=t(\"./wrap\"),h=t(\"./tile\");n.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,solidChildren:!1,tolerance:3,extent:4096,buffer:64,debug:0},n.prototype.splitTile=function(t,e,r,n,l,c,f){for(var d=[t,e,r,n],p=this.options,m=p.debug,g=null;d.length;){n=d.pop(),r=d.pop(),e=d.pop(),t=d.pop();var v=1<<e,y=i(e,r,n),x=this.tiles[y],b=e===p.maxZoom?0:p.tolerance/(v*p.extent);if(!x&&(m>1&&console.time(\"creation\"),x=this.tiles[y]=h(t,v,r,n,b,e===p.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,x.numFeatures,x.numPoints,x.numSimplified),console.timeEnd(\"creation\"));var _=\"z\"+e;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(x.source=t,l){if(e===p.maxZoom||e===l)continue;var w=1<<l-e;if(r!==Math.floor(c/w)||n!==Math.floor(f/w))continue}else if(e===p.indexMaxZoom||x.numPoints<=p.indexMaxPoints)continue;if(p.solidChildren||!s(x,p.extent,p.buffer)){x.source=null,m>1&&console.time(\"clipping\");var M,k,A,T,S,E,L=.5*p.buffer/p.extent,C=.5-L,z=.5+L,D=1+L;M=k=A=T=null,S=u(t,v,r-L,r+z,0,a,x.min[0],x.max[0]),E=u(t,v,r+C,r+D,0,a,x.min[0],x.max[0]),S&&(M=u(S,v,n-L,n+z,1,o,x.min[1],x.max[1]),k=u(S,v,n+C,n+D,1,o,x.min[1],x.max[1])),E&&(A=u(E,v,n-L,n+z,1,o,x.min[1],x.max[1]),T=u(E,v,n+C,n+D,1,o,x.min[1],x.max[1])),m>1&&console.timeEnd(\"clipping\"),t.length&&(d.push(M||[],e+1,2*r,2*n),d.push(k||[],e+1,2*r,2*n+1),d.push(A||[],e+1,2*r+1,2*n),d.push(T||[],e+1,2*r+1,2*n+1))}else l&&(g=e)}return g},n.prototype.getTile=function(t,e,r){var n=this.options,a=n.extent,o=n.debug,l=1<<t,u=i(t,e=(e%l+l)%l,r);if(this.tiles[u])return c.tile(this.tiles[u],a);o>1&&console.log(\"drilling down to z%d-%d-%d\",t,e,r);for(var f,h=t,d=e,p=r;!f&&h>0;)h--,d=Math.floor(d/2),p=Math.floor(p/2),f=this.tiles[i(h,d,p)];if(!f||!f.source)return null;if(o>1&&console.log(\"found parent tile z%d-%d-%d\",h,d,p),s(f,a,n.buffer))return c.tile(f,a);o>1&&console.time(\"drilling down\");var m=this.splitTile(f.source,h,d,p,t,e,r);if(o>1&&console.timeEnd(\"drilling down\"),null!==m){var g=1<<t-m;u=i(m,Math.floor(e/g),Math.floor(r/g))}return this.tiles[u]?c.tile(this.tiles[u],a):null}},{\"./clip\":148,\"./convert\":149,\"./tile\":153,\"./transform\":154,\"./wrap\":155}],152:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o=e*e,s=0,l=t.length-1,c=[];for(t[s][2]=1,t[l][2]=1;l;){for(n=0,r=s+1;r<l;r++)(i=function(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],l=t[1],c=a-n,u=o-i;if(0!==c||0!==u){var f=((s-n)*c+(l-i)*u)/(c*c+u*u);f>1?(n=a,i=o):f>0&&(n+=c*f,i+=u*f)}return c=s-n,u=l-i,c*c+u*u}(t[r],t[s],t[l]))>n&&(a=r,n=i);n>o?(t[a][2]=n,c.push(s),c.push(a),s=a):(l=c.pop(),s=c.pop())}}},{}],153:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){for(var o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z2:e,transformed:!1,min:[2,1],max:[-1,0]},s=0;s<t.length;s++){o.numFeatures++,function(t,e,r,n){var i,a,o,s,l=e.geometry,c=e.type,u=[],f=r*r;if(1===c)for(i=0;i<l.length;i++)u.push(l[i]),t.numPoints++,t.numSimplified++;else for(i=0;i<l.length;i++)if(o=l[i],n||!(2===c&&o.dist<r||3===c&&o.area<f)){var h=[];for(a=0;a<o.length;a++)s=o[a],(n||s[2]>f)&&(h.push(s),t.numSimplified++),t.numPoints++;3===c&&function(t,e){(function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],r=t[o],n+=(r[0]-e[0])*(e[1]+r[1]);return n})(t)<0===e&&t.reverse()}(h,o.outer),u.push(h)}else t.numPoints+=o.length;if(u.length){var d={geometry:u,type:c,tags:e.tags||null};null!==e.id&&(d.id=e.id),t.features.push(d)}}(o,t[s],i,a);var l=t[s].min,c=t[s].max;l[0]<o.min[0]&&(o.min[0]=l[0]),l[1]<o.min[1]&&(o.min[1]=l[1]),c[0]>o.max[0]&&(o.max[0]=c[0]),c[1]>o.max[1]&&(o.max[1]=c[1])}return o}},{}],154:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){return[Math.round(e*(t[0]*r-n)),Math.round(e*(t[1]*r-i))]}r.tile=function(t,e){if(t.transformed)return t;var r,i,a,o=t.z2,s=t.x,l=t.y;for(r=0;r<t.features.length;r++){var c=t.features[r],u=c.geometry;if(1===c.type)for(i=0;i<u.length;i++)u[i]=n(u[i],e,o,s,l);else for(i=0;i<u.length;i++){var f=u[i];for(a=0;a<f.length;a++)f[a]=n(f[a],e,o,s,l)}}return t.transformed=!0,t},r.point=n},{}],155:[function(t,e,r){\"use strict\";function n(t,e){for(var r=[],n=0;n<t.length;n++){var a,s=t[n],l=s.type;if(1===l)a=i(s.geometry,e);else{a=[];for(var c=0;c<s.geometry.length;c++)a.push(i(s.geometry[c],e))}r.push(o(s.tags,l,a,s.id))}return r}function i(t,e){var r=[];r.area=t.area,r.dist=t.dist;for(var n=0;n<t.length;n++)r.push([t[n][0]+e,t[n][1],t[n][2]]);return r}var a=t(\"./clip\"),o=t(\"./feature\");e.exports=function(t,e,r){var i=t,o=a(t,1,-1-e,e,0,r,-1,2),s=a(t,1,1-e,2+e,0,r,-1,2);return(o||s)&&(i=a(t,1,-e,1+e,0,r,-1,2)||[],o&&(i=n(o,1).concat(i)),s&&(i=i.concat(n(s,-1)))),i}},{\"./clip\":148,\"./feature\":150}],156:[function(t,e,r){e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"must specify type string\");if(e=e||{},\"undefined\"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement(\"canvas\");\"number\"==typeof e.width&&(r.width=e.width),\"number\"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf(\"webgl\")&&a.push(\"experimental-\"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},{}],157:[function(t,e,r){\"use strict\";function n(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=\"sans-serif\",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=c(t)}function a(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}function o(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var f=a,h=s,d=o,p=l;c&1<<u&&(f=s,h=a,d=l,p=o),f[u]=r[0][u],h[u]=r[1][u],i[u]>0?(d[u]=-1,p[u]=0):(d[u]=0,p[u]=1)}}e.exports=function(t,e){var r=new i(t);return r.update(e),r};var s=t(\"./lib/text.js\"),l=t(\"./lib/lines.js\"),c=t(\"./lib/background.js\"),u=t(\"./lib/cube.js\"),f=t(\"./lib/ticks.js\"),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=i.prototype;d.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]}),c=!1,u=!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]&&(u=!0),this.bounds[d][p]=h[d][p];if(\"ticks\"in t){r=t.ticks,c=!0,this.autoTicks=!1;for(d=0;d<3;++d)this.tickSpacing[d]=0}else n(\"tickSpacing\")&&(this.autoTicks=!0,u=!0);if(this._firstInit&&(\"ticks\"in t||\"tickSpacing\"in t||(this.autoTicks=!0),u=!0,c=!0,this._firstInit=!1),u&&this.autoTicks&&(r=f.create(this.bounds,this.tickSpacing),c=!0),c){for(d=0;d<3;++d)r[d].sort(function(t,e){return t.x-e.x});f.equal(r,this.ticks)?c=!1:this.ticks=r}i(\"tickEnable\"),a(\"tickFont\")&&(c=!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||c)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=s(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};var p=[new a,new a,new a],m=[0,0,0],g={model:h,view:h,projection:h};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];d.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||h,i=t.view||h,a=t.projection||h,s=this.bounds,l=u(r,i,a,s),c=l.cubeEdges,f=l.axis,d=i[12],b=i[13],_=i[14],w=i[15],M=this.pixelRatio*(a[3]*d+a[7]*b+a[11]*_+a[15]*w)/e.drawingBufferHeight,k=0;k<3;++k)this.lastCubeProps.cubeEdges[k]=c[k],this.lastCubeProps.axis[k]=f[k];var A=p;for(k=0;k<3;++k)o(p[k],k,this.bounds,c,f);e=this.gl;var T=m;for(k=0;k<3;++k)this.backgroundEnable[k]?T[k]=f[k]:T[k]=0;this._background.draw(r,i,a,s,T,this.backgroundColor),this._lines.bind(r,i,a,this);for(k=0;k<3;++k){var S=[0,0,0];f[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(E=0;E<2;++E){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(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);var z=n(v,A[k].primalMinor),D=n(y,A[k].mirrorMinor),I=this.lineTickLength;for(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(k=0;k<3;++k){var O=A[k].primalMinor,F=n(x,A[k].primalOffset);for(E=0;E<3;++E)this.lineTickEnable[k]&&(F[E]+=M*O[E]*Math.max(this.lineTickLength[E],0)/r[5*E]);if(this.tickEnable[k]){for(E=0;E<3;++E)F[E]+=M*O[E]*this.tickPad[E]/r[5*E];this._text.drawTicks(k,this.tickSize[k],this.tickAngle[k],F,this.tickColor[k])}if(this.labelEnable[k]){for(E=0;E<3;++E)F[E]+=M*O[E]*this.labelPad[E]/r[5*E];F[k]+=.5*(s[0][k]+s[1][k]),this._text.drawLabel(k,this.labelSize[k],this.labelAngle[k],F,this.labelColor[k])}}},d.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\":158,\"./lib/cube.js\":159,\"./lib/lines.js\":160,\"./lib/text.js\":162,\"./lib/ticks.js\":163}],158:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],d=-1;d<=1;d+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=d,h[l]=d;for(var p=-1;p<=1;p+=2){f[c]=p;for(var m=-1;m<=1;m+=2)f[u]=m,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=c;c=u,u=g}var v=i(t,new Float32Array(e)),y=i(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=a(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=o(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new n(t,v,x,b)};var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"./shaders\").bg,s=n.prototype;s.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)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders\":161,\"gl-buffer\":165,\"gl-vao\":259}],159:[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;e<p.length;++e)if((t=s.positive(t,p[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],a=0;for(e=1;e+1<t.length;++e){var o=t[e],l=t[e+1],c=o[0]/o[3]-n,u=o[1]/o[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;a+=Math.abs(c*h-u*f)}return a}e.exports=function(t,e,r,s){o(c,e,t),o(c,r,c);for(var p=0,y=0;y<2;++y){h[2]=s[y][2];for(var x=0;x<2;++x){h[1]=s[x][1];for(var b=0;b<2;++b)h[0]=s[b][0],n(u[p],h,c),p+=1}}var _=-1;for(y=0;y<8;++y){for(var w=u[y][3],M=0;M<3;++M)f[y][M]=u[y][M]/w;w<0&&(_<0?_=y:f[y][2]<f[_][2]&&(_=y))}if(_<0){_=0;for(var k=0;k<3;++k){for(var A=(k+2)%3,T=(k+1)%3,S=-1,E=-1,L=0;L<2;++L){var C=(D=L<<k)+(L<<A)+(1-L<<T),z=D+(1-L<<A)+(L<<T);l(f[D],f[C],f[z],d)<0||(L?S=1:E=1)}if(S<0||E<0)E>S&&(_|=1<<k);else{for(L=0;L<2;++L){C=(D=L<<k)+(L<<A)+(1-L<<T),z=D+(1-L<<A)+(L<<T);var D,I=i([u[D],u[C],u[z],u[D+(1<<A)+(1<<T)]]);L?S=I:E=I}E>S&&(_|=1<<k)}}}var P=7^_,O=-1;for(y=0;y<8;++y)y!==_&&y!==P&&(O<0?O=y:f[O][1]>f[y][1]&&(O=y));var F=-1;for(y=0;y<3;++y)(N=O^1<<y)!==_&&N!==P&&(F<0&&(F=N),(T=f[N])[0]<f[F][0]&&(F=N));var R=-1;for(y=0;y<3;++y){var N;(N=O^1<<y)!==_&&N!==P&&N!==F&&(R<0&&(R=N),(T=f[N])[0]>f[R][0]&&(R=N))}var j=m;j[0]=j[1]=j[2]=0,j[a.log2(F^O)]=O&F,j[a.log2(O^R)]=O&R;var B=7^R;B===_||B===P?(B=7^F,j[a.log2(R^B)]=B&R):j[a.log2(F^B)]=B&F;var U=g,V=_;for(k=0;k<3;++k)U[k]=V&1<<k?-1:1;return v};var a=t(\"bit-twiddle\"),o=t(\"gl-mat4/multiply\"),s=(t(\"gl-mat4/invert\"),t(\"split-polygon\")),l=t(\"robust-orientation\"),c=new Array(16),u=(new Array(16),new Array(8)),f=new Array(8),h=new Array(3),d=[0,0,0];!function(){for(var t=0;t<8;++t)u[t]=[1,1,1,1],f[t]=[1,1,1]}();var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]],m=[1,1,1],g=[0,0,0],v={cubeEdges:m,axis:g}},{\"bit-twiddle\":71,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"robust-orientation\":515,\"split-polygon\":535}],160:[function(t,e,r){\"use strict\";function n(t){return t[0]=t[1]=t[2]=0,t}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}e.exports=function(t,e,r){var n=[],i=[0,0,0],c=[0,0,0],u=[0,0,0],f=[0,0,0];n.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var h=0;h<3;++h){for(var d=n.length/3|0,p=0;p<r[h].length;++p){var m=+r[h][p].x;n.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1)}var g=n.length/3|0;i[h]=d,c[h]=g-d,d=n.length/3|0;for(var v=0;v<r[h].length;++v)m=+r[h][v].x,n.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1);g=n.length/3|0,u[h]=d,f[h]=g-d}var y=o(t,new Float32Array(n)),x=s(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=l(t);return b.attributes.position.location=0,new a(t,y,x,b,c,i,f,u)};var o=t(\"gl-buffer\"),s=t(\"gl-vao\"),l=t(\"./shaders\").line,c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],d=[1,1],p=a.prototype;p.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=d,this.vao.bind()},p.drawAxisLine=function(t,e,r,a,o){var s=n(u);this.shader.uniforms.majorAxis=u,s[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=s;var l=i(h,r);l[t]+=e[0][t],this.shader.uniforms.offset=l,this.shader.uniforms.lineWidth=o,this.shader.uniforms.color=a;(c=n(f))[(t+2)%3]=1,this.shader.uniforms.screenAxis=c,this.vao.draw(this.gl.TRIANGLES,6);var c;(c=n(f))[(t+1)%3]=1,this.shader.uniforms.screenAxis=c,this.vao.draw(this.gl.TRIANGLES,6)},p.drawAxisTicks=function(t,e,r,i,a){if(this.tickCount[t]){var o=n(c);o[t]=1,this.shader.uniforms.majorAxis=o,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=i,this.shader.uniforms.lineWidth=a;var s=n(f);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},p.drawGrid=function(t,e,r,a,o,s){if(this.gridCount[t]){var l=n(u);l[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=l;var d=i(h,a);d[e]+=r[0][e],this.shader.uniforms.offset=d;var p=n(c);p[t]=1,this.shader.uniforms.majorAxis=p;var m=n(f);m[t]=1,this.shader.uniforms.screenAxis=m,this.shader.uniforms.lineWidth=s,this.shader.uniforms.color=o,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},p.drawZero=function(t,e,r,a,o,s){var l=n(u);this.shader.uniforms.majorAxis=l,l[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=l;var c=i(h,a);c[t]+=r[0][t],this.shader.uniforms.offset=c;var d=n(f);d[e]=1,this.shader.uniforms.screenAxis=d,this.shader.uniforms.lineWidth=s,this.shader.uniforms.color=o,this.vao.draw(this.gl.TRIANGLES,6)},p.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{\"./shaders\":161,\"gl-buffer\":165,\"gl-vao\":259}],161:[function(t,e,r){\"use strict\";var n=t(\"gl-shader\");r.line=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\\nuniform float lineWidth;\\nuniform vec2 screenShape;\\n\\nvec3 project(vec3 p) {\\n vec4 pp = projection * view * model * vec4(p, 1.0);\\n return pp.xyz / max(pp.w, 0.0001);\\n}\\n\\nvoid main() {\\n vec3 major = position.x * majorAxis;\\n vec3 minor = position.y * minorAxis;\\n\\n vec3 vPosition = major + minor + offset;\\n vec3 pPosition = project(vPosition);\\n vec3 offset = project(vPosition + screenAxis * position.z);\\n\\n vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\\n\\n gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\\n}\\n\",\"precision mediump float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = color;\\n}\",null,[{name:\"position\",type:\"vec3\"}])};r.text=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 offset, axis;\\nuniform float scale, angle, pixelScale;\\nuniform vec2 resolution;\\n\\nvoid main() { \\n //Compute plane offset\\n vec2 planeCoord = position.xy * pixelScale;\\n mat2 planeXform = scale * mat2(cos(angle), sin(angle),\\n -sin(angle), cos(angle));\\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\\n\\n //Compute world offset\\n float axisDistance = position.z;\\n vec3 dataPosition = axisDistance * axis + offset;\\n vec4 worldPosition = model * vec4(dataPosition, 1);\\n \\n //Compute clip position\\n vec4 viewPosition = view * worldPosition;\\n vec4 clipPosition = projection * viewPosition;\\n clipPosition /= clipPosition.w;\\n\\n //Apply text offset in clip coordinates\\n clipPosition += vec4(viewOffset, 0, 0);\\n\\n //Done\\n gl_Position = clipPosition;\\n}\",\"precision mediump float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = color;\\n}\",null,[{name:\"position\",type:\"vec3\"}])};r.bg=function(t){return n(t,\"#define GLSLIFY 1\\nattribute vec3 position;\\nattribute vec3 normal;\\n\\nuniform mat4 model, view, projection;\\nuniform vec3 enable;\\nuniform vec3 bounds[2];\\n\\nvarying vec3 colorChannel;\\n\\nvoid main() {\\n if(dot(normal, enable) > 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\":243}],162:[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}e.exports=function(t,e,r,o,l,c){var u=i(t),f=a(t,[{buffer:u,size:3}]),h=s(t);h.attributes.position.location=0;var d=new n(t,h,u,f);return d.update(e,r,o,l,c),d};var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"vectorize-text\"),s=t(\"./shaders\").text,l=window||r.global||{},c=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};var u=n.prototype,f=[0,0];u.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,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.update=function(t,e,r,n,i){function a(t,e,r,n){var i=c[r];i||(i=c[r]={});var a=i[e];a||(a=i[e]=function(t,e){try{return o(t,e)}catch(t){return console.warn(\"error vectorizing text:\",t),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:\"center\",textBaseline:\"middle\"}));for(var l=(n||12)/12,u=a.positions,f=a.cells,h=0,d=f.length;h<d;++h)for(var p=f[h],m=2;m>=0;--m){var g=u[p[m]];s.push(l*g[0],-l*g[1],t)}}this.gl;for(var s=[],l=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],d=0;d<3;++d){f[d]=s.length/3|0,a(.5*(t[0][d]+t[1][d]),e[d],r),h[d]=(s.length/3|0)-f[d],l[d]=s.length/3|0;for(var p=0;p<n[d].length;++p)n[d][p].text&&a(n[d][p].x,n[d][p].text,n[d][p].font||i,n[d][p].fontSize||12);u[d]=(s.length/3|0)-l[d]}this.buffer.update(s),this.tickOffset=l,this.tickCount=u,this.labelOffset=f,this.labelCount=h};var h=[0,0,0];u.drawTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=h;a[0]=a[1]=a[2]=0,a[t]=1,this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}};var d=[0,0,0];u.drawLabel=function(t,e,r,n,i){this.labelCount[t]&&(this.shader.uniforms.axis=d,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,t(\"_process\"))},{\"./shaders\":161,_process:488,\"gl-buffer\":165,\"gl-vao\":259,\"vectorize-text\":568}],163:[function(t,e,r){\"use strict\";function n(t,e){var r=t+\"\",n=r.indexOf(\".\"),i=0;n>=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,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=\"\"+l;if(o<0&&(u=\"-\"+u),i){for(var f=\"\"+c;f.length<i;)f=\"0\"+f;return u+\".\"+f}return u}r.create=function(t,e){for(var r=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:n(e[i],o)});for(o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},{}],164:[function(t,e,r){\"use strict\";function n(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}function i(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=d,s=p,l=0;l<3;++l)s[l]=o[l]=r[l];s[3]=o[3]=1,s[a]+=1,u(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,u(o,o,e),o[3]<0&&(t[a]=1/0);var c=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(c*c+f*f)}return t}e.exports=function(t,e,r,n,u){var d=e.model||f,p=e.view||f,v=e.projection||f,y=t.bounds,x=(u=u||s(d,p,v,y)).axis;u.edges,l(h,p,d),l(h,v,h);for(var b=m,_=0;_<3;++_)b[_].lo=1/0,b[_].hi=-1/0,b[_].pixelsPerDataUnit=1/0;var w=a(c(h,h));c(h,h);for(var M=0;M<3;++M){var k=(M+1)%3,A=(M+2)%3,T=g;t:for(_=0;_<2;++_){var S=[];if(x[M]<0!=!!_){T[M]=y[_][M];for(var E=0;E<2;++E){T[k]=y[E^_][k];for(var L=0;L<2;++L)T[A]=y[L^E^_][A],S.push(T.slice())}for(E=0;E<w.length;++E){if(0===S.length)continue t;S=o.positive(S,w[E])}for(E=0;E<S.length;++E){A=S[E];var C=i(g,h,A,r,n);for(L=0;L<3;++L)b[L].lo=Math.min(b[L].lo,A[L]),b[L].hi=Math.max(b[L].hi,A[L]),L!==M&&(b[L].pixelsPerDataUnit=Math.min(b[L].pixelsPerDataUnit,Math.abs(C[L])))}}}}return b};var a=t(\"extract-frustum-planes\"),o=t(\"split-polygon\"),s=t(\"./lib/cube.js\"),l=t(\"gl-mat4/multiply\"),c=t(\"gl-mat4/transpose\"),u=t(\"gl-vec4/transformMat4\"),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=new Float32Array(16),d=[0,0,0,1],p=[0,0,0,1],m=[new n(1/0,-1/0,1/0),new n(1/0,-1/0,1/0),new n(1/0,-1/0,1/0)],g=[0,0,0]},{\"./lib/cube.js\":159,\"extract-frustum-planes\":139,\"gl-mat4/multiply\":188,\"gl-mat4/transpose\":196,\"gl-vec4/transformMat4\":265,\"split-polygon\":535}],165:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}function i(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)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=o.malloc(t.length,e),n=t.length,i=0;i<n;++i)r[i]=t[i];return r}var o=t(\"typedarray-pool\"),s=t(\"ndarray-ops\"),l=t(\"ndarray\"),c=[\"uint8\",\"uint8_clamped\",\"uint16\",\"uint32\",\"int8\",\"int16\",\"int32\",\"float32\"],u=n.prototype;u.bind=function(){this.gl.bindBuffer(this.type,this.handle)},u.unbind=function(){this.gl.bindBuffer(this.type,null)},u.dispose=function(){this.gl.deleteBuffer(this.handle)},u.update=function(t,e){if(\"number\"!=typeof e&&(e=-1),this.bind(),\"object\"==typeof t&&void 0!==t.shape){var r=t.dtype;if(c.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&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(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=o.malloc(t.size,r),u=l(n,t.shape);s.assign(u,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),o.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),o.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)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(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=new n(t,r,t.createBuffer(),0,i);return a.update(e),a}},{ndarray:458,\"ndarray-ops\":452,\"typedarray-pool\":554}],166:[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\"}},{}],167:[function(t,e,r){var n=t(\"./1.0/numbers\");e.exports=function(t){return n[t]}},{\"./1.0/numbers\":166}],168:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=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.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1}function i(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}function a(t,e,r,n){for(var i=f[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}e.exports=function(t){var e=t.gl,r=o(e),i=s(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),a=l(e);a.attributes.position.location=0,a.attributes.color.location=1,a.attributes.offset.location=2;var c=new n(e,r,i,a);return c.update(t),c};var o=t(\"gl-buffer\"),s=t(\"gl-vao\"),l=t(\"./shaders/index\"),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=n.prototype;u.isOpaque=function(){return this.opacity>=1},u.isTransparent=function(){return this.opacity<1},u.drawTransparent=u.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 f=0;f<3;++f)e.lineWidth(this.lineWidth[f]),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);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=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();u.update=function(t){\"lineWidth\"in(t=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 c=0;c<3;++c){this.lineOffset[c]=l;t:for(var u=0;u<s;++u){for(var f=r[u],h=0;h<3;++h)if(isNaN(f[h])||!isFinite(f[h]))continue t;var d=n[u],p=e[c];if(Array.isArray(p[0])&&(p=e[u]),3===p.length&&(p=[p[0],p[1],p[2],1]),!isNaN(d[0][c])&&!isNaN(d[1][c])){if(d[0][c]<0){(m=f.slice())[c]+=d[0][c],o.push(f[0],f[1],f[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,c)}if(d[1][c]>0){var m;(m=f.slice())[c]+=d[1][c],o.push(f[0],f[1],f[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,c)}}}this.lineCount[c]=l-this.lineOffset[c]}this.buffer.update(o)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{\"./shaders/index\":170,\"gl-buffer\":165,\"gl-vao\":259}],169:[function(t,e,r){e.exports=function(t){\"string\"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||\"\");return r.push(t[n]),r.join(\"\")}},{}],170:[function(t,e,r){\"use strict\";var n=t(\"glslify\"),i=t(\"gl-shader\"),a=n([\"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}\"]),o=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}\"]);e.exports=function(t){return i(t,a,o,null,[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"offset\",type:\"vec3\"}])}},{\"gl-shader\":243,glslify:169}],171:[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){switch(t){case f:throw new Error(\"gl-fbo: Framebuffer unsupported\");case h:throw new Error(\"gl-fbo: Framebuffer incomplete attachment\");case d:throw new Error(\"gl-fbo: Framebuffer incomplete dimensions\");case p:throw new Error(\"gl-fbo: Framebuffer incomplete missing attachment\");default:throw new Error(\"gl-fbo: Framebuffer failed for unspecified reason\")}}function o(t,e,r,n,i,a){if(!n)return null;var o=u(t,e,r,i,n);return o.magFilter=t.NEAREST,o.minFilter=t.NEAREST,o.mipSamples=1,o.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,o.handle,0),o}function s(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function l(t,e,r,l,c,u,f,h){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=h,this.color=new Array(c);for(var d=0;d<c;++d)this.color[d]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=l,this._useDepth=u,this._useStencil=f;var p=this,g=[0|e,0|r];Object.defineProperties(g,{0:{get:function(){return p._shape[0]},set:function(t){return p.width=t}},1:{get:function(){return p._shape[1]},set:function(t){return p.height=t}}}),this._shapeVector=g,function(t){var e=n(t.gl),r=t.gl,l=t.handle=r.createFramebuffer(),c=t._shape[0],u=t._shape[1],f=t.color.length,h=t._ext,d=t._useStencil,p=t._useDepth,g=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,l);for(var v=0;v<f;++v)t.color[v]=o(r,c,u,g,r.RGBA,r.COLOR_ATTACHMENT0+v);0===f?(t._color_rb=s(r,c,u,r.RGBA4,r.COLOR_ATTACHMENT0),h&&h.drawBuffersWEBGL(m[0])):f>1&&h.drawBuffersWEBGL(m[f]);var y=r.getExtension(\"WEBGL_depth_texture\");y?d?t.depth=o(r,c,u,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p&&(t.depth=o(r,c,u,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):p&&d?t._depth_rb=s(r,c,u,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):p?t._depth_rb=s(r,c,u,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=s(r,c,u,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(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),v=0;v<t.color.length;++v)t.color[v].dispose(),t.color[v]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),i(r,e),a(x)}i(r,e)}(this)}function c(t,e,r){if(t._destroyed)throw new Error(\"gl-fbo: Can't resize destroyed FBO\");if(t._shape[0]!==e||t._shape[1]!==r){var o=t.gl,s=o.getParameter(o.MAX_RENDERBUFFER_SIZE);if(e<0||e>s||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(o),c=0;c<t.color.length;++c)t.color[c].shape=t._shape;t._color_rb&&(o.bindRenderbuffer(o.RENDERBUFFER,t._color_rb),o.renderbufferStorage(o.RENDERBUFFER,o.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(o.bindRenderbuffer(o.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&o.renderbufferStorage(o.RENDERBUFFER,o.STENCIL_INDEX,t._shape[0],t._shape[1])),o.bindFramebuffer(o.FRAMEBUFFER,t.handle);var u=o.checkFramebufferStatus(o.FRAMEBUFFER);u!==o.FRAMEBUFFER_COMPLETE&&(t.dispose(),i(o,l),a(u)),i(o,l)}}var u=t(\"gl-texture2d\");e.exports=function(t,e,r,n){f||(f=t.FRAMEBUFFER_UNSUPPORTED,h=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,d=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,p=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var i=t.getExtension(\"WEBGL_draw_buffers\");if(!m&&i&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);m=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(a=n;a<r;++a)i[a]=t.NONE;m[n]=i}}(t,i),Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]),\"number\"!=typeof e)throw new Error(\"gl-fbo: Missing shape parameter\");var a=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>a||r<0||r>a)throw new Error(\"gl-fbo: Parameters are too large for FBO\");var o=1;if(\"color\"in(n=n||{})){if((o=Math.max(0|n.color,0))<0)throw new Error(\"gl-fbo: Must specify a nonnegative number of colors\");if(o>1){if(!i)throw new Error(\"gl-fbo: Multiple draw buffer extension not supported\");if(o>t.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error(\"gl-fbo: Context does not support \"+o+\" draw buffers\")}}var s=t.UNSIGNED_BYTE,c=t.getExtension(\"OES_texture_float\");if(n.float&&o>0){if(!c)throw new Error(\"gl-fbo: Context does not support floating point textures\");s=t.FLOAT}else n.preferFloat&&o>0&&c&&(s=t.FLOAT);var u=!0;\"depth\"in n&&(u=!!n.depth);var g=!1;return\"stencil\"in n&&(g=!!n.stencil),new l(t,e,r,s,o,u,g,i)};var f,h,d,p,m=null,g=l.prototype;Object.defineProperties(g,{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 c(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return t|=0,c(this,t,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,c(this,this._shape[0],t),t},enumerable:!1}}),g.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])}},g.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<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{\"gl-texture2d\":255}],172:[function(t,e,r){var n=t(\"sprintf-js\").sprintf,i=t(\"gl-constants/lookup\"),a=t(\"glsl-shader-name\"),o=t(\"add-line-numbers\");e.exports=function(t,e,r){\"use strict\";var s=a(e)||\"of unknown name (see npm glsl-shader-name)\",l=\"unknown type\";void 0!==r&&(l=r===i.FRAGMENT_SHADER?\"fragment\":\"vertex\");for(var c=n(\"Error compiling %s shader %s:\\n\",l,s),u=n(\"%s%s\",c,t),f=t.split(\"\\n\"),h={},d=0;d<f.length;d++){var p=f[d];if(\"\"!==p){var m=parseInt(p.split(\":\")[2]);if(isNaN(m))throw new Error(n(\"Could not parse error: %s\",p));h[m]=p}}var g=o(e).split(\"\\n\");for(d=0;d<g.length;d++)if((h[d+3]||h[d+2]||h[d+1])&&(c+=g[d]+\"\\n\",h[d+1])){var v=h[d+1];v=v.substr(v.split(\":\",3).join(\":\").length+1).trim(),c+=n(\"^^^ %s\\n\\n\",v)}return{long:c.trim(),short:u.trim()}}},{\"add-line-numbers\":44,\"gl-constants/lookup\":167,\"glsl-shader-name\":267,\"sprintf-js\":536}],173:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}e.exports=function(t,e){var r=t.gl,i=new n(t,s(r,c.vertex,c.fragment),s(r,c.pickVertex,c.pickFragment),l(r),l(r),l(r),l(r));return i.update(e),t.addObject(i),i};var i=t(\"binary-search-bounds\"),a=t(\"iota-array\"),o=t(\"typedarray-pool\"),s=t(\"gl-shader\"),l=t(\"gl-buffer\"),c=t(\"./lib/shaders\"),u=n.prototype,f=[0,0,1,0,0,1,1,0,1,1,0,1];u.draw=function(){var t=[1,0,0,0,1,0,0,0,1];return function(){var e=this.plot,r=this.shader,n=this.bounds,i=this.numVertices;if(!(i<=0)){var a=e.gl,o=e.dataBox,s=n[2]-n[0],l=n[3]-n[1],c=o[2]-o[0],u=o[3]-o[1];t[0]=2*s/c,t[4]=2*l/u,t[6]=2*(n[0]-o[0])/c-1,t[7]=2*(n[1]-o[1])/u-1,r.bind();var f=r.uniforms;f.viewTransform=t,f.shape=this.shape;var h=r.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(a.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(a.UNSIGNED_BYTE,!0),a.drawArrays(a.TRIANGLES,0,i)}}}(),u.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,c=a[2]-a[0],u=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*c/f,t[4]=2*u/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var d=0;d<4;++d)e[d]=r>>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]}}}(),u.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||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]]}},u.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||a(e[0]),n=t.y||a(e[1]),s=t.z||new Float32Array(e[0]*e[1]);this.xData=r,this.yData=n;var l=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],u=l.length,h=this.bounds,d=h[0]=r[0],p=h[1]=n[0],m=1/((h[2]=r[r.length-1])-d),g=1/((h[3]=n[n.length-1])-p),v=e[0],y=e[1];this.shape=[v,y];var x=(v-1)*(y-1)*(f.length>>>1);this.numVertices=x;for(var b=o.mallocUint8(4*x),_=o.mallocFloat32(2*x),w=o.mallocUint8(2*x),M=o.mallocUint32(x),k=0,A=0;A<y-1;++A)for(var T=g*(n[A]-p),S=g*(n[A+1]-p),E=0;E<v-1;++E)for(var L=m*(r[E]-d),C=m*(r[E+1]-d),z=0;z<f.length;z+=2){var D,I,P,O,F=f[z],R=f[z+1],N=s[(A+R)*v+(E+F)],j=i.le(l,N);if(j<0)D=c[0],I=c[1],P=c[2],O=c[3];else if(j===u-1)D=c[4*u-4],I=c[4*u-3],P=c[4*u-2],O=c[4*u-1];else{var B=(N-l[j])/(l[j+1]-l[j]),U=1-B,V=4*j,q=4*(j+1);D=U*c[V]+B*c[q],I=U*c[V+1]+B*c[q+1],P=U*c[V+2]+B*c[q+2],O=U*c[V+3]+B*c[q+3]}b[4*k]=255*D,b[4*k+1]=255*I,b[4*k+2]=255*P,b[4*k+3]=255*O,_[2*k]=.5*L+.5*C,_[2*k+1]=.5*T+.5*S,w[2*k]=F,w[2*k+1]=R,M[k]=A*v+E,k+=1}this.positionBuffer.update(_),this.weightBuffer.update(w),this.colorBuffer.update(b),this.idBuffer.update(M),o.free(_),o.free(b),o.free(w),o.free(M)},u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{\"./lib/shaders\":174,\"binary-search-bounds\":175,\"gl-buffer\":165,\"gl-shader\":243,\"iota-array\":281,\"typedarray-pool\":554}],174:[function(t,e,r){\"use strict\";e.exports={fragment:\"precision lowp float;\\n#define GLSLIFY 1\\nvarying vec4 fragColor;\\nvoid main() {\\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\\n}\\n\",vertex:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position;\\nattribute vec4 color;\\nattribute vec2 weight;\\n\\nuniform vec2 shape;\\nuniform mat3 viewTransform;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\\n fragColor = color;\\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\\n}\\n\",pickFragment:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragId;\\nvarying vec2 vWeight;\\n\\nuniform vec2 shape;\\nuniform vec4 pickOffset;\\n\\nvoid main() {\\n vec2 d = step(.5, vWeight);\\n vec4 id = fragId + pickOffset;\\n id.x += d.x + d.y*shape.x;\\n\\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_FragColor = id/255.;\\n}\\n\",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\"}},{}],175:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],176:[function(t,e,r){var n=t(\"gl-shader\"),i=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position, nextPosition;\\nattribute float arcLength, lineWidth;\\nattribute vec4 color;\\n\\nuniform vec2 screenShape;\\nuniform float pixelRatio;\\nuniform mat4 model, view, projection;\\n\\nvarying vec4 fragColor;\\nvarying vec3 worldPosition;\\nvarying float pixelArcLength;\\n\\nvoid main() {\\n vec4 projected = projection * view * model * vec4(position, 1.0);\\n vec4 tangentClip = projection * view * model * vec4(nextPosition - position, 0.0);\\n vec2 tangent = normalize(screenShape * tangentClip.xy);\\n vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(tangent.y, -tangent.x) / screenShape;\\n\\n gl_Position = vec4(projected.xy + projected.w * offset, projected.zw);\\n\\n worldPosition = position;\\n pixelArcLength = arcLength;\\n fragColor = color;\\n}\\n\",a=[{name:\"position\",type:\"vec3\"},{name:\"nextPosition\",type:\"vec3\"},{name:\"arcLength\",type:\"float\"},{name:\"lineWidth\",type:\"float\"},{name:\"color\",type:\"vec4\"}];r.createShader=function(t){return n(t,i,\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 clipBounds[2];\\nuniform sampler2D dashTexture;\\nuniform float dashScale;\\nuniform float opacity;\\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 float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\\n if(dashWeight < 0.5) {\\n discard;\\n }\\n gl_FragColor = fragColor * opacity;\\n}\\n\",null,a)},r.createPickShader=function(t){return n(t,i,\"precision mediump float;\\n#define GLSLIFY 1\\n\\n#define FLOAT_MAX 1.70141184e38\\n#define FLOAT_MIN 1.17549435e-38\\n\\nlowp vec4 encode_float_1_0(highp float v) {\\n highp float av = abs(v);\\n\\n //Handle special cases\\n if(av < FLOAT_MIN) {\\n return vec4(0.0, 0.0, 0.0, 0.0);\\n } else if(v > 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\":243}],177:[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}e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=p(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=m(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=s(e),a=l(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}]),u=h(new Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var d=c(e,u);d.wrap=e.REPEAT;var g=new o(e,r,n,i,a,d);return g.update(t),g};var s=t(\"gl-buffer\"),l=t(\"gl-vao\"),c=t(\"gl-texture2d\"),u=t(\"glsl-read-float\"),f=t(\"binary-search-bounds\"),h=t(\"ndarray\"),d=t(\"./lib/shaders\"),p=d.createShader,m=d.createPickShader,g=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],v=o.prototype;v.isTransparent=function(){return this.opacity<1},v.isOpaque=function(){return this.opacity>=1},v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.drawTransparent=v.draw=function(t){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||g,view:t.view||g,projection:t.projection||g,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)},v.drawPick=function(t){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||g,view:t.view||g,projection:t.projection||g,pickId:this.pickId,clipBounds:i(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount)},v.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=[],c=[],u=[],d=0,p=0,m=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=!1;t:for(e=1;e<a.length;++e){var v=a[e-1],y=a[e];for(c.push(d),u.push(v.slice()),r=0;r<3;++r){if(isNaN(v[r])||isNaN(y[r])||!isFinite(v[r])||!isFinite(y[r])){if(!i&&l.length>0){for(var x=0;x<24;++x)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 b,_;Array.isArray(o[0])?(b=o[e-1],_=o[e]):b=_=o,3===b.length&&(b=[b[0],b[1],b[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]);var w;w=Array.isArray(s)?s[e-1]:s;var M=d;if(d+=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,b[0],b[1],b[2],b[3]);p+=2,g=!1}l.push(v[0],v[1],v[2],y[0],y[1],y[2],M,w,b[0],b[1],b[2],b[3],v[0],v[1],v[2],y[0],y[1],y[2],M,-w,b[0],b[1],b[2],b[3],y[0],y[1],y[2],v[0],v[1],v[2],d,-w,_[0],_[1],_[2],_[3],y[0],y[1],y[2],v[0],v[1],v[2],d,w,_[0],_[1],_[2],_[3]),p+=4}if(this.buffer.update(l),c.push(d),u.push(a[a.length-1].slice()),this.bounds=m,this.vertexCount=p,this.points=u,this.arcLength=c,\"dashes\"in t){var k=t.dashes.slice();for(k.unshift(0),e=1;e<k.length;++e)k[e]=k[e-1]+k[e];var A=h(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)A.set(e,0,r,0);1&f.le(k,k[k.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}}},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},v.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=u(t.value[0],t.value[1],t.value[2],0),r=f.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new a(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],o=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),s=1-o,l=[0,0,0],c=0;c<3;++c)l[c]=s*n[c]+o*i[c];var h=Math.min(o<.5?r:r+1,this.points.length-1);return new a(e,l,h,this.points[h])}},{\"./lib/shaders\":176,\"binary-search-bounds\":70,\"gl-buffer\":165,\"gl-texture2d\":255,\"gl-vao\":259,\"glsl-read-float\":266,ndarray:458}],178:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null}},{}],179:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,d=c*a-o*l,p=r*f+n*h+i*d;return p?(p=1/p,t[0]=f*p,t[1]=(-u*n+i*c)*p,t[2]=(s*n-i*o)*p,t[3]=h*p,t[4]=(u*r-i*l)*p,t[5]=(-s*r+i*a)*p,t[6]=d*p,t[7]=(-c*r+n*l)*p,t[8]=(o*r-n*a)*p,t):null}},{}],180:[function(t,e,r){e.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],181:[function(t,e,r){e.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],182:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*o-r*a)*(f*g-h*m)-(e*s-n*a)*(u*g-h*p)+(e*l-i*a)*(u*m-f*p)+(r*s-n*o)*(c*g-h*d)-(r*l-i*o)*(c*m-f*d)+(n*l-i*s)*(c*p-u*d)}},{}],183:[function(t,e,r){e.exports=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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[1]=u+v,t[2]=h-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],184:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,d=i*l,p=i*c,m=a*c,g=o*s,v=o*l,y=o*c;return t[0]=1-(d+m),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(u+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},{}],185:[function(t,e,r){e.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{}],186:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(m*M-g*w+v*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*T-o*L-c*A)*C,t[5]=(r*L-i*T+a*A)*C,t[6]=(g*b-p*M-v*x)*C,t[7]=(u*M-h*b+d*x)*C,t[8]=(o*E-s*T+c*k)*C,t[9]=(n*T-r*E-a*k)*C,t[10]=(p*w-m*b+v*y)*C,t[11]=(f*b-u*w-d*y)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(m*x-p*_-g*y)*C,t[15]=(u*_-f*x+h*y)*C,t):null}},{}],187:[function(t,e,r){var n=t(\"./identity\");e.exports=function(t,e,r,i){var a,o,s,l,c,u,f,h,d,p,m=e[0],g=e[1],v=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],M=r[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-M)<1e-6?n(t):(f=m-_,h=g-w,d=v-M,p=1/Math.sqrt(f*f+h*h+d*d),f*=p,h*=p,d*=p,a=x*d-b*h,o=b*f-y*d,s=y*h-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),l=h*s-d*o,c=d*a-f*s,u=f*o-h*a,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=c,t[6]=h,t[7]=0,t[8]=s,t[9]=u,t[10]=d,t[11]=0,t[12]=-(a*m+o*g+s*v),t[13]=-(l*m+c*g+u*v),t[14]=-(f*m+h*g+d*v),t[15]=1,t)}},{\"./identity\":185}],188:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*m,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*c+_*d+w*v,t[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*m,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*c+_*d+w*v,t[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*m,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*c+_*d+w*v,t[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*m,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*c+_*d+w*v,t[15]=x*o+b*u+_*p+w*y,t}},{}],189:[function(t,e,r){e.exports=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}},{}],190:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,M,k,A,T,S,E=n[0],L=n[1],C=n[2],z=Math.sqrt(E*E+L*L+C*C);return Math.abs(z)<1e-6?null:(z=1/z,E*=z,L*=z,C*=z,i=Math.sin(r),a=Math.cos(r),o=1-a,s=e[0],l=e[1],c=e[2],u=e[3],f=e[4],h=e[5],d=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=E*E*o+a,b=L*E*o+C*i,_=C*E*o-L*i,w=E*L*o-C*i,M=L*L*o+a,k=C*L*o+E*i,A=E*C*o+L*i,T=L*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+m*_,t[1]=l*x+h*b+g*_,t[2]=c*x+d*b+v*_,t[3]=u*x+p*b+y*_,t[4]=s*w+f*M+m*k,t[5]=l*w+h*M+g*k,t[6]=c*w+d*M+v*k,t[7]=u*w+p*M+y*k,t[8]=s*A+f*T+m*S,t[9]=l*A+h*T+g*S,t[10]=c*A+d*T+v*S,t[11]=u*A+p*T+y*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},{}],191:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},{}],192:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},{}],193:[function(t,e,r){e.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},{}],194:[function(t,e,r){e.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],195:[function(t,e,r){e.exports=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,d,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*m+s*g+f*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=a*m+c*g+d*v+e[14],t[15]=o*m+u*g+p*v+e[15]),t}},{}],196:[function(t,e,r){e.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},{}],197:[function(t,e,r){\"use strict\";e.exports=function(t,e){switch(e.length){case 0:break;case 1:t[0]=1/e[0];break;case 4:n(t,e);break;case 9:i(t,e);break;case 16:a(t,e);break;default:throw new Error(\"currently supports matrices up to 4x4\")}return t};var n=t(\"gl-mat2/invert\"),i=t(\"gl-mat3/invert\"),a=t(\"gl-mat4/invert\")},{\"gl-mat2/invert\":178,\"gl-mat3/invert\":179,\"gl-mat4/invert\":186}],198:[function(t,e,r){r.glMatrix=t(\"./gl-matrix/common.js\"),r.mat2=t(\"./gl-matrix/mat2.js\"),r.mat2d=t(\"./gl-matrix/mat2d.js\"),r.mat3=t(\"./gl-matrix/mat3.js\"),r.mat4=t(\"./gl-matrix/mat4.js\"),r.quat=t(\"./gl-matrix/quat.js\"),r.vec2=t(\"./gl-matrix/vec2.js\"),r.vec3=t(\"./gl-matrix/vec3.js\"),r.vec4=t(\"./gl-matrix/vec4.js\")},{\"./gl-matrix/common.js\":199,\"./gl-matrix/mat2.js\":200,\"./gl-matrix/mat2d.js\":201,\"./gl-matrix/mat3.js\":202,\"./gl-matrix/mat4.js\":203,\"./gl-matrix/quat.js\":204,\"./gl-matrix/vec2.js\":205,\"./gl-matrix/vec3.js\":206,\"./gl-matrix/vec4.js\":207}],199:[function(t,e,r){var n={};n.EPSILON=1e-6,n.ARRAY_TYPE=\"undefined\"!=typeof Float32Array?Float32Array:Array,n.RANDOM=Math.random,n.ENABLE_SIMD=!1,n.SIMD_AVAILABLE=n.ARRAY_TYPE===Float32Array&&\"SIMD\"in this,n.USE_SIMD=n.ENABLE_SIMD&&n.SIMD_AVAILABLE,n.setMatrixArrayType=function(t){n.ARRAY_TYPE=t};var i=Math.PI/180;n.toRadian=function(t){return t*i},n.equals=function(t,e){return Math.abs(t-e)<=n.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))},e.exports=n},{}],200:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,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.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},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.set=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t},i.transpose=function(t,e){if(t===e){var r=e[1];t[1]=e[2],t[2]=r}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*a-i*n;return o?(o=1/o,t[0]=a*o,t[1]=-n*o,t[2]=-i*o,t[3]=r*o,t):null},i.adjoint=function(t,e){var r=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=r,t},i.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1],c=r[2],u=r[3];return t[0]=n*s+a*l,t[1]=i*s+o*l,t[2]=n*c+a*u,t[3]=i*c+o*u,t},i.mul=i.multiply,i.rotate=function(t,e,r){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]=n*-s+a*l,t[3]=i*-s+o*l,t},i.scale=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=r[0],l=r[1];return t[0]=n*s,t[1]=i*s,t[2]=a*l,t[3]=o*l,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t},i.str=function(t){return\"mat2(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},i.LDU=function(t,e,r,n){return t[2]=n[2]/n[0],r[0]=n[0],r[1]=n[1],r[3]=n[3]-t[2]*r[1],[t,e,r]},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.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(r-s)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-c)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(o-u)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},i.multiplyScalar=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.multiplyScalarAndAdd=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},e.exports=i},{\"./common.js\":199}],201:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},i.fromValues=function(t,e,r,i,a,o){var s=new n.ARRAY_TYPE(6);return s[0]=t,s[1]=e,s[2]=r,s[3]=i,s[4]=a,s[5]=o,s},i.set=function(t,e,r,n,i,a,o){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=r*a-n*i;return l?(l=1/l,t[0]=a*l,t[1]=-n*l,t[2]=-i*l,t[3]=r*l,t[4]=(i*s-a*o)*l,t[5]=(n*o-r*s)*l,t):null},i.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1],f=r[2],h=r[3],d=r[4],p=r[5];return t[0]=n*c+a*u,t[1]=i*c+o*u,t[2]=n*f+a*h,t[3]=i*f+o*h,t[4]=n*d+a*p+s,t[5]=i*d+o*p+l,t},i.mul=i.multiply,i.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=Math.sin(r),u=Math.cos(r);return t[0]=n*u+a*c,t[1]=i*u+o*c,t[2]=n*-c+a*u,t[3]=i*-c+o*u,t[4]=s,t[5]=l,t},i.scale=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n*c,t[1]=i*c,t[2]=a*u,t[3]=o*u,t[4]=s,t[5]=l,t},i.translate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=r[0],u=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=n*c+a*u+s,t[5]=i*c+o*u+l,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=-r,t[3]=n,t[4]=0,t[5]=0,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},i.str=function(t){return\"mat2d(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},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[4]=e[4]+r[4],t[5]=e[5]+r[5],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=e[0],u=e[1],f=e[2],h=e[3],d=e[4],p=e[5];return Math.abs(r-c)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(i-u)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-f)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(o-h)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(s-d)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(l-p)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(p))},e.exports=i},{\"./common.js\":199}],202:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},i.clone=function(t){var e=new n.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromValues=function(t,e,r,i,a,o,s,l,c){var u=new n.ARRAY_TYPE(9);return u[0]=t,u[1]=e,u[2]=r,u[3]=i,u[4]=a,u[5]=o,u[6]=s,u[7]=l,u[8]=c,u},i.set=function(t,e,r,n,i,a,o,s,l,c){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.transpose=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},i.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=u*o-s*c,h=-u*a+s*l,d=c*a-o*l,p=r*f+n*h+i*d;return p?(p=1/p,t[0]=f*p,t[1]=(-u*n+i*c)*p,t[2]=(s*n-i*o)*p,t[3]=h*p,t[4]=(u*r-i*l)*p,t[5]=(-s*r+i*a)*p,t[6]=d*p,t[7]=(-c*r+n*l)*p,t[8]=(o*r-n*a)*p,t):null},i.adjoint=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8];return t[0]=o*u-s*c,t[1]=i*c-n*u,t[2]=n*s-i*o,t[3]=s*l-a*u,t[4]=r*u-i*l,t[5]=i*a-r*s,t[6]=a*c-o*l,t[7]=n*l-r*c,t[8]=r*o-n*a,t},i.determinant=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8];return e*(c*a-o*l)+r*(-c*i+o*s)+n*(l*i-a*s)},i.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=r[0],d=r[1],p=r[2],m=r[3],g=r[4],v=r[5],y=r[6],x=r[7],b=r[8];return t[0]=h*n+d*o+p*c,t[1]=h*i+d*s+p*u,t[2]=h*a+d*l+p*f,t[3]=m*n+g*o+v*c,t[4]=m*i+g*s+v*u,t[5]=m*a+g*l+v*f,t[6]=y*n+x*o+b*c,t[7]=y*i+x*s+b*u,t[8]=y*a+x*l+b*f,t},i.mul=i.multiply,i.translate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=r[0],d=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=h*n+d*o+c,t[7]=h*i+d*s+u,t[8]=h*a+d*l+f,t},i.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=Math.sin(r),d=Math.cos(r);return t[0]=d*n+h*o,t[1]=d*i+h*s,t[2]=d*a+h*l,t[3]=d*o-h*n,t[4]=d*s-h*i,t[5]=d*l-h*a,t[6]=c,t[7]=u,t[8]=f,t},i.scale=function(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},i.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},i.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[3]=u-v,t[6]=h+g,t[1]=u+v,t[4]=1-c-p,t[7]=d-m,t[2]=h-g,t[5]=d+m,t[8]=1-c-f,t},i.normalFromMat4=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(l*T-o*L-c*A)*C,t[2]=(o*E-s*T+c*k)*C,t[3]=(i*E-n*L-a*S)*C,t[4]=(r*L-i*T+a*A)*C,t[5]=(n*T-r*E-a*k)*C,t[6]=(m*M-g*w+v*_)*C,t[7]=(g*b-p*M-v*x)*C,t[8]=(p*w-m*b+v*y)*C,t):null},i.str=function(t){return\"mat3(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\", \"+t[6]+\", \"+t[7]+\", \"+t[8]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},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[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],h=e[0],d=e[1],p=e[2],m=e[3],g=e[4],v=e[5],y=t[6],x=e[7],b=e[8];return Math.abs(r-h)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(i-d)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(a-p)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(o-m)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-g)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-v)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(c-y)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(u-x)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(f-b)<=n.EPSILON*Math.max(1,Math.abs(f),Math.abs(b))},e.exports=i},{\"./common.js\":199}],203:[function(t,e,r){var n=t(\"./common.js\"),i={scalar:{},SIMD:{}};i.create=function(){var t=new n.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.clone=function(t){var e=new n.ARRAY_TYPE(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.fromValues=function(t,e,r,i,a,o,s,l,c,u,f,h,d,p,m,g){var v=new n.ARRAY_TYPE(16);return v[0]=t,v[1]=e,v[2]=r,v[3]=i,v[4]=a,v[5]=o,v[6]=s,v[7]=l,v[8]=c,v[9]=u,v[10]=f,v[11]=h,v[12]=d,v[13]=p,v[14]=m,v[15]=g,v},i.set=function(t,e,r,n,i,a,o,s,l,c,u,f,h,d,p,m,g){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=m,t[15]=g,t},i.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.scalar.transpose=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},i.SIMD.transpose=function(t,e){var r,n,i,a,o,s,l,c,u,f;return r=SIMD.Float32x4.load(e,0),n=SIMD.Float32x4.load(e,4),i=SIMD.Float32x4.load(e,8),a=SIMD.Float32x4.load(e,12),o=SIMD.Float32x4.shuffle(r,n,0,1,4,5),s=SIMD.Float32x4.shuffle(i,a,0,1,4,5),l=SIMD.Float32x4.shuffle(o,s,0,2,4,6),c=SIMD.Float32x4.shuffle(o,s,1,3,5,7),SIMD.Float32x4.store(t,0,l),SIMD.Float32x4.store(t,4,c),o=SIMD.Float32x4.shuffle(r,n,2,3,6,7),s=SIMD.Float32x4.shuffle(i,a,2,3,6,7),u=SIMD.Float32x4.shuffle(o,s,0,2,4,6),f=SIMD.Float32x4.shuffle(o,s,1,3,5,7),SIMD.Float32x4.store(t,8,u),SIMD.Float32x4.store(t,12,f),t},i.transpose=n.USE_SIMD?i.SIMD.transpose:i.scalar.transpose,i.scalar.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,M=i*c-a*l,k=u*m-f*p,A=u*g-h*p,T=u*v-d*p,S=f*g-h*m,E=f*v-d*m,L=h*v-d*g,C=y*L-x*E+b*S+_*T-w*A+M*k;return C?(C=1/C,t[0]=(s*L-l*E+c*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(m*M-g*w+v*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*T-o*L-c*A)*C,t[5]=(r*L-i*T+a*A)*C,t[6]=(g*b-p*M-v*x)*C,t[7]=(u*M-h*b+d*x)*C,t[8]=(o*E-s*T+c*k)*C,t[9]=(n*T-r*E-a*k)*C,t[10]=(p*w-m*b+v*y)*C,t[11]=(f*b-u*w-d*y)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(m*x-p*_-g*y)*C,t[15]=(u*_-f*x+h*y)*C,t):null},i.SIMD.invert=function(t,e){var r,n,i,a,o,s,l,c,u,f,h=SIMD.Float32x4.load(e,0),d=SIMD.Float32x4.load(e,4),p=SIMD.Float32x4.load(e,8),m=SIMD.Float32x4.load(e,12);return o=SIMD.Float32x4.shuffle(h,d,0,1,4,5),n=SIMD.Float32x4.shuffle(p,m,0,1,4,5),r=SIMD.Float32x4.shuffle(o,n,0,2,4,6),n=SIMD.Float32x4.shuffle(n,o,1,3,5,7),o=SIMD.Float32x4.shuffle(h,d,2,3,6,7),a=SIMD.Float32x4.shuffle(p,m,2,3,6,7),i=SIMD.Float32x4.shuffle(o,a,0,2,4,6),a=SIMD.Float32x4.shuffle(a,o,1,3,5,7),o=SIMD.Float32x4.mul(i,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.mul(n,o),l=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,o),s),l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),o=SIMD.Float32x4.mul(n,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),s),u=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),u),u=SIMD.Float32x4.swizzle(u,2,3,0,1),o=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(n,2,3,0,1),a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),i=SIMD.Float32x4.swizzle(i,2,3,0,1),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),s),c=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),c),c=SIMD.Float32x4.swizzle(c,2,3,0,1),o=SIMD.Float32x4.mul(r,n),o=SIMD.Float32x4.swizzle(o,1,0,3,2),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(i,o),u),o=SIMD.Float32x4.swizzle(o,2,3,0,1),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(i,o)),o=SIMD.Float32x4.mul(r,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),c),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),l),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.mul(r,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),l),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),u),f=SIMD.Float32x4.mul(r,s),f=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(f,2,3,0,1),f),f=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(f,1,0,3,2),f),o=SIMD.Float32x4.reciprocalApproximation(f),f=SIMD.Float32x4.sub(SIMD.Float32x4.add(o,o),SIMD.Float32x4.mul(f,SIMD.Float32x4.mul(o,o))),(f=SIMD.Float32x4.swizzle(f,0,0,0,0))?(SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(f,s)),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(f,l)),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(f,c)),SIMD.Float32x4.store(t,12,SIMD.Float32x4.mul(f,u)),t):null},i.invert=n.USE_SIMD?i.SIMD.invert:i.scalar.invert,i.scalar.adjoint=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-d*g)-f*(l*v-c*g)+m*(l*d-c*h),t[1]=-(n*(h*v-d*g)-f*(i*v-a*g)+m*(i*d-a*h)),t[2]=n*(l*v-c*g)-s*(i*v-a*g)+m*(i*c-a*l),t[3]=-(n*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*v-d*g)-u*(l*v-c*g)+p*(l*d-c*h)),t[5]=r*(h*v-d*g)-u*(i*v-a*g)+p*(i*d-a*h),t[6]=-(r*(l*v-c*g)-o*(i*v-a*g)+p*(i*c-a*l)),t[7]=r*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*v-d*m)-u*(s*v-c*m)+p*(s*d-c*f),t[9]=-(r*(f*v-d*m)-u*(n*v-a*m)+p*(n*d-a*f)),t[10]=r*(s*v-c*m)-o*(n*v-a*m)+p*(n*c-a*s),t[11]=-(r*(s*d-c*f)-o*(n*d-a*f)+u*(n*c-a*s)),t[12]=-(o*(f*g-h*m)-u*(s*g-l*m)+p*(s*h-l*f)),t[13]=r*(f*g-h*m)-u*(n*g-i*m)+p*(n*h-i*f),t[14]=-(r*(s*g-l*m)-o*(n*g-i*m)+p*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+u*(n*l-i*s),t},i.SIMD.adjoint=function(t,e){var r,n,i,a,o,s,l,c,u,f=SIMD.Float32x4.load(e,0),h=SIMD.Float32x4.load(e,4),d=SIMD.Float32x4.load(e,8),p=SIMD.Float32x4.load(e,12);return o=SIMD.Float32x4.shuffle(f,h,0,1,4,5),n=SIMD.Float32x4.shuffle(d,p,0,1,4,5),r=SIMD.Float32x4.shuffle(o,n,0,2,4,6),n=SIMD.Float32x4.shuffle(n,o,1,3,5,7),o=SIMD.Float32x4.shuffle(f,h,2,3,6,7),a=SIMD.Float32x4.shuffle(d,p,2,3,6,7),i=SIMD.Float32x4.shuffle(o,a,0,2,4,6),a=SIMD.Float32x4.shuffle(a,o,1,3,5,7),o=SIMD.Float32x4.mul(i,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.mul(n,o),l=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(SIMD.Float32x4.mul(n,o),s),l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),l),l=SIMD.Float32x4.swizzle(l,2,3,0,1),o=SIMD.Float32x4.mul(n,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),s),u=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),u),u=SIMD.Float32x4.swizzle(u,2,3,0,1),o=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(n,2,3,0,1),a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),i=SIMD.Float32x4.swizzle(i,2,3,0,1),s=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),s),c=SIMD.Float32x4.mul(r,o),o=SIMD.Float32x4.swizzle(o,2,3,0,1),s=SIMD.Float32x4.sub(s,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(r,o),c),c=SIMD.Float32x4.swizzle(c,2,3,0,1),o=SIMD.Float32x4.mul(r,n),o=SIMD.Float32x4.swizzle(o,1,0,3,2),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(SIMD.Float32x4.mul(i,o),u),o=SIMD.Float32x4.swizzle(o,2,3,0,1),c=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,o),c),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(i,o)),o=SIMD.Float32x4.mul(r,a),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(i,o)),c=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),c),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(i,o),l),c=SIMD.Float32x4.sub(c,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.mul(r,i),o=SIMD.Float32x4.swizzle(o,1,0,3,2),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(a,o),l),u=SIMD.Float32x4.sub(u,SIMD.Float32x4.mul(n,o)),o=SIMD.Float32x4.swizzle(o,2,3,0,1),l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(a,o)),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(n,o),u),SIMD.Float32x4.store(t,0,s),SIMD.Float32x4.store(t,4,l),SIMD.Float32x4.store(t,8,c),SIMD.Float32x4.store(t,12,u),t},i.adjoint=n.USE_SIMD?i.SIMD.adjoint:i.scalar.adjoint,i.determinant=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*o-r*a)*(f*g-h*m)-(e*s-n*a)*(u*g-h*p)+(e*l-i*a)*(u*m-f*p)+(r*s-n*o)*(c*g-h*d)-(r*l-i*o)*(c*m-f*d)+(n*l-i*s)*(c*p-u*d)},i.SIMD.multiply=function(t,e,r){var n=SIMD.Float32x4.load(e,0),i=SIMD.Float32x4.load(e,4),a=SIMD.Float32x4.load(e,8),o=SIMD.Float32x4.load(e,12),s=SIMD.Float32x4.load(r,0),l=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(s,3,3,3,3),o))));SIMD.Float32x4.store(t,0,l);var c=SIMD.Float32x4.load(r,4),u=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(c,3,3,3,3),o))));SIMD.Float32x4.store(t,4,u);var f=SIMD.Float32x4.load(r,8),h=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,3,3,3,3),o))));SIMD.Float32x4.store(t,8,h);var d=SIMD.Float32x4.load(r,12),p=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,0,0,0,0),n),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,1,1,1,1),i),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,2,2,2,2),a),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,3,3,3,3),o))));return SIMD.Float32x4.store(t,12,p),t},i.scalar.multiply=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*m,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*c+_*d+w*v,t[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*m,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*c+_*d+w*v,t[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*m,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*c+_*d+w*v,t[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*m,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*c+_*d+w*v,t[15]=x*o+b*u+_*p+w*y,t},i.multiply=n.USE_SIMD?i.SIMD.multiply:i.scalar.multiply,i.mul=i.multiply,i.scalar.translate=function(t,e,r){var n,i,a,o,s,l,c,u,f,h,d,p,m=r[0],g=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*m+s*g+f*v+e[12],t[13]=i*m+l*g+h*v+e[13],t[14]=a*m+c*g+d*v+e[14],t[15]=o*m+u*g+p*v+e[15]),t},i.SIMD.translate=function(t,e,r){var n=SIMD.Float32x4.load(e,0),i=SIMD.Float32x4.load(e,4),a=SIMD.Float32x4.load(e,8),o=SIMD.Float32x4.load(e,12),s=SIMD.Float32x4(r[0],r[1],r[2],0);e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11]),n=SIMD.Float32x4.mul(n,SIMD.Float32x4.swizzle(s,0,0,0,0)),i=SIMD.Float32x4.mul(i,SIMD.Float32x4.swizzle(s,1,1,1,1)),a=SIMD.Float32x4.mul(a,SIMD.Float32x4.swizzle(s,2,2,2,2));var l=SIMD.Float32x4.add(n,SIMD.Float32x4.add(i,SIMD.Float32x4.add(a,o)));return SIMD.Float32x4.store(t,12,l),t},i.translate=n.USE_SIMD?i.SIMD.translate:i.scalar.translate,i.scalar.scale=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.SIMD.scale=function(t,e,r){var n,i,a,o=SIMD.Float32x4(r[0],r[1],r[2],0);return n=SIMD.Float32x4.load(e,0),SIMD.Float32x4.store(t,0,SIMD.Float32x4.mul(n,SIMD.Float32x4.swizzle(o,0,0,0,0))),i=SIMD.Float32x4.load(e,4),SIMD.Float32x4.store(t,4,SIMD.Float32x4.mul(i,SIMD.Float32x4.swizzle(o,1,1,1,1))),a=SIMD.Float32x4.load(e,8),SIMD.Float32x4.store(t,8,SIMD.Float32x4.mul(a,SIMD.Float32x4.swizzle(o,2,2,2,2))),t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},i.scale=n.USE_SIMD?i.SIMD.scale:i.scalar.scale,i.rotate=function(t,e,r,i){var a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,M,k,A,T,S,E,L=i[0],C=i[1],z=i[2],D=Math.sqrt(L*L+C*C+z*z);return Math.abs(D)<n.EPSILON?null:(D=1/D,L*=D,C*=D,z*=D,a=Math.sin(r),o=Math.cos(r),s=1-o,l=e[0],c=e[1],u=e[2],f=e[3],h=e[4],d=e[5],p=e[6],m=e[7],g=e[8],v=e[9],y=e[10],x=e[11],b=L*L*s+o,_=C*L*s+z*a,w=z*L*s-C*a,M=L*C*s-z*a,k=C*C*s+o,A=z*C*s+L*a,T=L*z*s+C*a,S=C*z*s-L*a,E=z*z*s+o,t[0]=l*b+h*_+g*w,t[1]=c*b+d*_+v*w,t[2]=u*b+p*_+y*w,t[3]=f*b+m*_+x*w,t[4]=l*M+h*k+g*A,t[5]=c*M+d*k+v*A,t[6]=u*M+p*k+y*A,t[7]=f*M+m*k+x*A,t[8]=l*T+h*S+g*E,t[9]=c*T+d*S+v*E,t[10]=u*T+p*S+y*E,t[11]=f*T+m*S+x*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},i.scalar.rotateX=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+c*n,t[5]=o*i+u*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=c*i-a*n,t[9]=u*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t},i.SIMD.rotateX=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,4),o=SIMD.Float32x4.load(e,8);return SIMD.Float32x4.store(t,4,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,8,SIMD.Float32x4.sub(SIMD.Float32x4.mul(o,i),SIMD.Float32x4.mul(a,n))),t},i.rotateX=n.USE_SIMD?i.SIMD.rotateX:i.scalar.rotateX,i.scalar.rotateY=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[8],u=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-c*n,t[1]=o*i-u*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+c*i,t[9]=o*n+u*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t},i.SIMD.rotateY=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,0),o=SIMD.Float32x4.load(e,8);return SIMD.Float32x4.store(t,0,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,8,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,n),SIMD.Float32x4.mul(o,i))),t},i.rotateY=n.USE_SIMD?i.SIMD.rotateY:i.scalar.rotateY,i.scalar.rotateZ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+c*n,t[1]=o*i+u*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=c*i-a*n,t[5]=u*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t},i.SIMD.rotateZ=function(t,e,r){var n=SIMD.Float32x4.splat(Math.sin(r)),i=SIMD.Float32x4.splat(Math.cos(r));e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);var a=SIMD.Float32x4.load(e,0),o=SIMD.Float32x4.load(e,4);return SIMD.Float32x4.store(t,0,SIMD.Float32x4.add(SIMD.Float32x4.mul(a,i),SIMD.Float32x4.mul(o,n))),SIMD.Float32x4.store(t,4,SIMD.Float32x4.sub(SIMD.Float32x4.mul(o,i),SIMD.Float32x4.mul(a,n))),t},i.rotateZ=n.USE_SIMD?i.SIMD.rotateZ:i.scalar.rotateZ,i.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},i.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromRotation=function(t,e,r){var i,a,o,s=r[0],l=r[1],c=r[2],u=Math.sqrt(s*s+l*l+c*c);return Math.abs(u)<n.EPSILON?null:(u=1/u,s*=u,l*=u,c*=u,i=Math.sin(e),a=Math.cos(e),o=1-a,t[0]=s*s*o+a,t[1]=l*s*o+c*i,t[2]=c*s*o-l*i,t[3]=0,t[4]=s*l*o-c*i,t[5]=l*l*o+a,t[6]=c*l*o+s*i,t[7]=0,t[8]=s*c*o+l*i,t[9]=l*c*o-s*i,t[10]=c*c*o+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},i.fromXRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromYRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromZRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},i.fromRotationTranslation=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,c=a+a,u=n*s,f=n*l,h=n*c,d=i*l,p=i*c,m=a*c,g=o*s,v=o*l,y=o*c;return t[0]=1-(d+m),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(u+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},i.getTranslation=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},i.getRotation=function(t,e){var r=e[0]+e[5]+e[10],n=0;return r>0?(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,c=a+a,u=o+o,f=i*l,h=i*c,d=i*u,p=a*c,m=a*u,g=o*u,v=s*l,y=s*c,x=s*u,b=n[0],_=n[1],w=n[2];return t[0]=(1-(p+g))*b,t[1]=(h+x)*b,t[2]=(d-y)*b,t[3]=0,t[4]=(h-x)*_,t[5]=(1-(f+g))*_,t[6]=(m+v)*_,t[7]=0,t[8]=(d+y)*w,t[9]=(m-v)*w,t[10]=(1-(f+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],c=a+a,u=o+o,f=s+s,h=a*c,d=a*u,p=a*f,m=o*u,g=o*f,v=s*f,y=l*c,x=l*u,b=l*f,_=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+b)*_,t[2]=(p-x)*_,t[3]=0,t[4]=(d-b)*w,t[5]=(1-(h+v))*w,t[6]=(g+y)*w,t[7]=0,t[8]=(p+x)*M,t[9]=(g-y)*M,t[10]=(1-(h+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,c=r*o,u=n*o,f=n*s,h=i*o,d=i*s,p=i*l,m=a*o,g=a*s,v=a*l;return t[0]=1-f-p,t[1]=u+v,t[2]=h-g,t[3]=0,t[4]=u-v,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=h+g,t[9]=d-m,t[10]=1-c-f,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),c=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)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,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),c=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*c*.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),c=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*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t},i.lookAt=function(t,e,r,a){var o,s,l,c,u,f,h,d,p,m,g=e[0],v=e[1],y=e[2],x=a[0],b=a[1],_=a[2],w=r[0],M=r[1],k=r[2];return Math.abs(g-w)<n.EPSILON&&Math.abs(v-M)<n.EPSILON&&Math.abs(y-k)<n.EPSILON?i.identity(t):(h=g-w,d=v-M,p=y-k,m=1/Math.sqrt(h*h+d*d+p*p),h*=m,d*=m,p*=m,o=b*p-_*d,s=_*h-x*p,l=x*d-b*h,(m=Math.sqrt(o*o+s*s+l*l))?(o*=m=1/m,s*=m,l*=m):(o=0,s=0,l=0),c=d*l-p*s,u=p*o-h*l,f=h*s-d*o,(m=Math.sqrt(c*c+u*u+f*f))?(c*=m=1/m,u*=m,f*=m):(c=0,u=0,f=0),t[0]=o,t[1]=c,t[2]=h,t[3]=0,t[4]=s,t[5]=u,t[6]=d,t[7]=0,t[8]=l,t[9]=f,t[10]=p,t[11]=0,t[12]=-(o*g+s*v+l*y),t[13]=-(c*g+u*v+f*y),t[14]=-(h*g+d*v+p*y),t[15]=1,t)},i.str=function(t){return\"mat4(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\", \"+t[4]+\", \"+t[5]+\", \"+t[6]+\", \"+t[7]+\", \"+t[8]+\", \"+t[9]+\", \"+t[10]+\", \"+t[11]+\", \"+t[12]+\", \"+t[13]+\", \"+t[14]+\", \"+t[15]+\")\"},i.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},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[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],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[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t},i.sub=i.subtract,i.multiplyScalar=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[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},i.multiplyScalarAndAdd=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[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],h=t[9],d=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=e[0],b=e[1],_=e[2],w=e[3],M=e[4],k=e[5],A=e[6],T=e[7],S=e[8],E=e[9],L=e[10],C=e[11],z=e[12],D=e[13],I=e[14],P=e[15];return Math.abs(r-x)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-b)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-_)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-w)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-M)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-k)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-A)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(u-T)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(f-S)<=n.EPSILON*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=n.EPSILON*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-L)<=n.EPSILON*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(p-C)<=n.EPSILON*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(m-z)<=n.EPSILON*Math.max(1,Math.abs(m),Math.abs(z))&&Math.abs(g-D)<=n.EPSILON*Math.max(1,Math.abs(g),Math.abs(D))&&Math.abs(v-I)<=n.EPSILON*Math.max(1,Math.abs(v),Math.abs(I))&&Math.abs(y-P)<=n.EPSILON*Math.max(1,Math.abs(y),Math.abs(P))},e.exports=i},{\"./common.js\":199}],204:[function(t,e,r){var n=t(\"./common.js\"),i=t(\"./mat3.js\"),a=t(\"./vec3.js\"),o=t(\"./vec4.js\"),s={};s.create=function(){var t=new n.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},s.rotationTo=function(){var t=a.create(),e=a.fromValues(1,0,0),r=a.fromValues(0,1,0);return function(n,i,o){var l=a.dot(i,o);return l<-.999999?(a.cross(t,e,i),a.length(t)<1e-6&&a.cross(t,r,i),a.normalize(t,t),s.setAxisAngle(n,t,Math.PI),n):l>.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],c=r[2],u=r[3];return t[0]=n*u+o*s+i*c-a*l,t[1]=i*u+o*l+a*s-n*c,t[2]=a*u+o*c+n*l-i*s,t[3]=o*u-n*s-i*l-a*c,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,c=e[0],u=e[1],f=e[2],h=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(a=c*d+u*p+f*m+h*g)<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*c+l*d,t[1]=s*u+l*p,t[2]=s*f+l*m,t[3]=s*h+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\":199,\"./mat3.js\":202,\"./vec3.js\":206,\"./vec4.js\":207}],205:[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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}(),i.str=function(t){return\"vec2(\"+t[0]+\", \"+t[1]+\")\"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},i.equals=function(t,e){var r=t[0],i=t[1],a=e[0],o=e[1];return Math.abs(r-a)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-o)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))},e.exports=i},{\"./common.js\":199}],206:[function(t,e,r){var n=t(\"./common.js\"),i={};i.create=function(){var t=new n.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},i.clone=function(t){var e=new n.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},i.fromValues=function(t,e,r){var i=new n.ARRAY_TYPE(3);return i[0]=t,i[1]=e,i[2]=r,i},i.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},i.set=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,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},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},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},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},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},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},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},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},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},i.scale=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*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},i.distance=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)},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];return r*r+n*n+i*i},i.sqrDist=i.squaredDistance,i.length=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)},i.len=i.length,i.squaredLength=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n},i.sqrLen=i.squaredLength,i.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},i.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},i.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(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,c=o*(a-1),u=o*(3-2*a);return t[0]=e[0]*s+r[0]*l+n[0]*c+i[0]*u,t[1]=e[1]*s+r[1]*l+n[1]*c+i[1]*u,t[2]=e[2]*s+r[2]*l+n[2]*c+i[2]*u,t},i.bezier=function(t,e,r,n,i,a){var o=1-a,s=o*o,l=a*a,c=s*o,u=3*a*s,f=3*l*o,h=l*a;return t[0]=e[0]*c+r[0]*u+n[0]*f+i[0]*h,t[1]=e[1]*c+r[1]*u+n[1]*f+i[1]*h,t[2]=e[2]*c+r[2]*u+n[2]*f+i[2]*h,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],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=u*c+d*-o+f*-l-h*-s,t[1]=f*c+d*-s+h*-o-u*-l,t[2]=h*c+d*-l+u*-s-f*-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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}(),i.angle=function(t,e){var r=i.fromValues(t[0],t[1],t[2]),n=i.fromValues(e[0],e[1],e[2]);i.normalize(r,r),i.normalize(n,n);var a=i.dot(r,n);return a>1?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\":199}],207:[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],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=u*c+d*-o+f*-l-h*-s,t[1]=f*c+d*-s+h*-o-u*-l,t[2]=h*c+d*-l+u*-s-f*-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;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}(),i.str=function(t){return\"vec4(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+t[3]+\")\"},i.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},i.equals=function(t,e){var r=t[0],i=t[1],a=t[2],o=t[3],s=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(r-s)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-c)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(o-u)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(u))},e.exports=i},{\"./common.js\":199}],208:[function(t,e,r){\"use strict\";function n(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function i(t,e,r,i,a){for(var o=n(i,n(r,n(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*a[0]*(1+o[0]),.5*a[1]*(1-o[1])]}var a=t(\"barycentric\"),o=t(\"polytope-closest-point/lib/closest_point_2d.js\");e.exports=function(t,e,r,n,s,l){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),u=0;u<t.length;++u)c[u]=i(t[u],r,n,s,l);var f=0,h=1/0;for(u=0;u<c.length;++u){for(var d=0,p=0;p<2;++p)d+=Math.pow(c[u][p]-e[p],2);d<h&&(h=d,f=u)}var m=function(t,e){if(2===t.length){for(var r=0,n=0,i=0;i<2;++i)r+=Math.pow(e[i]-t[0][i],2),n+=Math.pow(e[i]-t[1][i],2);return r=Math.sqrt(r),n=Math.sqrt(n),r+n<1e-6?[1,0]:[n/(r+n),r/(n+r)]}if(3===t.length){var s=[0,0];return o(t[0],t[1],t[2],e,s),a(t,s)}return[]}(c,e),g=0;for(u=0;u<3;++u){if(m[u]<-.001||m[u]>1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[f,function(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}(t,m),m]}},{barycentric:53,\"polytope-closest-point/lib/closest_point_2d.js\":487}],209:[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\"}]}},{}],210:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w,k,A,T,S){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=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,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=x,this.pointColors=_,this.pointUVs=w,this.pointSizes=k,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=T,this.contourVAO=S,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=M,this._view=M,this._projection=M,this._resolution=[1,1]}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"gl-vao\"),s=t(\"gl-texture2d\"),l=t(\"normals\"),c=t(\"gl-mat4/multiply\"),u=t(\"gl-mat4/invert\"),f=t(\"ndarray\"),h=t(\"colormap\"),d=t(\"simplicial-complex-contour\"),p=t(\"typedarray-pool\"),m=t(\"./lib/shaders\"),g=t(\"./lib/closest-point\"),v=m.meshShader,y=m.wireShader,x=m.pointShader,b=m.pickShader,_=m.pointPickShader,w=m.contourShader,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=n.prototype;k.isOpaque=function(){return this.opacity>=1},k.isTransparent=function(){return this.opacity<1},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(t&&this.contourEnable){for(var e=d(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var c=r[l],u=0;u<2;++u){var f=c[0];2===c.length&&(f=c[u]);for(var h=n[f][0],m=n[f][1],g=i[f],v=1-g,y=this.positions[h],x=this.positions[m],b=0;b<3;++b)o[s++]=g*y[b]+v*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),p.free(o)}else this.contourCount=0},k.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,\"contourEnable\"in t&&(this.contourEnable=t.contourEnable),\"contourColor\"in t&&(this.contourColor=t.contourColor),\"lineWidth\"in t&&(this.lineWidth=t.lineWidth),\"lightPosition\"in t&&(this.lightPosition=t.lightPosition),\"opacity\"in t&&(this.opacity=t.opacity),\"ambient\"in t&&(this.ambientLight=t.ambient),\"diffuse\"in t&&(this.diffuseLight=t.diffuse),\"specular\"in t&&(this.specularLight=t.specular),\"roughness\"in t&&(this.roughness=t.roughness),\"fresnel\"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=s(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=h({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 f(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],o=[],c=[],u=[],d=[],p=[],m=[],g=[],v=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,M=t.cellNormals,k=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,A=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!M&&(M=l.faceNormals(r,n,A)),M||w||(w=l.vertexNormals(r,n,k));var T=t.vertexColors,S=t.cellColors,E=t.meshColor||[1,1,1,1],L=t.vertexUVs,C=t.vertexIntensity,z=t.cellUVs,D=t.cellIntensity,I=1/0,P=-1/0;if(!L&&!z)if(C)if(t.vertexIntensityBounds)I=+t.vertexIntensityBounds[0],P=+t.vertexIntensityBounds[1];else for(var O=0;O<C.length;++O){var F=C[O];I=Math.min(I,F),P=Math.max(P,F)}else if(D)for(O=0;O<D.length;++O){F=D[O];I=Math.min(I,F),P=Math.max(P,F)}else for(O=0;O<n.length;++O){F=n[O][2];I=Math.min(I,F),P=Math.max(P,F)}this.intensity=C||(D?function(t,e,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=0;var a=t.length;for(i=0;i<a;++i)for(var o=t[i],s=0;s<o.length;++s)n[o[s]]=r[i];return n}(r,n.length,D):function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n));var R=t.pointSizes,N=t.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(O=0;O<n.length;++O)for(var j=n[O],B=0;B<3;++B)!isNaN(j[B])&&isFinite(j[B])&&(this.bounds[0][B]=Math.min(this.bounds[0][B],j[B]),this.bounds[1][B]=Math.max(this.bounds[1][B],j[B]));var U=0,V=0,q=0;t:for(O=0;O<r.length;++O){var H=r[O];switch(H.length){case 1:for(j=n[Y=H[0]],B=0;B<3;++B)if(isNaN(j[B])||!isFinite(j[B]))continue t;v.push(j[0],j[1],j[2]);3===(W=T?T[Y]:S?S[O]:E).length?y.push(W[0],W[1],W[2],1):y.push(W[0],W[1],W[2],W[3]);X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],x.push(X[0],X[1]),R?b.push(R[Y]):b.push(N),_.push(O),q+=1;break;case 2:for(B=0;B<2;++B){j=n[Y=H[B]];for(var G=0;G<3;++G)if(isNaN(j[G])||!isFinite(j[G]))continue t}for(B=0;B<2;++B){j=n[Y=H[B]];d.push(j[0],j[1],j[2]);3===(W=T?T[Y]:S?S[O]:E).length?p.push(W[0],W[1],W[2],1):p.push(W[0],W[1],W[2],W[3]);X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],m.push(X[0],X[1]),g.push(O)}V+=1;break;case 3:for(B=0;B<3;++B)for(j=n[Y=H[B]],G=0;G<3;++G)if(isNaN(j[G])||!isFinite(j[G]))continue t;for(B=0;B<3;++B){var Y;j=n[Y=H[B]];i.push(j[0],j[1],j[2]);var W;3===(W=T?T[Y]:S?S[O]:E).length?a.push(W[0],W[1],W[2],1):a.push(W[0],W[1],W[2],W[3]);var X;X=L?L[Y]:C?[(C[Y]-I)/(P-I),0]:z?z[O]:D?[(D[O]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],c.push(X[0],X[1]);var Z;Z=w?w[Y]:M[O],o.push(Z[0],Z[1],Z[2]),u.push(O)}U+=1}}this.pointCount=q,this.edgeCount=V,this.triangleCount=U,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(d),this.edgeColors.update(p),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(g)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(c),this.triangleNormals.update(o),this.triangleIds.update(new Uint32Array(u))}},k.drawTransparent=k.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||M,n=t.view||M,i=t.projection||M,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]);var s={model:r,view:n,projection:i,clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,contourColor:this.contourColor,texture:0};this.texture.bind(0);var l=new Array(16);c(l,s.view,s.model),c(l,s.projection,l),u(l,l);for(o=0;o<3;++o)s.eyePosition[o]=l[12+o]/l[15];var f=l[15];for(o=0;o<3;++o)f+=this.lightPosition[o]*l[4*o+3];for(o=0;o<3;++o){for(var h=l[12+o],d=0;d<3;++d)h+=l[4*d+o]*this.lightPosition[d];s.lightPosition[o]=h/f}if(this.triangleCount>0){(p=this.triShader).bind(),p.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){(p=this.lineShader).bind(),p.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){(p=this.pointShader).bind(),p.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 p;(p=this.contourShader).bind(),p.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||M,n=t.view||M,i=t.projection||M,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};if((l=this.pickShader).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;(l=this.pointPickShader).bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},k.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;a<r.length;++a)i[a]=n[r[a]];var o=g(i,[t.coord[0],this._resolution[1]-t.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(a=0;a<r.length;++a)l+=s[a]*this.intensity[r[a]];return{position:o[1],index:r[o[0]],cell:r,cellId:e,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},k.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},e.exports=function(t,e){1===arguments.length&&(t=(e=t).gl);var r=function(t){var e=i(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),l=function(t){var e=i(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),c=function(t){var e=i(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}(t),u=function(t){var e=i(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}(t),h=function(t){var e=i(t,_.vertex,_.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}(t),d=function(t){var e=i(t,w.vertex,w.fragment);return e.attributes.position.location=0,e}(t),p=s(t,f(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=t.LINEAR_MIPMAP_LINEAR,p.magFilter=t.LINEAR;var m=a(t),g=a(t),M=a(t),k=a(t),A=a(t),T=o(t,[{buffer:m,type:t.FLOAT,size:3},{buffer:A,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:M,type:t.FLOAT,size:2},{buffer:k,type:t.FLOAT,size:3}]),S=a(t),E=a(t),L=a(t),C=a(t),z=o(t,[{buffer:S,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:E,type:t.FLOAT,size:4},{buffer:L,type:t.FLOAT,size:2}]),D=a(t),I=a(t),P=a(t),O=a(t),F=a(t),R=o(t,[{buffer:D,type:t.FLOAT,size:3},{buffer:F,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:t.FLOAT,size:4},{buffer:P,type:t.FLOAT,size:2},{buffer:O,type:t.FLOAT,size:1}]),N=a(t),j=new n(t,p,r,l,c,u,h,d,m,A,g,M,k,T,S,C,E,L,z,D,F,I,P,O,R,N,o(t,[{buffer:N,type:t.FLOAT,size:3}]));return j.update(e),j}},{\"./lib/closest-point\":208,\"./lib/shaders\":209,colormap:105,\"gl-buffer\":165,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"gl-shader\":243,\"gl-texture2d\":255,\"gl-vao\":259,ndarray:458,normals:461,\"simplicial-complex-contour\":524,\"typedarray-pool\":554}],211:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r}e.exports=function(t){var e=t.gl;return new n(t,i(e,[0,0,0,1,1,0,1,1]),a(e,o.boxVert,o.lineFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"./shaders\"),s=n.prototype;s.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},s.drawBox=function(){var t=[0,0],e=[0,0];return function(r,n,i,a,o){var s=this.plot,l=this.shader,c=s.gl;t[0]=r,t[1]=n,e[0]=i,e[1]=a,l.uniforms.lo=t,l.uniforms.hi=e,l.uniforms.color=o,c.drawArrays(c.TRIANGLE_STRIP,0,4)}}(),s.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"gl-buffer\":165,\"gl-shader\":217}],212:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function i(t,e){return t-e}e.exports=function(t){var e=t.gl;return new n(t,a(e),o(e,l.gridVert,l.gridFrag),o(e,l.tickVert,l.gridFrag))};var a=t(\"gl-buffer\"),o=t(\"gl-shader\"),s=t(\"binary-search-bounds\"),l=t(\"./shaders\"),c=n.prototype;c.draw=function(){var t=[0,0],e=[0,0],r=[0,0];return function(){for(var n=this.plot,i=this.vbo,a=this.shader,o=this.ticks,s=n.gl,l=n._tickBounds,c=n.dataBox,u=n.viewBox,f=n.gridLineWidth,h=n.gridLineColor,d=n.gridLineEnable,p=n.pixelRatio,m=0;m<2;++m){var g=l[m],v=l[m+2]-g,y=.5*(c[m+2]+c[m]),x=c[m+2]-c[m];e[m]=2*v/x,t[m]=2*(g-y)/x}a.bind(),i.bind(),a.attributes.dataCoord.pointer(),a.uniforms.dataShift=t,a.uniforms.dataScale=e;var b=0;for(m=0;m<2;++m){r[0]=r[1]=0,r[m]=1,a.uniforms.dataAxis=r,a.uniforms.lineWidth=f[m]/(u[m+2]-u[m])*p,a.uniforms.color=h[m];var _=6*o[m].length;d[m]&&_&&s.drawArrays(s.TRIANGLES,b,_),b+=_}}}(),c.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],a=[0,0],o=[0,0];return function(){for(var l=this.plot,c=this.vbo,u=this.tickShader,f=this.ticks,h=l.gl,d=l._tickBounds,p=l.dataBox,m=l.viewBox,g=l.pixelRatio,v=l.screenBox,y=v[2]-v[0],x=v[3]-v[1],b=m[2]-m[0],_=m[3]-m[1],w=0;w<2;++w){var M=d[w],k=d[w+2]-M,A=.5*(p[w+2]+p[w]),T=p[w+2]-p[w];e[w]=2*k/T,t[w]=2*(M-A)/T}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=t,S.dataScale=e;var E=l.tickMarkLength,L=l.tickMarkWidth,C=l.tickMarkColor,z=6*f[0].length,D=Math.min(s.ge(f[0],(p[0]-d[0])/(d[2]-d[0]),i),f[0].length),I=Math.min(s.gt(f[0],(p[2]-d[0])/(d[2]-d[0]),i),f[0].length),P=0+6*D,O=6*Math.max(0,I-D),F=Math.min(s.ge(f[1],(p[1]-d[1])/(d[3]-d[1]),i),f[1].length),R=Math.min(s.gt(f[1],(p[3]-d[1])/(d[3]-d[1]),i),f[1].length),N=z+6*F,j=6*Math.max(0,R-F);a[0]=2*(m[0]-E[1])/y-1,a[1]=(m[3]+m[1])/x-1,o[0]=E[1]*g/y,o[1]=L[1]*g/x,j&&(S.color=C[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,h.drawArrays(h.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[1]-E[0])/x-1,o[0]=L[0]*g/y,o[1]=E[0]*g/x,O&&(S.color=C[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,h.drawArrays(h.TRIANGLES,P,O)),a[0]=2*(m[2]+E[3])/y-1,a[1]=(m[3]+m[1])/x-1,o[0]=E[3]*g/y,o[1]=L[3]*g/x,j&&(S.color=C[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,h.drawArrays(h.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[3]+E[2])/x-1,o[0]=L[2]*g/y,o[1]=E[2]*g/x,O&&(S.color=C[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,h.drawArrays(h.TRIANGLES,P,O))}}(),c.update=function(){var t=[1,1,-1,-1,1,-1],e=[1,-1,1,1,-1,-1];return function(r){for(var n=r.ticks,i=r.bounds,a=new Float32Array(18*(n[0].length+n[1].length)),o=(this.plot.zeroLineEnable,0),s=[[],[]],l=0;l<2;++l)for(var c=s[l],u=n[l],f=i[l],h=i[l+2],d=0;d<u.length;++d){var p=(u[d].x-f)/(h-f);c.push(p);for(var m=0;m<6;++m)a[o++]=p,a[o++]=t[m],a[o++]=e[m]}this.ticks=s,this.vbo.update(a)}}(),c.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{\"./shaders\":214,\"binary-search-bounds\":216,\"gl-buffer\":165,\"gl-shader\":217}],213:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r}e.exports=function(t){var e=t.gl;return new n(t,i(e,[-1,-1,-1,1,1,-1,1,1]),a(e,o.lineVert,o.lineFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"./shaders\"),s=n.prototype;s.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},s.drawLine=function(){var t=[0,0],e=[0,0];return function(r,n,i,a,o,s){var l=this.plot,c=this.shader,u=l.gl;t[0]=r,t[1]=n,e[0]=i,e[1]=a,c.uniforms.start=t,c.uniforms.end=e,c.uniforms.width=o*l.pixelRatio,c.uniforms.color=s,u.drawArrays(u.TRIANGLE_STRIP,0,4)}}(),s.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"gl-buffer\":165,\"gl-shader\":217}],214:[function(t,e,r){\"use strict\";var n=\"precision lowp float;\\n#define GLSLIFY 1\\nuniform vec4 color;\\nvoid main() {\\n gl_FragColor = vec4(color.xyz * color.w, color.w);\\n}\\n\";e.exports={lineVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 start, end;\\nuniform float width;\\n\\nvec2 perp(vec2 v) {\\n return vec2(v.y, -v.x);\\n}\\n\\nvec2 screen(vec2 v) {\\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n vec2 delta = normalize(perp(start - end));\\n vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\\n gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\\n}\\n\",lineFrag:n,textVert:\"#define GLSLIFY 1\\nattribute vec3 textCoordinate;\\n\\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\\nuniform float angle;\\n\\nvoid main() {\\n float dataOffset = textCoordinate.z;\\n vec2 glyphOffset = textCoordinate.xy;\\n mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\\n vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\\n glyphMatrix * glyphOffset * textScale + screenOffset;\\n gl_Position = vec4(screenCoordinate, 0, 1);\\n}\\n\",textFrag:n,gridVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 dataCoord;\\n\\nuniform vec2 dataAxis, dataShift, dataScale;\\nuniform float lineWidth;\\n\\nvoid main() {\\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\\n pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\\n gl_Position = vec4(pos, 0, 1);\\n}\\n\",gridFrag:n,boxVert:\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 coord;\\n\\nuniform vec4 screenBox;\\nuniform vec2 lo, hi;\\n\\nvec2 screen(vec2 v) {\\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\\n}\\n\\nvoid main() {\\n gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\\n}\\n\",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\"}},{}],215:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}e.exports=function(t){var e=t.gl;return new n(t,i(e),a(e,l.textVert,l.textFrag))};var i=t(\"gl-buffer\"),a=t(\"gl-shader\"),o=t(\"text-cache\"),s=t(\"binary-search-bounds\"),l=t(\"./shaders\"),c=n.prototype;c.drawTicks=function(){var t=[0,0],e=[0,0],r=[0,0];return function(n){var i=this.plot,a=this.shader,o=this.tickX[n],l=this.tickOffset[n],c=i.gl,u=i.viewBox,f=i.dataBox,h=i.screenBox,d=i.pixelRatio,p=i.tickEnable,m=i.tickPad,g=i.tickColor,v=i.tickAngle,y=i.labelEnable,x=i.labelPad,b=i.labelColor,_=i.labelAngle,w=this.labelOffset[n],M=this.labelCount[n],k=s.lt(o,f[n]),A=s.le(o,f[n+2]);t[0]=t[1]=0,t[n]=1,e[n]=(u[2+n]+u[n])/(h[2+n]-h[n])-1;var T=2/h[2+(1^n)]-h[1^n];e[1^n]=T*u[1^n]-1,p[n]&&(e[1^n]-=T*d*m[n],k<A&&l[A]>l[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n],a.uniforms.angle=v[n],c.drawArrays(c.TRIANGLES,l[k],l[A]-l[k]))),y[n]&&M&&(e[1^n]-=T*d*x[n],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=b[n],a.uniforms.angle=_[n],c.drawArrays(c.TRIANGLES,w,M)),e[1^n]=T*u[2+(1^n)]-1,p[n+2]&&(e[1^n]+=T*d*m[n+2],k<A&&l[A]>l[k]&&(a.uniforms.dataAxis=t,a.uniforms.screenOffset=e,a.uniforms.color=g[n+2],a.uniforms.angle=v[n+2],c.drawArrays(c.TRIANGLES,l[k],l[A]-l[k]))),y[n+2]&&M&&(e[1^n]+=T*d*x[n+2],a.uniforms.dataAxis=r,a.uniforms.screenOffset=e,a.uniforms.color=b[n+2],a.uniforms.angle=_[n+2],c.drawArrays(c.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,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-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 c=0;c<2;++c){var u=a[c],f=a[c+2]-u,h=.5*(o[c+2]+o[c]),d=o[c+2]-o[c],p=l[c],m=l[c+2]-p,g=s[c],v=s[c+2]-g;e[c]=2*f/d*m/v,t[c]=2*(u-h)/d*m/v}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,s=[],l=t.ticks,c=t.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[a];for(e=0;e<h.length;++e){var d=h[e],p=d.x,m=d.text,g=d.font||\"sans-serif\";i=d.fontSize||12;for(var v=1/(c[a+2]-c[a]),y=c[a],x=m.split(\"\\n\"),b=0;b<x.length;b++)for(n=o(g,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(p-y)*v);u.push(Math.floor(s.length/3)),f.push(p)}this.tickOffset[a]=u,this.tickX[a]=f}for(a=0;a<2;++a){for(this.labelOffset[a]=Math.floor(s.length/3),n=o(t.labelFont[a],t.labels[a],{textAlign:\"center\"}).data,i=t.labelSize[a],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[a]=Math.floor(s.length/3)-this.labelOffset[a]}for(this.titleOffset=Math.floor(s.length/3),n=o(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{\"./shaders\":214,\"binary-search-bounds\":216,\"gl-buffer\":165,\"gl-shader\":217,\"text-cache\":545}],216:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],217:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}function i(t,e){return t.name<e.name?-1:1}var a=t(\"./lib/create-uniforms\"),o=t(\"./lib/create-attributes\"),s=t(\"./lib/reflect\"),l=t(\"./lib/shader-cache\"),c=t(\"./lib/runtime-reflect\"),u=t(\"./lib/GLError\"),f=n.prototype;f.bind=function(){this.program||this._relink();var t,e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},f.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},f.update=function(t,e,r,n){function f(){d.program=l.program(p,d._vref,d._fref,_,w);for(var t=0;t<r.length;++t)E[t]=p.getUniformLocation(d.program,r[t].name)}if(!e||1===arguments.length){var h=t;t=h.vertex,e=h.fragment,r=h.uniforms,n=h.attributes}var d=this,p=d.gl,m=d._vref;d._vref=l.shader(p,p.VERTEX_SHADER,t),m&&m.dispose(),d.vertShader=d._vref.shader;var g=this._fref;if(d._fref=l.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),d.fragShader=d._fref.shader,!r||!n){var v=p.createProgram();if(p.attachShader(v,d.fragShader),p.attachShader(v,d.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var y=p.getProgramInfoLog(v);throw new u(y,\"Error linking program:\"+y)}r=r||c.uniforms(p,v),n=n||c.attributes(p,v),p.deleteProgram(v)}(n=n.slice()).sort(i);var x,b=[],_=[],w=[];for(x=0;x<n.length;++x){var M=n[x];if(M.type.indexOf(\"mat\")>=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T<k;++T)A[T]=w.length,_.push(M.name+\"[\"+T+\"]\"),\"number\"==typeof M.location?w.push(M.location+T):Array.isArray(M.location)&&M.location.length===k&&\"number\"==typeof M.location[T]?w.push(0|M.location[T]):w.push(-1);b.push({name:M.name,type:M.type,locations:A})}else b.push({name:M.name,type:M.type,locations:[w.length]}),_.push(M.name),\"number\"==typeof M.location?w.push(0|M.location):w.push(-1)}var S=0;for(x=0;x<w.length;++x)if(w[x]<0){for(;w.indexOf(S)>=0;)S+=1;w[x]=S}var E=new Array(r.length);f(),d._relink=f,d.types={uniforms:s(r),attributes:s(n)},d.attributes=o(p,d,b,w),Object.defineProperty(d,\"uniforms\",a(p,d,r,E))},e.exports=function(t,e,r,i,a){var o=new n(t);return o.update(e,r,i,a),o}},{\"./lib/GLError\":218,\"./lib/create-attributes\":219,\"./lib/create-uniforms\":220,\"./lib/reflect\":221,\"./lib/runtime-reflect\":222,\"./lib/shader-cache\":223}],218:[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).name=\"GLError\",n.prototype.constructor=n,e.exports=n},{}],219:[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\"],c=[],u=0;u<a;++u)l.push(\"x\"+u),c.push(\"x\"+u);l.push(\"if(x0.length===void 0){return gl.vertexAttrib\"+a+\"f(v,\"+c.join()+\")}else{return gl.vertexAttrib\"+a+\"fv(v,x0)}\");var f=Function.apply(null,l),h=new n(t,e,r,i,a,f);Object.defineProperty(o,s,{set:function(e){return t.disableVertexAttribArray(i[r]),f(t,i[r],e),e},get:function(){return h},enumerable:!0})}function a(t,e,r,n,a,o,s){for(var l=new Array(a),c=new Array(a),u=0;u<a;++u)i(t,e,r[u],n,a,l,u),c[u]=l[u];Object.defineProperty(l,\"location\",{set:function(t){if(Array.isArray(t))for(var e=0;e<a;++e)c[e].location=t[e];else for(e=0;e<a;++e)c[e].location=t+e;return t},get:function(){for(var t=new Array(a),e=0;e<a;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,i,o,s){e=e||t.FLOAT,i=!!i,o=o||a*a,s=s||0;for(var l=0;l<a;++l){var c=n[r[l]];t.vertexAttribPointer(c,a,e,i,o,s+l*a),t.enableVertexAttribArray(c)}};var f=new Array(a),h=t[\"vertexAttrib\"+a+\"fv\"];Object.defineProperty(o,s,{set:function(e){for(var i=0;i<a;++i){var o=n[r[i]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[i]);else{for(var s=0;s<a;++s)f[s]=e[a*i+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}e.exports=function(t,e,r,n){for(var s={},l=0,c=r.length;l<c;++l){var u=r[l],f=u.name,h=u.type,d=u.locations;switch(h){case\"bool\":case\"int\":case\"float\":i(t,e,d[0],n,1,s,f);break;default:if(h.indexOf(\"vec\")>=0){if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new o(\"\",\"Invalid data type for attribute \"+f+\": \"+h);i(t,e,d[0],n,p,s,f)}else{if(!(h.indexOf(\"mat\")>=0))throw new o(\"\",\"Unknown data type for attribute \"+f+\": \"+h);var p;if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new o(\"\",\"Invalid data type for attribute \"+f+\": \"+h);a(t,e,d,n,p,s,f)}}}return s};var o=t(\"./GLError\"),s=n.prototype;s.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},s.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(s,\"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\":218}],220:[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;n<t;++n)r[n]=e;return r}var a=t(\"./reflect\"),o=t(\"./GLError\");e.exports=function(t,e,r,s){function l(t,e,r){switch(r){case\"bool\":case\"int\":case\"sampler2D\":case\"samplerCube\":return\"gl.uniform1i(locations[\"+e+\"],obj\"+t+\")\";case\"float\":return\"gl.uniform1f(locations[\"+e+\"],obj\"+t+\")\";default:var n=r.indexOf(\"vec\");if(!(0<=n&&n<=1&&r.length===4+n)){if(0===r.indexOf(\"mat\")&&4===r.length){if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new o(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+r);return\"gl.uniformMatrix\"+i+\"fv(locations[\"+e+\"],false,obj\"+t+\")\"}throw new o(\"\",\"Unknown uniform data type for \"+name+\": \"+r)}var i;if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new o(\"\",\"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 o(\"\",\"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 u(e){for(var n=[\"return function updateProperty(obj){\"],i=c(\"\",e),a=0;a<i.length;++a){var o=i[a],u=o[0],f=o[1];s[f]&&n.push(l(u,f,r[f].type))}return n.push(\"return obj}\"),new Function(\"gl\",\"locations\",n.join(\"\\n\"))(t,s)}function f(a,l,c){if(\"object\"==typeof c){var f=h(c);Object.defineProperty(a,l,{get:n(f),set:u(c),enumerable:!0,configurable:!1})}else s[c]?Object.defineProperty(a,l,{get:function(r){return new Function(\"gl\",\"wrapper\",\"locations\",\"return function(){return gl.getUniform(wrapper.program,locations[\"+r+\"])}\")(t,e,s)}(c),set:u(c),enumerable:!0,configurable:!1}):a[l]=function(t){switch(t){case\"bool\":return!1;case\"int\":case\"sampler2D\":case\"samplerCube\":case\"float\":return 0;default:var e=t.indexOf(\"vec\");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new o(\"\",\"Invalid data type\");return\"b\"===t.charAt(0)?i(r,!1):i(r,0)}if(0===t.indexOf(\"mat\")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new o(\"\",\"Invalid uniform dimension type for matrix \"+name+\": \"+t);return i(r*r,0)}throw new o(\"\",\"Unknown uniform data type for \"+name+\": \"+t)}}(r[c].type)}function h(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)f(e,r,t[r])}else{e={};for(var n in t)f(e,n,t[n])}return e}var d=a(r,!0);return{get:n(h(d)),set:u(d),enumerable:!0,configurable:!0}}},{\"./GLError\":218,\"./reflect\":221}],221:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name.split(\".\"),a=r,o=0;o<i.length;++o){var s=i[o].split(\"[\");if(s.length>1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l<s.length;++l){var c=parseInt(s[l]);l<s.length-1||o<i.length-1?(c in a||(l<s.length-1?a[c]=[]:a[c]={}),a=a[c]):a[c]=e?n:t[n].type}}else o<i.length-1?(s[0]in a||(a[s[0]]={}),a=a[s[0]]):a[s[0]]=e?n:t[n].type}return r}},{}],222:[function(t,e,r){\"use strict\";function n(t,e){if(!a){var r=Object.keys(i);a={};for(var n=0;n<r.length;++n){var o=r[n];a[t[o]]=i[o]}}return a[e]}r.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=[],a=0;a<r;++a){var o=t.getActiveUniform(e,a);if(o){var s=n(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)i.push({name:o.name.replace(\"[0]\",\"[\"+l+\"]\"),type:s});else i.push({name:o.name,type:s})}}return i},r.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=[],a=0;a<r;++a){var o=t.getActiveAttrib(e,a);o&&i.push({name:o.name,type:n(t,o.type)})}return i};var i={FLOAT:\"float\",FLOAT_VEC2:\"vec2\",FLOAT_VEC3:\"vec3\",FLOAT_VEC4:\"vec4\",INT:\"int\",INT_VEC2:\"ivec2\",INT_VEC3:\"ivec3\",INT_VEC4:\"ivec4\",BOOL:\"bool\",BOOL_VEC2:\"bvec2\",BOOL_VEC3:\"bvec3\",BOOL_VEC4:\"bvec4\",FLOAT_MAT2:\"mat2\",FLOAT_MAT3:\"mat3\",FLOAT_MAT4:\"mat4\",SAMPLER_2D:\"sampler2D\",SAMPLER_CUBE:\"samplerCube\"},a=null},{}],223:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function i(t){this.gl=t,this.shaders=[{},{}],this.programs={}}function a(t){var e=l.get(t);return e||(e=new i(t),l.set(t,e)),e}r.shader=function(t,e,r){return a(t).getShaderReference(e,r)},r.program=function(t,e,r,n,i){return a(t).getProgram(e,r,n,i)};var o=t(\"./GLError\"),s=t(\"gl-format-compiler-error\"),l=new(\"undefined\"==typeof WeakMap?t(\"weakmap-shim\"):WeakMap),c=0;n.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var u=i.prototype;u.getShaderReference=function(t,e){var r=this.gl,i=this.shaders[t===r.FRAGMENT_SHADER|0],a=i[e];if(a&&r.isShader(a.shader))a.count+=1;else{var l=function(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(n);try{var a=s(i,r,e)}catch(t){throw console.warn(\"Failed to format compiler error: \"+t),new o(i,\"Error compiling shader:\\n\"+i)}throw new o(i,a.short,a.long)}return n}(r,t,e);a=i[e]=new n(c++,e,t,l,[],1,this)}return a},u.getProgram=function(t,e,r,n){var i=[t.id,e.id,r.join(\":\"),n.join(\":\")].join(\"@\"),a=this.programs[i];return a&&this.gl.isProgram(a)||(this.programs[i]=a=function(t,e,r,n,i){var a=t.createProgram();t.attachShader(a,e),t.attachShader(a,r);for(var s=0;s<n.length;++s)t.bindAttribLocation(a,i[s],n[s]);if(t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS)){var l=t.getProgramInfoLog(a);throw new o(l,\"Error linking program: \"+l)}return a}(this.gl,t.shader,e.shader,r,n),t.programs.push(i),e.programs.push(i)),a}},{\"./GLError\":218,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],224:[function(t,e,r){\"use strict\";function n(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}function i(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function a(t,e){return t.x-e.x}e.exports=function(t){var e=t.gl,r=new n(e,o(e,[e.drawingBufferWidth,e.drawingBufferHeight]));return r.grid=s(r),r.text=l(r),r.line=c(r),r.box=u(r),r.update(t),r};var o=t(\"gl-select-static\"),s=t(\"./lib/grid\"),l=t(\"./lib/text\"),c=t(\"./lib/line\"),u=t(\"./lib/box\"),f=n.prototype;f.setDirty=function(){this.dirty=this.pickDirty=!0},f.setOverlayDirty=function(){this.dirty=!0},f.nextDepthValue=function(){return this._depthCounter++/65536},f.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var c=this.borderColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,d=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var p=0;p<2;++p)if(f[p]&&n[p]<=0&&n[p+2]>=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],h[p]):o.drawLine(e[0],m,e[2],m,d[p],h[p])}}for(p=0;p<l.length;++p)l[p].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var g=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;g[1]&&o.drawLine(r[0],r[1]-.5*v[1]*i,r[0],r[3]+.5*v[3]*i,v[1],y[1]),g[0]&&o.drawLine(r[0]-.5*v[0]*i,r[1],r[2]+.5*v[2]*i,r[1],v[0],y[0]),g[3]&&o.drawLine(r[2],r[1]-.5*v[1]*i,r[2],r[3]+.5*v[3]*i,v[3],y[3]),g[2]&&o.drawLine(r[0]-.5*v[0]*i,r[3],r[2]+.5*v[2]*i,r[3],v[2],y[2]),s.bind();for(p=0;p<2;++p)s.drawTicks(p);this.titleEnable&&s.drawTitle();var x=this.overlays;for(p=0;p<x.length;++p)x[p].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},f.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl;this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},f.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var f=c[u].pick(a,o,l);if(f)return f}return null}},f.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},f.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},f.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},f.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]);this.screenBox;this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,o=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/o,10,10/o]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=i(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=i(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=i(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!(\"titleEnable\"in t&&!t.titleEnable),this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=i(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=i(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=i(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var s=t.ticks||[[],[]],l=this._tickBounds;l[0]=l[1]=1/0,l[2]=l[3]=-1/0;for(var c=0;c<2;++c){var u=s[c].slice(0);0!==u.length&&(u.sort(a),l[c]=Math.min(l[c],u[0].x),l[c+2]=Math.max(l[c+2],u[u.length-1].x))}this.grid.update({bounds:l,ticks:s}),this.text.update({bounds:l,ticks:s,labels:t.labels||[\"x\",\"y\"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||[\"sans-serif\",\"sans-serif\"],title:t.title||\"\",titleSize:t.titleSize||18,titleFont:t.titleFont||\"sans-serif\"}),this.static=!!t.static,this.setDirty()},f.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();this.objects.length=0;for(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;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},f.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},f.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},{\"./lib/box\":211,\"./lib/grid\":212,\"./lib/line\":213,\"./lib/text\":215,\"gl-select-static\":242}],225:[function(t,e,r){var n=t(\"gl-shader\");e.exports=function(t){return n(t,\"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}\",\"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}\",null,[{name:\"position\",type:\"vec2\"}])}},{\"gl-shader\":243}],226:[function(t,e,r){\"use strict\";function n(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function i(t){return\"boolean\"!=typeof t||t}e.exports=function(t){function e(){if(!x&&U.autoResize){var t=b.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*U.pixelRatio),i=0|Math.ceil(r*U.pixelRatio);if(n!==b.width||i!==b.height){b.width=n,b.height=i;var a=b.style;a.position=a.position||\"absolute\",a.left=\"0px\",a.top=\"0px\",a.width=e+\"px\",a.height=r+\"px\",O=!0}}}function r(){for(var t=z.length,e=P.length,r=0;r<e;++r)I[r]=0;t:for(r=0;r<t;++r){var n=z[r],i=n.pickSlots;if(i){for(var a=0;a<e;++a)if(I[a]+i<255){D[r]=a,n.setPickBase(I[a]+1),I[a]+=i;continue t}var o=c(_,B);D[r]=e,P.push(o),I.push(i),n.setPickBase(1),e+=1}else D[r]=-1}for(;e>0&&0===I[e-1];)I.pop(),P.pop().dispose()}function g(){if(U.contextLost)return!0;_.isContextLost()&&(U.contextLost=!0,U.mouseListener.enabled=!1,U.selection.object=null,U.oncontextloss&&U.oncontextloss())}function v(){if(!g()){e();var t=U.camera.tick();j.view=U.camera.matrix,O=O||t,F=F||t,E.pixelRatio=U.pixelRatio,C.pixelRatio=U.pixelRatio;var r=z.length,i=G[0],a=G[1];i[0]=i[1]=i[2]=1/0,a[0]=a[1]=a[2]=-1/0;for(var o=0;o<r;++o){(L=z[o]).pixelRatio=U.pixelRatio,L.axes=U.axes,O=O||!!L.dirty,F=F||!!L.dirty;var l=L.bounds;if(l)for(var c=l[0],u=l[1],h=0;h<3;++h)i[h]=Math.min(i[h],c[h]),a[h]=Math.max(a[h],u[h])}var p=U.bounds;if(U.autoBounds)for(h=0;h<3;++h){if(a[h]<i[h])i[h]=-1,a[h]=1;else{i[h]===a[h]&&(i[h]-=1,a[h]+=1);var m=.05*(a[h]-i[h]);i[h]=i[h]-m,a[h]=a[h]+m}p[0][h]=i[h],p[1][h]=a[h]}var v=!1;for(h=0;h<3;++h)v=v||Y[0][h]!==p[0][h]||Y[1][h]!==p[1][h],Y[0][h]=p[0][h],Y[1][h]=p[1][h];if(F=F||v,O=O||v){if(v){var y=[0,0,0];for(o=0;o<3;++o)y[o]=n((p[1][o]-p[0][o])/10);E.autoTicks?E.update({bounds:p,tickSpacing:y}):E.update({bounds:p})}var x=_.drawingBufferWidth,b=_.drawingBufferHeight;for(B[0]=x,B[1]=b,V[0]=0|Math.max(x/U.pixelRatio,1),V[1]=0|Math.max(b/U.pixelRatio,1),d(R,U.fovy,x/b,U.zNear,U.zFar),o=0;o<16;++o)N[o]=0;N[15]=1;var w=0;for(o=0;o<3;++o)w=Math.max(w,p[1][o]-p[0][o]);for(o=0;o<3;++o)U.autoScale?N[5*o]=U.aspect[o]/(p[1][o]-p[0][o]):N[5*o]=1/w,U.autoCenter&&(N[12+o]=.5*-N[5*o]*(p[0][o]+p[1][o]));for(o=0;o<r;++o)(L=z[o]).axesBounds=p,U.clipToBounds&&(L.clipBounds=p);M.object&&(U.snapToData?C.position=M.dataCoordinate:C.position=M.dataPosition,C.bounds=p),F&&(F=!1,function(){if(!g()){_.colorMask(!0,!0,!0,!0),_.depthMask(!0),_.disable(_.BLEND),_.enable(_.DEPTH_TEST);for(var t=z.length,e=P.length,r=0;r<e;++r){var n=P[r];n.shape=V,n.begin();for(var i=0;i<t;++i)if(D[i]===r){var a=z[i];a.drawPick&&(a.pixelRatio=1,a.drawPick(j))}n.end()}}}()),U.axesPixels=s(U.axes,j,x,b),U.onrender&&U.onrender(),_.bindFramebuffer(_.FRAMEBUFFER,null),_.viewport(0,0,x,b);var T=U.clearColor;_.clearColor(T[0],T[1],T[2],T[3]),_.clear(_.COLOR_BUFFER_BIT|_.DEPTH_BUFFER_BIT),_.depthMask(!0),_.colorMask(!0,!0,!0,!0),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL),_.disable(_.BLEND),_.disable(_.CULL_FACE);var S=!1;for(E.enable&&(S=S||E.isTransparent(),E.draw(j)),C.axes=E,M.object&&C.draw(j),_.disable(_.CULL_FACE),o=0;o<r;++o)(L=z[o]).axes=E,L.pixelRatio=U.pixelRatio,L.isOpaque&&L.isOpaque()&&L.draw(j),L.isTransparent&&L.isTransparent()&&(S=!0);if(S){for(k.shape=B,k.bind(),_.clear(_.DEPTH_BUFFER_BIT),_.colorMask(!1,!1,!1,!1),_.depthMask(!0),_.depthFunc(_.LESS),E.enable&&E.isTransparent()&&E.drawTransparent(j),o=0;o<r;++o)(L=z[o]).isOpaque&&L.isOpaque()&&L.draw(j);for(_.enable(_.BLEND),_.blendEquation(_.FUNC_ADD),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.colorMask(!0,!0,!0,!0),_.depthMask(!1),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT),E.isTransparent()&&E.drawTransparent(j),o=0;o<r;++o){var L;(L=z[o]).isTransparent&&L.isTransparent()&&L.drawTransparent(j)}_.bindFramebuffer(_.FRAMEBUFFER,null),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.disable(_.DEPTH_TEST),A.bind(),k.color[0].bind(0),A.uniforms.accumBuffer=0,f(_),_.disable(_.BLEND)}for(O=!1,o=0;o<r;++o)z[o].dirty=!1}}}function y(){x||U.contextLost||(requestAnimationFrame(y),v())}var x=!1,b=((t=t||{}).pixelRatio||parseFloat(window.devicePixelRatio),t.canvas);b||(b=document.createElement(\"canvas\"),t.container?t.container.appendChild(b):document.body.appendChild(b));var _=t.gl;if(_||(_=function(t,e){var r=null;try{(r=t.getContext(\"webgl\",e))||(r=t.getContext(\"experimental-webgl\",e))}catch(t){return null}return r}(b,t.glOptions||{premultipliedAlpha:!0,antialias:!0})),!_)throw new Error(\"webgl not supported\");var w=t.bounds||[[-10,-10,-10],[10,10,10]],M=new function(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null},k=u(_,[_.drawingBufferWidth,_.drawingBufferHeight],{preferFloat:!m}),A=p(_),T=t.camera||{eye:[2,0,0],center:[0,0,0],up:[0,1,0],zoomMin:.1,zoomMax:100,mode:\"turntable\"},S=t.axes||{},E=o(_,S);E.enable=!S.disable;var L=t.spikes||{},C=l(_,L),z=[],D=[],I=[],P=[],O=!0,F=!0,R=new Array(16),N=new Array(16),j={view:null,projection:R,model:N},B=(F=!0,[_.drawingBufferWidth,_.drawingBufferHeight]),U={gl:_,contextLost:!1,pixelRatio:t.pixelRatio||parseFloat(window.devicePixelRatio),canvas:b,selection:M,camera:a(b,T),axes:E,axesPixels:null,spikes:C,bounds:w,objects:z,shape:B,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:i(t.autoResize),autoBounds:i(t.autoBounds),autoScale:!!t.autoScale,autoCenter:i(t.autoCenter),clipToBounds:i(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:j,oncontextloss:null,mouseListener:null},V=[_.drawingBufferWidth/U.pixelRatio|0,_.drawingBufferHeight/U.pixelRatio|0];U.autoResize&&e(),window.addEventListener(\"resize\",e),U.update=function(t){x||(t=t||{},O=!0,F=!0)},U.add=function(t){x||(t.axes=E,z.push(t),D.push(-1),O=!0,F=!0,r())},U.remove=function(t){if(!x){var e=z.indexOf(t);e<0||(z.splice(e,1),D.pop(),O=!0,F=!0,r())}},U.dispose=function(){if(!x&&(x=!0,window.removeEventListener(\"resize\",e),b.removeEventListener(\"webglcontextlost\",g),U.mouseListener.enabled=!1,!U.contextLost)){E.dispose(),C.dispose();for(var t=0;t<z.length;++t)z[t].dispose();for(k.dispose(),t=0;t<P.length;++t)P[t].dispose();A.dispose(),_=null,E=null,C=null,z=[]}};var q=!1,H=0;U.mouseListener=h(b,function(t,e,r){if(!x){var n=P.length,i=z.length,a=M.object;M.distance=1/0,M.mouse[0]=e,M.mouse[1]=r,M.object=null,M.screen=null,M.dataCoordinate=M.dataPosition=null;var o=!1;if(t&&H)q=!0;else{q&&(F=!0),q=!1;for(var s=0;s<n;++s){var l=P[s].query(e,V[1]-r-1,U.pickRadius);if(l){if(l.distance>M.distance)continue;for(var c=0;c<i;++c){var u=z[c];if(D[c]===s){var f=u.pick(l);f&&(M.buttons=t,M.screen=l.coord,M.distance=l.distance,M.object=u,M.index=f.distance,M.dataPosition=f.position,M.dataCoordinate=f.dataCoordinate,M.data=f,o=!0)}}}}}a&&a!==M.object&&(a.highlight&&a.highlight(null),O=!0),M.object&&(M.object.highlight&&M.object.highlight(M.data),O=!0),(o=o||M.object!==a)&&U.onselect&&U.onselect(M),1&t&&!(1&H)&&U.onclick&&U.onclick(M),H=t}}),b.addEventListener(\"webglcontextlost\",g);var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Y=[G[0].slice(),G[1].slice()];return y(),U.redraw=function(){x||(O=!0,v())},U};var a=t(\"3d-view-controls\"),o=t(\"gl-axes3d\"),s=t(\"gl-axes3d/properties\"),l=t(\"gl-spikes3d\"),c=t(\"gl-select-static\"),u=t(\"gl-fbo\"),f=t(\"a-big-triangle\"),h=t(\"mouse-change\"),d=t(\"gl-mat4/perspective\"),p=t(\"./lib/shader\"),m=t(\"is-mobile\")()},{\"./lib/shader\":225,\"3d-view-controls\":39,\"a-big-triangle\":42,\"gl-axes3d\":157,\"gl-axes3d/properties\":164,\"gl-fbo\":171,\"gl-mat4/perspective\":189,\"gl-select-static\":242,\"gl-spikes3d\":252,\"is-mobile\":285,\"mouse-change\":443}],227:[function(t,e,r){r.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}\",r.pointFragment=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color, borderColor;\\nuniform float centerFraction;\\nuniform float pointCloud;\\n\\nvoid main() {\\n float radius;\\n vec4 baseColor;\\n if(pointCloud != 0.0) { // pointCloud is truthy\\n if(centerFraction == 1.0) {\\n gl_FragColor = color;\\n } else {\\n gl_FragColor = mix(borderColor, color, centerFraction);\\n }\\n } else {\\n radius = length(2.0 * gl_PointCoord.xy - 1.0);\\n if(radius > 1.0) {\\n discard;\\n }\\n baseColor = mix(borderColor, color, step(radius, centerFraction));\\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\\n }\\n}\\n\",r.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\",r.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\"},{}],228:[function(t,e,r){arguments[4][217][0].apply(r,arguments)},{\"./lib/GLError\":229,\"./lib/create-attributes\":230,\"./lib/create-uniforms\":231,\"./lib/reflect\":232,\"./lib/runtime-reflect\":233,\"./lib/shader-cache\":234,dup:217}],229:[function(t,e,r){arguments[4][218][0].apply(r,arguments)},{dup:218}],230:[function(t,e,r){arguments[4][219][0].apply(r,arguments)},{\"./GLError\":229,dup:219}],231:[function(t,e,r){arguments[4][220][0].apply(r,arguments)},{\"./GLError\":229,\"./reflect\":232,dup:220}],232:[function(t,e,r){arguments[4][221][0].apply(r,arguments)},{dup:221}],233:[function(t,e,r){arguments[4][222][0].apply(r,arguments)},{dup:222}],234:[function(t,e,r){arguments[4][223][0].apply(r,arguments)},{\"./GLError\":229,dup:223,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],235:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"typedarray-pool\"),s=t(\"./lib/shader\");e.exports=function(t,e){var r=t.gl,o=new n(t,a(r),a(r),i(r,s.pointVertex,s.pointFragment),i(r,s.pickVertex,s.pickFragment));return o.update(e),t.addObject(o),o};var l=n.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.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,s=t.positions,l=i?s:o.mallocFloat32(s.length),c=a?t.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),r=0;r<n;r++)c[r]=r;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),i||o.free(l),a||o.free(c),this.pointCount=n,this.pickOffset=0},l.unifiedDraw=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=void 0!==r,i=n?this.pickShader:this.shader,a=this.plot.gl,o=this.plot.dataBox;if(0===this.pointCount)return r;var s=o[2]-o[0],l=o[3]-o[1],c=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,o),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(c,.33333)));t[0]=2/s,t[4]=2/l,t[6]=-2*o[0]/s-1,t[7]=-2*o[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=t,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=u<5,i.uniforms.pointSize=u,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),n&&(e[0]=255&r,e[1]=r>>8&255,e[2]=r>>16&255,e[3]=r>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(a.UNSIGNED_BYTE),i.uniforms.pickOffset=e,this.pickOffset=r);var f=a.getParameter(a.BLEND),h=a.getParameter(a.DITHER);return f&&!this.blend&&a.disable(a.BLEND),h&&a.disable(a.DITHER),a.drawArrays(a.POINTS,0,this.pointCount),f&&!this.blend&&a.enable(a.BLEND),h&&a.enable(a.DITHER),r+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||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\":227,\"gl-buffer\":165,\"gl-shader\":228,\"typedarray-pool\":554}],236:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(a=c*d+u*p+f*m+h*g)<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*c+l*d,t[1]=s*u+l*p,t[2]=s*f+l*m,t[3]=s*h+l*g,t}},{}],237:[function(t,e,r){\"use strict\";var n=t(\"vectorize-text\");e.exports=function(t,e){var r=i[e];if(r||(r=i[e]={}),t in r)return r[t];for(var a=n(t,{textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:e}),o=n(t,{triangles:!0,textAlign:\"center\",textBaseline:\"middle\",lineHeight:1,font:e}),s=[[1/0,1/0],[-1/0,-1/0]],l=0;l<a.positions.length;++l)for(var c=a.positions[l],u=0;u<2;++u)s[0][u]=Math.min(s[0][u],c[u]),s[1][u]=Math.max(s[1][u],c[u]);return r[t]=[o,a,s]};var i={}},{\"vectorize-text\":568}],238:[function(t,e,r){function n(t,e){var r=i(t,e),n=r.attributes;return n.position.location=0,n.color.location=1,n.glyph.location=2,n.id.location=3,r}var i=t(\"gl-shader\"),a=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\n\\nuniform vec4 highlightId;\\nuniform float highlightScale;\\nuniform mat4 model, view, projection;\\nuniform vec3 clipBounds[2];\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\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 float scale = 1.0;\\n if(distance(highlightId, id) < 0.0001) {\\n scale = highlightScale;\\n }\\n\\n vec4 worldPosition = model * vec4(position, 1);\\n vec4 viewPosition = view * worldPosition;\\n viewPosition = viewPosition / viewPosition.w;\\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\\n \\n gl_Position = clipPosition;\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = position;\\n }\\n}\",o=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float highlightScale, pixelRatio;\\nuniform vec4 highlightId;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(position, clipBounds[0])) || any(greaterThan(position, clipBounds[1]))) {\\n gl_Position = vec4(0,0,0,0);\\n } else {\\n float scale = pixelRatio;\\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\\n scale *= highlightScale;\\n }\\n\\n vec4 worldPosition = model * vec4(position, 1.0);\\n vec4 viewPosition = view * worldPosition;\\n vec4 clipPosition = projection * viewPosition;\\n clipPosition /= clipPosition.w;\\n \\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = position;\\n }\\n}\",s=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute vec2 glyph;\\nattribute vec4 id;\\n\\nuniform float highlightScale;\\nuniform vec4 highlightId;\\nuniform vec3 axes[2];\\nuniform mat4 model, view, projection;\\nuniform vec2 screenSize;\\nuniform vec3 clipBounds[2];\\nuniform float scale, pixelRatio;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\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 float lscale = pixelRatio * scale;\\n if(distance(highlightId, id) < 0.0001) {\\n lscale *= highlightScale;\\n }\\n\\n vec4 clipCenter = projection * view * model * vec4(position, 1);\\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\\n\\n gl_Position = clipPosition;\\n interpColor = color;\\n pickId = id;\\n dataCoordinate = dataPosition;\\n }\\n}\\n\",l=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float opacity;\\n\\nvarying vec4 interpColor;\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(dataCoordinate, fragClipBounds[0])) ||\\n any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\\n discard;\\n } else {\\n gl_FragColor = interpColor * opacity;\\n }\\n}\\n\",c=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec3 fragClipBounds[2];\\nuniform float pickGroup;\\n\\nvarying vec4 pickId;\\nvarying vec3 dataCoordinate;\\n\\nvoid main() {\\n if(any(lessThan(dataCoordinate, fragClipBounds[0])) || \\n any(greaterThan(dataCoordinate, fragClipBounds[1])) ) {\\n discard;\\n } else {\\n gl_FragColor = vec4(pickGroup, pickId.bgr);\\n }\\n}\",u=[{name:\"position\",type:\"vec3\"},{name:\"color\",type:\"vec4\"},{name:\"glyph\",type:\"vec2\"},{name:\"id\",type:\"vec4\"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},d={vertex:s,fragment:l,attributes:u},p={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};r.createPerspective=function(t){return n(t,f)},r.createOrtho=function(t){return n(t,h)},r.createProject=function(t){return n(t,d)},r.createPickPerspective=function(t){return n(t,p)},r.createPickOrtho=function(t){return n(t,m)},r.createPickProject=function(t){return n(t,g)}},{\"gl-shader\":243}],239:[function(t,e,r){\"use strict\";function n(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function i(t,e,r,i){return n(i,i),n(i,i),n(i,i)}function a(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new function(t,e){this.index=t,this.dataCoordinate=this.position=e}(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}function o(t){return t[0]=t[1]=t[2]=0,t}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function l(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function c(t,e,r,n,a){var c,u=e.axesProject,f=e.gl,h=t.uniforms,d=r.model||v,m=r.view||v,g=r.projection||v,y=e.axesBounds,S=function(t){for(var e=T,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);c=e.axes?e.axes.lastCubeProps.axis:[1,1,1],x[0]=2/f.drawingBufferWidth,x[1]=2/f.drawingBufferHeight,t.bind(),h.view=m,h.projection=g,h.screenSize=x,h.highlightId=e.highlightId,h.highlightScale=e.highlightScale,h.clipBounds=S,h.pickGroup=e.pickId/255,h.pixelRatio=e.pixelRatio;for(var E=0;E<3;++E)if(u[E]&&e.projectOpacity[E]<1===n){h.scale=e.projectScale[E],h.opacity=e.projectOpacity[E];for(var L=k,C=0;C<16;++C)L[C]=0;for(C=0;C<4;++C)L[5*C]=1;L[5*E]=0,c[E]<0?L[12+E]=y[0][E]:L[12+E]=y[1][E],p(L,d,L),h.model=L;var z=(E+1)%3,D=(E+2)%3,I=o(b),P=o(_);I[z]=1,P[D]=1;var O=i(0,0,0,s(w,I)),F=i(0,0,0,s(M,P));if(Math.abs(O[1])>Math.abs(F[1])){var R=O;O=F,F=R,R=I,I=P,P=R;var N=z;z=D,D=N}O[0]<0&&(I[z]=-1),F[1]>0&&(P[D]=-1);var j=0,B=0;for(C=0;C<4;++C)j+=Math.pow(d[4*z+C],2),B+=Math.pow(d[4*D+C],2);I[z]/=Math.sqrt(j),P[D]/=Math.sqrt(B),h.axes[0]=I,h.axes[1]=P,h.fragClipBounds[0]=l(A,S[0],E,-1e8),h.fragClipBounds[1]=l(A,S[1],E,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 u(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||v,s.view=n.view||v,s.projection=n.projection||v,x[0]=2/o.drawingBufferWidth,x[1]=2/o.drawingBufferHeight,s.screenSize=x,s.highlightId=r.highlightId,s.highlightScale=r.highlightScale,s.fragClipBounds=S,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))}c(e,r,n,i),r.vao.unbind()}var f=t(\"gl-buffer\"),h=t(\"gl-vao\"),d=t(\"typedarray-pool\"),p=t(\"gl-mat4/multiply\"),m=t(\"./lib/shaders\"),g=t(\"./lib/glyphs\"),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=function(t){var e=t.gl,r=m.createPerspective(e),n=m.createOrtho(e),i=m.createProject(e),o=m.createPickPerspective(e),s=m.createPickOrtho(e),l=m.createPickProject(e),c=f(e),u=f(e),d=f(e),p=f(e),g=new a(e,r,n,i,c,u,d,p,h(e,[{buffer:c,size:3,type:e.FLOAT},{buffer:u,size:4,type:e.FLOAT},{buffer:d,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),o,s,l);return g.update(t),g};var y=a.prototype;y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.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},y.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 x=[0,0],b=[0,0,0],_=[0,0,0],w=[0,0,0,1],M=[0,0,0,1],k=v.slice(),A=[0,0,0],T=[[0,0,0],[0,0,0]],S=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];y.draw=function(t){u(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!1,!1)},y.drawTransparent=function(t){u(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,!0,!1)},y.drawPick=function(t){u(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,!1,!0)},y.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},y.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]},y.update=function(t){if(\"perspective\"in(t=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{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,c=t.color,u=t.size,f=t.angle,h=t.lineColor,p=0,m=0,v=0,y=n.length;t:for(var x=0;x<y;++x){for(var b=n[x],_=0;_<3;++_)if(isNaN(b[_])||!isFinite(b[_]))continue t;var w=(R=Array.isArray(l)?g(l[x],i):l?g(l,i):g(\"\\u25cf\",i))[0],M=R[1],k=R[2];m+=3*w.cells.length,v+=2*M.edges.length}var A=m+v,T=d.mallocFloat(3*A),S=d.mallocFloat(4*A),E=d.mallocFloat(2*A),L=d.mallocUint32(A),C=[0,a[1]],z=0,D=m,I=[0,0,0,1],P=[0,0,0,1],O=Array.isArray(c)&&Array.isArray(c[0]),F=Array.isArray(h)&&Array.isArray(h[0]);t:for(x=0;x<y;++x){for(b=n[x],_=0;_<3;++_){if(isNaN(b[_])||!isFinite(b[_])){p+=1;continue t}s[_]=Math.max(s[_],b[_]),o[_]=Math.min(o[_],b[_])}var R;w=(R=Array.isArray(l)?g(l[x],i):l?g(l,i):g(\"\\u25cf\",i))[0],M=R[1],k=R[2];if(Array.isArray(c)){if(3===(N=O?c[x]:c).length){for(_=0;_<3;++_)I[_]=N[_];I[3]=1}else if(4===N.length)for(_=0;_<4;++_)I[_]=N[_]}else I[0]=I[1]=I[2]=0,I[3]=1;if(Array.isArray(h)){var N;if(3===(N=F?h[x]:h).length){for(_=0;_<3;++_)P[_]=N[_];P[_]=1}else if(4===N.length)for(_=0;_<4;++_)P[_]=N[_]}else P[0]=P[1]=P[2]=0,P[3]=1;var j=.5;Array.isArray(u)?j=+u[x]:u?j=+u:this.useOrtho&&(j=12);var B=0;Array.isArray(f)?B=+f[x]:f&&(B=+f);var U=Math.cos(B),V=Math.sin(B);for(b=n[x],_=0;_<3;++_)s[_]=Math.max(s[_],b[_]),o[_]=Math.min(o[_],b[_]);a[0]<0?C[0]=a[0]*(1+k[1][0]):a[0]>0&&(C[0]=-a[0]*(1+k[0][0]));var q=w.cells,H=w.positions;for(_=0;_<q.length;++_)for(var G=q[_],Y=0;Y<3;++Y){for(var W=0;W<3;++W)T[3*z+W]=b[W];for(W=0;W<4;++W)S[4*z+W]=I[W];L[z]=p;var X=H[G[Y]];E[2*z]=j*(U*X[0]-V*X[1]+C[0]),E[2*z+1]=j*(V*X[0]+U*X[1]+C[1]),z+=1}for(q=M.edges,H=M.positions,_=0;_<q.length;++_)for(G=q[_],Y=0;Y<2;++Y){for(W=0;W<3;++W)T[3*D+W]=b[W];for(W=0;W<4;++W)S[4*D+W]=P[W];L[D]=p;X=H[G[Y]];E[2*D]=j*(U*X[0]-V*X[1]+C[0]),E[2*D+1]=j*(V*X[0]+U*X[1]+C[1]),D+=1}p+=1}this.vertexCount=m,this.lineVertexCount=v,this.pointBuffer.update(T),this.colorBuffer.update(S),this.glyphBuffer.update(E),this.idBuffer.update(new Uint32Array(L)),d.free(T),d.free(S),d.free(E),d.free(L),this.bounds=[o,s],this.points=n,this.pointCount=n.length}},y.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{\"./lib/glyphs\":237,\"./lib/shaders\":238,\"gl-buffer\":165,\"gl-mat4/multiply\":188,\"gl-vao\":259,\"typedarray-pool\":554}],240:[function(t,e,r){\"use strict\";r.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\",r.boxFragment=\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color;\\n\\nvoid main() {\\n gl_FragColor = color;\\n}\\n\"},{}],241:[function(t,e,r){\"use strict\";function n(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}var i=t(\"gl-shader\"),a=t(\"gl-buffer\"),o=t(\"./lib/shaders\");e.exports=function(t,e){var r=t.gl,s=new n(t,a(r,[0,0,0,1,1,0,1,1]),i(r,o.boxVertex,o.boxFragment));return s.update(e),t.addOverlay(s),s};var s=n.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,c=t.viewBox,u=t.pixelRatio,f=(e[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],h=(e[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],d=(e[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],p=(e[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(f=Math.max(f,c[0]),h=Math.max(h,c[1]),d=Math.min(d,c[2]),p=Math.min(p,c[3]),!(d<f||p<h)){o.bind();var m=s[2]-s[0],g=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,m,h,i),o.drawBox(0,h,f,p,i),o.drawBox(0,p,m,g,i),o.drawBox(d,h,m,p,i)),this.innerFill&&o.drawBox(f,h,d,p,n),r>0){var v=r*u;o.drawBox(f-v,h-v,d+v,h+v,a),o.drawBox(f-v,p-v,d+v,p+v,a),o.drawBox(f-v,h-v,f+v,p+v,a),o.drawBox(d-v,h-v,d+v,p+v,a)}}}},s.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()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{\"./lib/shaders\":240,\"gl-buffer\":165,\"gl-shader\":243}],242:[function(t,e,r){\"use strict\";function n(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)}}e.exports=function(t,e){return new n(t,i(t,e),a.mallocUint8(e[0]*e[1]*4))};var i=t(\"gl-fbo\"),a=t(\"typedarray-pool\"),o=t(\"ndarray\"),s=t(\"bit-twiddle\").nextPow2,l=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_f<this_closestD2&&(this_closestD2=_inline_46_f,this_closestX=_inline_46_arg6_[0],this_closestY=_inline_46_arg6_[1])}}\",args:[{name:\"_inline_46_arg0_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg1_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg2_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg3_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg4_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg5_\",lvalue:!1,rvalue:!0,count:1},{name:\"_inline_46_arg6_\",lvalue:!1,rvalue:!0,count:4}],thisVars:[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],localVars:[\"_inline_46_a\",\"_inline_46_f\",\"_inline_46_l\"]},post:{body:\"{return[this_closestX,this_closestY,this_closestD2]}\",args:[],thisVars:[\"this_closestD2\",\"this_closestX\",\"this_closestY\"],localVars:[]},debug:!1,funcName:\"cwise\",blockSize:64}),c=n.prototype;Object.defineProperty(c,\"shape\",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(s(r*e*4)),i=0;i<r*e*4;++i)n[i]=255}return t}}}),c.begin=function(){var t=this.gl;this.shape;t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},c.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},c.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,\"number\"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),a=0|Math.min(Math.max(t+r,0),n[0]),s=0|Math.min(Math.max(e-r,0),n[1]),c=0|Math.min(Math.max(e+r,0),n[1]);if(a<=i||c<=s)return null;var u=[a-i,c-s],f=o(this.buffer,[u[0],u[1],4],[4,4*n[0],1],4*(i+n[0]*s)),h=l(f.hi(u[0],u[1],1),r,r),d=h[0],p=h[1];if(d<0||Math.pow(this.radius,2)<h[2])return null;return new function(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}(d+i|0,p+s|0,f.get(d,p,0),[f.get(d,p,1),f.get(d,p,2),f.get(d,p,3)],Math.sqrt(h[2]))},c.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{\"bit-twiddle\":71,\"cwise/lib/wrapper\":119,\"gl-fbo\":171,ndarray:458,\"typedarray-pool\":554}],243:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}function i(t,e){return t.name<e.name?-1:1}var a=t(\"./lib/create-uniforms\"),o=t(\"./lib/create-attributes\"),s=t(\"./lib/reflect\"),l=t(\"./lib/shader-cache\"),c=t(\"./lib/runtime-reflect\"),u=t(\"./lib/GLError\"),f=n.prototype;f.bind=function(){this.program||this._relink(),this.gl.useProgram(this.program)},f.dispose=function(){this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},f.update=function(t,e,r,n){function f(){d.program=l.program(p,d._vref,d._fref,b,_);for(var t=0;t<r.length;++t)E[t]=p.getUniformLocation(d.program,r[t].name)}if(!e||1===arguments.length){var h=t;t=h.vertex,e=h.fragment,r=h.uniforms,n=h.attributes}var d=this,p=d.gl,m=d._vref;d._vref=l.shader(p,p.VERTEX_SHADER,t),m&&m.dispose(),d.vertShader=d._vref.shader;var g=this._fref;if(d._fref=l.shader(p,p.FRAGMENT_SHADER,e),g&&g.dispose(),d.fragShader=d._fref.shader,!r||!n){var v=p.createProgram();if(p.attachShader(v,d.fragShader),p.attachShader(v,d.vertShader),p.linkProgram(v),!p.getProgramParameter(v,p.LINK_STATUS)){var y=p.getProgramInfoLog(v);throw new u(y,\"Error linking program:\"+y)}r=r||c.uniforms(p,v),n=n||c.attributes(p,v),p.deleteProgram(v)}(n=n.slice()).sort(i);for(var x=[],b=[],_=[],w=0;w<n.length;++w){var M=n[w];if(M.type.indexOf(\"mat\")>=0){for(var k=0|M.type.charAt(M.type.length-1),A=new Array(k),T=0;T<k;++T)A[T]=_.length,b.push(M.name+\"[\"+T+\"]\"),\"number\"==typeof M.location?_.push(M.location+T):Array.isArray(M.location)&&M.location.length===k&&\"number\"==typeof M.location[T]?_.push(0|M.location[T]):_.push(-1);x.push({name:M.name,type:M.type,locations:A})}else x.push({name:M.name,type:M.type,locations:[_.length]}),b.push(M.name),\"number\"==typeof M.location?_.push(0|M.location):_.push(-1)}var S=0;for(w=0;w<_.length;++w)if(_[w]<0){for(;_.indexOf(S)>=0;)S+=1;_[w]=S}var E=new Array(r.length);f(),d._relink=f,d.types={uniforms:s(r),attributes:s(n)},d.attributes=o(p,d,x,_),Object.defineProperty(d,\"uniforms\",a(p,d,r,E))},e.exports=function(t,e,r,i,a){var o=new n(t);return o.update(e,r,i,a),o}},{\"./lib/GLError\":244,\"./lib/create-attributes\":245,\"./lib/create-uniforms\":246,\"./lib/reflect\":247,\"./lib/runtime-reflect\":248,\"./lib/shader-cache\":249}],244:[function(t,e,r){arguments[4][218][0].apply(r,arguments)},{dup:218}],245:[function(t,e,r){arguments[4][219][0].apply(r,arguments)},{\"./GLError\":244,dup:219}],246:[function(t,e,r){arguments[4][220][0].apply(r,arguments)},{\"./GLError\":244,\"./reflect\":247,dup:220}],247:[function(t,e,r){arguments[4][221][0].apply(r,arguments)},{dup:221}],248:[function(t,e,r){arguments[4][222][0].apply(r,arguments)},{dup:222}],249:[function(t,e,r){arguments[4][223][0].apply(r,arguments)},{\"./GLError\":244,dup:223,\"gl-format-compiler-error\":172,\"weakmap-shim\":576}],250:[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]}e.exports=function(t,e){var r=new n(t);return r.update(e),t.addOverlay(r),r};var i=n.prototype;i.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()},i.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]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,c,s[0],c,e[0],r[0]),t[1]&&a.drawLine(l,c,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,c,s[2],c,e[2],r[2]),t[3]&&a.drawLine(l,c,l,s[3],e[3],r[3])}},i.dispose=function(){this.plot.removeOverlay(this)}},{}],251:[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\":243}],252:[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}var i=t(\"gl-buffer\"),a=t(\"gl-vao\"),o=t(\"./shaders/index\");e.exports=function(t,e){function r(t,e,r,n,i,a){var o=[t,e,r,0,0,0,1];o[n+3]=1,o[n]=i,s.push.apply(s,o),o[6]=-1,s.push.apply(s,o),o[n]=a,s.push.apply(s,o),s.push.apply(s,o),o[6]=1,s.push.apply(s,o),o[n]=i,s.push.apply(s,o)}var s=[];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=i(t,s),c=a(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}]),u=o(t);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var f=new n(t,l,c,u);return f.update(e),f};var s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l=n.prototype,c=[0,0,0],u=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||s,o=t.view||s,l=t.projection||s;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=c,d=u,p=0;p<3;++p)i&&i[p]<0?(h[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(h[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=l,n.uniforms.coordinates=[this.position,h,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f;for(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()},l.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))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{\"./shaders/index\":251,\"gl-buffer\":165,\"gl-vao\":259}],253:[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 = max(beckmannSpecular_1_1(L, V, N, roughness), 0.);\\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\":243}],254:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u,f,h,d){this.gl=t,this.shape=e,this.bounds=r,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=s,this._contourShader=l,this._contourPickShader=c,this._contourBuffer=u,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new function(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=h,this._dynamicVAO=d,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=[y(p.mallocFloat(1024),[0,0]),y(p.mallocFloat(1024),[0,0]),y(p.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 i(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||O,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=F.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],b(l,t.model,l);var c=F.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return F.showSurface=o,F.showContour=s,F}function a(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=R;n.model=t.model||C,n.view=t.view||C,n.projection=t.projection||C,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=_(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var o=n.clipBounds[a],s=0;s<3;++s)o[s]=Math.min(Math.max(this.clipBounds[a][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=j,n.vertexColor=this.vertexColor;var l=N;for(b(l,n.view,n.model),b(l,n.projection,l),_(l,l),a=0;a<3;++a)n.eyePosition[a]=l[12+a]/l[15];var c=l[15];for(a=0;a<3;++a)c+=this.lightPosition[a]*l[4*a+3];for(a=0;a<3;++a){var u=l[12+a];for(s=0;s<3;++s)u+=l[4*s+a]*this.lightPosition[s];n.lightPosition[a]=u/c}var f=i(n,this);if(f.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),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=f.projections[a],this._shader.uniforms.clipBounds=f.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(f.showContour&&!e){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var d=this._contourVAO;for(d.bind(),a=0;a<3;++a)for(h.uniforms.permutation=D[a],r.lineWidth(this.contourWidth[a]),s=0;s<this.contourLevels[a].length;++s)this._contourCounts[a][s]&&(s===this.highlightLevel[a]?(h.uniforms.contourColor=this.highlightColor[a],h.uniforms.contourTint=this.highlightTint[a]):0!==s&&s-1!==this.highlightLevel[a]||(h.uniforms.contourColor=this.contourColor[a],h.uniforms.contourTint=this.contourTint[a]),h.uniforms.height=this.contourLevels[a][s],d.draw(r.LINES,this._contourCounts[a][s],this._contourOffsets[a][s]));for(a=0;a<3;++a)for(h.uniforms.model=f.projections[a],h.uniforms.clipBounds=f.clipBounds[a],s=0;s<3;++s)if(this.contourProject[a][s]){h.uniforms.permutation=D[s],r.lineWidth(this.contourWidth[s]);for(var p=0;p<this.contourLevels[s].length;++p)p===this.highlightLevel[s]?(h.uniforms.contourColor=this.highlightColor[s],h.uniforms.contourTint=this.highlightTint[s]):0!==p&&p-1!==this.highlightLevel[s]||(h.uniforms.contourColor=this.contourColor[s],h.uniforms.contourTint=this.contourTint[s]),h.uniforms.height=this.contourLevels[s][p],d.draw(r.LINES,this._contourCounts[s][p],this._contourOffsets[s][p])}for((d=this._dynamicVAO).bind(),a=0;a<3;++a)if(0!==this._dynamicCounts[a])for(h.uniforms.model=n.model,h.uniforms.clipBounds=n.clipBounds,h.uniforms.permutation=D[a],r.lineWidth(this.dynamicWidth[a]),h.uniforms.contourColor=this.dynamicColor[a],h.uniforms.contourTint=this.dynamicTint[a],h.uniforms.height=this.dynamicLevel[a],d.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]),s=0;s<3;++s)this.contourProject[s][a]&&(h.uniforms.model=f.projections[s],h.uniforms.clipBounds=f.clipBounds[s],d.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]));d.unbind()}}function o(t,e){var r=e.shape.slice(),n=t.shape.slice();g.assign(t.lo(1,1).hi(r[0],r[1]),e),g.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),g.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),g.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),g.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))}function s(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function l(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function c(t){if(Array.isArray(t)){if(Array.isArray(t))return[l(t[0]),l(t[1]),l(t[2])];var e=l(t);return[e.slice(),e.slice(),e.slice()]}}e.exports=function(t){var e=t.gl,r=A(e),i=S(e),a=T(e),o=E(e),s=f(e),l=h(e,[{buffer:s,size:4,stride:L,offset:0},{buffer:s,size:3,stride:L,offset:16},{buffer:s,size:3,stride:L,offset:28}]),c=f(e),u=h(e,[{buffer:c,size:4,stride:20,offset:0},{buffer:c,size:1,stride:20,offset:16}]),p=f(e),m=h(e,[{buffer:p,size:2,type:e.FLOAT}]),g=d(e,1,I,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var v=new n(e,[0,0],[[0,0,0],[0,0,0]],r,i,s,l,g,a,o,c,u,p,m),y={levels:[[],[],[]]};for(var x in t)y[x]=t[x];return y.colormap=y.colormap||\"jet\",v.update(y),v};var u=t(\"bit-twiddle\"),f=t(\"gl-buffer\"),h=t(\"gl-vao\"),d=t(\"gl-texture2d\"),p=t(\"typedarray-pool\"),m=t(\"colormap\"),g=t(\"ndarray-ops\"),v=t(\"ndarray-pack\"),y=t(\"ndarray\"),x=t(\"surface-nets\"),b=t(\"gl-mat4/multiply\"),_=t(\"gl-mat4/invert\"),w=t(\"binary-search-bounds\"),M=t(\"ndarray-gradient\"),k=t(\"./lib/shaders\"),A=k.createShader,T=k.createContourShader,S=k.createPickShader,E=k.createPickContourShader,L=40,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[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]];!function(){for(var t=0;t<3;++t){var e=D[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var I=256,P=n.prototype;P.isTransparent=function(){return this.opacity<1},P.isOpaque=function(){if(this.opacity>=1)return!0;for(var t=0;t<3;++t)if(this._contourCounts[t].length>0||this._dynamicCounts[t]>0)return!0;return!1},P.pickSlots=1,P.setPickBase=function(t){this.pickId=t};var O=[0,0,0],F={showSurface:!1,showContour:!1,projections:[C.slice(),C.slice(),C.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]},R={model:C,view:C,projection:C,inverseModel:C.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},N=C.slice(),j=[1,0,0,0,1,0,0,0,1];P.draw=function(t){return a.call(this,t,!1)},P.drawTransparent=function(t){return a.call(this,t,!0)};var B={model:C,view:C,projection:C,inverseModel:C,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]};P.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=B;r.model=t.model||C,r.view=t.view||C,r.projection=t.projection||C,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.permutation=j;for(var n=0;n<2;++n)for(var a=r.clipBounds[n],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[n][o],-1e8),1e8);var s=i(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 c=this._contourVAO;for(c.bind(),o=0;o<3;++o)for(e.lineWidth(this.contourWidth[o]),l.uniforms.permutation=D[o],n=0;n<this.contourLevels[o].length;++n)this._contourCounts[o][n]&&(l.uniforms.height=this.contourLevels[o][n],c.draw(e.LINES,this._contourCounts[o][n],this._contourOffsets[o][n]));for(n=0;n<3;++n)for(l.uniforms.model=s.projections[n],l.uniforms.clipBounds=s.clipBounds[n],o=0;o<3;++o)if(this.contourProject[n][o]){l.uniforms.permutation=D[o],e.lineWidth(this.contourWidth[o]);for(var u=0;u<this.contourLevels[o].length;++u)this._contourCounts[o][u]&&(l.uniforms.height=this.contourLevels[o][u],c.draw(e.LINES,this._contourCounts[o][u],this._contourOffsets[o][u]))}c.unbind()}},P.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>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 c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var d=i+u,p=s+h,m=f*(h?l:1-l),g=0;g<3;++g)c[g]+=this._field[g].get(d,p)*m;for(var v=this._pickResult.level,y=0;y<3;++y)if(v[y]=w.le(this.contourLevels[y],c[y]),v[y]<0)this.contourLevels[y].length>0&&(v[y]=0);else if(v[y]<this.contourLevels[y].length-1){var x=this.contourLevels[y][v[y]],b=this.contourLevels[y][v[y]+1];Math.abs(x-c[y])>Math.abs(b-c[y])&&(v[y]+=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],g=0;g<3;++g)r.dataCoordinate[g]=this._field[g].get(r.index[0],r.index[1]);return r},P.update=function(t){t=t||{},this.dirty=!0,\"contourWidth\"in t&&(this.contourWidth=s(t.contourWidth,Number)),\"showContour\"in t&&(this.showContour=s(t.showContour,Boolean)),\"showSurface\"in t&&(this.showSurface=!!t.showSurface),\"contourTint\"in t&&(this.contourTint=s(t.contourTint,Boolean)),\"contourColor\"in t&&(this.contourColor=c(t.contourColor)),\"contourProject\"in t&&(this.contourProject=s(t.contourProject,function(t){return s(t,Boolean)})),\"surfaceProject\"in t&&(this.surfaceProject=t.surfaceProject),\"dynamicColor\"in t&&(this.dynamicColor=c(t.dynamicColor)),\"dynamicTint\"in t&&(this.dynamicTint=s(t.dynamicTint,Number)),\"dynamicWidth\"in t&&(this.dynamicWidth=s(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&&(p.freeFloat(this._field[2].data),this._field[2].data=p.mallocFloat(u.nextPow2(n))),this._field[2]=y(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),o(this._field[2],e),this.shape=e.shape.slice();for(var i=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(p.freeFloat(this._field[a].data),this._field[a].data=p.mallocFloat(this._field[2].size)),this._field[a]=y(this._field[a].data,[i[0]+2,i[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error(\"gl-surface: invalid coordinates for x/y\");for(a=0;a<2;++a){var f=l[a];for(w=0;w<2;++w)if(f.shape[w]!==i[w])throw new Error(\"gl-surface: coords have incorrect shape\");o(this._field[a],f)}}else if(t.ticks){var h=t.ticks;if(!Array.isArray(h)||2!==h.length)throw new Error(\"gl-surface: invalid ticks\");for(a=0;a<2;++a){var d=h[a];if((Array.isArray(d)||d.length)&&(d=y(d)),d.shape[0]!==i[a])throw new Error(\"gl-surface: invalid tick length\");var b=y(d.data,i);b.stride[a]=d.stride[0],b.stride[1^a]=0,o(this._field[a],b)}}else{for(a=0;a<2;++a){var _=[0,0];_[a]=1,this._field[a]=y(this._field[a].data,[i[0]+2,i[1]+2],_,0)}this._field[0].set(0,0,0);for(var w=0;w<i[0];++w)this._field[0].set(w+1,0,w);for(this._field[0].set(i[0]+1,0,i[0]-1),this._field[1].set(0,0,0),w=0;w<i[1];++w)this._field[1].set(0,w+1,w);this._field[1].set(0,i[1]+1,i[1]-1)}var k=this._field,A=y(p.mallocFloat(3*k[2].size*2),[3,i[0]+2,i[1]+2,2]);for(a=0;a<3;++a)M(A.pick(a),k[a],\"mirror\");var T=y(p.mallocFloat(3*k[2].size),[i[0]+2,i[1]+2,3]);for(a=0;a<i[0]+2;++a)for(w=0;w<i[1]+2;++w){var S=A.get(0,a,w,0),E=A.get(0,a,w,1),L=A.get(1,a,w,0),C=A.get(1,a,w,1),D=A.get(2,a,w,0),P=A.get(2,a,w,1),O=L*P-C*D,F=D*E-P*S,R=S*C-E*L,N=Math.sqrt(O*O+F*F+R*R);N<1e-8?(N=Math.max(Math.abs(O),Math.abs(F),Math.abs(R)))<1e-8?(R=1,F=O=0,N=1):N=1/N:N=1/Math.sqrt(N),T.set(a,w,0,O*N),T.set(a,w,1,F*N),T.set(a,w,2,R*N)}p.free(A.data);var j=[1/0,1/0,1/0],B=[-1/0,-1/0,-1/0],U=1/0,V=-1/0,q=(i[0]-1)*(i[1]-1)*6,H=p.mallocFloat(u.nextPow2(10*q)),G=0,Y=0;for(a=0;a<i[0]-1;++a)t:for(w=0;w<i[1]-1;++w){for(var W=0;W<2;++W)for(var X=0;X<2;++X)for(var Z=0;Z<3;++Z){var J=this._field[Z].get(1+a+W,1+w+X);if(isNaN(J)||!isFinite(J))continue t}for(Z=0;Z<6;++Z){var K=a+z[Z][0],Q=w+z[Z][1],$=this._field[0].get(K+1,Q+1),tt=this._field[1].get(K+1,Q+1),et=J=this._field[2].get(K+1,Q+1);O=T.get(K+1,Q+1,0),F=T.get(K+1,Q+1,1),R=T.get(K+1,Q+1,2),t.intensity&&(et=t.intensity.get(K,Q)),H[G++]=K,H[G++]=Q,H[G++]=$,H[G++]=tt,H[G++]=J,H[G++]=0,H[G++]=et,H[G++]=O,H[G++]=F,H[G++]=R,j[0]=Math.min(j[0],$),j[1]=Math.min(j[1],tt),j[2]=Math.min(j[2],J),U=Math.min(U,et),B[0]=Math.max(B[0],$),B[1]=Math.max(B[1],tt),B[2]=Math.max(B[2],J),V=Math.max(V,et),Y+=1}}for(t.intensityBounds&&(U=+t.intensityBounds[0],V=+t.intensityBounds[1]),a=6;a<G;a+=10)H[a]=(H[a]-U)/(V-U);this._vertexCount=Y,this._coordinateBuffer.update(H.subarray(0,G)),p.freeFloat(H),p.free(T.data),this.bounds=[j,B],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===U&&this.intensityBounds[1]===V||(r=!0),this.intensityBounds=[U,V]}if(\"levels\"in t){var rt=t.levels;for(rt=Array.isArray(rt[0])?rt.slice():[[],[],rt],a=0;a<3;++a)rt[a]=rt[a].slice(),rt.sort(function(t,e){return t-e});t:for(a=0;a<3;++a){if(rt[a].length!==this.contourLevels[a].length){r=!0;break}for(w=0;w<rt[a].length;++w)if(rt[a][w]!==this.contourLevels[a][w]){r=!0;break t}}this.contourLevels=rt}if(r){k=this._field,i=this.shape;for(var nt=[],it=0;it<3;++it){rt=this.contourLevels[it];var at=[],ot=[],st=[0,0,0];for(a=0;a<rt.length;++a){var lt=x(this._field[it],rt[a]);at.push(nt.length/5|0),Y=0;t:for(w=0;w<lt.cells.length;++w){var ct=lt.cells[w];for(Z=0;Z<2;++Z){var ut=lt.positions[ct[Z]],ft=ut[0],ht=0|Math.floor(ft),dt=ft-ht,pt=ut[1],mt=0|Math.floor(pt),gt=pt-mt,vt=!1;e:for(var yt=0;yt<3;++yt){st[yt]=0;var xt=(it+yt+1)%3;for(W=0;W<2;++W){var bt=W?dt:1-dt;for(K=0|Math.min(Math.max(ht+W,0),i[0]),X=0;X<2;++X){var _t=X?gt:1-gt;if(Q=0|Math.min(Math.max(mt+X,0),i[1]),J=yt<2?this._field[xt].get(K,Q):(this.intensity.get(K,Q)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(J)||isNaN(J)){vt=!0;break e}var wt=bt*_t;st[yt]+=wt*J}}}if(vt){if(Z>0){for(var Mt=0;Mt<5;++Mt)nt.pop();Y-=1}continue t}nt.push(st[0],st[1],ut[0],ut[1],st[2]),Y+=1}}ot.push(Y)}this._contourOffsets[it]=at,this._contourCounts[it]=ot}var kt=p.mallocFloat(nt.length);for(a=0;a<nt.length;++a)kt[a]=nt[a];this._contourBuffer.update(kt),p.freeFloat(kt)}t.colormap&&this._colorMap.setPixels(function(t){var e=v([m({colormap:t,nshades:I,format:\"rgba\"}).map(function(t){return[t[0],t[1],t[2],255*t[3]]})]);return g.divseq(e,255),e}(t.colormap))},P.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)p.freeFloat(this._field[t].data)},P.highlight=function(t){if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(var e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;var r;if(r=this.snapToData?t.dataCoordinate:t.position,this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=p.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var s=(o+1)%3,l=(o+2)%3,c=this._field[o],u=this._field[s],f=this._field[l],h=(this.intensity,x(c,r[o])),d=h.cells,m=h.positions;for(this._dynamicOffsets[o]=n,e=0;e<d.length;++e)for(var g=d[e],v=0;v<2;++v){var y=m[g[v]],b=+y[0],_=0|b,w=0|Math.min(_+1,i[0]),M=b-_,k=1-M,A=+y[1],T=0|A,S=0|Math.min(T+1,i[1]),E=A-T,L=1-E,C=k*L,z=k*E,D=M*L,I=M*E,P=C*u.get(_,T)+z*u.get(_,S)+D*u.get(w,T)+I*u.get(w,S),O=C*f.get(_,T)+z*f.get(_,S)+D*f.get(w,T)+I*f.get(w,S);if(isNaN(P)||isNaN(O)){v&&(n-=1);break}a[2*n+0]=P,a[2*n+1]=O,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),p.freeFloat(a)}}},{\"./lib/shaders\":253,\"binary-search-bounds\":70,\"bit-twiddle\":71,colormap:105,\"gl-buffer\":165,\"gl-mat4/invert\":186,\"gl-mat4/multiply\":188,\"gl-texture2d\":255,\"gl-vao\":259,ndarray:458,\"ndarray-gradient\":449,\"ndarray-ops\":452,\"ndarray-pack\":453,\"surface-nets\":540,\"typedarray-pool\":554}],255:[function(t,e,r){\"use strict\";function n(t){return\"undefined\"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||\"undefined\"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||\"undefined\"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||\"undefined\"!=typeof ImageData&&t instanceof ImageData}function i(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||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 a(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 o(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 s(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 l(t,e,r,n,i){var o=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>o||r<0||r>o)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 l=s(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new a(t,l,e,r,n,i)}var c=t(\"ndarray\"),u=t(\"ndarray-ops\"),f=t(\"typedarray-pool\");e.exports=function(t){if(arguments.length<=1)throw new Error(\"gl-texture2d: Missing arguments for texture2d constructor\");if(h||function(t){h=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],d=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],p=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t),\"number\"==typeof arguments[1])return l(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return l(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=n(e)?e:e.raw;if(r)return function(t,e,r,n,i,o){var l=s(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,o,e),new a(t,l,r,n,i,o)}(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 function(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 l=o(n,e.stride.slice()),h=0;\"float32\"===r?h=t.FLOAT:\"float64\"===r?(h=t.FLOAT,l=!1,r=\"float32\"):\"uint8\"===r?h=t.UNSIGNED_BYTE:(h=t.UNSIGNED_BYTE,l=!1,r=\"uint8\");var d=0;if(2===n.length)d=t.LUMINANCE,n=[n[0],n[1],1],e=c(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])d=t.ALPHA;else if(2===n[2])d=t.LUMINANCE_ALPHA;else if(3===n[2])d=t.RGB;else{if(4!==n[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");d=t.RGBA}}h!==t.FLOAT||t.getExtension(\"OES_texture_float\")||(h=t.UNSIGNED_BYTE,l=!1);var p,g,v=e.size;if(l)p=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[n[2],n[2]*n[0],1];g=f.malloc(v,r);var x=c(g,n,y,0);\"float32\"!==r&&\"float64\"!==r||h!==t.UNSIGNED_BYTE?u.assign(x,e):m(x,e),p=g.subarray(0,v)}var b=s(t);return t.texImage2D(t.TEXTURE_2D,0,d,n[0],n[1],0,d,h,p),l||f.free(g),new a(t,b,n[0],n[1],d,h)}(t,e)}throw new Error(\"gl-texture2d: Invalid arguments for texture2d constructor\")};var h=null,d=null,p=null,m=function(t,e){u.muls(t,e,255)},g=a.prototype;Object.defineProperties(g,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&h.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),d.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&&h.indexOf(t)>=0&&(e.getExtension(\"OES_texture_float_linear\")||(t=e.NEAREST)),d.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(),p.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(),p.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(p.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 i(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,i(this,t,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,i(this,this._shape[0],t),t}}}),g.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},g.dispose=function(){this.gl.deleteTexture(this.handle)},g.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)},g.setPixels=function(t,e,r,i){var a=this.gl;this.bind(),Array.isArray(e)?(i=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),i=i||0;var s=n(t)?t:t.raw;if(s){this._mipLevels.indexOf(i)<0?(a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,this.type,s),this._mipLevels.push(i)):a.texSubImage2D(a.TEXTURE_2D,i,e,r,this.format,this.type,s)}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]>>>i||r+t.shape[0]>this._shape[0]>>>i||e<0||r<0)throw new Error(\"gl-texture2d: Texture dimensions are out of bounds\");!function(t,e,r,n,i,a,s,l){var h=l.dtype,d=l.shape.slice();if(d.length<2||d.length>3)throw new Error(\"gl-texture2d: Invalid ndarray, must be 2d or 3d\");var p=0,g=0,v=o(d,l.stride.slice());if(\"float32\"===h?p=t.FLOAT:\"float64\"===h?(p=t.FLOAT,v=!1,h=\"float32\"):\"uint8\"===h?p=t.UNSIGNED_BYTE:(p=t.UNSIGNED_BYTE,v=!1,h=\"uint8\"),2===d.length)g=t.LUMINANCE,d=[d[0],d[1],1],l=c(l.data,d,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==d.length)throw new Error(\"gl-texture2d: Invalid shape for texture\");if(1===d[2])g=t.ALPHA;else if(2===d[2])g=t.LUMINANCE_ALPHA;else if(3===d[2])g=t.RGB;else{if(4!==d[2])throw new Error(\"gl-texture2d: Invalid shape for pixel coords\");g=t.RGBA}d[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||i!==t.LUMINANCE&&i!==t.ALPHA||(g=i),g!==i)throw new Error(\"gl-texture2d: Incompatible texture format for setPixels\");var y=l.size,x=s.indexOf(n)<0;if(x&&s.push(n),p===a&&v)0===l.offset&&l.data.length===y?x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,l.data):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,l.data):x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,l.data.subarray(l.offset,l.offset+y)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,l.data.subarray(l.offset,l.offset+y));else{var b;b=a===t.FLOAT?f.mallocFloat32(y):f.mallocUint8(y);var _=c(b,d,[d[2],d[2]*d[0],1]);p===t.FLOAT&&a===t.UNSIGNED_BYTE?m(_,l):u.assign(_,l),x?t.texImage2D(t.TEXTURE_2D,n,i,d[0],d[1],0,i,a,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,n,e,r,d[0],d[1],i,a,b.subarray(0,y)),a===t.FLOAT?f.freeFloat32(b):f.freeUint8(b)}}(a,e,r,i,this.format,this.type,this._mipLevels,t)}}},{ndarray:458,\"ndarray-ops\":452,\"typedarray-pool\":554}],256:[function(t,e,r){\"use strict\";e.exports=function(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;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,c=!!a.normalized,u=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,c,u,f)}else{if(\"number\"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error(\"gl-vao: Invalid vertex attribute\");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},{}],257:[function(t,e,r){\"use strict\";function n(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}var i=t(\"./do-bind.js\");n.prototype.bind=function(){i(this.gl,this._elements,this._attributes)},n.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},n.prototype.dispose=function(){},n.prototype.unbind=function(){},n.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t){return new n(t)}},{\"./do-bind.js\":256}],258:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function i(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}var a=t(\"./do-bind.js\");n.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},i.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},i.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},i.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},i.prototype.update=function(t,e,r){if(this.bind(),a(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var i=0;i<t.length;++i){var o=t[i];\"number\"==typeof o?this._attribs.push(new n(i,1,o)):Array.isArray(o)&&this._attribs.push(new n(i,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},e.exports=function(t,e){return new i(t,e,e.createVertexArrayOES())}},{\"./do-bind.js\":256}],259:[function(t,e,r){\"use strict\";var n=t(\"./lib/vao-native.js\"),i=t(\"./lib/vao-emulated.js\");e.exports=function(t,e,r,a){var o,s=t.createVertexArray?new function(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}(t):t.getExtension(\"OES_vertex_array_object\");return(o=s?n(t,s):i(t)).update(e,r,a),o}},{\"./lib/vao-emulated.js\":257,\"./lib/vao-native.js\":258}],260:[function(t,e,r){e.exports=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}},{}],261:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],262:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},{}],263:[function(t,e,r){e.exports=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}},{}],264:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},{}],265:[function(t,e,r){e.exports=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}},{}],266:[function(t,e,r){e.exports=function(t,e,r,a){return n[0]=a,n[1]=r,n[2]=e,n[3]=t,i[0]};var n=new Uint8Array(4),i=new Float32Array(n.buffer)},{}],267:[function(t,e,r){var n=t(\"glsl-tokenizer\"),i=t(\"atob-lite\");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if(\"preprocessor\"===a.type){var o=a.data.match(/\\#define\\s+SHADER_NAME(_B64)?\\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},{\"atob-lite\":52,\"glsl-tokenizer\":274}],268:[function(t,e,r){e.exports=function(t){function e(t){t.length&&D.push({type:w[C],data:t,position:O,line:I,column:P})}function r(t){E=0,S=(N+=t).length;for(var r;A=N[E],E<S;){switch(r=E,C){case u:E=\"/\"===A&&\"*\"===T?(z.push(A),e(z.join(\"\")),C=l,E+1):(z.push(A),T=A,E+1);break;case f:case h:E=M();break;case d:E=function(){if(\".\"===T&&/\\d/.test(A))return C=m,E;if(\"/\"===T&&\"*\"===A)return C=u,E;if(\"/\"===T&&\"/\"===A)return C=f,E;if(\".\"===A&&z.length){for(;k(z););return C=m,E}if(\";\"===A||\")\"===A||\"(\"===A){if(z.length)for(;k(z););return e(A),C=l,E+1}var t=2===z.length&&\"=\"!==A;if(/[\\w_\\d\\s]/.test(A)||t){for(;k(z););return C=l,E}return z.push(A),T=A,E+1}();break;case p:E=\".\"===A?(z.push(A),C=m,T=A,E+1):/[eE]/.test(A)?(z.push(A),C=m,T=A,E+1):\"x\"===A&&1===z.length&&\"0\"===z[0]?(C=_,z.push(A),T=A,E+1):/[^\\d]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case _:E=/[^a-fA-F0-9]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case m:\"f\"===A&&(z.push(A),T=A,E+=1),E=/[eE]/.test(A)?(z.push(A),T=A,E+1):\"-\"===A&&/[eE]/.test(T)?(z.push(A),T=A,E+1):/[^\\d]/.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case c:E=function(){if(/[^\\d\\w_]/.test(A)){var t=z.join(\"\");return C=B.indexOf(t)>-1?y:j.indexOf(t)>-1?v:g,e(z.join(\"\")),C=l,E}return z.push(A),T=A,E+1}();break;case x:E=/[^\\s]/g.test(A)?(e(z.join(\"\")),C=l,E):(z.push(A),T=A,E+1);break;case l:z=z.length?[]:z,E=\"/\"===T&&\"*\"===A?(O=L+E-1,C=u,T=A,E+1):\"/\"===T&&\"/\"===A?(O=L+E-1,C=f,T=A,E+1):\"#\"===A?(C=h,O=L+E,E):/\\s/.test(A)?(C=x,O=L+E,E):(F=/\\d/.test(A),R=/[^\\w_]/.test(A),O=L+E,C=F?p:R?d:c,E)}if(r!==E)switch(N[r]){case\"\\n\":P=0,++I;break;default:++P}}return L+=E,N=N.slice(E),D}function M(){return\"\\r\"!==A&&\"\\n\"!==A||\"\\\\\"===T?(z.push(A),T=A,E+1):(e(z.join(\"\")),C=l,E)}function k(t){for(var r,n,a=0;;){if(r=i.indexOf(t.slice(0,t.length+a).join(\"\")),n=i[r],-1===r){if(a--+t.length>0)continue;n=t.slice(0,1).join(\"\")}return e(n),O+=n.length,(z=z.slice(n.length)).length}}var A,T,S,E=0,L=0,C=l,z=[],D=[],I=1,P=0,O=0,F=!1,R=!1,N=\"\",j=a,B=n;return\"300 es\"===(t=t||{}).version&&(j=s,B=o),function(t){return D=[],null!==t?r(t.replace?t.replace(/\\r\\n/g,\"\\n\"):t):(z.length&&e(z.join(\"\")),C=b,e(\"(eof)\"),D)}};var n=t(\"./lib/literals\"),i=t(\"./lib/operators\"),a=t(\"./lib/builtins\"),o=t(\"./lib/literals-300es\"),s=t(\"./lib/builtins-300es\"),l=999,c=9999,u=0,f=1,h=2,d=3,p=4,m=5,g=6,v=7,y=8,x=9,b=10,_=11,w=[\"block-comment\",\"line-comment\",\"preprocessor\",\"operator\",\"integer\",\"float\",\"ident\",\"builtin\",\"keyword\",\"whitespace\",\"eof\",\"integer\"]},{\"./lib/builtins\":270,\"./lib/builtins-300es\":269,\"./lib/literals\":272,\"./lib/literals-300es\":271,\"./lib/operators\":273}],269:[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\":270}],270:[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\"]},{}],271:[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\":272}],272:[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\"]},{}],273:[function(t,e,r){e.exports=[\"<<=\",\">>=\",\"++\",\"--\",\"<<\",\">>\",\"<=\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"+=\",\"-=\",\"*=\",\"/=\",\"%=\",\"&=\",\"^^\",\"^=\",\"|=\",\"(\",\")\",\"[\",\"]\",\".\",\"!\",\"~\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\">\",\"&\",\"^\",\"|\",\"?\",\":\",\"=\",\",\",\";\",\"{\",\"}\"]},{}],274:[function(t,e,r){var n=t(\"./index\");e.exports=function(t,e){var r=n(e),i=[];return i=i.concat(r(t)),i=i.concat(r(null))}},{\"./index\":268}],275:[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<this.d*this.d;o++){var s=a[i+o],l=a[i+o+1];n.push(s===l?null:a.subarray(s,l))}var c=a[i+n.length],u=a[i+n.length+1];this.keys=a.subarray(c,u),this.bboxes=a.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var f=0;f<this.d*this.d;f++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}e.exports=n;var i=3;n.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},n.prototype._insertReadonly=function(){throw\"Cannot insert into a GridIndex created from an ArrayBuffer.\"},n.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},n.prototype.query=function(t,e,r,n){var i=this.min,a=this.max;if(t<=i&&e<=i&&a<=r&&a<=n)return Array.prototype.slice.call(this.keys);var o=[],s={};return this._forEachCell(t,e,r,n,this._queryCell,o,s),o},n.prototype._queryCell=function(t,e,r,n,i,a,o){var s=this.cells[i];if(null!==s)for(var l=this.keys,c=this.bboxes,u=0;u<s.length;u++){var f=s[u];if(void 0===o[f]){var h=4*f;t<=c[h+2]&&e<=c[h+3]&&r>=c[h+0]&&n>=c[h+1]?(o[f]=!0,a.push(l[f])):o[f]=!1}}},n.prototype._forEachCell=function(t,e,r,n,i,a,o){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),c=this._convertToCellCoord(r),u=this._convertToCellCoord(n),f=s;f<=c;f++)for(var h=l;h<=u;h++){var d=this.d*h+f;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<this.cells.length;n++)r+=this.cells[n].length;var a=new Int32Array(e+r+this.keys.length+this.bboxes.length);a[0]=this.extent,a[1]=this.n,a[2]=this.padding;for(var o=e,s=0;s<t.length;s++){var l=t[s];a[i+s]=o,a.set(l,o),o+=l.length}return a[i+t.length]=o,a.set(this.keys,o),o+=this.keys.length,a[i+t.length+1]=o,a.set(this.bboxes,o),o+=this.bboxes.length,a.buffer}},{}],276:[function(t,e,r){(function(r){\"use strict\";var n,i=t(\"is-browser\");n=\"function\"==typeof r.matchMedia?!r.matchMedia(\"(hover: none)\").matches:i,e.exports=n}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"is-browser\":282}],277:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,f=u>>1,h=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=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+d]=255&o,d+=p,o/=256,c-=8);t[r+d-p]|=128*m}},{}],278:[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 l(t.vertices,e.vertices)}function o(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=c[t];i||(i=c[t]=function(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=s[t+1];return i||(i=s),n(i)}(t)),this.orient=i}e.exports=function(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),l=s.apply(void 0,a);if(0===l)throw new Error(\"Input not in general position\");for(var c=new Array(i+1),u=0;u<=i;++u)c[u]=u;l<0&&(c[0]=1,c[1]=0);var f=new n(c,new Array(i+1),!1),h=f.adjacent,d=new Array(i+2);for(u=0;u<=i;++u){for(var p=c.slice(),m=0;m<=i;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var v=new n(p,new Array(i+1),!0);h[u]=v,d[u]=v}for(d[i+1]=f,u=0;u<=i;++u){p=h[u].vertices;var y=h[u].adjacent;for(m=0;m<=i;++m){var x=p[m];if(x<0)y[m]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[m]=h[b])}}var _=new o(i,a,d),w=!!e;for(u=i+1;u<r;++u)_.insert(t[u],w);return _.boundary()};var s=t(\"robust-orientation\"),l=t(\"simplicial-complex\").compareCells;n.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var c=[],u=o.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var d=this.orient();if(d>0)return c;c.lastVisited=-n,0===d&&o.push(c)}}}return null},u.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,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var d=this.orient();if(a[u]=h,d<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,o=this.dimension,s=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var d=(e=f.pop()).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 x=0,b=0;b<=o;++b)y[b]<0?(x=b,l[b]=t):l[b]=s[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=d.slice(),M=p.slice(),k=new n(w,M,!0);u.push(k);var A=_.indexOf(e);if(!(A<0)){_[A]=k,M[m]=v,w[g]=-1,M[g]=e,p[g]=k,k.flip();for(b=0;b<=o;++b){var T=w[b];if(!(T<0||T===r)){for(var S=new Array(o-1),E=0,L=0;L<=o;++L){var C=w[L];C<0||L===b||(S[E++]=C)}h.push(new i(S,k,b))}}}}}}h.sort(a);for(g=0;g+1<h.length;g+=2){var z=h[g],D=h[g+1],I=z.index,P=D.index;I<0||P<0||(z.cell.adjacent[z.index]=D.cell,D.cell.adjacent[D.index]=z.cell)}},u.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},u.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,c=0,u=0;u<=t;++u)s[u]>=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{\"robust-orientation\":515,\"simplicial-complex\":526}],279:[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?v:(r.splice(n,1),a(t,r),y)}function l(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function c(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function u(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function f(t,e){return t-e}function h(t,e){var r=t[0]-e[0];return r||t[1]-e[1]}function d(t,e){var r=t[1]-e[1];return r||t[0]-e[0]}function p(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(f);var i=e[e.length>>1],a=[],o=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<i?a.push(l):i<l[0]?o.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(h),u.sort(d),new n(i,p(a),p(o),c,u)}function m(t){this.root=t}var g=t(\"binary-search-bounds\"),v=0,y=1;e.exports=function(t){return new m(t&&0!==t.length?p(t):null)};var x=n.prototype;x.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},x.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(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=g.ge(this.leftPoints,t,h),n=g.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]<this.mid){if(!this.left)return v;if(4*(this.right?this.right.count:0)>3*(e-1))return s(this,t);return 2===(o=this.left.remove(t))?(this.left=null,this.count-=1,y):(o===y&&(this.count-=1),o)}if(t[0]>this.mid){if(!this.right)return v;if(4*(this.left?this.left.count:0)>3*(e-1))return s(this,t);return 2===(o=this.right.remove(t))?(this.right=null,this.count-=1,y):(o===y&&(this.count-=1),o)}if(1===this.count)return this.leftPoints[0]===t?2:v;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,n=this.left;n.right;)r=n,n=n.right;if(r===this)n.right=this.right;else{var a=this.left,o=this.right;r.count-=n.count,r.right=n.left,n.left=a,n.right=o}i(this,n),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 y}for(a=g.ge(this.leftPoints,t,h);a<this.leftPoints.length&&this.leftPoints[a][0]===t[0];++a)if(this.leftPoints[a]===t){this.count-=1,this.leftPoints.splice(a,1);for(o=g.ge(this.rightPoints,t,d);o<this.rightPoints.length&&this.rightPoints[o][1]===t[1];++o)if(this.rightPoints[o]===t)return this.rightPoints.splice(o,1),y}return v},x.queryPoint=function(t,e){if(t<this.mid){if(this.left){if(r=this.left.queryPoint(t,e))return r}return l(this.leftPoints,t,e)}if(t>this.mid){if(this.right){var r;if(r=this.right.queryPoint(t,e))return r}return c(this.rightPoints,t,e)}return u(this.leftPoints,e)},x.queryInterval=function(t,e,r){if(t<this.mid&&this.left){if(n=this.left.queryInterval(t,e,r))return n}if(e>this.mid&&this.right){var n;if(n=this.right.queryInterval(t,e,r))return n}return e<this.mid?l(this.leftPoints,e,r):t>this.mid?c(this.rightPoints,t,r):u(this.leftPoints,r)};var b=m.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new n(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==v}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(b,\"count\",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,\"intervals\",{get:function(){return this.root?this.root.intervals([]):[]}})},{\"binary-search-bounds\":70}],280:[function(t,e,r){\"use strict\";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r<t.length;++r)e[t[r]]=r;return e}},{}],281:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},{}],282:[function(t,e,r){e.exports=!0},{}],283:[function(t,e,r){function n(t){return!!t.constructor&&\"function\"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return\"function\"==typeof t.readFloatLE&&\"function\"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],284:[function(t,e,r){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\\//.test(navigator.appVersion))},{}],285:[function(t,e,r){e.exports=function(t){return t||\"undefined\"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&\"string\"==typeof t.headers[\"user-agent\"]&&(t=t.headers[\"user-agent\"]),\"string\"==typeof t&&(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(t.substr(0,4)))}},{}],286:[function(t,e,r){\"use strict\";var n=Object.prototype.toString;e.exports=function(t){var e;return\"[object Object]\"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],287:[function(t,e,r){\"use strict\";e.exports=function(t){return\"string\"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\\dz]$/i.test(t)&&t.length>4))}},{}],288:[function(t,e,r){\"use strict\";function n(t,e,r,n,a){e=e||function(t){return t[0]},r=r||function(t){return t[1]},a=a||Array,this.nodeSize=n||64,this.points=t,this.ids=new a(t.length),this.coords=new a(2*t.length);for(var o=0;o<t.length;o++)this.ids[o]=o,this.coords[2*o]=e(t[o]),this.coords[2*o+1]=r(t[o]);i(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}var i=t(\"./sort\"),a=t(\"./range\"),o=t(\"./within\");e.exports=function(t,e,r,i,a){return new n(t,e,r,i,a)},n.prototype={range:function(t,e,r,n){return a(this.ids,this.coords,t,e,r,n,this.nodeSize)},within:function(t,e,r){return o(this.ids,this.coords,t,e,r,this.nodeSize)}}},{\"./range\":289,\"./sort\":290,\"./within\":291}],289:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),d=c.pop();if(h-d<=o)for(var p=d;p<=h;p++)s=e[2*p],l=e[2*p+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[p]);else{var m=Math.floor((d+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[m]);var g=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(d),c.push(m-1),c.push(g)),(0===f?i>=s:a>=l)&&(c.push(m+1),c.push(h),c.push(g))}}return u}},{}],290:[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,c=r-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1);i(t,e,r,Math.max(n,Math.floor(r-c*f/l+h)),Math.min(o,Math.floor(r+(l-c)*f/l+h)),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);p<m;){for(a(t,e,p,m),p++,m--;e[2*p+s]<d;)p++;for(;e[2*m+s]>d;)m--}e[2*n+s]===d?a(t,e,n,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},{}],291:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}e.exports=function(t,e,r,i,a,o){for(var s=[0,t.length-1,0],l=[],c=a*a;s.length;){var u=s.pop(),f=s.pop(),h=s.pop();if(f-h<=o)for(var d=h;d<=f;d++)n(e[2*d],e[2*d+1],r,i)<=c&&l.push(t[d]);else{var p=Math.floor((h+f)/2),m=e[2*p],g=e[2*p+1];n(m,g,r,i)<=c&&l.push(t[p]);var v=(u+1)%2;(0===u?r-a<=m:i-a<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===u?r+a>=m:i+a>=g)&&(s.push(p+1),s.push(f),s.push(v))}}return l}},{}],292:[function(t,e,r){\"use strict\";function n(t,e){if(!(this instanceof n))return new n(t,e);this.nodeSize=e||64,this.coords=t.slice();var r=Math.floor(t.length/2);this.ids=Array(r);for(var i=0;i<r;i++)this.ids[i]=i;a(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function i(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}function a(t,e,r,n,i,s){if(!(i-n<=r)){var l=Math.floor((n+i)/2);o(t,e,l,n,i,s%2),a(t,e,r,n,l-1,s+1),a(t,e,r,l+1,i,s+1)}}function o(t,e,r,n,i,a){for(;i>n;){if(i-n>600){var l=i-n+1,c=r-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1);o(t,e,r,Math.max(n,Math.floor(r-c*f/l+h)),Math.min(i,Math.floor(r+(l-c)*f/l+h)),a)}var d=e[2*r+a],p=n,m=i;for(s(t,e,n,r),e[2*i+a]>d&&s(t,e,n,i);p<m;){for(s(t,e,p,m),p++,m--;e[2*p+a]<d;)p++;for(;e[2*m+a]>d;)m--}e[2*n+a]===d?s(t,e,n,m):s(t,e,++m,i),m<=r&&(n=m+1),r<=m&&(i=m-1)}}function s(t,e,r,n){l(t,r,n),l(e,2*r,2*n),l(e,2*r+1,2*n+1)}function l(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n,n.prototype.range=function(t,e,r,n){for(var i,a,o=this.ids,s=this.coords,l=this.nodeSize,c=[0,o.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),d=c.pop();if(h-d<=l)for(var p=d;p<=h;p++)i=s[2*p],a=s[2*p+1],i>=t&&i<=r&&a>=e&&a<=n&&u.push(o[p]);else{var m=Math.floor((d+h)/2);i=s[2*m],a=s[2*m+1],i>=t&&i<=r&&a>=e&&a<=n&&u.push(o[m]);var g=(f+1)%2;(0===f?t<=i:e<=a)&&(c.push(d),c.push(m-1),c.push(g)),(0===f?r>=i:n>=a)&&(c.push(m+1),c.push(h),c.push(g))}}return u},n.prototype.within=function(t,e,r){for(var n=this.ids,a=this.coords,o=this.nodeSize,s=[0,n.length-1,0],l=[],c=r*r;s.length;){var u=s.pop(),f=s.pop(),h=s.pop();if(f-h<=o)for(var d=h;d<=f;d++)i(a[2*d],a[2*d+1],t,e)<=c&&l.push(n[d]);else{var p=Math.floor((h+f)/2),m=a[2*p],g=a[2*p+1];i(m,g,t,e)<=c&&l.push(n[p]);var v=(u+1)%2;(0===u?t-r<=m:e-r<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===u?t+r>=m:e+r>=g)&&(s.push(p+1),s.push(f),s.push(v))}}return l}},{}],293:[function(t,e,r){\"use strict\";function n(t,e){var r;if(u(t)){var l,c=t.stops&&\"object\"==typeof t.stops[0][0],f=c||void 0!==t.property,h=c||!f,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(c){for(var p={},m=[],g=0;g<t.stops.length;g++){var v=t.stops[g];void 0===p[v[0].zoom]&&(p[v[0].zoom]={zoom:v[0].zoom,type:t.type,property:t.property,stops:[]}),p[v[0].zoom].stops.push([v[0].value,v[1]])}for(var y in p)m.push([p[y].zoom,n(p[y])]);(r=function(e,r){return o({stops:m,base:t.base},e)(e,r)}).isFeatureConstant=!1,r.isZoomConstant=!1}else h?((r=function(e){return l(t,e)}).isFeatureConstant=!0,r.isZoomConstant=!1):((r=function(e,r){return l(t,r[t.property])}).isFeatureConstant=!1,r.isZoomConstant=!0)}else(r=function(){return t}).isFeatureConstant=!0,r.isZoomConstant=!0;return r}function i(t,e){for(var r=0;r<t.stops.length;r++)if(e===t.stops[r][0])return t.stops[r][1];return t.stops[0][1]}function a(t,e){for(var r=0;r<t.stops.length&&!(e<t.stops[r][0]);r++);return t.stops[Math.max(r-1,0)][1]}function o(t,e){for(var r=void 0!==t.base?t.base:1,n=0;!(n>=t.stops.length||e<=t.stops[n][0]);)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?function(t,e,r,n,i,a){for(var o=[],s=0;s<i.length;s++)o[s]=c(t,e,r,n,i[s],a[s]);return o}(t,e,r,n,i,a):c(t,e,r,n,i,a)}function c(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 u(t){return\"object\"==typeof t&&(t.stops||\"identity\"===t.type)}e.exports.isFunctionDefinition=u,e.exports.interpolated=function(t){return n(t,\"exponential\")},e.exports[\"piecewise-constant\"]=function(t){return n(t,\"interval\")}},{}],294:[function(t,e,r){t(\"path\");e.exports={debug:{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;\\n\\nvoid main() {\\n gl_FragColor = u_color;\\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;\\n\\nvoid main() {\\n gl_Position = u_matrix * vec4(a_pos, step(32767.0, a_pos.x), 1);\\n}\\n\"},fill:{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 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_FragColor = color * 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;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define lowp float opacity\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float opacity\\n\\n gl_Position = u_matrix * vec4(a_pos, 0, 1);\\n}\\n\"},circle:{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 color\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main() {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n float t = smoothstep(1.0 - max(blur, v_antialiasblur), 1.0, length(v_extrude));\\n gl_FragColor = color * (1.0 - t) * 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 bool u_scale_with_map;\\nuniform vec2 u_extrude_scale;\\nuniform float u_devicepixelratio;\\n\\nattribute vec2 a_pos;\\n\\n#pragma mapbox: define lowp vec4 color\\n#pragma mapbox: define mediump float radius\\n#pragma mapbox: define lowp float blur\\n#pragma mapbox: define lowp float opacity\\n\\nvarying vec2 v_extrude;\\nvarying lowp float v_antialiasblur;\\n\\nvoid main(void) {\\n #pragma mapbox: initialize lowp vec4 color\\n #pragma mapbox: initialize mediump float radius\\n #pragma mapbox: initialize lowp float blur\\n #pragma mapbox: initialize lowp float opacity\\n\\n // unencode the extrusion vector that we snuck into the a_pos vector\\n v_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\\n\\n vec2 extrude = v_extrude * radius * u_extrude_scale;\\n // multiply a_pos by 0.5, since we had it * 2 in order to sneak\\n // in extrusion data\\n gl_Position = u_matrix * vec4(floor(a_pos * 0.5), 0, 1);\\n\\n if (u_scale_with_map) {\\n gl_Position.xy += extrude;\\n } else {\\n gl_Position.xy += extrude * gl_Position.w;\\n }\\n\\n // This is a minimum blur distance that serves as a faux-antialiasing for\\n // the circle. since blur is a ratio of the circle's size and the intent is\\n // to keep the blur at roughly 1px, the two are inversely related.\\n v_antialiasblur = 1.0 / u_devicepixelratio / radius;\\n}\\n\"},line:{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;\\nuniform float u_blur;\\n\\nvarying vec2 v_linewidth;\\nvarying vec2 v_normal;\\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 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\\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;\\nuniform mediump float u_blur;\\n\\nvarying vec2 v_normal;\\nvarying vec2 v_linewidth;\\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\\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 // 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:468}],295:[function(t,e,r){\"use strict\";var n=t(\"util\").format;e.exports=function(t,e){this.message=(t?t+\": \":\"\")+n.apply(n,Array.prototype.slice.call(arguments,2)),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)}},{util:563}],296:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}},{}],297:[function(t,e,r){\"use strict\";e.exports=function(t){return t instanceof Number?\"number\":t instanceof String?\"string\":t instanceof Boolean?\"boolean\":Array.isArray(t)?\"array\":null===t?\"null\":typeof t}},{}],298:[function(t,e,r){\"use strict\";e.exports=function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}},{}],299:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"../util/extend\");e.exports=function(e){var r=t(\"./validate_function\"),o=t(\"./validate_object\"),s={\"*\":function(){return[]},array:t(\"./validate_array\"),boolean:t(\"./validate_boolean\"),number:t(\"./validate_number\"),color:t(\"./validate_color\"),constants:t(\"./validate_constants\"),enum:t(\"./validate_enum\"),filter:t(\"./validate_filter\"),function:t(\"./validate_function\"),layer:t(\"./validate_layer\"),object:t(\"./validate_object\"),source:t(\"./validate_source\"),string:t(\"./validate_string\")},l=e.value,c=e.valueSpec,u=e.key,f=e.styleSpec,h=e.style;if(\"string\"===i(l)&&\"@\"===l[0]){if(f.$version>7)return[new n(u,l,\"constants have been deprecated as of v8\")];if(!(l in h.constants))return[new n(u,l,'constant \"%s\" not found',l)];e=a({},e,{value:h.constants[l]})}return c.function&&\"object\"===i(l)?r(e):c.type&&s[c.type]?s[c.type](e):o(a({},e,{valueSpec:c.type?f[c.type]:c}))}},{\"../error/validation_error\":295,\"../util/extend\":296,\"../util/get_type\":297,\"./validate_array\":300,\"./validate_boolean\":301,\"./validate_color\":302,\"./validate_constants\":303,\"./validate_enum\":304,\"./validate_filter\":305,\"./validate_function\":306,\"./validate_layer\":308,\"./validate_number\":310,\"./validate_object\":311,\"./validate_source\":313,\"./validate_string\":314}],300:[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,c=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.length<r[\"min-length\"])return[new a(l,e,\"array length at least %d expected, length %d found\",r[\"min-length\"],e.length)];var u={type:r.value};s.$version<7&&(u.function=r.function),\"object\"===n(r.value)&&(u=r.value);for(var f=[],h=0;h<e.length;h++)f=f.concat(c({array:e,arrayIndex:h,value:e[h],valueSpec:u,style:o,styleSpec:s,key:l+\"[\"+h+\"]\"}));return f}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299}],301:[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\"boolean\"!==a?[new i(r,e,\"boolean expected, %s found\",a)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297}],302:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"csscolorparser\").parseCSSColor;e.exports=function(t){var e=t.key,r=t.value,o=i(r);return\"string\"!==o?[new n(e,r,\"color expected, %s found\",o)]:null===a(r)?[new n(e,r,'color expected, \"%s\" found',r)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297,csscolorparser:114}],303:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\");e.exports=function(t){var e=t.key,r=t.value;if(t.styleSpec.$version>7)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\":295,\"../util/get_type\":297}],304:[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\":295,\"../util/unbundle_jsonlint\":298}],305:[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,c=e.styleSpec,u=[];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(u=u.concat(i({key:l+\"[0]\",value:s[0],valueSpec:c.filter_operator,style:e.style,styleSpec:e.styleSpec})),o(s[0])){case\"<\":case\"<=\":case\">\":case\">=\":s.length>=2&&\"$type\"==s[1]&&u.push(new n(l,s,'\"$type\" cannot be use with operator \"%s\"',s[0]));case\"==\":case\"!=\":3!=s.length&&u.push(new n(l,s,'filter array for operator \"%s\" must have 3 elements',s[0]));case\"in\":case\"!in\":s.length>=2&&(\"string\"!==(r=a(s[1]))?u.push(new n(l+\"[1]\",s[1],\"string expected, %s found\",r)):\"@\"===s[1][0]&&u.push(new n(l+\"[1]\",s[1],\"filter key cannot be a constant\")));for(var f=2;f<s.length;f++)r=a(s[f]),\"$type\"==s[1]?u=u.concat(i({key:l+\"[\"+f+\"]\",value:s[f],valueSpec:c.geometry_type,style:e.style,styleSpec:e.styleSpec})):\"string\"===r&&\"@\"===s[f][0]?u.push(new n(l+\"[\"+f+\"]\",s[f],\"filter value cannot be a constant\")):\"string\"!==r&&\"number\"!==r&&\"boolean\"!==r&&u.push(new n(l+\"[\"+f+\"]\",s[f],\"string, number, or boolean expected, %s found\",r));break;case\"any\":case\"all\":case\"none\":for(f=1;f<s.length;f++)u=u.concat(t({key:l+\"[\"+f+\"]\",value:s[f],style:e.style,styleSpec:e.styleSpec}));break;case\"has\":case\"!has\":r=a(s[1]),2!==s.length?u.push(new n(l,s,'filter array for \"%s\" operator must have 2 elements',s[0])):\"string\"!==r?u.push(new n(l+\"[1]\",s[1],\"string expected, %s found\",r)):\"@\"===s[1][0]&&u.push(new n(l+\"[1]\",s[1],\"filter key cannot be a constant\"))}return u}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"../util/unbundle_jsonlint\":298,\"./validate_enum\":304}],306:[function(t,e,r){\"use strict\";var n=t(\"../error/validation_error\"),i=t(\"../util/get_type\"),a=t(\"./validate\"),o=t(\"./validate_object\"),s=t(\"./validate_array\"),l=t(\"./validate_number\");e.exports=function(t){function e(t){var e=[],s=t.value,f=t.key;if(\"array\"!==i(s))return[new n(f,s,\"array expected, %s found\",i(s))];if(2!==s.length)return[new n(f,s,\"array length %d expected, length %d found\",2,s.length)];var d=i(s[0]);if(c||(c=d),d!==c)return[new n(f,s,\"%s stop key type must match previous stop key type %s\",d,c)];if(\"object\"===d){if(void 0===s[0].zoom)return[new n(f,s,\"object stop key must have zoom\")];if(void 0===s[0].value)return[new n(f,s,\"object stop key must have value\")];e=e.concat(o({key:f+\"[0]\",value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:l,value:r}}))}else e=e.concat((h?l:r)({key:f+\"[0]\",value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec}));return e=e.concat(a({key:f+\"[1]\",value:s[1],valueSpec:u,style:t.style,styleSpec:t.styleSpec})),\"number\"===i(s[0])&&(\"piecewise-constant\"===u.function&&s[0]%1!=0&&e.push(new n(f+\"[0]\",s[0],\"zoom level for piecewise-constant functions must be an integer\")),0!==t.arrayIndex&&s[0]<t.array[t.arrayIndex-1][0]&&e.push(new n(f+\"[0]\",s[0],\"array stops must appear in ascending order\"))),e}function r(t){var e=[],r=i(t.value);return\"number\"!==r&&\"string\"!==r&&\"array\"!==r&&e.push(new n(t.key,t.value,\"property value must be a number, string or array\")),e}var c,u=t.valueSpec,f=void 0!==t.value.property||\"object\"===c,h=void 0===t.value.property||\"object\"===c,d=o({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){var r=[],a=t.value;return r=r.concat(s({key:t.key,value:a,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:e})),\"array\"===i(a)&&0===a.length&&r.push(new n(t.key,a,\"array must have at least one stop\")),r}}});return t.styleSpec.$version>=8&&(f&&!t.valueSpec[\"property-function\"]?d.push(new n(t.key,t.value,\"property functions not supported\")):h&&!t.valueSpec[\"zoom-function\"]&&d.push(new n(t.key,t.value,\"zoom functions not supported\"))),d}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299,\"./validate_array\":300,\"./validate_number\":310,\"./validate_object\":311}],307:[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\":295,\"./validate_string\":314}],308:[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\"),c=t(\"../util/extend\");e.exports=function(t){var e=[],r=t.value,u=t.key,f=t.style,h=t.styleSpec;r.type||r.ref||e.push(new n(u,r,'either \"type\" or \"ref\" is required'));var d=i(r.type),p=i(r.ref);if(r.id)for(var m=0;m<t.arrayIndex;m++){var g=f.layers[m];i(g.id)===i(r.id)&&e.push(new n(u,r.id,'duplicate layer id \"%s\", previously used at line %d',r.id,g.id.__line__))}if(\"ref\"in r){[\"type\",\"source\",\"source-layer\",\"filter\",\"layout\"].forEach(function(t){t in r&&e.push(new n(u,r[t],'\"%s\" is prohibited for ref layers',t))});var v;f.layers.forEach(function(t){t.id==p&&(v=t)}),v?v.ref?e.push(new n(u,r.ref,\"ref cannot reference another ref layer\")):d=i(v.type):e.push(new n(u,r.ref,'ref layer \"%s\" not found',p))}else if(\"background\"!==d)if(r.source){var y=f.sources&&f.sources[r.source];y?\"vector\"==y.type&&\"raster\"==d?e.push(new n(u,r.source,'layer \"%s\" requires a raster source',r.id)):\"raster\"==y.type&&\"raster\"!=d?e.push(new n(u,r.source,'layer \"%s\" requires a vector source',r.id)):\"vector\"!=y.type||r[\"source-layer\"]||e.push(new n(u,r,'layer \"%s\" must specify a \"source-layer\"',r.id)):e.push(new n(u,r.source,'source \"%s\" not found',r.source))}else e.push(new n(u,r,'missing required property \"source\"'));return e=e.concat(a({key:u,value:r,valueSpec:h.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{filter:o,layout:function(t){return a({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return l(c({layerType:d},t))}}})},paint:function(t){return a({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{\"*\":function(t){return s(c({layerType:d},t))}}})}}}))}},{\"../error/validation_error\":295,\"../util/extend\":296,\"../util/unbundle_jsonlint\":298,\"./validate_filter\":305,\"./validate_layout_property\":309,\"./validate_object\":311,\"./validate_paint_property\":312}],309:[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[\"layout_\"+t.layerType];if(t.valueSpec||l[s]){var c=[];return\"symbol\"===t.layerType&&(\"icon-image\"===s&&r&&!r.sprite?c.push(new i(e,o,'use of \"icon-image\" requires a style \"sprite\" property')):\"text-field\"===s&&r&&!r.glyphs&&c.push(new i(e,o,'use of \"text-field\" requires a style \"glyphs\" property'))),c.concat(n({key:t.key,value:o,valueSpec:t.valueSpec||l[s],style:r,styleSpec:a}))}return[new i(e,o,'unknown property \"%s\"',s)]}},{\"../error/validation_error\":295,\"./validate\":299}],310:[function(t,e,r){\"use strict\";var n=t(\"../util/get_type\"),i=t(\"../error/validation_error\");e.exports=function(t){var e=t.key,r=t.value,a=t.valueSpec,o=n(r);return\"number\"!==o?[new i(e,r,\"number expected, %s found\",o)]:\"minimum\"in a&&r<a.minimum?[new i(e,r,\"%s is less than the minimum value %s\",r,a.minimum)]:\"maximum\"in a&&r>a.maximum?[new i(e,r,\"%s is greater than the maximum value %s\",r,a.maximum)]:[]}},{\"../error/validation_error\":295,\"../util/get_type\":297}],311:[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,c=t.styleSpec,u=[],f=i(r);if(\"object\"!==f)return[new n(e,r,\"object expected, %s found\",f)];for(var h in r){var d=h.split(\".\")[0],p=o&&(o[d]||o[\"*\"]),m=s[d]||s[\"*\"];p||m?u=u.concat((m||a)({key:(e?e+\".\":e)+h,value:r[h],valueSpec:p,style:l,styleSpec:c,object:r,objectKey:h})):\"\"!==e&&1!==e.split(\".\").length&&u.push(new n(e,r[h],'unknown property \"%s\"',h))}for(d in o)o[d].required&&void 0===o[d].default&&void 0===r[d]&&u.push(new n(e,r,'missing required property \"%s\"',d));return u}},{\"../error/validation_error\":295,\"../util/get_type\":297,\"./validate\":299}],312:[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],c=s.match(/^(.*)-transition$/);return c&&l[c[1]]&&l[c[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\":295,\"./validate\":299}],313:[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 c=[];if(c=c.concat(a({key:r,value:e,valueSpec:s.source_tile,style:t.style,styleSpec:s})),\"url\"in e)for(var u in e)[\"type\",\"url\",\"tileSize\"].indexOf(u)<0&&c.push(new n(r+\".\"+u,e[u],'a source with a \"url\" property may not include a \"%s\" property',u));return c;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\":295,\"../util/unbundle_jsonlint\":298,\"./validate_enum\":304,\"./validate_object\":311}],314:[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\":295,\"../util/get_type\":297}],315:[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:c}})),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\"),c=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\":316,\"./validate/validate\":299,\"./validate/validate_constants\":303,\"./validate/validate_filter\":305,\"./validate/validate_glyphs_url\":307,\"./validate/validate_layer\":308,\"./validate/validate_layout_property\":309,\"./validate/validate_paint_property\":312,\"./validate/validate_source\":313}],316:[function(t,e,r){e.exports=t(\"./v8.min.json\")},{\"./v8.min.json\":317}],317:[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\"}}}},{}],318:[function(t,e,r){\"use strict\";function n(t){return!!(\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&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.prototype&&Function.prototype.bind&&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&&\"JSON\"in window&&\"parse\"in JSON&&\"stringify\"in JSON&&\"Worker\"in window&&\"Uint8ClampedArray\"in window&&function(t){void 0===i[t]&&(i[t]=function(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)}(t));return i[t]}(t&&t.failIfMajorPerformanceCaveat))}void 0!==e&&e.exports?e.exports=n:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=n);var i={};n.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},{}],319:[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\":433}],320:[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=function(t){var e={};for(var r in t.programInterfaces){for(var n=e[r]={},a=0;a<t.childLayers.length;a++){var o=t.childLayers[a];n[o.id]={attributes:[],uniforms:[],defines:[],vertexPragmas:{define:{},initialize:{}},fragmentPragmas:{define:{},initialize:{}}}}var s=t.programInterfaces[r];if(s.paintAttributes)for(var c=\"{precision}\",f=\"{type}\",h=0;h<s.paintAttributes.length;h++){var d=s.paintAttributes[h];d.multiplier=d.multiplier||1;for(var p=0;p<t.childLayers.length;p++){var m=t.childLayers[p],g=n[m.id],v=d.name;u(\"a_\"===d.name.slice(0,2));var y,x=d.name.slice(2);if(g.fragmentPragmas.initialize[x]=\"\",m.isPaintValueFeatureConstant(d.paintProperty))g.uniforms.push(d),g.fragmentPragmas.define[x]=g.vertexPragmas.define[x]=[\"uniform\",c,f,v].join(\" \")+\";\",g.fragmentPragmas.initialize[x]=g.vertexPragmas.initialize[x]=[c,f,x,\"=\",v].join(\" \")+\";\\n\";else if(m.isPaintValueZoomConstant(d.paintProperty)){g.attributes.push(l.extend({},d,{name:v})),y=[\"varying\",c,f,x].join(\" \")+\";\\n\";var b=[g.fragmentPragmas.define[x],\"attribute\",c,f,v].join(\" \")+\";\\n\";g.fragmentPragmas.define[x]=y,g.vertexPragmas.define[x]=y+b,g.vertexPragmas.initialize[x]=[x,\"=\",v,\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\"}else{for(var _=\"u_\"+v.slice(2)+\"_t\",w=m.getPaintValueStopZoomLevels(d.paintProperty),M=0;M<w.length&&w[M]<t.zoom;)M++;for(var k=Math.max(0,Math.min(w.length-4,M-2)),A=[],T=0;T<4;T++)A.push(w[Math.min(k+T,w.length-1)]);y=[\"varying\",c,f,x].join(\" \")+\";\\n\",g.vertexPragmas.define[x]=y+[\"uniform\",\"lowp\",\"float\",_].join(\" \")+\";\\n\",g.fragmentPragmas.define[x]=y,g.uniforms.push(l.extend({},d,{name:_,getValue:function(t,e){return function(r,n){var i=r.getPaintInterpolationT(t.paintProperty,n.zoom);return[Math.max(0,Math.min(4,i-e))]}}(d,k),components:1}));var S=d.components;if(1===S)g.attributes.push(l.extend({},d,{getValue:i(d,A),isFunction:!0,components:4*S})),g.vertexPragmas.define[x]+=[\"attribute\",c,\"vec4\",v].join(\" \")+\";\\n\",g.vertexPragmas.initialize[x]=[x,\"=\",\"evaluate_zoom_function_1(\"+v+\", \"+_+\")\",\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\";else{for(var E=[],L=0;L<4;L++)E.push(v+L),g.attributes.push(l.extend({},d,{getValue:i(d,[A[L]]),isFunction:!0,name:v+L})),g.vertexPragmas.define[x]+=[\"attribute\",c,f,v+L].join(\" \")+\";\\n\";g.vertexPragmas.initialize[x]=[x,\" = \",\"evaluate_zoom_function_4(\"+E.join(\", \")+\", \"+_+\")\",\"/\",d.multiplier.toFixed(1)].join(\" \")+\";\\n\"}}}}}return e}(this),t.arrays){var e=this.programInterfaces;this.bufferGroups=l.mapObject(t.arrays,function(r,n){var i=e[n],a=t.paintVertexArrayTypes[n];return r.map(function(t){return new s(t,{layoutVertexArrayType:i.layoutVertexArrayType.serialize(),elementArrayType:i.elementArrayType&&i.elementArrayType.serialize(),elementArrayType2:i.elementArrayType2&&i.elementArrayType2.serialize(),paintVertexArrayTypes:a})})})}}function i(t,e){return function(r,n,i){if(1===e.length)return t.getValue(r,l.extend({},n,{zoom:e[0]}),i);for(var a=[],o=0;o<e.length;o++){var s=e[o];a.push(t.getValue(r,l.extend({},n,{zoom:s}),i)[0])}return a}}var a=t(\"feature-filter\"),o=t(\"./array_group\"),s=t(\"./buffer_group\"),l=t(\"../util/util\"),c=t(\"../util/struct_array\"),u=t(\"assert\");e.exports=n,n.create=function(e){return new({fill:t(\"./bucket/fill_bucket\"),line:t(\"./bucket/line_bucket\"),circle:t(\"./bucket/circle_bucket\"),symbol:t(\"./bucket/symbol_bucket\")}[e.layer.type])(e)},n.EXTENT=8192,n.prototype.populateArrays=function(){this.createArrays(),this.recalculateStyleLayers();for(var t=0;t<this.features.length;t++)this.addFeature(this.features[t]);this.trimArrays()},n.prototype.prepareArrayGroup=function(t,e){var r=this.arrayGroups[t],n=r.length&&r[r.length-1];return n&&n.hasCapacityFor(e)||((n=new o({layoutVertexArrayType:this.programInterfaces[t].layoutVertexArrayType,elementArrayType:this.programInterfaces[t].elementArrayType,elementArrayType2:this.programInterfaces[t].elementArrayType2,paintVertexArrayTypes:this.paintVertexArrayTypes[t]})).index=r.length,r.push(n)),n},n.prototype.createArrays=function(){this.arrayGroups={},this.paintVertexArrayTypes={};for(var t in this.programInterfaces){this.arrayGroups[t]=[];var e=this.paintVertexArrayTypes[t]={},r=this.paintAttributes[t];for(var i in r)e[i]=new n.VertexArrayType(r[i].attributes)}},n.prototype.destroy=function(t){for(var e in this.bufferGroups)for(var r=this.bufferGroups[e],n=0;n<r.length;n++)r[n].destroy(t)},n.prototype.trimArrays=function(){for(var t in this.arrayGroups)for(var e=this.arrayGroups[t],r=0;r<e.length;r++)e[r].trim()},n.prototype.isEmpty=function(){for(var t in this.arrayGroups)for(var e=this.arrayGroups[t],r=0;r<e.length;r++)if(!e[r].isEmpty())return!1;return!0},n.prototype.getTransferables=function(t){for(var e in this.arrayGroups)for(var r=this.arrayGroups[e],n=0;n<r.length;n++)r[n].getTransferables(t)},n.prototype.setUniforms=function(t,e,r,n,i){for(var a=this.paintAttributes[e][n.id].uniforms,o=0;o<a.length;o++){var s=a[o],l=r[s.name];t[\"uniform\"+s.components+\"fv\"](l,s.getValue(n,i))}},n.prototype.serialize=function(){return{layerId:this.layer.id,zoom:this.zoom,arrays:l.mapObject(this.arrayGroups,function(t){return t.map(function(t){return t.serialize()})}),paintVertexArrayTypes:l.mapObject(this.paintVertexArrayTypes,function(t){return l.mapObject(t,function(t){return t.serialize()})}),childLayerIds:this.childLayers.map(function(t){return t.id})}},n.prototype.createFilter=function(){this.filter||(this.filter=a(this.layer.filter))};var f={lastIntegerZoom:1/0,lastIntegerZoomTime:0,lastZoom:0};n.prototype.recalculateStyleLayers=function(){for(var t=0;t<this.childLayers.length;t++)this.childLayers[t].recalculate(this.zoom,f)},n.prototype.populatePaintArrays=function(t,e,r,n,i){for(var a=0;a<this.childLayers.length;a++)for(var o=this.childLayers[a],s=this.arrayGroups[t],l=n.index;l<s.length;l++){var c=s[l],u=c.layoutVertexArray.length,f=c.paintVertexArrays[o.id];f.resize(u);for(var h=this.paintAttributes[t][o.id].attributes,d=0;d<h.length;d++)for(var p=h[d],m=p.getValue(o,e,r),g=p.multiplier||1,v=p.components||1,y=l===n.index?i:0;y<u;y++)for(var x=f.get(y),b=0;b<v;b++){x[v>1?p.name+b:p.name]=m[b]*g}}},n.VertexArrayType=function(t){return new c({members:t,alignment:4})},n.ElementArrayType=function(t){return new c({members:[{type:\"Uint16\",name:\"vertices\",components:t||3}]})}},{\"../util/struct_array\":431,\"../util/util\":433,\"./array_group\":319,\"./bucket/circle_bucket\":321,\"./bucket/fill_bucket\":322,\"./bucket/line_bucket\":323,\"./bucket/symbol_bucket\":324,\"./buffer_group\":326,assert:51,\"feature-filter\":141}],321:[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,{})).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<r.length;a++)for(var l=0;l<r[a].length;l++){var c=r[a][l].x,u=r[a][l].y;if(!(c<0||c>=s||u<0||u>=s)){var f=this.prepareArrayGroup(\"circle\",4),h=f.layoutVertexArray,d=this.addCircleVertex(h,c,u,-1,-1);this.addCircleVertex(h,c,u,1,-1),this.addCircleVertex(h,c,u,1,1),this.addCircleVertex(h,c,u,-1,1),f.elementArray.emplaceBack(d,d+1,d+2),f.elementArray.emplaceBack(d,d+3,d+2)}}this.populatePaintArrays(\"circle\",e,t.properties,n,i)}},{\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328}],322:[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,{})).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;a<r.length;a++)this.addPolygon(r[a]);this.populatePaintArrays(\"fill\",{zoom:this.zoom},t.properties,n,i)},n.prototype.addPolygon=function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].length;for(var n=this.prepareArrayGroup(\"fill\",e),i=[],a=[],o=n.layoutVertexArray.length,l=0;l<t.length;l++){var c=t[l];l>0&&a.push(i.length/2);for(var u=0;u<c.length;u++){var f=c[u],h=n.layoutVertexArray.emplaceBack(f.x,f.y);u>=1&&n.elementArray2.emplaceBack(h-1,h),i.push(f.x),i.push(f.y)}}for(var d=s(i,a),p=0;p<d.length;p++)n.elementArray.emplaceBack(d[p]+o)}},{\"../../util/classify_rings\":421,\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328,earcut:135}],323:[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,l=Math.cos(Math.PI/180*37.5),c=Math.pow(2,14)/.5;e.exports=n,(n.prototype=a.inherit(i,{})).addLineVertex=function(t,e,r,n,i,a,o){return t.emplaceBack(e.x<<1|n,e.y<<1|i,Math.round(63*r.x)+128,Math.round(63*r.y)+128,1+(0===a?0:a<0?-1:1)|(.5*o&63)<<2,.5*o>>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;r<e.length;r++)this.addLine(e[r],this.layer.layout[\"line-join\"],this.layer.layout[\"line-cap\"],this.layer.layout[\"line-miter-limit\"],this.layer.layout[\"line-round-limit\"])},n.prototype.addLine=function(t,e,r,n,i){for(var a=t.length;a>2&&t[a-1].equals(t[a-2]);)a--;if(!(t.length<2)){\"bevel\"===e&&(n=1.05);var o=s/(512*this.overscaling)*15,c=t[0],u=t[a-1],f=c.equals(u);if(this.prepareArrayGroup(\"line\",10*a),2!==a||!f){this.distance=0;var h,d,p,m,g,v,y,x=r,b=f?\"butt\":r,_=!0;this.e1=this.e2=this.e3=-1,f&&(h=t[a-2],g=c.sub(h)._unit()._perp());for(var w=0;w<a;w++)if(!(p=f&&w===a-1?t[1]:t[w+1])||!t[w].equals(p)){g&&(m=g),h&&(d=h),h=t[w],g=p?p.sub(h)._unit()._perp():m;var M=(m=m||g).add(g)._unit(),k=M.x*g.x+M.y*g.y,A=1/k,T=k<l&&d&&p;if(T&&w>0){var S=h.dist(d);if(S>2*o){var E=h.sub(h.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?x:b;if(L&&\"round\"===C&&(A<i?C=\"miter\":A<=2&&(C=\"fakeround\")),\"miter\"===C&&A>n&&(C=\"bevel\"),\"bevel\"===C&&(A>2&&(C=\"flipbevel\"),A<n&&(C=\"miter\")),d&&(this.distance+=h.dist(d)),\"miter\"===C)M._mult(A),this.addCurrentVertex(h,this.distance,M,0,0,!1);else if(\"flipbevel\"===C){if(A>100)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(h,this.distance,M,0,0,!1),this.addCurrentVertex(h,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(h,this.distance,m,v,y,!1),\"fakeround\"===C){for(var O,F=Math.floor(8*(.5-(k-.5))),R=0;R<F;R++)O=g.mult((R+1)/(F+1))._add(m)._unit(),this.addPieSliceVertex(h,this.distance,O,I);this.addPieSliceVertex(h,this.distance,M,I);for(var N=F-1;N>=0;N--)O=m.mult((N+1)/(F+1))._add(g)._unit(),this.addPieSliceVertex(h,this.distance,O,I)}p&&this.addCurrentVertex(h,this.distance,g,-v,-y,!1)}else\"butt\"===C?(_||this.addCurrentVertex(h,this.distance,m,0,0,!1),p&&this.addCurrentVertex(h,this.distance,g,0,0,!1)):\"square\"===C?(_||(this.addCurrentVertex(h,this.distance,m,1,1,!1),this.e1=this.e2=-1),p&&this.addCurrentVertex(h,this.distance,g,-1,-1,!1)):\"round\"===C&&(_||(this.addCurrentVertex(h,this.distance,m,0,0,!1),this.addCurrentVertex(h,this.distance,m,1,1,!0),this.e1=this.e2=-1),p&&(this.addCurrentVertex(h,this.distance,g,-1,-1,!0),this.addCurrentVertex(h,this.distance,g,0,0,!1)));if(T&&w<a-1){var j=h.dist(p);if(j>2*o){var B=h.add(p.sub(h)._mult(o/j)._round());this.distance+=B.dist(h),this.addCurrentVertex(B,this.distance,g.mult(1),0,0,!1),h=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],u=l.layoutVertexArray,f=l.elementArray;o=r.clone(),n&&o._sub(r.perp()._mult(n)),this.e3=this.addLineVertex(u,t,o,s,0,n,e),this.e1>=0&&this.e2>=0&&f.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(u,t,o,s,1,-i,e),this.e1>=0&&this.e2>=0&&f.emplaceBack(this.e1,this.e2,this.e3),this.e1=this.e2,this.e2=this.e3,e>c/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\":433,\"../bucket\":320,\"../load_geometry\":328}],324:[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,c,u){return t.emplaceBack(e,r,Math.round(64*n),Math.round(64*i),a/4,o/4,10*(c||0),u,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\"),c=t(\"../../util/token\"),u=t(\"../../symbol/quads\"),f=t(\"../../symbol/shaping\"),h=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=f.shapeText,x=f.shapeIcon,b=u.getGlyphQuads,_=u.getIconQuads,w=o.EXTENT;e.exports=n,n.MAX_QUADS=65535,(n.prototype=m.inherit(o,{})).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,u=.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\":u=1;break;case\"top\":case\"top-right\":case\"top-left\":u=0}for(var f=\"right\"===a[\"text-justify\"]?1:\"left\"===a[\"text-justify\"]?0:.5,h=24*a[\"text-line-height\"],p=\"line\"!==a[\"symbol-placement\"]?24*a[\"text-max-width\"]:0,v=24*a[\"text-letter-spacing\"],b=[24*a[\"text-offset\"][0],24*a[\"text-offset\"][1]],_=this.fontstack=a[\"text-font\"].join(\",\"),M=[],k=0;k<o.length;k++)M.push(g(o[k]));if(\"line\"===a[\"symbol-placement\"]){var A=d(o,s,M);M=A.geometries,o=A.features,s=A.textFeatures}for(var T,S,E=0;E<o.length;E++)if(M[E]){if(T=s[E]?y(s[E],e[_],p,h,l,u,f,v,b):null,a[\"icon-image\"]){var L=r[c(o[E].properties,a[\"icon-image\"])];S=x(L,a),L&&(void 0===this.sdfIcons?this.sdfIcons=L.sdf:this.sdfIcons!==L.sdf&&m.warnOnce(\"Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer\"),1!==L.pixelRatio?this.iconsNeedLinear=!0:0===a[\"icon-rotate\"]&&this.layer.isLayoutValueFeatureConstant(\"icon-rotate\")||(this.iconsNeedLinear=!0))}else S=null;(T||S)&&this.addFeature(M[E],T,S,o[E])}this.symbolInstancesEndIndex=this.symbolInstancesArray.length,this.placeFeatures(t,this.showCollisionBoxes),this.trimArrays()},n.prototype.addFeature=function(t,e,r,n){var i=this.layer.layout,a=this.adjustedTextSize/24,o=void 0!==this.adjustedTextMaxSize?this.adjustedTextMaxSize:this.adjustedTextSize,c=this.tilePixelRatio*a,u=this.tilePixelRatio*o/24,f=this.tilePixelRatio*this.adjustedIconSize,h=this.tilePixelRatio*i[\"symbol-spacing\"],d=i[\"symbol-avoid-edges\"],m=i[\"text-padding\"]*this.tilePixelRatio,g=i[\"icon-padding\"]*this.tilePixelRatio,v=i[\"text-max-angle\"]/180*Math.PI,y=\"map\"===i[\"text-rotation-alignment\"]&&\"line\"===i[\"symbol-placement\"],x=\"map\"===i[\"icon-rotation-alignment\"]&&\"line\"===i[\"symbol-placement\"],b=i[\"text-allow-overlap\"]||i[\"icon-allow-overlap\"]||i[\"text-ignore-placement\"]||i[\"icon-ignore-placement\"],_=\"line\"===i[\"symbol-placement\"],M=h/2;_&&(t=p(t,0,0,w,w));for(var k=0;k<t.length;k++)for(var A,T=t[k],S=0,E=(A=_?l(T,h,v,e,r,24,u,this.overscaling,w):[new s(T[0].x,T[0].y,0)]).length;S<E;S++){var L=A[S];if(!(e&&_&&this.anchorIsTooClose(e.text,M,L))){var C=!(L.x<0||L.x>w||L.y<0||L.y>w);if(!d||C){var z=C||b;this.addSymbolInstance(L,T,e,r,this.layer,z,this.symbolInstancesArray.length,this.collisionBoxArray,n.index,this.sourceLayerIndex,this.index,c,m,y,f,g,x,{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])<e)return!0}else n[t]=[];return n[t].push(r),!1},n.prototype.placeFeatures=function(t,e){this.recalculateStyleLayers(),this.createArrays();var r=this.layer.layout,n=t.maxScale,i=\"map\"===r[\"text-rotation-alignment\"]&&\"line\"===r[\"symbol-placement\"],a=\"map\"===r[\"icon-rotation-alignment\"]&&\"line\"===r[\"symbol-placement\"];if(r[\"text-allow-overlap\"]||r[\"icon-allow-overlap\"]||r[\"text-ignore-placement\"]||r[\"icon-ignore-placement\"]){var o=this.symbolInstancesArray.toArray(this.symbolInstancesStartIndex,this.symbolInstancesEndIndex),s=t.angle,l=Math.sin(s),c=Math.cos(s);this.sortedSymbolInstances=o.sort(function(t,e){return(l*t.anchorPointX+c*t.anchorPointY|0)-(l*e.anchorPointX+c*e.anchorPointY|0)||e.index-t.index})}for(var u=this.symbolInstancesStartIndex;u<this.symbolInstancesEndIndex;u++){var f=this.sortedSymbolInstances?this.sortedSymbolInstances[u-this.symbolInstancesStartIndex]:this.symbolInstancesArray.get(u),h={boxStartIndex:f.textBoxStartIndex,boxEndIndex:f.textBoxEndIndex},d={boxStartIndex:f.iconBoxStartIndex,boxEndIndex:f.iconBoxEndIndex},p=!(f.textBoxStartIndex===f.textBoxEndIndex),m=!(f.iconBoxStartIndex===f.iconBoxEndIndex),g=r[\"text-optional\"]||!p,v=r[\"icon-optional\"]||!m,y=p?t.placeCollisionFeature(h,r[\"text-allow-overlap\"],r[\"symbol-avoid-edges\"]):t.minScale,x=m?t.placeCollisionFeature(d,r[\"icon-allow-overlap\"],r[\"symbol-avoid-edges\"]):t.minScale;g||v?!v&&y?y=Math.max(x,y):!g&&x&&(x=Math.max(x,y)):x=y=Math.max(x,y),p&&(t.insertCollisionFeature(h,y,r[\"text-ignore-placement\"]),y<=n&&this.addSymbols(\"glyph\",f.glyphQuadStartIndex,f.glyphQuadEndIndex,y,r[\"text-keep-upright\"],i,t.angle)),m&&(t.insertCollisionFeature(d,x,r[\"icon-ignore-placement\"]),x<=n&&this.addSymbols(\"icon\",f.iconQuadStartIndex,f.iconQuadEndIndex,x,r[\"icon-keep-upright\"],a,t.angle))}e&&this.addToDebugBuffers(t)},n.prototype.addSymbols=function(t,e,r,n,a,o,s){for(var l=this.prepareArrayGroup(t,4*(r-e)),c=l.elementArray,u=l.layoutVertexArray,f=this.zoom,h=Math.max(Math.log(n)/Math.LN2+f,0),d=e;d<r;d++){var p=this.symbolQuadsArray.get(d).SymbolQuad,m=(p.anchorAngle+s+Math.PI)%(2*Math.PI);if(!(a&&o&&(m<=Math.PI/2||m>3*Math.PI/2))){var g=p.tl,v=p.tr,y=p.bl,x=p.br,b=p.tex,_=p.anchorPoint,w=Math.max(f+Math.log(p.minScale)/Math.LN2,h),M=Math.min(f+Math.log(p.maxScale)/Math.LN2,25);if(!(M<=w)){w===h&&(w=0);var k=Math.round(p.glyphAngle/(2*Math.PI)*256),A=i(u,_.x,_.y,g.x,g.y,b.x,b.y,w,M,h,k);i(u,_.x,_.y,v.x,v.y,b.x+b.w,b.y,w,M,h,k),i(u,_.x,_.y,y.x,y.y,b.x,b.y+b.h,w,M,h,k),i(u,_.x,_.y,x.x,x.y,b.x+b.w,b.y+b.h,w,M,h,k),c.emplaceBack(A,A+1,A+2),c.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;r<this.features.length;r++){var n=c(this.features[r].properties,e);n&&(t[n]=!0)}},n.prototype.updateFont=function(t){this.recalculateStyleLayers();var e=this.layer.layout[\"text-font\"],r=t[e]=t[e]||{};this.textFeatures=h(this.features,this.layer.layout,r)},n.prototype.addToDebugBuffers=function(t){for(var e=this.prepareArrayGroup(\"collisionBox\",0).layoutVertexArray,r=-t.angle,n=t.yStretch,i=this.symbolInstancesStartIndex;i<this.symbolInstancesEndIndex;i++){var o=this.symbolInstancesArray.get(i);o.textCollisionFeature={boxStartIndex:o.textBoxStartIndex,boxEndIndex:o.textBoxEndIndex},o.iconCollisionFeature={boxStartIndex:o.iconBoxStartIndex,boxEndIndex:o.iconBoxEndIndex};for(var s=0;s<2;s++){var l=o[0===s?\"textCollisionFeature\":\"iconCollisionFeature\"];if(l)for(var c=l.boxStartIndex;c<l.boxEndIndex;c++){var u=this.collisionBoxArray.get(c),f=u.anchorPoint,h=new a(u.x1,u.y1*n)._rotate(r),d=new a(u.x2,u.y1*n)._rotate(r),p=new a(u.x1,u.y2*n)._rotate(r),m=new a(u.x2,u.y2*n)._rotate(r),g=Math.max(0,Math.min(25,this.zoom+Math.log(u.maxScale)/Math.LN2)),v=Math.max(0,Math.min(25,this.zoom+Math.log(u.placementScale)/Math.LN2));this.addCollisionBoxVertex(e,f,h,g,v),this.addCollisionBoxVertex(e,f,d,g,v),this.addCollisionBoxVertex(e,f,d,g,v),this.addCollisionBoxVertex(e,f,m,g,v),this.addCollisionBoxVertex(e,f,m,g,v),this.addCollisionBoxVertex(e,f,p,g,v),this.addCollisionBoxVertex(e,f,p,g,v),this.addCollisionBoxVertex(e,f,h,g,v)}}}},n.prototype.addSymbolInstance=function(t,e,r,i,a,o,s,l,c,u,f,h,d,p,g,y,x,w,M){var k,A,T,S,E,L,C,z;if(r&&(C=o?b(t,r,h,e,a,p):[],E=new v(l,e,t,c,u,f,r,h,d,p,!1)),k=this.symbolQuadsArray.length,C&&C.length)for(var D=0;D<C.length;D++)this.addSymbolQuad(C[D]);A=this.symbolQuadsArray.length;var I=E?E.boxStartIndex:this.collisionBoxArray.length,P=E?E.boxEndIndex:this.collisionBoxArray.length;i&&(z=o?_(t,i,g,e,a,x,r,w,M):[],L=new v(l,e,t,c,u,f,i,g,y,x,!0)),T=this.symbolQuadsArray.length,z&&1===z.length&&this.addSymbolQuad(z[0]),S=this.symbolQuadsArray.length;var O=L?L.boxStartIndex:this.collisionBoxArray.length,F=L?L.boxEndIndex:this.collisionBoxArray.length;return S>n.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,F,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\":382,\"../../symbol/clip_line\":384,\"../../symbol/collision_feature\":386,\"../../symbol/get_anchors\":388,\"../../symbol/mergelines\":391,\"../../symbol/quads\":392,\"../../symbol/resolve_text\":393,\"../../symbol/shaping\":394,\"../../util/token\":432,\"../../util/util\":433,\"../bucket\":320,\"../load_geometry\":328,\"point-geometry\":477}],325:[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;r<this.attributes.length;r++){var n=this.attributes[r],a=e[n.name];void 0!==a&&t.vertexAttribPointer(a,n.components,t[i[n.type]],!1,this.arrayType.bytesPerElement,n.offset)}},n.prototype.destroy=function(t){this.buffer&&t.deleteBuffer(this.buffer)},n.BufferType={VERTEX:\"ARRAY_BUFFER\",ELEMENT:\"ELEMENT_ARRAY_BUFFER\"}},{}],326:[function(t,e,r){\"use strict\";function n(t,e){this.layoutVertexBuffer=new a(t.layoutVertexArray,e.layoutVertexArrayType,a.BufferType.VERTEX),t.elementArray&&(this.elementBuffer=new a(t.elementArray,e.elementArrayType,a.BufferType.ELEMENT));var r,n=this.vaos={};t.elementArray2&&(this.elementBuffer2=new a(t.elementArray2,e.elementArrayType2,a.BufferType.ELEMENT),r=this.secondVaos={}),this.paintVertexBuffers=i.mapObject(t.paintVertexArrays,function(i,s){return n[s]=new o,t.elementArray2&&(r[s]=new o),new a(i,e.paintVertexArrayTypes[s],a.BufferType.VERTEX)})}var i=t(\"../util/util\"),a=t(\"./buffer\"),o=t(\"../render/vertex_array_object\");e.exports=n,n.prototype.destroy=function(t){this.layoutVertexBuffer.destroy(t),this.elementBuffer&&this.elementBuffer.destroy(t),this.elementBuffer2&&this.elementBuffer2.destroy(t);for(var e in this.paintVertexBuffers)this.paintVertexBuffers[e].destroy(t);for(var r in this.vaos)this.vaos[r].destroy(t);for(var n in this.secondVaos)this.secondVaos[n].destroy(t)}},{\"../render/vertex_array_object\":348,\"../util/util\":433,\"./buffer\":325}],327:[function(t,e,r){\"use strict\";function n(t,e,r){if(t.grid){var n=t,i=e;t=n.coord,e=n.overscaling,this.grid=new d(n.grid),this.featureIndexArray=new M(n.featureIndexArray),this.rawTileData=i,this.bucketLayerIDs=n.bucketLayerIDs}else this.grid=new d(u,16,0),this.featureIndexArray=new M;this.coord=t,this.overscaling=e,this.x=t.x,this.y=t.y,this.z=t.z-Math.log(e)/Math.LN2,this.setCollisionTile(r)}function i(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function a(t,e){return e-t}function o(t){return t[\"line-gap-width\"]>0?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=l.convert(e),\"viewport\"===r&&e._rotate(-n);for(var a=[],o=0;o<t.length;o++){for(var s=t[o],c=[],u=0;u<s.length;u++)c.push(s[u].sub(e._mult(i)));a.push(c)}return a}var l=t(\"point-geometry\"),c=t(\"./load_geometry\"),u=t(\"./bucket\").EXTENT,f=t(\"feature-filter\"),h=t(\"../util/struct_array\"),d=t(\"grid-index\"),p=t(\"../util/dictionary_coder\"),m=t(\"vector-tile\"),g=t(\"pbf\"),v=t(\"../util/vectortile_to_geojson\"),y=t(\"../util/util\").arraysIntersect,x=t(\"../util/intersection_tests\"),b=x.multiPolygonIntersectsBufferedMultiPoint,_=x.multiPolygonIntersectsMultiPolygon,w=x.multiPolygonIntersectsBufferedMultiLine,M=new h({members:[{type:\"Uint32\",name:\"featureIndex\"},{type:\"Uint16\",name:\"sourceLayerIndex\"},{type:\"Uint16\",name:\"bucketIndex\"}]});e.exports=n,n.prototype.insert=function(t,e,r,n){var i=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(e,r,n);for(var a=c(t),o=0;o<a.length;o++){for(var s=a[o],l=[1/0,1/0,-1/0,-1/0],u=0;u<s.length;u++){var f=s[u];l[0]=Math.min(l[0],f.x),l[1]=Math.min(l[1],f.y),l[2]=Math.max(l[2],f.x),l[3]=Math.max(l[3],f.y)}this.grid.insert(i,l[0],l[1],l[2],l[3])}},n.prototype.setCollisionTile=function(t){this.collisionTile=t},n.prototype.serialize=function(){var t={coord:this.coord,overscaling:this.overscaling,grid:this.grid.toArrayBuffer(),featureIndexArray:this.featureIndexArray.serialize(),bucketLayerIDs:this.bucketLayerIDs};return{data:t,transferables:[t.grid,t.featureIndexArray.arrayBuffer]}},n.prototype.query=function(t,e){this.vtLayers||(this.vtLayers=new m.VectorTile(new g(new Uint8Array(this.rawTileData))).layers,this.sourceLayerCoder=new p(this.vtLayers?Object.keys(this.vtLayers).sort():[\"_geojsonTileLayer\"]));var r={},n=t.params||{},s=u/t.tileSize/t.scale,c=f(n.filter),h=0;for(var d in e){var v=e[d],y=v.paint,x=0;\"line\"===v.type?x=o(y)/2+Math.abs(y[\"line-offset\"])+i(y[\"line-translate\"]):\"fill\"===v.type?x=i(y[\"fill-translate\"]):\"circle\"===v.type&&(x=y[\"circle-radius\"]+i(y[\"circle-translate\"])),h=Math.max(h,x*s)}for(var b=t.queryGeometry.map(function(t){return t.map(function(t){return new l(t.x,t.y)})}),_=1/0,w=1/0,M=-1/0,k=-1/0,A=0;A<b.length;A++)for(var T=b[A],S=0;S<T.length;S++){var E=T[S];_=Math.min(_,E.x),w=Math.min(w,E.y),M=Math.max(M,E.x),k=Math.max(k,E.y)}var L=this.grid.query(_-h,w-h,M+h,k+h);L.sort(a),this.filterMatching(r,L,this.featureIndexArray,b,c,n.layers,e,t.bearing,s);var C=this.collisionTile.queryRenderedSymbols(_,w,M,k,t.scale);return C.sort(),this.filterMatching(r,C,this.collisionTile.collisionBoxArray,b,c,n.layers,e,t.bearing,s),r},n.prototype.filterMatching=function(t,e,r,n,i,a,u,f,h){for(var d,p=0;p<e.length;p++){var m=e[p];if(m!==d){d=m;var g=r.get(m),x=this.bucketLayerIDs[g.bucketIndex];if(!a||y(a,x)){var M=this.sourceLayerCoder.decode(g.sourceLayerIndex),k=this.vtLayers[M].feature(g.featureIndex);if(i(k))for(var A=null,T=0;T<x.length;T++){var S=x[T];if(!(a&&a.indexOf(S)<0)){var E=u[S];if(E){var L;if(\"symbol\"!==E.type){A||(A=c(k));var C=E.paint;if(\"line\"===E.type){L=s(n,C[\"line-translate\"],C[\"line-translate-anchor\"],f,h);var z=o(C)/2*h;if(C[\"line-offset\"]&&(A=function(t,e){for(var r=[],n=new l(0,0),i=0;i<t.length;i++){for(var a=t[i],o=[],s=0;s<a.length;s++){var c=a[s-1],u=a[s],f=a[s+1],h=0===s?n:u.sub(c)._unit()._perp(),d=s===a.length-1?n:f.sub(u)._unit()._perp(),p=h._add(d)._unit(),m=p.x*d.x+p.y*d.y;p._mult(1/m),o.push(p._mult(e)._add(u))}r.push(o)}return r}(A,C[\"line-offset\"]*h)),!w(L,A,z))continue}else if(\"fill\"===E.type){if(L=s(n,C[\"fill-translate\"],C[\"fill-translate-anchor\"],f,h),!_(L,A))continue}else if(\"circle\"===E.type){L=s(n,C[\"circle-translate\"],C[\"circle-translate-anchor\"],f,h);var D=C[\"circle-radius\"]*h;if(!b(L,A,D))continue}}var I=new v(k,this.z,this.x,this.y);I.layer=E.serialize({includeRefProperties:!0});var P=t[S];void 0===P&&(P=t[S]=[]),P.push(I)}}}}}}}},{\"../util/dictionary_coder\":423,\"../util/intersection_tests\":428,\"../util/struct_array\":431,\"../util/util\":433,\"../util/vectortile_to_geojson\":434,\"./bucket\":320,\"./load_geometry\":328,\"feature-filter\":141,\"grid-index\":275,pbf:470,\"point-geometry\":477,\"vector-tile\":564}],328:[function(t,e,r){\"use strict\";function n(t){return{min:-1*Math.pow(2,t-1),max:Math.pow(2,t-1)-1}}var i=t(\"../util/util\"),a=t(\"./bucket\").EXTENT,o=t(\"assert\"),s={15:n(15),16:n(16)};e.exports=function(t,e){var r=s[e||16];o(r);for(var n=a/t.extent,l=t.loadGeometry(),c=0;c<l.length;c++)for(var u=l[c],f=0;f<u.length;f++){var h=u[f];h.x=Math.round(h.x*n),h.y=Math.round(h.y*n),(h.x<r.min||h.x>r.max||h.y<r.min||h.y>r.max)&&i.warnOnce(\"Geometry exceeds allowed extent, reduce your vector tile buffer size\")}return l}},{\"../util/util\":433,\"./bucket\":320,assert:51}],329:[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}}},{}],330:[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\":433}],331:[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\":330}],332:[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\"),c=t(\"../source/tile_coord\"),u=t(\"../data/bucket\").EXTENT,f=t(\"gl-matrix\"),h=f.vec4,d=f.mat4,p=f.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(e<t.minzoom)return[];e>t.maxzoom&&(e=t.maxzoom);var n=this.locationCoordinate(this.center)._zoomTo(e),i=new a(n.column-.5,n.row-.5);return c.cover(e,[this.pointCoordinate(new a(0,0))._zoomTo(e),this.pointCoordinate(new a(this.width,0))._zoomTo(e),this.pointCoordinate(new a(this.width,this.height))._zoomTo(e),this.pointCoordinate(new a(0,this.height))._zoomTo(e)],t.reparseOverscaled?r:e).sort(function(t,e){return i.dist(t)-i.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];h.transformMat4(e,e,this.pixelMatrixInverse),h.transformMat4(r,r,this.pixelMatrixInverse);var n=e[3],i=r[3],a=e[0]/n,s=r[0]/i,c=e[1]/n,u=r[1]/i,f=e[2]/n,d=r[2]/i,p=f===d?0:(0-f)/(d-f),m=this.worldSize/this.zoomScale(this.tileZoom);return new o(l(a,s,p)/m,l(c,u,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 h.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 c&&(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/u,n/u,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,c=this.size,u=this._unmodified;this.latRange&&(t=this.latY(this.latRange[1]),i=(e=this.latY(this.latRange[0]))-t<c.y?c.y/(e-t):0),this.lngRange&&(r=this.lngX(this.lngRange[0]),o=(n=this.lngX(this.lngRange[1]))-r<c.x?c.x/(n-r):0);var f=Math.max(o||0,i||0);if(f)return this.center=this.unproject(new a(o?(n+r)/2:this.x,i?(e+t)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var h=this.y,d=c.y/2;h-d<t&&(l=t+d),h+d>e&&(l=e-d)}if(this.lngRange){var p=this.x,m=c.x/2;p-m<r&&(s=r+m),p+m>n&&(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=u,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\":320,\"../source/tile_coord\":360,\"../util/interpolate\":427,\"../util/util\":433,\"./coordinate\":329,\"./lng_lat\":330,\"gl-matrix\":198,\"point-geometry\":477}],333:[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,c,u,f,h,d=[];for(a=0,o=t.length;a<o;a++)if(c=n[t[a]]){for(h=null,s=0,l=c[1].length;s<l;s+=2)-1===c[1][s]&&-1===c[1][s+1]?h=null:(u=e+c[1][s]*i,f=r-c[1][s+1]*i,h&&d.push(h.x,h.y,u,f),h={x:u,y:f});e+=c[0]*i}return d}},{}],334:[function(t,e,r){\"use strict\";var n=e.exports={};n.version=t(\"../package.json\").version,n.Map=t(\"./ui/map\"),n.Control=t(\"./ui/control/control\"),n.Navigation=t(\"./ui/control/navigation\"),n.Geolocate=t(\"./ui/control/geolocate\"),n.Attribution=t(\"./ui/control/attribution\"),n.Popup=t(\"./ui/popup\"),n.Marker=t(\"./ui/marker\"),n.Style=t(\"./style/style\"),n.LngLat=t(\"./geo/lng_lat\"),n.LngLatBounds=t(\"./geo/lng_lat_bounds\"),n.Point=t(\"point-geometry\"),n.Evented=t(\"./util/evented\"),n.util=t(\"./util/util\"),n.supported=t(\"./util/browser\").supported;var i=t(\"./util/ajax\");n.util.getJSON=i.getJSON,n.util.getArrayBuffer=i.getArrayBuffer;var a=t(\"./util/config\");n.config=a,Object.defineProperty(n,\"accessToken\",{get:function(){return a.ACCESS_TOKEN},set:function(t){a.ACCESS_TOKEN=t}})},{\"../package.json\":435,\"./geo/lng_lat\":330,\"./geo/lng_lat_bounds\":331,\"./style/style\":369,\"./ui/control/attribution\":400,\"./ui/control/control\":401,\"./ui/control/geolocate\":402,\"./ui/control/navigation\":403,\"./ui/map\":412,\"./ui/marker\":413,\"./ui/popup\":414,\"./util/ajax\":416,\"./util/browser\":417,\"./util/config\":422,\"./util/evented\":425,\"./util/util\":433,\"point-geometry\":477}],335:[function(t,e,r){\"use strict\";var n=t(\"assert\");e.exports=function(t){for(var e={define:{},initialize:{}},r=0;r<t.length;r++){var i=t[r];n(\"u_\"===i.name.slice(0,2));var a=\"{precision} \"+(1===i.components?\"float\":\"vec\"+i.components);e.define[i.name.slice(2)]=\"uniform \"+a+\" \"+i.name+\";\\n\",e.initialize[i.name.slice(2)]=a+\" \"+i.name.slice(2)+\" = \"+i.name+\";\\n\"}return e}},{assert:51}],336:[function(t,e,r){\"use strict\";var n=t(\"../source/pixels_to_tile_units\"),i=t(\"./create_uniform_pragmas\"),a=512;e.exports=function(t,e,r){var o,s=t.gl,l=t.transform,c=r.paint[\"background-color\"],u=r.paint[\"background-pattern\"],f=r.paint[\"background-opacity\"],h=u?t.spriteAtlas.getPosition(u.from,!0):null,d=u?t.spriteAtlas.getPosition(u.to,!0):null;if(t.setDepthSublayer(0),h&&d){if(t.isOpaquePass)return;o=t.useProgram(\"pattern\"),s.uniform1i(o.u_image,0),s.uniform2fv(o.u_pattern_tl_a,h.tl),s.uniform2fv(o.u_pattern_br_a,h.br),s.uniform2fv(o.u_pattern_tl_b,d.tl),s.uniform2fv(o.u_pattern_br_b,d.br),s.uniform1f(o.u_opacity,f),s.uniform1f(o.u_mix,u.t),s.uniform2fv(o.u_pattern_size_a,h.size),s.uniform2fv(o.u_pattern_size_b,d.size),s.uniform1f(o.u_scale_a,u.fromScale),s.uniform1f(o.u_scale_b,u.toScale),s.activeTexture(s.TEXTURE0),t.spriteAtlas.bind(s,!0),t.tileExtentPatternVAO.bind(s,o,t.tileExtentBuffer)}else{if(t.isOpaquePass!==(1===c[3]))return;var p=i([{name:\"u_color\",components:4},{name:\"u_opacity\",components:1}]);o=t.useProgram(\"fill\",[],p,p),s.uniform4fv(o.u_color,c),s.uniform1f(o.u_opacity,f),t.tileExtentVAO.bind(s,o,t.tileExtentBuffer)}s.disable(s.STENCIL_TEST);for(var m=l.coveringTiles({tileSize:a}),g=0;g<m.length;g++){var v=m[g];if(h&&d){var y={coord:v,tileSize:a};s.uniform1f(o.u_tile_units_to_pixels,1/n(y,1,t.transform.tileZoom));var x=y.tileSize*Math.pow(2,t.transform.tileZoom-y.coord.z),b=x*(y.coord.x+v.w*Math.pow(2,y.coord.z)),_=x*y.coord.y;s.uniform2f(o.u_pixel_coord_upper,b>>16,_>>16),s.uniform2f(o.u_pixel_coord_lower,65535&b,65535&_)}s.uniformMatrix4fv(o.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)}},{\"../source/pixels_to_tile_units\":354,\"./create_uniform_pragmas\":335}],337:[function(t,e,r){\"use strict\";var n=t(\"../util/browser\");e.exports=function(t,e,r,i){if(!t.isOpaquePass){var a=t.gl;t.setDepthSublayer(0),t.depthMask(!1),a.disable(a.STENCIL_TEST);for(var o=0;o<i.length;o++){var s=i[o],l=e.getTile(s),c=l.getBucket(r);if(c){var u=c.bufferGroups.circle;if(u){var f=c.paintAttributes.circle[r.id],h=t.useProgram(\"circle\",f.defines,f.vertexPragmas,f.fragmentPragmas);\"map\"===r.paint[\"circle-pitch-scale\"]?(a.uniform1i(h.u_scale_with_map,!0),a.uniform2f(h.u_extrude_scale,t.transform.pixelsToGLUnits[0]*t.transform.altitude,t.transform.pixelsToGLUnits[1]*t.transform.altitude)):(a.uniform1i(h.u_scale_with_map,!1),a.uniform2fv(h.u_extrude_scale,t.transform.pixelsToGLUnits)),a.uniform1f(h.u_devicepixelratio,n.devicePixelRatio),a.uniformMatrix4fv(h.u_matrix,!1,t.translatePosMatrix(s.posMatrix,l,r.paint[\"circle-translate\"],r.paint[\"circle-translate-anchor\"])),c.setUniforms(a,\"circle\",h,r,{zoom:t.transform.zoom});for(var d=0;d<u.length;d++){var p=u[d];p.vaos[r.id].bind(a,h,p.layoutVertexBuffer,p.elementBuffer,p.paintVertexBuffers[r.id]),a.drawElements(a.TRIANGLES,3*p.elementBuffer.length,a.UNSIGNED_SHORT,0)}}}}}}},{\"../util/browser\":417}],338:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=t.gl;i.enable(i.STENCIL_TEST);for(var a=t.useProgram(\"collisionbox\"),o=0;o<n.length;o++){var s=n[o],l=e.getTile(s),c=l.getBucket(r);if(c){var u=c.bufferGroups.collisionBox;if(u&&u.length){var f=u[0];0!==f.layoutVertexBuffer.length&&(i.uniformMatrix4fv(a.u_matrix,!1,s.posMatrix),t.enableTileClippingMask(s),t.lineWidth(1),i.uniform1f(a.u_scale,Math.pow(2,t.transform.zoom-l.coord.z)),i.uniform1f(a.u_zoom,10*t.transform.zoom),i.uniform1f(a.u_maxzoom,10*(l.coord.z+1)),f.vaos[r.id].bind(i,a,f.layoutVertexBuffer),i.drawArrays(i.LINES,0,f.layoutVertexBuffer.length))}}}}},{}],339:[function(t,e,r){\"use strict\";var n=t(\"../lib/debugtext\"),i=t(\"../util/browser\"),a=t(\"gl-matrix\").mat4,o=t(\"../data/bucket\").EXTENT,s=t(\"../data/buffer\"),l=t(\"./vertex_array_object\");e.exports=function(t,e,r){if(!t.isOpaquePass&&t.options.debug)for(var c=0;c<r.length;c++)!function(t,e,r){var c=t.gl;c.disable(c.STENCIL_TEST),t.lineWidth(1*i.devicePixelRatio);var u=r.posMatrix,f=t.useProgram(\"debug\");c.uniformMatrix4fv(f.u_matrix,!1,u),c.uniform4f(f.u_color,1,0,0,1),t.debugVAO.bind(c,f,t.debugBuffer),c.drawArrays(c.LINE_STRIP,0,t.debugBuffer.length);for(var h=n(r.toString(),50,200,5),d=new t.PosArray,p=0;p<h.length;p+=2)d.emplaceBack(h[p],h[p+1]);var m=new s(d.serialize(),t.PosArray.serialize(),s.BufferType.VERTEX);(new l).bind(c,f,m),c.uniform4f(f.u_color,1,1,1,1);for(var g=e.getTile(r).tileSize,v=o/(Math.pow(2,t.transform.zoom-r.z)*g),y=[[-1,-1],[-1,1],[1,-1],[1,1]],x=0;x<y.length;x++){var b=y[x];c.uniformMatrix4fv(f.u_matrix,!1,a.translate([],u,[v*b[0],v*b[1],0])),c.drawArrays(c.LINES,0,m.length)}c.uniform4f(f.u_color,0,0,0,1),c.uniformMatrix4fv(f.u_matrix,!1,u),c.drawArrays(c.LINES,0,m.length)}(t,e,r[c])}},{\"../data/bucket\":320,\"../data/buffer\":325,\"../lib/debugtext\":333,\"../util/browser\":417,\"./vertex_array_object\":348,\"gl-matrix\":198}],340:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,o){var s=a.gl,l=a.spriteAtlas.getPosition(t.from,!0),c=a.spriteAtlas.getPosition(t.to,!0);if(l&&c){s.uniform1i(o.u_image,0),s.uniform2fv(o.u_pattern_tl_a,l.tl),s.uniform2fv(o.u_pattern_br_a,l.br),s.uniform2fv(o.u_pattern_tl_b,c.tl),s.uniform2fv(o.u_pattern_br_b,c.br),s.uniform1f(o.u_opacity,e),s.uniform1f(o.u_mix,t.t),s.uniform1f(o.u_tile_units_to_pixels,1/i(r,1,a.transform.tileZoom)),s.uniform2fv(o.u_pattern_size_a,l.size),s.uniform2fv(o.u_pattern_size_b,c.size),s.uniform1f(o.u_scale_a,t.fromScale),s.uniform1f(o.u_scale_b,t.toScale);var u=r.tileSize*Math.pow(2,a.transform.tileZoom-r.coord.z),f=u*(r.coord.x+n.w*Math.pow(2,r.coord.z)),h=u*r.coord.y;s.uniform2f(o.u_pixel_coord_upper,f>>16,h>>16),s.uniform2f(o.u_pixel_coord_lower,65535&f,65535&h),s.activeTexture(s.TEXTURE0),a.spriteAtlas.bind(s,!0)}}var i=t(\"../source/pixels_to_tile_units\");e.exports=function(t,e,r,i){var a=t.gl;a.enable(a.STENCIL_TEST);var o;if(o=!r.paint[\"fill-pattern\"]&&r.isPaintValueFeatureConstant(\"fill-color\")&&r.isPaintValueFeatureConstant(\"fill-opacity\")&&1===r.paint[\"fill-color\"][3]&&1===r.paint[\"fill-opacity\"],t.isOpaquePass===o){t.setDepthSublayer(1);for(var s=0;s<i.length;s++)!function(t,e,r,i){var a=e.getTile(i),o=a.getBucket(r);if(o){var s=o.bufferGroups.fill;if(s){var l,c=t.gl,u=r.paint[\"fill-pattern\"];if(u)l=t.useProgram(\"pattern\"),n(u,r.paint[\"fill-opacity\"],a,i,t,l),c.activeTexture(c.TEXTURE0),t.spriteAtlas.bind(c,!0);else{var f=o.paintAttributes.fill[r.id];l=t.useProgram(\"fill\",f.defines,f.vertexPragmas,f.fragmentPragmas),o.setUniforms(c,\"fill\",l,r,{zoom:t.transform.zoom})}c.uniformMatrix4fv(l.u_matrix,!1,t.translatePosMatrix(i.posMatrix,a,r.paint[\"fill-translate\"],r.paint[\"fill-translate-anchor\"])),t.enableTileClippingMask(i);for(var h=0;h<s.length;h++){var d=s[h];d.vaos[r.id].bind(c,l,d.layoutVertexBuffer,d.elementBuffer,d.paintVertexBuffers[r.id]),c.drawElements(c.TRIANGLES,d.elementBuffer.length,c.UNSIGNED_SHORT,0)}}}}(t,e,r,i[s])}if(!t.isOpaquePass&&r.paint[\"fill-antialias\"]){t.lineWidth(2),t.depthMask(!1);var l=r.getPaintProperty(\"fill-outline-color\");!l&&r.paint[\"fill-pattern\"]||!l?t.setDepthSublayer(0):t.setDepthSublayer(2);for(var c=0;c<i.length;c++)!function(t,e,r,i){var a=e.getTile(i),o=a.getBucket(r);if(o){var s,l=t.gl,c=o.bufferGroups.fill,u=r.paint[\"fill-pattern\"],f=r.paint[\"fill-opacity\"],h=r.getPaintProperty(\"fill-outline-color\");if(u&&!h)s=t.useProgram(\"outlinepattern\"),l.uniform2f(s.u_world,l.drawingBufferWidth,l.drawingBufferHeight);else{var d=o.paintAttributes.fill[r.id];s=t.useProgram(\"outline\",d.defines,d.vertexPragmas,d.fragmentPragmas),l.uniform2f(s.u_world,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform1f(s.u_opacity,f),o.setUniforms(l,\"fill\",s,r,{zoom:t.transform.zoom})}l.uniformMatrix4fv(s.u_matrix,!1,t.translatePosMatrix(i.posMatrix,a,r.paint[\"fill-translate\"],r.paint[\"fill-translate-anchor\"])),u&&n(u,f,a,i,t,s),t.enableTileClippingMask(i);for(var p=0;p<c.length;p++){var m=c[p];m.secondVaos[r.id].bind(l,s,m.layoutVertexBuffer,m.elementBuffer2,m.paintVertexBuffers[r.id]),l.drawElements(l.LINES,2*m.elementBuffer2.length,l.UNSIGNED_SHORT,0)}}}(t,e,r,i[c])}}},{\"../source/pixels_to_tile_units\":354}],341:[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,c=r.paint[\"line-blur\"]+l,u=r.paint[\"line-color\"],f=t.transform,h=i.create();i.scale(h,h,[1,Math.cos(f._pitch)]),i.rotate(h,h,t.transform.angle);var d,p,m,g,v,y=Math.sqrt(f.height*f.height/4*(1+f.altitude*f.altitude)),x=(y+f.height/2*Math.tan(f._pitch))/y-1,b=r.paint[\"line-dasharray\"],_=r.paint[\"line-pattern\"];if(b)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,c),s.uniform4fv(d.u_color,u),s.uniform1f(d.u_opacity,r.paint[\"line-opacity\"]),p=t.lineAtlas.getDash(b.from,\"round\"===r.layout[\"line-cap\"]),m=t.lineAtlas.getDash(b.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,b.t),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint[\"line-offset\"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,h);else if(_){if(g=t.spriteAtlas.getPosition(_.from,!0),v=t.spriteAtlas.getPosition(_.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,c),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,_.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,h)}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,c),s.uniform1f(d.u_extra,x),s.uniform1f(d.u_offset,-r.paint[\"line-offset\"]),s.uniformMatrix2fv(d.u_antialiasingmatrix,!1,h),s.uniform4fv(d.u_color,u),s.uniform1f(d.u_opacity,r.paint[\"line-opacity\"]);for(var w=0;w<o.length;w++){var M=o[w],k=e.getTile(M),A=k.getBucket(r);if(A){var T=A.bufferGroups.line;if(T){t.enableTileClippingMask(M);var S=t.translatePosMatrix(M.posMatrix,k,r.paint[\"line-translate\"],r.paint[\"line-translate-anchor\"]);s.uniformMatrix4fv(d.u_matrix,!1,S);var E=1/a(k,1,t.transform.zoom);if(b){var L=p.width*b.fromScale,C=m.width*b.toScale,z=[1/a(k,L,t.transform.tileZoom),-p.height/2],D=[1/a(k,C,t.transform.tileZoom),-m.height/2],I=t.lineAtlas.width/(256*Math.min(L,C)*n.devicePixelRatio)/2;s.uniform1f(d.u_ratio,E),s.uniform2fv(d.u_patternscale_a,z),s.uniform2fv(d.u_patternscale_b,D),s.uniform1f(d.u_sdfgamma,I)}else _?(s.uniform1f(d.u_ratio,E),s.uniform2fv(d.u_pattern_size_a,[a(k,g.size[0]*_.fromScale,t.transform.tileZoom),v.size[1]]),s.uniform2fv(d.u_pattern_size_b,[a(k,v.size[0]*_.toScale,t.transform.tileZoom),v.size[1]])):s.uniform1f(d.u_ratio,E);for(var P=0;P<T.length;P++){var O=T[P];O.vaos[r.id].bind(s,d,O.layoutVertexBuffer,O.elementBuffer),s.drawElements(s.TRIANGLES,3*O.elementBuffer.length,s.UNSIGNED_SHORT,0)}}}}}}}},{\"../source/pixels_to_tile_units\":354,\"../util/browser\":417,\"gl-matrix\":198}],342:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(!t.isOpaquePass){var a=t.gl;a.enable(a.DEPTH_TEST),t.depthMask(!0),a.depthFunc(a.LESS);for(var o=n.length&&n[0].z,s=0;s<n.length;s++){var l=n[s];t.setDepthSublayer(l.z-o),function(t,e,r,n){var a=t.gl;a.disable(a.STENCIL_TEST);var o=e.getTile(n),s=t.transform.calculatePosMatrix(n,e.maxzoom),l=t.useProgram(\"raster\");a.uniformMatrix4fv(l.u_matrix,!1,s),a.uniform1f(l.u_brightness_low,r.paint[\"raster-brightness-min\"]),a.uniform1f(l.u_brightness_high,r.paint[\"raster-brightness-max\"]),a.uniform1f(l.u_saturation_factor,function(t){return t>0?1-1/(1.001-t):-t}(r.paint[\"raster-saturation\"])),a.uniform1f(l.u_contrast_factor,function(t){return t>0?1/(1-t):1+t}(r.paint[\"raster-contrast\"])),a.uniform3fv(l.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint[\"raster-hue-rotate\"]));var c,u,f=o.source&&o.source.findLoadedParent(n,0,{}),h=function(t,e,r,n){var a=[1,0],o=r.paint[\"raster-fade-duration\"];if(t.source&&o>0){var s=(new Date).getTime(),l=(s-t.timeAdded)/o,c=e?(s-e.timeAdded)/o:-1,u=n.coveringZoomLevel(t.source),f=!!e&&Math.abs(e.coord.z-u)>Math.abs(t.coord.z-u);!e||f?(a[0]=i.clamp(l,0,1),a[1]=1-a[0]):(a[0]=i.clamp(1-c,0,1),a[1]=1-a[0])}var h=r.paint[\"raster-opacity\"];return a[0]*=h,a[1]*=h,a}(o,f,r,t.transform);a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o.texture),a.activeTexture(a.TEXTURE1),f?(a.bindTexture(a.TEXTURE_2D,f.texture),c=Math.pow(2,f.coord.z-o.coord.z),u=[o.coord.x*c%1,o.coord.y*c%1]):(a.bindTexture(a.TEXTURE_2D,o.texture),h[1]=0);a.uniform2fv(l.u_tl_parent,u||[0,0]),a.uniform1f(l.u_scale_parent,c||1),a.uniform1f(l.u_buffer_scale,1),a.uniform1f(l.u_opacity0,h[0]),a.uniform1f(l.u_opacity1,h[1]),a.uniform1i(l.u_image0,0),a.uniform1i(l.u_image1,1);var d=o.boundsBuffer||t.rasterBoundsBuffer;(o.boundsVAO||t.rasterBoundsVAO).bind(a,l,d),a.drawArrays(a.TRIANGLE_STRIP,0,d.length)}(t,e,r,l)}a.depthFunc(a.LEQUAL)}}var i=t(\"../util/util\"),a=t(\"../util/struct_array\");e.exports=n,n.RasterBoundsArray=new a({members:[{name:\"a_pos\",type:\"Int16\",components:2},{name:\"a_texture_pos\",type:\"Int16\",components:2}]})},{\"../util/struct_array\":431,\"../util/util\":433}],343:[function(t,e,r){\"use strict\";function n(t,e,r,n,a,s,l,c,u,f,h,d,p,m,g){for(var v=0;v<n.length;v++){var y=e.getTile(n[v]),x=y.getBucket(r);if(x){var b=x.bufferGroups,_=a?b.glyph:b.icon;_.length&&(t.enableTileClippingMask(n[v]),function(t,e,r,n,a,s,l,c,u,f,h,d,p,m,g,v,y,x,b,_,w){var M,k,A,T=t.gl,S=t.transform,E=\"map\"===m,L=\"map\"===g,C=l?24:1,z=v/C;L?(k=o(n,1,t.transform.zoom)*z,A=1/Math.cos(S._pitch),M=[k,k]):(k=t.transform.altitude*z,A=1,M=[S.pixelsToGLUnits[0]*k,S.pixelsToGLUnits[1]*k]);if(!l&&!t.style.sprite.loaded())return;var D=t.useProgram(c?\"sdf\":\"icon\");if(T.uniformMatrix4fv(D.u_matrix,!1,t.translatePosMatrix(r,n,d,p)),T.uniform1i(D.u_rotate_with_map,E),T.uniform1i(D.u_pitch_with_map,L),T.uniform2fv(D.u_extrude_scale,M),T.activeTexture(T.TEXTURE0),T.uniform1i(D.u_texture,0),l){var I=h&&t.glyphSource.getGlyphAtlas(h);if(!I)return;I.updateTexture(T),T.uniform2f(D.u_texsize,I.width/4,I.height/4)}else{var P=t.options.rotating||t.options.zooming,O=1!==z||i.devicePixelRatio!==t.spriteAtlas.pixelRatio||u,F=L||t.transform.pitch;t.spriteAtlas.bind(T,c||P||O||F),T.uniform2f(D.u_texsize,t.spriteAtlas.width/4,t.spriteAtlas.height/4)}var R=Math.log(v/f)/Math.LN2||0;T.uniform1f(D.u_zoom,10*(t.transform.zoom-R)),T.activeTexture(T.TEXTURE1),t.frameHistory.bind(T),T.uniform1i(D.u_fadetexture,1);var N;if(c){var j=.105*C/v/i.devicePixelRatio;if(y){T.uniform1f(D.u_gamma,(1.19*b/z/8+j)*A),T.uniform4fv(D.u_color,x),T.uniform1f(D.u_opacity,_),T.uniform1f(D.u_buffer,(6-y/z)/8);for(var B=0;B<s.length;B++)(N=s[B]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}T.uniform1f(D.u_gamma,j*A),T.uniform4fv(D.u_color,w),T.uniform1f(D.u_opacity,_),T.uniform1f(D.u_buffer,.75),T.uniform1f(D.u_pitch,S.pitch/360*2*Math.PI),T.uniform1f(D.u_bearing,S.bearing/360*2*Math.PI),T.uniform1f(D.u_aspect_ratio,S.width/S.height);for(var U=0;U<s.length;U++)(N=s[U]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}else{T.uniform1f(D.u_opacity,_);for(var V=0;V<s.length;V++)(N=s[V]).vaos[e.id].bind(T,D,N.layoutVertexBuffer,N.elementBuffer),T.drawElements(T.TRIANGLES,3*N.elementBuffer.length,T.UNSIGNED_SHORT,0)}}(t,r,n[v].posMatrix,y,0,_,a,a||x.sdfIcons,!a&&x.iconsNeedLinear,a?x.adjustedTextSize:x.adjustedIconSize,x.fontstack,s,l,c,u,f,h,d,p,m,g))}}}var i=t(\"../util/browser\"),a=t(\"./draw_collision_debug\"),o=t(\"../source/pixels_to_tile_units\");e.exports=function(t,e,r,i){if(!t.isOpaquePass){var o=!(r.layout[\"text-allow-overlap\"]||r.layout[\"icon-allow-overlap\"]||r.layout[\"text-ignore-placement\"]||r.layout[\"icon-ignore-placement\"]),s=t.gl;o?s.disable(s.STENCIL_TEST):s.enable(s.STENCIL_TEST),t.setDepthSublayer(0),t.depthMask(!1),s.disable(s.DEPTH_TEST),n(t,e,r,i,!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\"]),n(t,e,r,i,!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\"]),s.enable(s.DEPTH_TEST),e.map.showCollisionBoxes&&a(t,e,r,i)}}},{\"../source/pixels_to_tile_units\":354,\"../util/browser\":417,\"./draw_collision_debug\":338}],344:[function(t,e,r){\"use strict\";function n(){this.changeTimes=new Float64Array(256),this.changeOpacities=new Uint8Array(256),this.opacities=new Uint8ClampedArray(256),this.array=new Uint8Array(this.opacities.buffer),this.fadeDuration=300,this.previousZoom=0,this.firstFrame=!0}e.exports=n,n.prototype.record=function(t){var e=Date.now();this.firstFrame&&(e=0,this.firstFrame=!1);var r;if((t=Math.floor(10*t))<this.previousZoom)for(r=t+1;r<=this.previousZoom;r++)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];else for(r=t;r>this.previousZoom;r--)this.changeTimes[r]=e,this.changeOpacities[r]=this.opacities[r];for(r=0;r<256;r++){var n=(e-this.changeTimes[r])/this.fadeDuration*255;this.opacities[r]=r<=t?this.changeOpacities[r]+n:this.changeOpacities[r]-n}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))}},{}],345:[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;o<t.length;o++)a+=t[o];for(var s=this.width/a,l=s/2,c=t.length%2==1,u=-r;u<=r;u++)for(var f=this.nextRow+r+u,h=this.width*f,d=c?-t[t.length-1]:0,p=t[0],m=1,g=0;g<this.width;g++){for(;p<g/s;)d=p,p+=t[m],c&&m===t.length-1&&(p+=t[0]),m++;var v,y=Math.abs(g-d*s),x=Math.abs(g-p*s),b=Math.min(y,x),_=m%2==1;if(e){var w=r?u/r*(l+1):0;if(_){var M=l-Math.abs(w);v=Math.sqrt(b*b+M*M)}else v=l-Math.sqrt(b*b+w*w)}else v=(_?1:-1)*b;this.data[3+4*(h+g)]=Math.max(0,Math.min(255,v+128))}var k={y:(this.nextRow+r+.5)/this.height,height:2*r/this.height,width:a};return this.nextRow+=n,this.dirty=!0,k},n.prototype.bind=function(t){this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),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,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))}},{\"../util/util\":433}],346:[function(t,e,r){\"use strict\";function n(t,e){this.gl=t,this.transform=e,this.reusableTextures={},this.preFbos={},this.frameHistory=new o,this.setup(),this.numSublayers=s.maxUnderzooming+s.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.lineWidthRange=t.getParameter(t.ALIASED_LINE_WIDTH_RANGE)}var i=t(\"../util/browser\"),a=t(\"gl-matrix\").mat4,o=t(\"./frame_history\"),s=t(\"../source/source_cache\"),l=t(\"../data/bucket\").EXTENT,c=t(\"../source/pixels_to_tile_units\"),u=t(\"../util/util\"),f=t(\"../util/struct_array\"),h=t(\"../data/buffer\"),d=t(\"./vertex_array_object\"),p=t(\"./draw_raster\").RasterBoundsArray,m=t(\"./create_uniform_pragmas\");e.exports=n,u.extend(n.prototype,t(\"./painter/use_program\")),n.prototype.resize=function(t,e){var r=this.gl;this.width=t*i.devicePixelRatio,this.height=e*i.devicePixelRatio,r.viewport(0,0,this.width,this.height)},n.prototype.setup=function(){var t=this.gl;t.verbose=!0,t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.enable(t.STENCIL_TEST),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),this._depthMask=!1,t.depthMask(!1);var e=this.PosArray=new f({members:[{name:\"a_pos\",type:\"Int16\",components:2}]}),r=new e;r.emplaceBack(0,0),r.emplaceBack(l,0),r.emplaceBack(0,l),r.emplaceBack(l,l),this.tileExtentBuffer=new h(r.serialize(),e.serialize(),h.BufferType.VERTEX),this.tileExtentVAO=new d,this.tileExtentPatternVAO=new d;var n=new e;n.emplaceBack(0,0),n.emplaceBack(l,0),n.emplaceBack(l,l),n.emplaceBack(0,l),n.emplaceBack(0,0),this.debugBuffer=new h(n.serialize(),e.serialize(),h.BufferType.VERTEX),this.debugVAO=new d;var i=new p;i.emplaceBack(0,0,0,0),i.emplaceBack(l,0,32767,0),i.emplaceBack(0,l,0,32767),i.emplaceBack(l,l,32767,32767),this.rasterBoundsBuffer=new h(i.serialize(),p.serialize(),h.BufferType.VERTEX),this.rasterBoundsVAO=new d},n.prototype.clearColor=function(){var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},n.prototype.clearStencil=function(){var t=this.gl;t.clearStencil(0),t.stencilMask(255),t.clear(t.STENCIL_BUFFER_BIT)},n.prototype.clearDepth=function(){var t=this.gl;t.clearDepth(1),this.depthMask(!0),t.clear(t.DEPTH_BUFFER_BIT)},n.prototype._renderTileClippingMasks=function(t){var e=this.gl;e.colorMask(!1,!1,!1,!1),this.depthMask(!1),e.disable(e.DEPTH_TEST),e.enable(e.STENCIL_TEST),e.stencilMask(248),e.stencilOp(e.KEEP,e.KEEP,e.REPLACE);var r=1;this._tileClippingMaskIDs={};for(var n=0;n<t.length;n++){var i=t[n],a=this._tileClippingMaskIDs[i.id]=r++<<3;e.stencilFunc(e.ALWAYS,a,248);var o=m([{name:\"u_color\",components:4},{name:\"u_opacity\",components:1}]),s=this.useProgram(\"fill\",[],o,o);e.uniformMatrix4fv(s.u_matrix,!1,i.posMatrix),this.tileExtentVAO.bind(e,s,this.tileExtentBuffer),e.drawArrays(e.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}e.stencilMask(0),e.colorMask(!0,!0,!0,!0),this.depthMask(!0),e.enable(e.DEPTH_TEST)},n.prototype.enableTileClippingMask=function(t){var e=this.gl;e.stencilFunc(e.EQUAL,this._tileClippingMaskIDs[t.id],248)},n.prototype.prepareBuffers=function(){},n.prototype.bindDefaultFramebuffer=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)};var g={symbol:t(\"./draw_symbol\"),circle:t(\"./draw_circle\"),line:t(\"./draw_line\"),fill:t(\"./draw_fill\"),raster:t(\"./draw_raster\"),background:t(\"./draw_background\"),debug:t(\"./draw_debug\")};n.prototype.render=function(t,e){this.style=t,this.options=e,this.lineAtlas=t.lineAtlas,this.spriteAtlas=t.spriteAtlas,this.spriteAtlas.setSprite(t.sprite),this.glyphSource=t.glyphSource,this.frameHistory.record(this.transform.zoom),this.prepareBuffers(),this.clearColor(),this.clearDepth(),this.showOverdrawInspector(e.showOverdrawInspector),this.depthRange=(t._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass({isOpaquePass:!0}),this.renderPass({isOpaquePass:!1})},n.prototype.renderPass=function(t){var e=this.style._groups,r=t.isOpaquePass;this.currentLayer=r?this.style._order.length:-1;for(var n=0;n<e.length;n++){var i,a=e[r?e.length-1-n:n],o=this.style.sources[a.source],s=[];if(o){for(s=o.getVisibleCoordinates(),i=0;i<s.length;i++)s[i].posMatrix=this.transform.calculatePosMatrix(s[i],o.maxzoom);this.clearStencil(),o.prepare&&o.prepare(),o.isTileClipped&&this._renderTileClippingMasks(s)}for(r?(this._showOverdrawInspector||this.gl.disable(this.gl.BLEND),this.isOpaquePass=!0):(this.gl.enable(this.gl.BLEND),this.isOpaquePass=!1,s.reverse()),i=0;i<a.length;i++){var l=a[r?a.length-1-i:i];this.currentLayer+=r?-1:1,this.renderLayer(this,o,l,s)}o&&g.debug(this,o,s)}},n.prototype.depthMask=function(t){t!==this._depthMask&&(this._depthMask=t,this.gl.depthMask(t))},n.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||(\"background\"===r.type||n.length)&&(this.id=r.id,g[r.type](t,e,r,n))},n.prototype.setDepthSublayer=function(t){var e=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,r=e-1+this.depthRange;this.gl.depthRange(r,e)},n.prototype.translatePosMatrix=function(t,e,r,n){if(!r[0]&&!r[1])return t;if(\"viewport\"===n){var i=Math.sin(-this.transform.angle),o=Math.cos(-this.transform.angle);r=[r[0]*o-r[1]*i,r[0]*i+r[1]*o]}var s=[c(e,r[0],this.transform.zoom),c(e,r[1],this.transform.zoom),0],l=new Float32Array(16);return a.translate(l,t,s),l},n.prototype.saveTexture=function(t){var e=this.reusableTextures[t.size];e?e.push(t):this.reusableTextures[t.size]=[t]},n.prototype.getTexture=function(t){var e=this.reusableTextures[t];return e&&e.length>0?e.pop():null},n.prototype.lineWidth=function(t){this.gl.lineWidth(u.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\":320,\"../data/buffer\":325,\"../source/pixels_to_tile_units\":354,\"../source/source_cache\":358,\"../util/browser\":417,\"../util/struct_array\":431,\"../util/util\":433,\"./create_uniform_pragmas\":335,\"./draw_background\":336,\"./draw_circle\":337,\"./draw_debug\":339,\"./draw_fill\":340,\"./draw_line\":341,\"./draw_raster\":342,\"./draw_symbol\":343,\"./frame_history\":344,\"./painter/use_program\":347,\"./vertex_array_object\":348,\"gl-matrix\":198}],347:[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 c=this.gl,u=c.createProgram(),f=o[t],h=\"#define MAPBOX_GL_JS;\\n\",d=0;d<e.length;d++)h+=\"#define \"+e[d]+\";\\n\";var p=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(p,n(h+f.fragmentSource,l)),c.compileShader(p),i(c.getShaderParameter(p,c.COMPILE_STATUS),c.getShaderInfoLog(p)),c.attachShader(u,p);var m=c.createShader(c.VERTEX_SHADER);c.shaderSource(m,n(h+s+f.vertexSource,r)),c.compileShader(m),i(c.getShaderParameter(m,c.COMPILE_STATUS),c.getShaderInfoLog(m)),c.attachShader(u,m),c.linkProgram(u),i(c.getProgramParameter(u,c.LINK_STATUS),c.getProgramInfoLog(u));for(var g={},v=c.getProgramParameter(u,c.ACTIVE_ATTRIBUTES),y=0;y<v;y++){var x=c.getActiveAttrib(u,y);g[x.name]=c.getAttribLocation(u,x.name)}for(var b={},_=c.getProgramParameter(u,c.ACTIVE_UNIFORMS),w=0;w<_;w++){var M=c.getActiveUniform(u,w);b[M.name]=c.getUniformLocation(u,M.name)}return a.extend({program:u,definition:f,attributes:g,numAttributes:v},g,b)},e.exports._createProgramCached=function(t,e,r,n){this.cache=this.cache||{};var i=JSON.stringify({name:t,defines:e,vertexPragmas:r,fragmentPragmas:n});return this.cache[i]||(this.cache[i]=this._createProgram(t,e,r,n)),this.cache[i]},e.exports.useProgram=function(t,e,r,n){var i=this.gl;e=e||[],this._showOverdrawInspector&&(e=e.concat(\"OVERDRAW_INSPECTOR\"));var a=this._createProgramCached(t,e,r,n);return this.currentProgram!==a&&(i.useProgram(a.program),this.currentProgram=a),a}},{\"../../util/util\":433,assert:51,\"mapbox-gl-shaders\":294}],348:[function(t,e,r){\"use strict\";function n(){this.boundProgram=null,this.boundVertexBuffer=null,this.boundVertexBuffer2=null,this.boundElementBuffer=null,this.vao=null}var i=t(\"assert\");e.exports=n,n.prototype.bind=function(t,e,r,n,i){void 0===t.extVertexArrayObject&&(t.extVertexArrayObject=t.getExtension(\"OES_vertex_array_object\"));var a=!this.vao||this.boundProgram!==e||this.boundVertexBuffer!==r||this.boundVertexBuffer2!==i||this.boundElementBuffer!==n;!t.extVertexArrayObject||a?this.freshBind(t,e,r,n,i):t.extVertexArrayObject.bindVertexArrayOES(this.vao)},n.prototype.freshBind=function(t,e,r,n,a){var o,s=e.numAttributes;if(t.extVertexArrayObject)this.vao&&this.destroy(t),this.vao=t.extVertexArrayObject.createVertexArrayOES(),t.extVertexArrayObject.bindVertexArrayOES(this.vao),o=0,this.boundProgram=e,this.boundVertexBuffer=r,this.boundVertexBuffer2=a,this.boundElementBuffer=n;else{o=t.currentNumAttributes||0;for(var l=s;l<o;l++)i(0!==l),t.disableVertexAttribArray(l)}for(var c=o;c<s;c++)t.enableVertexAttribArray(c);r.bind(t),r.setVertexAttribPointers(t,e),a&&(a.bind(t),a.setVertexAttribPointers(t,e)),n&&n.bind(t),t.currentNumAttributes=s},n.prototype.unbind=function(t){var e=t.extVertexArrayObject;e&&e.bindVertexArrayOES(null)},n.prototype.destroy=function(t){var e=t.extVertexArrayObject;e&&this.vao&&(e.deleteVertexArrayOES(this.vao),this.vao=null)}},{assert:51}],349:[function(t,e,r){\"use strict\";function n(t,e,r){e=e||{},this.id=t,this.dispatcher=r,this._data=e.data,void 0!==e.maxzoom&&(this.maxzoom=e.maxzoom),e.type&&(this.type=e.type);var n=s/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:e.cluster||!1,geojsonVtOptions:{buffer:(void 0!==e.buffer?e.buffer:128)*n,tolerance:(void 0!==e.tolerance?e.tolerance:.375)*n,extent:s,maxZoom:this.maxzoom},superclusterOptions:{maxZoom:Math.min(e.clusterMaxZoom,this.maxzoom-1)||this.maxzoom-1,extent:s,radius:(e.clusterRadius||50)*n,log:!1}},e.workerOptions),this._updateWorkerData(function(t){t?this.fire(\"error\",{error:t}):this.fire(\"load\")}.bind(this))}var i=t(\"../util/evented\"),a=t(\"../util/util\"),o=t(\"resolve-url\"),s=t(\"../data/bucket\").EXTENT;e.exports=n,n.prototype=a.inherit(i,{type:\"geojson\",minzoom:0,maxzoom:18,tileSize:512,isTileClipped:!0,reparseOverscaled:!0,onAdd:function(t){this.map=t},setData:function(t){return this._data=t,this._updateWorkerData(function(t){if(t)return this.fire(\"error\",{error:t});this.fire(\"change\")}.bind(this)),this},_updateWorkerData:function(t){var e=a.extend({},this.workerOptions),r=this._data;\"string\"==typeof r?e.url=\"undefined\"!=typeof window?o(window.location.href,r):r:e.data=JSON.stringify(r),this.workerID=this.dispatcher.send(this.type+\".loadData\",e,function(e){this._loaded=!0,t(e)}.bind(this))},loadTile:function(t,e){var r=t.coord.z>this.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\":320,\"../util/evented\":425,\"../util/util\":433,\"resolve-url\":508}],350:[function(t,e,r){\"use strict\";function n(t,e,r){r&&(this.loadGeoJSON=r),f.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\"),c=t(\"supercluster\"),u=t(\"geojson-vt\"),f=t(\"./vector_tile_worker_source\");e.exports=n,n.prototype=i.inherit(f,{_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,c(e.superclusterOptions).load(t.features)):r(null,u(t,e.geojsonVtOptions))}catch(t){return r(t)}}})},{\"../util/ajax\":416,\"../util/util\":433,\"./geojson_wrapper\":351,\"./vector_tile_worker_source\":362,\"geojson-rewind\":147,\"geojson-vt\":151,supercluster:538,\"vt-pbf\":570}],351:[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;e<t.geometry.length;e++)this.rawGeometry.push([t.geometry[e]])}else this.rawGeometry=t.geometry;this.properties=t.tags,this.extent=s}var a=t(\"point-geometry\"),o=t(\"vector-tile\").VectorTileFeature,s=t(\"../data/bucket\").EXTENT;e.exports=n,n.prototype.feature=function(t){return new i(this.features[t])},i.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new a(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},i.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},i.prototype.toGeoJSON=o.prototype.toGeoJSON},{\"../data/bucket\":320,\"point-geometry\":477,\"vector-tile\":564}],352:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r,this.url=e.url,this.coordinates=e.coordinates,c.getImage(e.url,function(t,r){if(t)return this.fire(\"error\",{error:t});this.image=r,this.image.addEventListener(\"load\",function(){this.map._rerender()}.bind(this)),this._loaded=!0,this.fire(\"load\"),this.map&&this.setCoordinates(e.coordinates)}.bind(this))}var i=t(\"../util/util\"),a=t(\"./tile_coord\"),o=t(\"../geo/lng_lat\"),s=t(\"point-geometry\"),l=t(\"../util/evented\"),c=t(\"../util/ajax\"),u=t(\"../data/bucket\").EXTENT,f=t(\"../render/draw_raster\").RasterBoundsArray,h=t(\"../data/buffer\"),d=t(\"../render/vertex_array_object\");e.exports=n,n.prototype=i.inherit(l,{minzoom:0,maxzoom:22,tileSize:512,onAdd:function(t){this.map=t,this.image&&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)*u),Math.round((e.row-n.row)*u))}),this.fire(\"change\"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new f;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 h(e.serialize(),f.serialize(),h.BufferType.VERTEX),this.tile.boundsVAO=new d,this.tile.state=\"loaded\"},prepare:function(){if(this._loaded&&this.image&&this.image.complete&&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.image)):(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.image))}},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:\"image\",urls:this.url,coordinates:this.coordinates}}})},{\"../data/bucket\":320,\"../data/buffer\":325,\"../geo/lng_lat\":330,\"../render/draw_raster\":342,\"../render/vertex_array_object\":348,\"../util/ajax\":416,\"../util/evented\":425,\"../util/util\":433,\"./tile_coord\":360,\"point-geometry\":477}],353:[function(t,e,r){\"use strict\";var n=t(\"../util/util\"),i=t(\"../util/ajax\"),a=t(\"../util/browser\"),o=t(\"../util/mapbox\").normalizeSourceURL;e.exports=function(t,e){var r=function(t,r){if(t)return e(t);var i=n.pick(r,[\"tiles\",\"minzoom\",\"maxzoom\",\"attribution\"]);r.vector_layers&&(i.vectorLayers=r.vector_layers,i.vectorLayerIds=i.vectorLayers.map(function(t){return t.id})),e(null,i)};t.url?i.getJSON(o(t.url),r):a.frame(r.bind(null,null,t))}},{\"../util/ajax\":416,\"../util/browser\":417,\"../util/mapbox\":430,\"../util/util\":433}],354:[function(t,e,r){\"use strict\";var n=t(\"../data/bucket\");e.exports=function(t,e,r){return e*(n.EXTENT/(t.tileSize*Math.pow(2,r-t.coord.z)))}},{\"../data/bucket\":320}],355:[function(t,e,r){\"use strict\";function n(t,e){var r=t.coord,n=e.coord;return r.z-n.z||r.y-n.y||r.w-n.w||r.x-n.x}var i=t(\"./tile_coord\");r.rendered=function(t,e,r,i,a,o){var s=t.tilesIn(r);s.sort(n);for(var l=[],c=0;c<s.length;c++){var u=s[c];u.tile.featureIndex&&l.push(u.tile.featureIndex.query({queryGeometry:u.queryGeometry,scale:u.scale,tileSize:u.tile.tileSize,bearing:o,params:i},e))}return function(t){for(var e=t[0]||{},r=1;r<t.length;r++){var n=t[r];for(var i in n){var a=n[i],o=e[i];if(void 0===o)o=e[i]=a;else for(var s=0;s<a.length;s++)o.push(a[s])}}return e}(l)},r.source=function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),n=[],a={},o=0;o<r.length;o++){var s=r[o],l=new i(Math.min(s.sourceMaxZoom,s.coord.z),s.coord.x,s.coord.y,0).id;a[l]||(a[l]=!0,s.querySourceFeatures(n,e))}return n}},{\"./tile_coord\":360}],356:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r,i.extend(this,i.pick(e,[\"url\",\"scheme\",\"tileSize\"])),s(e,function(t,e){if(t)return this.fire(\"error\",t);i.extend(this,e),this.fire(\"load\")}.bind(this))}var i=t(\"../util/util\"),a=t(\"../util/ajax\"),o=t(\"../util/evented\"),s=t(\"./load_tilejson\"),l=t(\"../util/mapbox\").normalizeTileURL;e.exports=n,n.prototype=i.inherit(o,{minzoom:0,maxzoom:22,roundZoom:!0,scheme:\"xyz\",tileSize:512,_loaded:!1,onAdd:function(t){this.map=t},serialize:function(){return{type:\"raster\",url:this.url,tileSize:this.tileSize}},loadTile:function(t,e){var r=l(t.coord.url(this.tiles,null,this.scheme),this.url,this.tileSize);t.request=a.getImage(r,function(r,n){if(delete t.request,!t.aborted){if(r)return e(r);var i=this.map.painter.gl;t.texture=this.map.painter.getTexture(n.width),t.texture?(i.bindTexture(i.TEXTURE_2D,t.texture),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,n)):(t.texture=i.createTexture(),i.bindTexture(i.TEXTURE_2D,t.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),t.texture.size=n.width),i.generateMipmap(i.TEXTURE_2D),this.map.animationLoop.set(this.map.style.rasterFadeDuration),t.state=\"loaded\",e(null)}}.bind(this))},abortTile:function(t){t.request&&(t.request.abort(),delete t.request)},unloadTile:function(t){t.texture&&this.map.painter.saveTexture(t.texture)}})},{\"../util/ajax\":416,\"../util/evented\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./load_tilejson\":353}],357:[function(t,e,r){\"use strict\";var n=t(\"../util/util\"),i={vector:t(\"../source/vector_tile_source\"),raster:t(\"../source/raster_tile_source\"),geojson:t(\"../source/geojson_source\"),video:t(\"../source/video_source\"),image:t(\"../source/image_source\")};r.create=function(t,e,r){if((e=new i[e.type](t,e,r)).id!==t)throw new Error(\"Expected Source id to be \"+t+\" instead of \"+e.id);return n.bindAll([\"load\",\"abort\",\"unload\",\"serialize\",\"prepare\"],e),e},r.getType=function(t){return i[t]},r.setType=function(t,e){i[t]=e}},{\"../source/geojson_source\":349,\"../source/image_source\":352,\"../source/raster_tile_source\":356,\"../source/vector_tile_source\":361,\"../source/video_source\":363,\"../util/util\":433}],358:[function(t,e,r){\"use strict\";function n(t,e,r){this.id=t,this.dispatcher=r;var n=this._source=o.create(t,e,r).on(\"load\",function(){this.map&&this._source.onAdd&&this._source.onAdd(this.map),this._sourceLoaded=!0,this.tileSize=n.tileSize,this.minzoom=n.minzoom,this.maxzoom=n.maxzoom,this.roundZoom=n.roundZoom,this.reparseOverscaled=n.reparseOverscaled,this.isTileClipped=n.isTileClipped,this.attribution=n.attribution,this.vectorLayerIds=n.vectorLayerIds,this.fire(\"load\")}.bind(this)).on(\"error\",function(t){this._sourceErrored=!0,this.fire(\"error\",t)}.bind(this)).on(\"change\",function(){this.reload(),this.transform&&this.update(this.transform,this.map&&this.map.style.rasterFadeDuration),this.fire(\"change\")}.bind(this));this._tiles={},this._cache=new u(0,this.unloadTile.bind(this)),this._isIdRenderable=this._isIdRenderable.bind(this)}function i(t,e,r){var n=r.zoomTo(Math.min(t.z,e));return{x:(n.column-(t.x+t.w*Math.pow(2,t.z)))*d,y:(n.row-t.y)*d}}function a(t,e){return t%32-e%32}var o=t(\"./source\"),s=t(\"./tile\"),l=t(\"../util/evented\"),c=t(\"./tile_coord\"),u=t(\"../util/lru_cache\"),f=t(\"../geo/coordinate\"),h=t(\"../util/util\"),d=t(\"../data/bucket\").EXTENT;e.exports=n,n.maxOverzooming=10,n.maxUnderzooming=3,n.prototype=h.inherit(l,{onAdd:function(t){this.map=t,this._source&&this._source.onAdd&&this._source.onAdd(t)},loaded:function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if(\"loaded\"!==e.state&&\"errored\"!==e.state)return!1}return!0},getSource:function(){return this._source},loadTile:function(t,e){return this._source.loadTile(t,e)},unloadTile:function(t){if(this._source.unloadTile)return this._source.unloadTile(t)},abortTile:function(t){if(this._source.abortTile)return this._source.abortTile(t)},serialize:function(){return this._source.serialize()},prepare:function(){if(this._sourceLoaded&&this._source.prepare)return this._source.prepare()},getIds:function(){return Object.keys(this._tiles).map(Number).sort(a)},getRenderableIds:function(){return this.getIds().filter(this._isIdRenderable)},_isIdRenderable:function(t){return this._tiles[t].isRenderable()&&!this._coveredTiles[t]},reload:function(){this._cache.reset();for(var t in this._tiles){var e=this._tiles[t];\"loading\"!==e.state&&(e.state=\"reloading\"),this.loadTile(this._tiles[t],this._tileLoaded.bind(this,this._tiles[t]))}},_tileLoaded:function(t,e){if(e)return t.state=\"errored\",this.fire(\"tile.error\",{tile:t,error:e}),void this._source.fire(\"tile.error\",{tile:t,error:e});t.source=this,t.timeAdded=(new Date).getTime(),this.fire(\"tile.load\",{tile:t}),this._source.fire(\"tile.load\",{tile:t})},getTile:function(t){return this.getTileByID(t.id)},getTileByID:function(t){return this._tiles[t]},getZoom:function(t){return t.zoom+t.scaleZoom(t.tileSize/this.tileSize)},findLoadedChildren:function(t,e,r){var n=!1;for(var i in this._tiles){var a=this._tiles[i];if(!(r[i]||!a.isRenderable()||a.coord.z<=t.z||a.coord.z>e)){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.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)*(Math.ceil(t.height/t.tileSize)+1);this._cache.setMaxSize(Math.floor(5*e))},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),u={},f=(new Date).getTime();this._coveredTiles={};var d=this.used?t.coveringTiles(this._source):[];for(r=0;r<d.length;r++)i=d[r],a=this.addTile(i),u[i.id]=!0,a.isRenderable()||this.findLoadedChildren(i,l,u)||this.findLoadedParent(i,s,u);for(var p={},m=Object.keys(u),g=0;g<m.length;g++){var v=m[g];i=c.fromID(v),(a=this._tiles[v])&&a.timeAdded>f-(e||0)&&(this.findLoadedChildren(i,l,u)&&(u[v]=!0),this.findLoadedParent(i,s,p))}var y;for(y in p)u[y]||(this._coveredTiles[y]=!0);for(y in p)u[y]=!0;var x=h.keysDifference(this._tiles,u);for(r=0;r<x.length;r++)this.removeTile(+x[r]);this.transform=t}},addTile:function(t){var e=this._tiles[t.id];if(e)return e;var r=t.wrapped();if((e=this._tiles[r.id])||(e=this._cache.get(r.id))&&this._redoPlacement&&this._redoPlacement(e),!e){var n=t.z,i=n>this.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,u=0;u<t.length;u++){var h=t[u];n=Math.min(n,h.column),a=Math.min(a,h.row),o=Math.max(o,h.column),s=Math.max(s,h.row)}for(var p=0;p<r.length;p++){var m=this._tiles[r[p]],g=c.fromID(r[p]),v=[i(g,m.sourceMaxZoom,new f(n,a,l)),i(g,m.sourceMaxZoom,new f(o,s,l))];if(v[0].x<d&&v[0].y<d&&v[1].x>=0&&v[1].y>=0){for(var y=[],x=0;x<t.length;x++)y.push(i(g,m.sourceMaxZoom,t[x]));var b=e[m.coord.id];void 0===b&&(b=e[m.coord.id]={tile:m,coord:g,queryGeometry:[],scale:Math.pow(2,this.transform.zoom-m.coord.z)}),b.queryGeometry.push(y)}}var _=[];for(var w in e)_.push(e[w]);return _},redoPlacement:function(){for(var t=this.getIds(),e=0;e<t.length;e++){this.getTileByID(t[e]).redoPlacement(this)}},getVisibleCoordinates:function(){return this.getRenderableIds().map(c.fromID)}})},{\"../data/bucket\":320,\"../geo/coordinate\":329,\"../util/evented\":425,\"../util/lru_cache\":429,\"../util/util\":433,\"./source\":357,\"./tile\":359,\"./tile_coord\":360}],359:[function(t,e,r){\"use strict\";function n(t,e,r){this.coord=t,this.uid=a.uniqueId(),this.uses=0,this.tileSize=e,this.sourceMaxZoom=r,this.buckets={},this.state=\"loading\"}function i(t,e){if(e){for(var r={},n=0;n<t.length;n++){var i=e.getLayer(t[n].layerId);if(i){var s=o.create(a.extend({layer:i,childLayers:t[n].childLayerIds.map(e.getLayer.bind(e)).filter(function(t){return t})},t[n]));r[s.id]=s}}return r}}var a=t(\"../util/util\"),o=t(\"../data/bucket\"),s=t(\"../data/feature_index\"),l=t(\"vector-tile\"),c=t(\"pbf\"),u=t(\"../util/vectortile_to_geojson\"),f=t(\"feature-filter\"),h=t(\"../symbol/collision_tile\"),d=t(\"../symbol/collision_box\"),p=t(\"../symbol/symbol_instances\"),m=t(\"../symbol/symbol_quads\");e.exports=n,n.prototype={loadVectorData:function(t,e){this.state=\"loaded\",t&&(this.collisionBoxArray=new d(t.collisionBoxArray),this.collisionTile=new h(t.collisionTile,this.collisionBoxArray),this.symbolInstancesArray=new p(t.symbolInstancesArray),this.symbolQuadsArray=new m(t.symbolQuadsArray),this.featureIndex=new s(t.featureIndex,t.rawTileData,this.collisionTile),this.rawTileData=t.rawTileData,this.buckets=i(t.buckets,e))},reloadSymbolData:function(t,e,r){if(\"unloaded\"!==this.state){this.collisionTile=new h(t.collisionTile,this.collisionBoxArray),this.featureIndex.setCollisionTile(this.collisionTile);for(var n in this.buckets){var o=this.buckets[n];\"symbol\"===o.type&&(o.destroy(e.gl),delete this.buckets[n])}a.extend(this.buckets,i(t.buckets,r))}},unloadVectorData:function(t){for(var e in this.buckets){this.buckets[e].destroy(t.gl)}this.collisionBoxArray=null,this.symbolQuadsArray=null,this.symbolInstancesArray=null,this.collisionTile=null,this.featureIndex=null,this.rawTileData=null,this.buckets=null,this.state=\"unloaded\"},redoPlacement:function(t){\"loaded\"===this.state&&\"reloading\"!==this.state?(this.state=\"reloading\",t.dispatcher.send(\"redo placement\",{uid:this.uid,source:t.id,angle:t.map.transform.angle,pitch:t.map.transform.pitch,showCollisionBoxes:t.map.showCollisionBoxes},function(e,r){this.reloadSymbolData(r,t.map.painter,t.map.style),t.fire(\"tile.load\",{tile:this}),this.state=\"loaded\",this.redoWhenDone&&(this.redoPlacement(t),this.redoWhenDone=!1)}.bind(this),this.workerID)):this.redoWhenDone=!0},getBucket:function(t){return this.buckets&&this.buckets[t.ref||t.id]},querySourceFeatures:function(t,e){if(this.rawTileData){this.vtLayers||(this.vtLayers=new l.VectorTile(new c(new Uint8Array(this.rawTileData))).layers);var r=this.vtLayers._geojsonTileLayer||this.vtLayers[e.sourceLayer];if(r)for(var n=f(e.filter),i={z:this.coord.z,x:this.coord.x,y:this.coord.y},a=0;a<r.length;a++){var o=r.feature(a);if(n(o)){var s=new u(o,this.coord.z,this.coord.x,this.coord.y);s.tile=i,t.push(s)}}}},isRenderable:function(){return\"loaded\"===this.state||\"reloading\"===this.state}}},{\"../data/bucket\":320,\"../data/feature_index\":327,\"../symbol/collision_box\":385,\"../symbol/collision_tile\":387,\"../symbol/symbol_instances\":396,\"../symbol/symbol_quads\":397,\"../util/util\":433,\"../util/vectortile_to_geojson\":434,\"feature-filter\":141,pbf:470,\"vector-tile\":564}],360:[function(t,e,r){\"use strict\";function n(t,e,r,n){s(!isNaN(t)&&t>=0&&t%1==0),s(!isNaN(e)&&e>=0&&e%1==0),s(!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<<this.z;this.id=32*(i*i*n+i*this.y+this.x)+this.z,this.posMatrix=null}function i(t,e){if(t.row>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 a(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.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,c=e.dx/e.dy,u=t.dx>0,f=e.dx<0,h=a;h<o;h++){var d=l*Math.max(0,Math.min(t.dy,h+u-t.y0))+t.x0,p=c*Math.max(0,Math.min(e.dy,h+f-e.y0))+e.x0;i(Math.floor(p),Math.ceil(d),h)}}function o(t,e,r,n,o,s){var l,c=i(t,e),u=i(e,r),f=i(r,t);c.dy>u.dy&&(l=c,c=u,u=l),c.dy>f.dy&&(l=c,c=f,f=l),u.dy>f.dy&&(l=u,u=f,f=l),c.dy&&a(f,c,n,o,s),u.dy&&a(f,u,n,o,s)}var s=t(\"assert\"),l=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<<e,i=(t-e)/32,a=i%r,o=(i-a)/r%r,s=Math.floor(i/(r*r));return s%2!=0&&(s=-1*s-1),s/=2,new n(e,a,o,s)},n.prototype.url=function(t,e,r){var n=l.getTileBBox(this.x,this.y,this.z),i=function(t,e,r){for(var n,i=\"\",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(\"{prefix}\",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(\"{z}\",Math.min(this.z,e||this.z)).replace(\"{x}\",this.x).replace(\"{y}\",\"tms\"===r?Math.pow(2,this.z)-this.y-1:this.y).replace(\"{quadkey}\",i).replace(\"{bbox-epsg-3857}\",n)},n.prototype.parent=function(t){return 0===this.z?null:this.z>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 o,l;if(i>=0&&i<=a)for(o=t;o<e;o++)l=new n(r,(o%a+a)%a,i,Math.floor(o/a)),s[l.id]=l}var a=1<<t,s={};return o(e[0],e[1],e[2],0,a,i),o(e[2],e[3],e[0],0,a,i),Object.keys(s).map(function(t){return s[t]})}},{\"../geo/coordinate\":329,assert:51,\"whoots-js\":580}],361:[function(t,e,r){\"use strict\";function n(t,e,r){if(this.id=t,this.dispatcher=r,a.extend(this,a.pick(e,[\"url\",\"scheme\",\"tileSize\"])),this._options=a.extend({type:\"vector\"},e),512!==this.tileSize)throw new Error(\"vector tile sources must have a tileSize of 512\");o(e,function(t,e){t?this.fire(\"error\",t):(a.extend(this,e),this.fire(\"load\"))}.bind(this))}var i=t(\"../util/evented\"),a=t(\"../util/util\"),o=t(\"./load_tilejson\"),s=t(\"../util/mapbox\").normalizeTileURL;e.exports=n,n.prototype=a.inherit(i,{minzoom:0,maxzoom:22,scheme:\"xyz\",tileSize:512,reparseOverscaled:!0,isTileClipped:!0,onAdd:function(t){this.map=t},serialize:function(){return a.extend({},this._options)},loadTile:function(t,e){function r(r,n){if(!t.aborted){if(r)return e(r);t.loadVectorData(n,this.map.style),t.redoWhenDone&&(t.redoWhenDone=!1,t.redoPlacement(this)),e(null),t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)}}var n=t.coord.z>this.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\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./load_tilejson\":353}],362:[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){var r=t.source,n=t.uid;this.loading[r]||(this.loading[r]={});var i=this.loading[r][n]=new s(t);i.abort=this.loadVectorData(t,function(t,a){return delete this.loading[r][n],t?e(t):a?(i.data=a.tile,i.parse(i.data,this.styleLayers.getLayerFamilies(),this.actor,a.rawTileData,e),this.loaded[r]=this.loaded[r]||{},void(this.loaded[r][n]=i)):e(null,null)}.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){var r=i.getArrayBuffer(t.url,function(t,r){if(t)return e(t);var n=new a.VectorTile(new o(new Uint8Array(r)));e(t,{tile:n,rawTileData:r})}.bind(this));return function(){r.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].redoPlacement(t.angle,t.pitch,t.showCollisionBoxes);a.result&&e(null,a.result,a.transferables)}else n&&n[i]&&(n[i].angle=t.angle)}}},{\"../util/ajax\":416,\"./worker_tile\":365,pbf:470,\"vector-tile\":564}],363:[function(t,e,r){\"use strict\";function n(t,e){this.id=t,this.urls=e.urls,this.coordinates=e.coordinates,c.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\"),c=t(\"../util/ajax\"),u=t(\"../data/bucket\").EXTENT,f=t(\"../render/draw_raster\").RasterBoundsArray,h=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)*u),Math.round((e.row-n.row)*u))}),this.fire(\"change\"),this},_setTile:function(t){this._prepared=!1,this.tile=t;var e=new f;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 h(e.serialize(),f.serialize(),h.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\":320,\"../data/buffer\":325,\"../geo/lng_lat\":330,\"../render/draw_raster\":342,\"../render/vertex_array_object\":348,\"../util/ajax\":416,\"../util/evented\":425,\"../util/util\":433,\"./tile_coord\":360,\"point-geometry\":477}],364:[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 c(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\"),c=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<t.length;a++){var s=t[a];\"fill\"!==s.type&&\"line\"!==s.type&&\"circle\"!==s.type&&\"symbol\"!==s.type||(s.ref?n.push(a):e(s))}for(var l=0;l<n.length;l++)e(t[n[l]]);this.layerFamilies=i(this.layers)},\"update layers\":function(t){function e(t){var e=a.layers[t.ref];a.layers[t.id]?a.layers[t.id].set(t,e):a.layers[t.id]=o.create(t,e),a.layers[t.id].updatePaintTransitions({},{transition:!1})}var r,n,a=this;for(r in t)(n=t[r]).ref&&e(n);for(r in t)(n=t[r]).ref||e(n);this.layerFamilies=i(this.layers)},\"load tile\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].loadTile(t,e)},\"reload tile\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].reloadTile(t,e)},\"abort tile\":function(t){var e=t.type||\"vector\";this.workerSources[e].abortTile(t)},\"remove tile\":function(t){var e=t.type||\"vector\";this.workerSources[e].removeTile(t)},\"redo placement\":function(t,e){var r=t.type||\"vector\";this.workerSources[r].redoPlacement(t,e)},\"load worker source\":function(t,e){try{this.self.importScripts(t.url),e()}catch(t){e(t)}}})},{\"../style/style_layer\":372,\"../util/actor\":415,\"../util/util\":433,\"./geojson_worker_source\":350,\"./vector_tile_worker_source\":362}],365:[function(t,e,r){\"use strict\";function n(t){this.coord=t.coord,this.uid=t.uid,this.zoom=t.zoom,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=t.overscaling,this.angle=t.angle,this.pitch=t.pitch,this.showCollisionBoxes=t.showCollisionBoxes}function i(t){return!t.isEmpty()}function a(t){return t.serialize()}function o(t){var e=[];for(var r in t)t[r].getTransferables(e);return e}function s(t){return t.id}var l=t(\"../data/feature_index\"),c=t(\"../symbol/collision_tile\"),u=t(\"../data/bucket\"),f=t(\"../symbol/collision_box\"),h=t(\"../util/dictionary_coder\"),d=t(\"../util/util\"),p=t(\"../symbol/symbol_instances\"),m=t(\"../symbol/symbol_quads\");e.exports=n,n.prototype.parse=function(t,e,r,n,g){function v(t,e){for(var r=0;r<t.length;r++){var n=t.feature(r);n.index=r;for(var i in e)e[i].filter(n)&&e[i].features.push(n)}}function y(t){if(t)return g(t);if(2==++j){for(var e=P.length-1;e>=0;e--)x(E,P[e]);b()}}function x(t,e){if(e.populateArrays(A,N,R),\"symbol\"!==e.type)for(var r=0;r<e.features.length;r++){var n=e.features[r];T.insert(n,n.index,e.sourceLayerIndex,e.index)}e.features=null}function b(){E.status=\"done\",E.redoPlacementAfterDone&&(E.redoPlacement(E.angle,E.pitch,null),E.redoPlacementAfterDone=!1);var t=T.serialize(),e=A.serialize(),r=E.collisionBoxArray.serialize(),s=E.symbolInstancesArray.serialize(),l=E.symbolQuadsArray.serialize(),c=[n].concat(t.transferables).concat(e.transferables),u=I.filter(i);g(null,{buckets:u.map(a),featureIndex:t.data,collisionTile:e.data,collisionBoxArray:r,symbolInstancesArray:s,symbolQuadsArray:l,rawTileData:n},o(u).concat(c))}this.status=\"parsing\",this.data=t,this.collisionBoxArray=new f,this.symbolInstancesArray=new p,this.symbolQuadsArray=new m;var _,w,M,k,A=new c(this.angle,this.pitch,this.collisionBoxArray),T=new l(this.coord,this.overscaling,A,t.layers),S=new h(t.layers?Object.keys(t.layers).sort():[\"_geojsonTileLayer\"]),E=this,L={},C={},z=0;for(var D in e)(w=e[D][0]).source===this.source&&(w.ref||w.minzoom&&this.zoom<w.minzoom||w.maxzoom&&this.zoom>=w.maxzoom||w.layout&&\"none\"===w.layout.visibility||t.layers&&!t.layers[w.sourceLayer]||((k=u.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\")})).createFilter(),L[w.id]=k,t.layers&&(C[M=w.sourceLayer]=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 F in L)0!==(k=L[F]).features.length&&(T.bucketLayerIDs[k.index]=k.childLayers.map(s),I.push(k),\"symbol\"===k.type?P.push(k):O.push(k));var R={},N={},j=0;if(P.length>0){for(_=P.length-1;_>=0;_--)P[_].updateIcons(R),P[_].updateFont(N);for(var B in N)N[B]=Object.keys(N[B]).map(Number);R=Object.keys(R),r.send(\"get glyphs\",{uid:this.uid,stacks:N},function(t,e){N=e,y(t)}),R.length?r.send(\"get icons\",{icons:R},function(t,e){R=e,y(t)}):y()}for(_=O.length-1;_>=0;_--)x(0,O[_]);if(0===P.length)return b()},n.prototype.redoPlacement=function(t,e,r){if(\"done\"!==this.status)return this.redoPlacementAfterDone=!0,this.angle=t,{};for(var n=new c(t,e,this.collisionBoxArray),s=this.symbolBuckets,l=s.length-1;l>=0;l--)s[l].placeFeatures(n,r);var u=n.serialize(),f=s.filter(i);return{result:{buckets:f.map(a),collisionTile:u.data},transferables:o(f).concat(u.transferables)}}},{\"../data/bucket\":320,\"../data/feature_index\":327,\"../symbol/collision_box\":385,\"../symbol/collision_tile\":387,\"../symbol/symbol_instances\":396,\"../symbol/symbol_quads\":397,\"../util/dictionary_coder\":423,\"../util/util\":433}],366:[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})}},{}],367:[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){t?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)this.fire(\"error\",{error:t});else{for(var r=e.getData(),n=e.data=new Uint8Array(r.length),i=0;i<r.length;i+=4){var a=r[i+3]/255;n[i+0]=r[i+0]*a,n[i+1]=r[i+1]*a,n[i+2]=r[i+2]*a,n[i+3]=r[i+3]}this.img=e,this.data&&this.fire(\"load\")}}.bind(this))}function i(){}var a=t(\"../util/evented\"),o=t(\"../util/ajax\"),s=t(\"../util/browser\"),l=t(\"../util/mapbox\").normalizeSpriteURL;e.exports=n,(n.prototype=Object.create(a)).toJSON=function(){return this.base},n.prototype.loaded=function(){return!(!this.data||!this.img)},n.prototype.resize=function(){if(s.devicePixelRatio>1!==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\":416,\"../util/browser\":417,\"../util/evented\":425,\"../util/mapbox\":430}],368:[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\":433,\"./style_function\":371,csscolorparser:114}],369:[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 c(256,512),this._layers={},this._order=[],this._groups=[],this.sources={},this.zoomHistory={},u.bindAll([\"_forwardSourceEvent\",\"_forwardTileEvent\",\"_forwardLayerEvent\",\"_redoPlacement\"],this),this._resetUpdates();var n=function(t,e){if(t)this.fire(\"error\",{error:t});else 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?f.getJSON(h(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\"),c=t(\"../render/line_atlas\"),u=t(\"../util/util\"),f=t(\"../util/ajax\"),h=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\"),x=t(\"../source/source_cache\"),b=t(\"./style_spec\"),_=t(\"./style_function\");e.exports=n,n.prototype=u.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;r<this.stylesheet.layers.length;r++)(e=this.stylesheet.layers[r]).ref||(t=a.create(e),this._layers[t.id]=t,t.on(\"error\",this._forwardLayerEvent));for(var n=0;n<this.stylesheet.layers.length;n++)if((e=this.stylesheet.layers[n]).ref){var i=this.getLayer(e.ref);t=a.create(e,i),this._layers[t.id]=t,t.on(\"error\",this._forwardLayerEvent)}this._groupLayers(),this._updateWorkerLayers()},_groupLayers:function(){var t;this._groups=[];for(var e=0;e<this._order.length;++e){var r=this._layers[this._order[e]];t&&r.source===t.source||((t=[]).source=r.source,this._groups.push(t)),t.push(r)}},_updateWorkerLayers:function(t){this.dispatcher.broadcast(t?\"update layers\":\"set layers\",this._serializeLayers(t))},_serializeLayers:function(t){t=t||this._order;for(var e=[],r={includeRefProperties:!0},n=0;n<t.length;n++)e.push(this._layers[t[n]].serialize(r));return e},_applyClasses:function(t,e){if(this._loaded){t=t||[],e=e||{transition:!0};var r=this.stylesheet.transition||{},n=this._updates.allPaintProps?this._layers:this._updates.paintProps;for(var i in n){var a=this._layers[i],o=this._updates.paintProps[i];if(this._updates.allPaintProps||o.all)a.updatePaintTransitions(t,e,r,this.animationLoop);else for(var s in o)this._layers[i].updatePaintTransition(s,t,e,r,this.animationLoop)}}},_recalculate:function(t){for(var e in this.sources)this.sources[e].used=!1;this._updateZoomHistory(t),this.rasterFadeDuration=300;for(var r in this._layers){var n=this._layers[r];n.recalculate(t,this.zoomHistory),!n.isHidden(t)&&n.source&&(this.sources[n.source].used=!0)}Math.floor(this.z)!==Math.floor(t)&&this.animationLoop.set(300),this.z=t,this.fire(\"zoom\")},_updateZoomHistory:function(t){var e=this.zoomHistory;void 0===e.lastIntegerZoom&&(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=0,e.lastZoom=t),Math.floor(e.lastZoom)<Math.floor(t)?(e.lastIntegerZoom=Math.floor(t),e.lastIntegerZoomTime=Date.now()):Math.floor(e.lastZoom)>Math.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<i.length;n++)this._reloadSource(i[n]);for(n=0;n<this._updates.events.length;n++){var a=this._updates.events[n];this.fire(a[0],a[1])}return this._applyClasses(t,e),this._updates.changed&&this.fire(\"change\"),this._resetUpdates(),this},_resetUpdates:function(){this._updates={events:[],layers:{},sources:{},paintProps:{}}},addSource:function(t,e){if(this._checkLoaded(),void 0!==this.sources[t])throw new Error(\"There is already a source with this ID\");if(!e.type)throw new Error(\"The type property must be defined, but the only the following properties were given: \"+Object.keys(e)+\".\");return[\"vector\",\"raster\",\"geojson\",\"video\",\"image\"].indexOf(e.type)>=0&&this._handleErrors(g.source,\"sources.\"+t,e)?this:(e=new x(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:u.deepEqual(r.filter,e)?this:(r.filter=u.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 u.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(u.deepEqual(i.getPaintProperty(e,n),r))return this;var a=i.isPaintValueFeatureConstant(e);i.setPaintProperty(e,r,n);return!(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 u.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:u.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;i<t.length;i++){var a=t[i][n];if(a)for(var o=0;o<a.length;o++)e.push(a[o])}return e},queryRenderedFeatures:function(t,e,r,n){e&&e.filter&&this._handleErrors(g.filter,\"queryRenderedFeatures.filter\",e.filter,!0);var i={};if(e&&e.layers)for(var a=0;a<e.layers.length;a++){var o=e.layers[a];i[this._layers[o].source]=!0}var s=[];for(var l in this.sources)if(!e.layers||i[l]){var c=this.sources[l],u=y.rendered(c,this._layers,t,e,r,n);s.push(u)}return this._flattenRenderedFeatures(s)},querySourceFeatures:function(t,e){e&&e.filter&&this._handleErrors(g.filter,\"querySourceFeatures.filter\",e.filter,!0);var r=this.sources[t];return r?y.source(r,e):[]},addSourceType:function(t,e,r){return v.getType(t)?r(new Error('A source type called \"'+t+'\" already exists.')):(v.setType(t,e),e.workerSourceURL?void this.dispatcher.broadcast(\"load worker source\",{name:t,url:e.workerSourceURL},r):r(null,null))},_handleErrors:function(t,e,r,n,i){var a=n?g.throwErrors:g.emitErrors,o=t.call(g,u.extend({key:e,style:this.serialize(),value:r,styleSpec:b},i));return a.call(g,this,o)},_remove:function(){this.dispatcher.remove()},_reloadSource:function(t){this.sources[t].reload()},_updateSources:function(t){for(var e in this.sources)this.sources[e].update(t)},_redoPlacement:function(){for(var t in this.sources)this.sources[t].redoPlacement&&this.sources[t].redoPlacement()},_forwardSourceEvent:function(t){this.fire(\"source.\"+t.type,u.extend({source:t.target.getSource()},t))},_forwardTileEvent:function(t){this.fire(t.type,u.extend({source:t.target},t))},_forwardLayerEvent:function(t){this.fire(\"layer.\"+t.type,u.extend({layer:{id:t.target.id}},t))},\"get sprite json\":function(t,e){var r=this.sprite;r.loaded()?e(null,{sprite:r.data,retina:r.retina}):r.on(\"load\",function(){e(null,{sprite:r.data,retina:r.retina})})},\"get icons\":function(t,e){var r=this.sprite,n=this.spriteAtlas;r.loaded()?(n.setSprite(r),n.addIcons(t.icons,e)):r.on(\"load\",function(){n.setSprite(r),n.addIcons(t.icons,e)})},\"get glyphs\":function(t,e){function r(t,r,n){t&&console.error(t),a[n]=r,0===--i&&e(null,a)}var n=t.stacks,i=Object.keys(n).length,a={};for(var o in n)this.glyphSource.getSimpleGlyphs(o,n[o],t.uid,r)}})},{\"../render/line_atlas\":345,\"../source/query_features\":355,\"../source/source\":357,\"../source/source_cache\":358,\"../symbol/glyph_source\":390,\"../symbol/sprite_atlas\":395,\"../util/ajax\":416,\"../util/browser\":417,\"../util/dispatcher\":424,\"../util/evented\":425,\"../util/mapbox\":430,\"../util/util\":433,\"./animation_loop\":366,\"./image_sprite\":367,\"./style_function\":371,\"./style_layer\":372,\"./style_spec\":379,\"./validate_style\":381}],370:[function(t,e,r){\"use strict\";var n=t(\"./style_function\"),i=t(\"./parse_color\"),a=t(\"../util/util\");e.exports=function(t,e){this.value=a.clone(e),this.isFunction=n.isFunctionDefinition(e),this.json=JSON.stringify(this.value);var r=\"color\"===t.type&&this.value?i(this.value):e;if(this.calculate=n[t.function||\"piecewise-constant\"](r),this.isFeatureConstant=this.calculate.isFeatureConstant,this.isZoomConstant=this.calculate.isZoomConstant,\"piecewise-constant\"===t.function&&t.transition&&(this.calculate=function(t){return function(e,r){var n,i,a,o=e.zoom,s=e.zoomHistory,l=e.duration,c=o%1,u=Math.min((Date.now()-s.lastIntegerZoomTime)/l,1),f=1;return o>s.lastIntegerZoom?(n=c+(1-c)*u,f*=2,i=t({zoom:o-1},r),a=t({zoom:o},r)):(n=1-(1-u)*c,a=t({zoom:o},r),i=t({zoom:o+1},r),f/=2),void 0===i||void 0===a?void 0:{from:i,fromScale:f,to:a,toScale:1,t:n}}}(this.calculate)),!this.isFeatureConstant&&!this.isZoomConstant){this.stopZoomLevels=[];for(var o=[],s=this.value.stops,l=0;l<this.value.stops.length;l++){var c=s[l][0].zoom;this.stopZoomLevels.indexOf(c)<0&&(this.stopZoomLevels.push(c),o.push([c,o.length]))}this.calculateInterpolationT=n.interpolated({stops:o,base:e.base})}}},{\"../util/util\":433,\"./parse_color\":368,\"./style_function\":371}],371:[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\":293}],372:[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\"),c=t(\"./validate_style\"),u=t(\"./parse_color\"),f=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(f,{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(c.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(c.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(c.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?u(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.minzoom)||(!!(this.maxzoom&&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<t.length;o++)a.extend(i,this._paintDeclarations[t[o]]);var s;for(s in i)this._applyPaintDeclaration(s,i[s],e,r,n);for(s in this._paintTransitions)s in i||this._applyPaintDeclaration(s,null,e,r,n)},updatePaintTransition:function(t,e,r,n,i){for(var a=this._paintDeclarations[\"\"][t],o=0;o<e.length;o++){var s=this._paintDeclarations[e[o]];s&&s[t]&&(a=s[t])}this._applyPaintDeclaration(t,a,r,n,i)},recalculate:function(t,e){for(var r in this._paintTransitions)this.paint[r]=this.getPaintValue(r,{zoom:t,zoomHistory:e});for(var n in this._layoutFunctions)this.layout[n]=this.getLayoutValue(n,{zoom:t,zoomHistory:e})},serialize:function(t){var e={id:this.id,ref:this.ref,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom};for(var r in this._paintDeclarations){e[\"\"===r?\"paint\":\"paint.\"+r]=a.mapObject(this._paintDeclarations[r],i)}return(!this.ref||t&&t.includeRefProperties)&&a.extend(e,{type:this.type,source:this.source,\"source-layer\":this.sourceLayer,filter:this.filter,layout:a.mapObject(this._layoutDeclarations,i)}),a.filterObject(e,function(t,e){return void 0!==t&&!(\"layout\"===e&&!Object.keys(t).length)})},_applyPaintDeclaration:function(t,e,r,n,i){var l=r.transition?this._paintTransitions[t]:void 0,c=this._paintSpecifications[t];if(null!==e&&void 0!==e||(e=new s(c,c.default)),!l||l.declaration.json!==e.json){var u=a.extend({duration:300,delay:0},n,this.getPaintProperty(t+\"-transition\")),f=this._paintTransitions[t]=new o(c,e,l,u);f.instant()||(f.loopID=i.set(f.endTime-Date.now())),l&&i.cancel(l.loopID)}},_updateLayoutValue:function(t){var e=this._layoutDeclarations[t];e&&e.isFunction?this._layoutFunctions[t]=!0:(delete this._layoutFunctions[t],this.layout[t]=this.getLayoutValue(t))},_handleErrors:function(t,e,r,n){return c.emitErrors(this,t.call(c,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:l,style:{glyphs:!0,sprite:!0}}))}})},{\"../util/evented\":425,\"../util/util\":433,\"./parse_color\":368,\"./style_declaration\":370,\"./style_layer/background_style_layer\":373,\"./style_layer/circle_style_layer\":374,\"./style_layer/fill_style_layer\":375,\"./style_layer/line_style_layer\":376,\"./style_layer/raster_style_layer\":377,\"./style_layer/symbol_style_layer\":378,\"./style_spec\":379,\"./style_transition\":380,\"./validate_style\":381}],373:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],374:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],375:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");n.prototype=i.inherit(a,{getPaintValue:function(t,e,r){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintValue.call(this,\"fill-color\",e,r):a.prototype.getPaintValue.call(this,t,e,r)},getPaintValueStopZoomLevels:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintValueStopZoomLevels.call(this,\"fill-color\"):a.prototype.getPaintValueStopZoomLevels.call(this,arguments)},getPaintInterpolationT:function(t,e){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.getPaintInterpolationT.call(this,\"fill-color\",e):a.prototype.getPaintInterpolationT.call(this,t,e)},isPaintValueFeatureConstant:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.isPaintValueFeatureConstant.call(this,\"fill-color\"):a.prototype.isPaintValueFeatureConstant.call(this,t)},isPaintValueZoomConstant:function(t){return\"fill-outline-color\"===t&&void 0===this.getPaintProperty(\"fill-outline-color\")?a.prototype.isPaintValueZoomConstant.call(this,\"fill-color\"):a.prototype.isPaintValueZoomConstant.call(this,t)}}),e.exports=n},{\"../../util/util\":433,\"../style_layer\":372}],376:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{getPaintValue:function(t,e,r){var n=a.prototype.getPaintValue.apply(this,arguments);if(n&&\"line-dasharray\"===t){var i=Math.floor(e.zoom);this._flooredZoom!==i&&(this._flooredZoom=i,this._flooredLineWidth=this.getPaintValue(\"line-width\",e,r)),n.fromScale*=this._flooredLineWidth,n.toScale*=this._flooredLineWidth}return n}})},{\"../../util/util\":433,\"../style_layer\":372}],377:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{})},{\"../../util/util\":433,\"../style_layer\":372}],378:[function(t,e,r){\"use strict\";function n(){a.apply(this,arguments)}var i=t(\"../../util/util\"),a=t(\"../style_layer\");e.exports=n,n.prototype=i.inherit(a,{isHidden:function(){if(a.prototype.isHidden.apply(this,arguments))return!0;var t=0===this.paint[\"text-opacity\"]||!this.layout[\"text-field\"],e=0===this.paint[\"icon-opacity\"]||!this.layout[\"icon-image\"];return!(!t||!e)},getLayoutValue:function(t,e,r){return(\"text-rotation-alignment\"!==t||\"line\"!==this.getLayoutValue(\"symbol-placement\",e,r)||this.getLayoutProperty(\"text-rotation-alignment\"))&&(\"icon-rotation-alignment\"!==t||\"line\"!==this.getLayoutValue(\"symbol-placement\",e,r)||this.getLayoutProperty(\"icon-rotation-alignment\"))?\"text-pitch-alignment\"!==t||this.getLayoutProperty(\"text-pitch-alignment\")?a.prototype.getLayoutValue.apply(this,arguments):this.getLayoutValue(\"text-rotation-alignment\"):\"map\"}})},{\"../../util/util\":433,\"../style_layer\":372}],379:[function(t,e,r){\"use strict\";e.exports=t(\"mapbox-gl-style-spec/reference/latest.min\")},{\"mapbox-gl-style-spec/reference/latest.min\":316}],380:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.declaration=e,this.startTime=this.endTime=(new Date).getTime(),\"piecewise-constant\"===t.function&&t.transition?this.interp=i:this.interp=o[t.type],this.oldTransition=r,this.duration=n.duration||0,this.delay=n.delay||0,this.instant()||(this.endTime=this.startTime+this.duration+this.delay,this.ease=a.easeCubicInOut),r&&r.endTime<=this.startTime&&delete r.oldTransition}function i(t,e,r){return void 0===(t&&t.to)||void 0===(e&&e.to)?void 0:{from:t.to,fromScale:t.toScale,to:e.to,toScale:e.toScale,t:r}}var a=t(\"../util/util\"),o=t(\"../util/interpolate\");e.exports=n,n.prototype.instant=function(){return!this.oldTransition||!this.interp||0===this.duration&&0===this.delay},n.prototype.calculate=function(t,e){var r=this.declaration.calculate(a.extend({},t,{duration:this.duration}),e);if(this.instant())return r;var n=t.time||Date.now();if(n<this.endTime){var i=this.oldTransition.calculate(a.extend({},t,{time:this.startTime}),e),o=this.ease((n-this.startTime-this.delay)/this.duration);r=this.interp(i,r,o)}return r}},{\"../util/interpolate\":427,\"../util/util\":433}],381:[function(t,e,r){\"use strict\";e.exports=t(\"mapbox-gl-style-spec/lib/validate_style.min\"),e.exports.emitErrors=function(t,e){if(e&&e.length){for(var r=0;r<e.length;r++)t.fire(\"error\",{error:new Error(e[r].message)});return!0}return!1},e.exports.throwErrors=function(t,e){if(e)for(var r=0;r<e.length;r++)throw new Error(e[r].message)}},{\"mapbox-gl-style-spec/lib/validate_style.min\":315}],382:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.x=t,this.y=e,this.angle=r,void 0!==n&&(this.segment=n)}var i=t(\"point-geometry\");e.exports=n,(n.prototype=Object.create(i.prototype)).clone=function(){return new n(this.x,this.y,this.angle,this.segment)}},{\"point-geometry\":477}],383:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-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=[],c=0;s<r/2;){var u=t[o-1],f=t[o],h=t[o+1];if(!h)return!1;var d=u.angleTo(f)-f.angleTo(h);for(d=Math.abs((d+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:d}),c+=d;s-l[0].distance>n;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}},{}],384:[function(t,e,r){\"use strict\";var n=t(\"point-geometry\");e.exports=function(t,e,r,i,a){for(var o=[],s=0;s<t.length;s++)for(var l,c=t[s],u=0;u<c.length-1;u++){var f=c[u],h=c[u+1];f.x<e&&h.x<e||(f.x<e?f=new n(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round():h.x<e&&(h=new n(e,f.y+(h.y-f.y)*((e-f.x)/(h.x-f.x)))._round()),f.y<r&&h.y<r||(f.y<r?f=new n(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round():h.y<r&&(h=new n(f.x+(h.x-f.x)*((r-f.y)/(h.y-f.y)),r)._round()),f.x>=i&&h.x>=i||(f.x>=i?f=new n(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round():h.x>=i&&(h=new n(i,f.y+(h.y-f.y)*((i-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new n(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new n(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),l&&f.equals(l[l.length-1])||(l=[f],o.push(l)),l.push(h)))))}return o}},{\"point-geometry\":477}],385:[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\":431,\"../util/util\":433,\"point-geometry\":477}],386:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c,u){var f=o.top*s-l,h=o.bottom*s+l,d=o.left*s-l,p=o.right*s+l;if(this.boxStartIndex=t.length,c){var m=h-f,g=p-d;if(m>0)if(m=Math.max(10*s,m),u){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,f,p,h,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 c=a/2,u=Math.floor(i/c),f=-a/2,h=this.boxes,d=r,p=n+1,m=f;do{if(--p<0)return h;m-=e[p].dist(d),d=e[p]}while(m>-i/2);for(var g=e[p].dist(e[p+1]),v=0;v<u;v++){for(var y=-i/2+v*c;m+g<y;){if(m+=g,++p+1>=e.length)return h;g=e[p].dist(e[p+1])}var x=y-m,b=e[p],_=e[p+1].sub(b)._unit()._mult(x)._add(b)._round(),w=i/2/Math.max(Math.abs(y-f)-c/2,0);t.emplaceBack(_.x,_.y,-a/2,-a/2,a/2,a/2,w,o,s,l,0,0,0,0,0)}return h}},{}],387:[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<t.boxEndIndex;l++){var c=n.get(l),u=c.anchorPoint._matMult(o),f=u.x,h=u.y,d=f+c.x1,p=h+c.y1*s,m=f+c.x2,g=h+c.y2*s;if(c.bbox0=d,c.bbox1=p,c.bbox2=m,c.bbox3=g,!e)for(var v=this.grid.query(d,p,m,g),y=0;y<v.length;y++){var x=n.get(v[y]),b=x.anchorPoint._matMult(o);if((a=this.getPlacementScale(a,u,c,b,x))>=this.maxScale)return a}if(r){var _;if(this.angle){var w=this.reverseRotationMatrix,M=new i(c.x1,c.y1).matMult(w),k=new i(c.x2,c.y1).matMult(w),A=new i(c.x1,c.y2).matMult(w),T=new i(c.x2,c.y2).matMult(w);(_=this.tempCollisionBox).anchorPointX=c.anchorPoint.x,_.anchorPointY=c.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=c.maxScale}else _=c;for(var S=0;S<this.edges.length;S++){var E=this.edges[S];if((a=this.getPlacementScale(a,c.anchorPoint,_,E.anchorPoint,E))>=this.maxScale)return a}}}return a},n.prototype.queryRenderedSymbols=function(t,e,r,n,a){var o={},s=[],l=this.collisionBoxArray,c=this.rotationMatrix,u=new i(t,e)._matMult(c),f=this.tempCollisionBox;f.anchorX=u.x,f.anchorY=u.y,f.x1=0,f.y1=0,f.x2=r-t,f.y2=n-e,f.maxScale=a,a=f.maxScale;for(var h=[u.x+f.x1/a,u.y+f.y1/a*this.yStretch,u.x+f.x2/a,u.y+f.y2/a*this.yStretch],d=this.grid.query(h[0],h[1],h[2],h[3]),p=this.ignoredGrid.query(h[0],h[1],h[2],h[3]),m=0;m<p.length;m++)d.push(p[m]);for(var g=0;g<d.length;g++){var v=l.get(d[g]),y=v.sourceLayerIndex,x=v.featureIndex;if(void 0===o[y]&&(o[y]={}),!o[y][x]){var b=v.anchorPoint.matMult(c);this.getPlacementScale(this.minScale,u,f,b,v)>=a&&(o[y][x]=!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,c=(i.y1-r.y2)*this.yStretch/o,u=(i.y2-r.y1)*this.yStretch/o;(isNaN(s)||isNaN(l))&&(s=l=1),(isNaN(c)||isNaN(u))&&(c=u=1);var f=Math.min(Math.max(s,l),Math.max(c,u)),h=i.maxScale,d=r.maxScale;return f>h&&(f=h),f>d&&(f=d),f>t&&f>=i.placementScale&&(t=f),t},n.prototype.insertCollisionFeature=function(t,e,r){for(var n=r?this.ignoredGrid:this.grid,i=this.collisionBoxArray,a=t.boxStartIndex;a<t.boxEndIndex;a++){var o=i.get(a);o.placementScale=e,e<this.maxScale&&n.insert(a,o.bbox0,o.bbox1,o.bbox2,o.bbox3)}}},{\"../data/bucket\":320,\"grid-index\":275,\"point-geometry\":477}],388:[function(t,e,r){\"use strict\";function n(t,e,r,s,l,c,u,f,h){for(var d=c/2,p=0,m=0;m<t.length-1;m++)p+=t[m].dist(t[m+1]);for(var g=0,v=e-r,y=[],x=0;x<t.length-1;x++){for(var b=t[x],_=t[x+1],w=b.dist(_),M=_.angleTo(b);v+r<g+w;){var k=((v+=r)-g)/w,A=i(b.x,_.x,k),T=i(b.y,_.y,k);if(A>=0&&A<h&&T>=0&&T<h&&v-d>=0&&v+d<=p){var S=new a(A,T,M,x)._round();s&&!o(t,S,c,s,l)||y.push(S)}}g+=w}return f||y.length||u||(y=n(t,g/2,r,s,l,c,u,!0,h)),y}var i=t(\"../util/interpolate\"),a=t(\"../symbol/anchor\"),o=t(\"./check_max_angle\");e.exports=function(t,e,r,i,a,o,s,l,c){var u=i?.6*o*s:0,f=Math.max(i?i.right-i.left:0,a?a.right-a.left:0),h=0===t[0].x||t[0].x===c||0===t[0].y||t[0].y===c;return e-f*s<e/4&&(e=f*s+e/4),n(t,h?e/2*l%e:(f/2+2*o)*s*l%e,e,u,r,f*s,h,!1,c)}},{\"../symbol/anchor\":382,\"../util/interpolate\":427,\"./check_max_angle\":383}],389:[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)e=(t=i.split(\"#\"))[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)e=(t=i.split(\"#\"))[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,c=s+2;l+=4-l%4,c+=4-c%4;var u=this.bin.packOne(l,c);if(u||(this.resize(),u=this.bin.packOne(l,c)),!u)return a.warnOnce(\"glyph bitmap overflow\"),null;this.index[i]=u,this.ids[i]=[t];for(var f=this.data,h=r.bitmap,d=0;d<s;d++)for(var p=this.width*(u.y+d+1)+u.x+1,m=o*d,g=0;g<o;g++)f[p+g]=h[m+g];return this.dirty=!0,u},n.prototype.resize=function(){var t=this.width,e=this.height;if(!(t>=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;n<e;n++){var i=new Uint8Array(this.data.buffer,e*n,t);new Uint8Array(r,e*n*4,t).set(i)}this.data=new Uint8Array(r)}},n.prototype.bind=function(t){this.gl=t,this.texture?t.bindTexture(t.TEXTURE_2D,this.texture):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),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.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,null))},n.prototype.updateTexture=function(t){this.bind(t),this.dirty&&(t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data),this.dirty=!1)}},{\"../util/util\":433,\"shelf-pack\":521}],390:[function(t,e,r){\"use strict\";function n(t){this.url=t&&a(t),this.atlases={},this.stacks={},this.loading={}}function i(t,e,r){this.advance=t.advance,this.left=t.left-r-1,this.top=t.top+r+1,this.rect=e}var a=t(\"../util/mapbox\").normalizeGlyphsURL,o=t(\"../util/ajax\").getArrayBuffer,s=t(\"../util/glyphs\"),l=t(\"../symbol/glyph_atlas\"),c=t(\"pbf\");e.exports=n,n.prototype.getSimpleGlyphs=function(t,e,r,n){void 0===this.stacks[t]&&(this.stacks[t]={}),void 0===this.atlases[t]&&(this.atlases[t]=new l);for(var a,o={},s=this.stacks[t],c=this.atlases[t],u={},f=0,h=0;h<e.length;h++){var d=e[h];if(a=Math.floor(d/256),s[a]){var p=s[a].glyphs[d],m=c.addGlyph(r,t,p,3);p&&(o[d]=new i(p,m,3))}else void 0===u[a]&&(u[a]=[],f++),u[a].push(d)}f||n(void 0,o,t);var g=function(e,a,s){if(!e)for(var l=this.stacks[t][a]=s.stacks[0],h=0;h<u[a].length;h++){var d=u[a][h],p=l.glyphs[d],m=c.addGlyph(r,t,p,3);p&&(o[d]=new i(p,m,3))}--f||n(void 0,o,t)}.bind(this);for(var v in u)this.loadRange(t,v,g)},n.prototype.loadRange=function(t,e,r){if(256*e>65535)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=function(t,e,r,n){return n=n||\"abc\",r.replace(\"{s}\",n[t.length%n.length]).replace(\"{fontstack}\",t).replace(\"{range}\",e)}(t,256*e+\"-\"+(256*e+255),this.url);o(i,function(t,r){for(var i=!t&&new s(new c(new Uint8Array(r))),a=0;a<n[e].length;a++)n[e][a](t,e,i);delete n[e]})}},n.prototype.getGlyphAtlas=function(t){return this.atlases[t]}},{\"../symbol/glyph_atlas\":389,\"../util/ajax\":416,\"../util/glyphs\":426,\"../util/mapbox\":430,pbf:470}],391:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){function n(n){u.push(t[n]),f.push(r[n]),h.push(e[n]),d++}function i(t,e,r){var n=c[t];return delete c[t],c[e]=n,f[n][0].pop(),f[n][0]=f[n][0].concat(r[0]),n}function a(t,e,r){var n=l[e];return delete l[e],l[t]=n,f[n][0].shift(),f[n][0]=r[0].concat(f[n][0]),n}function o(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+\":\"+n.x+\":\"+n.y}var s,l={},c={},u=[],f=[],h=[],d=0;for(s=0;s<t.length;s++){var p=r[s],m=e[s];if(m){var g=o(m,p),v=o(m,p,!0);if(g in c&&v in l&&c[g]!==l[v]){var y=a(g,v,p),x=i(g,v,f[y]);delete l[g],delete c[v],c[o(m,f[x],!0)]=x,f[y]=null}else g in c?i(g,v,p):v in l?a(g,v,p):(n(s),l[g]=d-1,c[v]=d-1)}else n(s)}return{features:u,textFeatures:h,geometries:f}}},{}],392:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s,l,c){this.anchorPoint=t,this.tl=e,this.tr=r,this.bl=n,this.br=i,this.tex=a,this.anchorAngle=o,this.glyphAngle=s,this.minScale=l,this.maxScale=c}function i(t,e,r,n,i,s){var l=!s;r<0&&(s=!s),s&&i++;var c=new a(e.x,e.y),u=n[i],f=1/0;r=Math.abs(r);for(var h=o;;){var d=c.dist(u),p=r/d,m=Math.atan2(u.y-c.y,u.x-c.x);if(s||(m+=Math.PI),t.push({anchorPoint:c,offset:l?Math.PI:0,minScale:p,maxScale:f,angle:(m+2*Math.PI)%(2*Math.PI)}),p<=h)break;for(c=u;c.equals(u);)if(i+=s?1:-1,!(u=n[i]))return p;var g=u.sub(c)._unit();c=c.sub(g._mult(d)),f=p}return h}var a=t(\"point-geometry\");e.exports={getIconQuads:function(t,e,r,i,s,l,c,u,f){var h,d,p,m,g=e.image.rect,v=s.layout,y=e.left-1,x=y+g.w/e.image.pixelRatio,b=e.top-1,_=b+g.h/e.image.pixelRatio;if(\"none\"!==v[\"icon-text-fit\"]&&c){var w=x-y,M=_-b,k=v[\"text-size\"]/24,A=c.left*k,T=c.right*k,S=c.top*k,E=T-A,L=c.bottom*k-S,C=v[\"icon-text-fit-padding\"][0],z=v[\"icon-text-fit-padding\"][1],D=v[\"icon-text-fit-padding\"][2],I=v[\"icon-text-fit-padding\"][3],P=\"width\"===v[\"icon-text-fit\"]?.5*(L-M):0,O=\"height\"===v[\"icon-text-fit\"]?.5*(E-w):0,F=\"width\"===v[\"icon-text-fit\"]||\"both\"===v[\"icon-text-fit\"]?E:w,R=\"height\"===v[\"icon-text-fit\"]||\"both\"===v[\"icon-text-fit\"]?L:M;h=new a(A+O-I,S+P-C),d=new a(A+O+z+F,S+P-C),p=new a(A+O+z+F,S+P+D+R),m=new a(A+O-I,S+P+D+R)}else h=new a(y,b),d=new a(x,b),p=new a(x,_),m=new a(y,_);var N=s.getLayoutValue(\"icon-rotate\",u,f)*Math.PI/180;if(l){var j=i[t.segment];if(t.y===j.y&&t.x===j.x&&t.segment+1<i.length){var B=i[t.segment+1];N+=Math.atan2(t.y-B.y,t.x-B.x)+Math.PI}else N+=Math.atan2(t.y-j.y,t.x-j.x)}if(N){var U=Math.sin(N),V=Math.cos(N),q=[V,-U,U,V];h=h.matMult(q),d=d.matMult(q),m=m.matMult(q),p=p.matMult(q)}return[new n(new a(t.x,t.y),h,d,m,p,e.image.rect,0,0,o,1/0)]},getGlyphQuads:function(t,e,r,s,l,c){for(var u=l.layout[\"text-rotate\"]*Math.PI/180,f=l.layout[\"text-keep-upright\"],h=e.positionedGlyphs,d=[],p=0;p<h.length;p++){var m=h[p],g=m.glyph,v=g.rect;if(v){var y,x=(m.x+g.advance/2)*r,b=o;c?(b=i(y=[],t,x,s,t.segment,!0),f&&(b=Math.min(b,i(y,t,x,s,t.segment,!1)))):y=[{anchorPoint:new a(t.x,t.y),offset:0,angle:0,maxScale:1/0,minScale:o}];for(var _=m.x+g.left,w=m.y-g.top,M=_+v.w,k=w+v.h,A=new a(_,w),T=new a(M,w),S=new a(_,k),E=new a(M,k),L=0;L<y.length;L++){var C=y[L],z=A,D=T,I=S,P=E;if(u){var O=Math.sin(u),F=Math.cos(u),R=[F,-O,O,F];z=z.matMult(R),D=D.matMult(R),I=I.matMult(R),P=P.matMult(R)}var N=Math.max(C.minScale,b),j=(t.angle+C.offset+2*Math.PI)%(2*Math.PI),B=(C.angle+C.offset+2*Math.PI)%(2*Math.PI);d.push(new n(C.anchorPoint,z,D,I,P,v,j,B,N,C.maxScale))}}}return d},SymbolQuad:n};var o=.5},{\"point-geometry\":477}],393:[function(t,e,r){\"use strict\";var n=t(\"../util/token\");e.exports=function(t,e,r){for(var i=[],a=0,o=t.length;a<o;a++){var s=n(t[a].properties,e[\"text-field\"]);if(s){s=s.toString();var l=e[\"text-transform\"];\"uppercase\"===l?s=s.toLocaleUpperCase():\"lowercase\"===l&&(s=s.toLocaleLowerCase());for(var c=0;c<s.length;c++)r[s.charCodeAt(c)]=!0;i[a]=s}else i[a]=null}return i}},{\"../util/token\":432}],394:[function(t,e,r){\"use strict\";function n(t,e,r,n){this.codePoint=t,this.x=e,this.y=r,this.glyph=n}function i(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}e.exports={shapeText:function(t,e,r,s,l,c,u,f,h){for(var d=[],p=new function(t,e,r,n,i,a){this.positionedGlyphs=t,this.text=e,this.top=r,this.bottom=n,this.left=i,this.right=a}(d,t,h[1],h[1],h[0],h[0]),m=0,g=0;g<t.length;g++){var v=t.charCodeAt(g),y=e[v];y&&(d.push(new n(v,m,-17,y)),m+=y.advance+f)}return!!d.length&&(function(t,e,r,n,s,l,c,u){var f=null,h=0,d=0,p=0,m=0,g=t.positionedGlyphs;if(n)for(var v=0;v<g.length;v++){var y=g[v];if(y.x-=h,y.y+=r*p,y.x>n&&null!==f){var x=g[f+1].x;m=Math.max(x,m);for(var b=f+1;b<=v;b++)g[b].y+=r,g[b].x-=x;if(c){var _=f;a[g[f].codePoint]&&_--,i(g,e,d,_,c)}d=f+1,f=null,h+=x,p++}o[y.codePoint]&&(f=v)}var w=g[g.length-1],M=w.x+e[w.codePoint].advance;m=Math.max(m,M);var k=(p+1)*r;i(g,e,d,g.length-1,c),function(t,e,r,n,i,a,o,s){for(var l=(e-r)*i+s[0],c=(-n*(o+1)+.5)*a+s[1],u=0;u<t.length;u++)t[u].x+=l,t[u].y+=c}(g,c,s,l,m,r,p,u),t.top+=-l*k,t.bottom=t.top+k,t.left+=-s*m,t.right=t.left+m}(p,e,s,r,l,c,u,h),p)},shapeIcon:function(t,e){if(!t||!t.rect)return null;var r=e[\"icon-offset\"][0],n=e[\"icon-offset\"][1],i=r-t.width/2,a=i+t.width,o=n-t.height/2;return new function(t,e,r,n,i){this.image=t,this.top=e,this.bottom=r,this.left=n,this.right=i}(t,o,o+t.height,i,a)}};var a={32:!0,8203:!0},o={32:!0,38:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0}},{}],395:[function(t,e,r){\"use strict\";function n(t,e){this.width=t,this.height=e,this.bin=new i(t,e),this.images={},this.data=!1,this.texture=0,this.filter=0,this.pixelRatio=1,this.dirty=!0}var i=t(\"shelf-pack\"),a=t(\"../util/browser\"),o=t(\"../util/util\");e.exports=n,n.prototype.allocateImage=function(t,e){var r=(t/=this.pixelRatio)+2+(4-(t+2)%4),n=(e/=this.pixelRatio)+2+(4-(e+2)%4),i=this.bin.packOne(r,n);return i||(o.warnOnce(\"SpriteAtlas out of space.\"),null)},n.prototype.getImage=function(t,e){if(this.images[t])return this.images[t];if(!this.sprite)return null;var r=this.sprite.getSpritePosition(t);if(!r.width||!r.height)return null;var n=this.allocateImage(r.width,r.height);if(!n)return null;var i=new function(t,e,r,n,i){this.rect=t,this.width=e,this.height=r,this.sdf=n,this.pixelRatio=i}(n,r.width/r.pixelRatio,r.height/r.pixelRatio,r.sdf,r.pixelRatio/this.pixelRatio);return this.images[t]=i,this.copy(n,r,e),i},n.prototype.getPosition=function(t,e){var r=this.getImage(t,e),n=r&&r.rect;if(!n)return null;var i=r.width*r.pixelRatio,a=r.height*r.pixelRatio;return{size:[r.width,r.height],tl:[(n.x+1)/this.width,(n.y+1)/this.height],br:[(n.x+1+i)/this.width,(n.y+1+a)/this.height]}},n.prototype.allocate=function(){if(!this.data){var t=Math.floor(this.width*this.pixelRatio),e=Math.floor(this.height*this.pixelRatio);this.data=new Uint32Array(t*e);for(var r=0;r<this.data.length;r++)this.data[r]=0}},n.prototype.copy=function(t,e,r){if(this.sprite.img.data){var n=new Uint32Array(this.sprite.img.data.buffer);this.allocate();var i=this.data;!function(t,e,r,n,i,a,o,s,l,c,u){var f,h,d=n*e+r,p=s*a+o;if(u)for(p-=a,h=-1;h<=c;h++,d=((h+c)%c+n)*e+r,p+=a)for(f=-1;f<=l;f++)i[p+f]=t[d+(f+l)%l];else for(h=0;h<c;h++,d+=e,p+=a)for(f=0;f<l;f++)i[p+f]=t[d+f]}(n,this.sprite.img.width,e.x,e.y,i,this.width*this.pixelRatio,(t.x+1)*this.pixelRatio,(t.y+1)*this.pixelRatio,e.width,e.height,r),this.dirty=!0}},n.prototype.setSprite=function(t){t&&(this.pixelRatio=a.devicePixelRatio>1?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;r<t.length;r++)this.getImage(t[r]);e(null,this.images)},n.prototype.bind=function(t,e){var r=!1;this.texture?t.bindTexture(t.TEXTURE_2D,this.texture):(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),r=!0);var n=e?t.LINEAR:t.NEAREST;n!==this.filter&&(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n),this.filter=n),this.dirty&&(this.allocate(),r?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width*this.pixelRatio,this.height*this.pixelRatio,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)):t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width*this.pixelRatio,this.height*this.pixelRatio,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(this.data.buffer)),this.dirty=!1)}},{\"../util/browser\":417,\"../util/util\":433,\"shelf-pack\":521}],396:[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:\"Uint16\",name:\"textBoxStartIndex\"},{type:\"Uint16\",name:\"textBoxEndIndex\"},{type:\"Uint16\",name:\"iconBoxStartIndex\"},{type:\"Uint16\",name:\"iconBoxEndIndex\"},{type:\"Uint16\",name:\"glyphQuadStartIndex\"},{type:\"Uint16\",name:\"glyphQuadEndIndex\"},{type:\"Uint16\",name:\"iconQuadStartIndex\"},{type:\"Uint16\",name:\"iconQuadEndIndex\"},{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Int8\",name:\"index\"}]});i.extendAll(o.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}})},{\"../util/struct_array\":431,\"../util/util\":433,\"point-geometry\":477}],397:[function(t,e,r){\"use strict\";var n=t(\"../util/struct_array\"),i=t(\"../util/util\"),a=t(\"point-geometry\"),o=t(\"./quads\").SymbolQuad,s=e.exports=new n({members:[{type:\"Int16\",name:\"anchorPointX\"},{type:\"Int16\",name:\"anchorPointY\"},{type:\"Float32\",name:\"tlX\"},{type:\"Float32\",name:\"tlY\"},{type:\"Float32\",name:\"trX\"},{type:\"Float32\",name:\"trY\"},{type:\"Float32\",name:\"blX\"},{type:\"Float32\",name:\"blY\"},{type:\"Float32\",name:\"brX\"},{type:\"Float32\",name:\"brY\"},{type:\"Int16\",name:\"texH\"},{type:\"Int16\",name:\"texW\"},{type:\"Int16\",name:\"texX\"},{type:\"Int16\",name:\"texY\"},{type:\"Float32\",name:\"anchorAngle\"},{type:\"Float32\",name:\"glyphAngle\"},{type:\"Float32\",name:\"maxScale\"},{type:\"Float32\",name:\"minScale\"}]});i.extendAll(s.prototype.StructType.prototype,{get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)},get SymbolQuad(){return new o(this.anchorPoint,new a(this.tlX,this.tlY),new a(this.trX,this.trY),new a(this.blX,this.blY),new a(this.brX,this.brY),{x:this.texX,y:this.texY,h:this.texH,w:this.texW,height:this.texH,width:this.texW},this.anchorAngle,this.glyphAngle,this.minScale,this.maxScale)}})},{\"../util/struct_array\":431,\"../util/util\":433,\"./quads\":392,\"point-geometry\":477}],398:[function(t,e,r){\"use strict\";var n=t(\"../util/dom\"),i=t(\"point-geometry\"),a={scrollZoom:t(\"./handler/scroll_zoom\"),boxZoom:t(\"./handler/box_zoom\"),dragRotate:t(\"./handler/drag_rotate\"),dragPan:t(\"./handler/drag_pan\"),keyboard:t(\"./handler/keyboard\"),doubleClickZoom:t(\"./handler/dblclick_zoom\"),touchZoomRotate:t(\"./handler/touch_zoom_rotate\")};e.exports=function(t,e){function r(){f=null}function o(e,r){var i=n.mousePos(l,r);return t.fire(e,{lngLat:t.unproject(i),point:i,originalEvent:r})}function s(e,r){var a=n.touchPos(l,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 l=t.getCanvasContainer(),c=null,u=null,f=null;for(var h in a)t[h]=new a[h](t,e),e.interactive&&e[h]&&t[h].enable();l.addEventListener(\"mouseout\",function(t){o(\"mouseout\",t)},!1),l.addEventListener(\"mousedown\",function(e){t.stop(),u=n.mousePos(l,e),o(\"mousedown\",e)},!1),l.addEventListener(\"mouseup\",function(e){var r=t.dragRotate&&t.dragRotate.isActive();c&&!r&&o(\"contextmenu\",c),c=null,o(\"mouseup\",e)},!1),l.addEventListener(\"mousemove\",function(e){if(!(t.dragPan&&t.dragPan.isActive()||t.dragRotate&&t.dragRotate.isActive())){for(var r=e.toElement||e.target;r&&r!==l;)r=r.parentNode;r===l&&o(\"mousemove\",e)}},!1),l.addEventListener(\"touchstart\",function(e){t.stop(),s(\"touchstart\",e),!e.touches||e.touches.length>1||(f?(clearTimeout(f),f=null,o(\"dblclick\",e)):f=setTimeout(r,300))},!1),l.addEventListener(\"touchend\",function(t){s(\"touchend\",t)},!1),l.addEventListener(\"touchmove\",function(t){s(\"touchmove\",t)},!1),l.addEventListener(\"touchcancel\",function(t){s(\"touchcancel\",t)},!1),l.addEventListener(\"click\",function(t){n.mousePos(l,t).equals(u)&&o(\"click\",t)},!1),l.addEventListener(\"dblclick\",function(t){o(\"dblclick\",t),t.preventDefault()},!1),l.addEventListener(\"contextmenu\",function(t){c=t,t.preventDefault()},!1)}},{\"../util/dom\":419,\"./handler/box_zoom\":404,\"./handler/dblclick_zoom\":405,\"./handler/drag_pan\":406,\"./handler/drag_rotate\":407,\"./handler/keyboard\":408,\"./handler/scroll_zoom\":409,\"./handler/touch_zoom_rotate\":410,\"point-geometry\":477}],399:[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\"),c=e.exports=function(){};n.extend(c.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())<this._bearingSnap?this.resetNorth(t,e):this},getPitch:function(){return this.transform.pitch},setPitch:function(t,e){return this.jumpTo({pitch:t},e),this},fitBounds:function(t,e,r){e=n.extend({padding:0,offset:[0,0],maxZoom:1/0},e),t=s.convert(t);var i=l.convert(e.offset),a=this.transform,o=a.project(t.getNorthWest()),c=a.project(t.getSouthEast()),u=c.sub(o),f=(a.width-2*e.padding-2*Math.abs(i.x))/u.x,h=(a.height-2*e.padding-2*Math.abs(i.y))/u.y;return e.center=a.unproject(o.add(c).div(2)),e.zoom=Math.min(a.scaleZoom(a.scale*Math.min(f,h)),e.maxZoom),e.bearing=0,e.linear?this.easeTo(e,r):this.flyTo(e,r)},jumpTo:function(t,e){this.stop();var r=this.transform,n=!1,i=!1,a=!1;return\"zoom\"in t&&r.zoom!==+t.zoom&&(n=!0,r.zoom=+t.zoom),\"center\"in t&&(r.center=o.convert(t.center)),\"bearing\"in t&&r.bearing!==+t.bearing&&(i=!0,r.bearing=+t.bearing),\"pitch\"in t&&r.pitch!==+t.pitch&&(a=!0,r.pitch=+t.pitch),this.fire(\"movestart\",e).fire(\"move\",e),n&&this.fire(\"zoomstart\",e).fire(\"zoom\",e).fire(\"zoomend\",e),i&&this.fire(\"rotate\",e),a&&this.fire(\"pitch\",e),this.fire(\"moveend\",e)},easeTo:function(t,e){this.stop(),t=n.extend({offset:[0,0],duration:500,easing:n.ease},t);var r,a,s=this.transform,c=l.convert(t.offset),u=this.getZoom(),f=this.getBearing(),h=this.getPitch(),d=\"zoom\"in t?+t.zoom:u,p=\"bearing\"in t?this._normalizeBearing(t.bearing,f):f,m=\"pitch\"in t?+t.pitch:h;\"center\"in t?(r=o.convert(t.center),a=s.centerPoint.add(c)):\"around\"in t?(r=o.convert(t.around),a=s.locationPoint(r)):(a=s.centerPoint.add(c),r=s.pointLocation(a));var g=s.locationPoint(r);return!1===t.animate&&(t.duration=0),this.zooming=d!==u,this.rotating=f!==p,this.pitching=m!==h,t.noMoveStart||this.fire(\"movestart\",e),this.zooming&&this.fire(\"zoomstart\",e),clearTimeout(this._onEaseEnd),this._ease(function(t){this.zooming&&(s.zoom=i(u,d,t)),this.rotating&&(s.bearing=i(f,p,t)),this.pitching&&(s.pitch=i(h,m,t)),s.setLocationAtPoint(r,g.add(a.sub(g)._mult(t))),this.fire(\"move\",e),this.zooming&&this.fire(\"zoom\",e),this.rotating&&this.fire(\"rotate\",e),this.pitching&&this.fire(\"pitch\",e)},function(){t.delayEndEvents?this._onEaseEnd=setTimeout(this._easeToEnd.bind(this,e),t.delayEndEvents):this._easeToEnd(e)}.bind(this),t),this},_easeToEnd:function(t){var e=this.zooming;this.zooming=!1,this.rotating=!1,this.pitching=!1,e&&this.fire(\"zoomend\",t),this.fire(\"moveend\",t)},flyTo:function(t,e){function r(t){var e=(k*k-M*M+(t?-1:1)*E*E*A*A)/(2*(t?k:M)*E*A);return Math.log(Math.sqrt(e*e+1)-e)}function a(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}this.stop(),t=n.extend({offset:[0,0],speed:1.2,curve:1.42,easing:n.ease},t);var c=this.transform,u=l.convert(t.offset),f=this.getZoom(),h=this.getBearing(),d=this.getPitch(),p=\"center\"in t?o.convert(t.center):this.getCenter(),m=\"zoom\"in t?+t.zoom:f,g=\"bearing\"in t?this._normalizeBearing(t.bearing,h):h,v=\"pitch\"in t?+t.pitch:d;Math.abs(c.center.lng)+Math.abs(p.lng)>180&&(c.center.lng>0&&p.lng<0?p.lng+=360:c.center.lng<0&&p.lng>0&&(p.lng-=360));var y=c.zoomScale(m-f),x=c.point,b=\"center\"in t?c.project(p).sub(u.div(y)):x,_=c.worldSize,w=t.curve,M=Math.max(c.width,c.height),k=M/y,A=b.sub(x).mag();if(\"minZoom\"in t){var T=n.clamp(Math.min(t.minZoom,f,m),c.minZoom,c.maxZoom),S=M/c.zoomScale(T-f);w=Math.sqrt(S/A*2)}var E=w*w,L=r(0),C=function(t){return s(L)/s(L+w*t)},z=function(t){return M*((s(L)*function(t){return a(t)/s(t)}(L+w*t)-a(L))/E)/A},D=(r(1)-L)/w;if(Math.abs(A)<1e-6){if(Math.abs(M-k)<1e-6)return this.easeTo(t);var I=k<M?-1:1;D=Math.abs(Math.log(k/M))/w,z=function(){return 0},C=function(t){return Math.exp(I*w*t)}}if(\"duration\"in t)t.duration=+t.duration;else{var P=\"screenSpeed\"in t?+t.screenSpeed/w:+t.speed;t.duration=1e3*D/P}return this.zooming=!0,h!==g&&(this.rotating=!0),d!==v&&(this.pitching=!0),this.fire(\"movestart\",e),this.fire(\"zoomstart\",e),this._ease(function(t){var r=t*D,n=z(r);c.zoom=f+c.scaleZoom(1/C(r)),c.center=c.unproject(x.add(b.sub(x).mult(n)),_),this.rotating&&(c.bearing=i(h,g,t)),this.pitching&&(c.pitch=i(d,v,t)),this.fire(\"move\",e),this.fire(\"zoom\",e),this.rotating&&this.fire(\"rotate\",e),this.pitching&&this.fire(\"pitch\",e)},function(){this.zooming=!1,this.rotating=!1,this.pitching=!1,this.fire(\"zoomend\",e),this.fire(\"moveend\",e)},t),this},isEasing:function(){return!!this._abortFn},stop:function(){return this._abortFn&&(this._abortFn(),this._finishEase()),this},_ease:function(t,e,r){this._finishFn=e,this._abortFn=a.timed(function(e){t.call(this,r.easing(e)),1===e&&this._finishEase()},!1===r.animate?0:r.duration,this)},_finishEase:function(){delete this._abortFn;var t=this._finishFn;delete this._finishFn,t.call(this)},_normalizeBearing:function(t,e){t=n.wrap(t,-180,180);var r=Math.abs(t-e);return Math.abs(t-360-e)<r&&(t-=360),Math.abs(t+360-e)<r&&(t+=360),t},_updateEasing:function(t,e,r){var i;if(this.ease){var a=this.ease,o=(Date.now()-a.start)/a.duration,s=a.easing(o+.01)-a.easing(o),l=.27/Math.sqrt(s*s+1e-4)*.01,c=Math.sqrt(.0729-l*l);i=n.bezier(l,c,.25,1)}else i=r?n.bezier.apply(n,r):n.ease;return this.ease={start:(new Date).getTime(),to:Math.pow(2,e),duration:t,easing:i},i}})},{\"../geo/lng_lat\":330,\"../geo/lng_lat_bounds\":331,\"../util/browser\":417,\"../util/interpolate\":427,\"../util/util\":433,\"point-geometry\":477}],400:[function(t,e,r){\"use strict\";function n(t){o.setOptions(this,t)}var i=t(\"./control\"),a=t(\"../../util/dom\"),o=t(\"../../util/util\");e.exports=n,n.createAttributionString=function(t){var e=[];for(var r in t){var n=t[r];n.attribution&&e.indexOf(n.attribution)<0&&e.push(n.attribution)}return e.sort(function(t,e){return t.length-e.length}),(e=e.filter(function(t,r){for(var n=r+1;n<e.length;n++)if(e[n].indexOf(t)>=0)return!1;return!0})).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\":419,\"../../util/util\":433,\"./control\":401}],401:[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\":425,\"../../util/util\":433}],402:[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\":417,\"../../util/dom\":419,\"../../util/util\":433,\"./control\":401}],403:[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\":419,\"../../util/util\":433,\"./control\":401}],404:[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\":331,\"../../util/dom\":419,\"../../util/util\":433}],405:[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)}}},{}],406:[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)e();else{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]))e();else{var l=a.mult(.3/s),c=l.mag();c>1400&&(c=1400,l._unit()._mult(c));var u=c/750,f=l.mult(-u/2);this._map.panBy(f,{duration:1e3*u,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\":419,\"../../util/util\":433}],407:[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,c=l[l.length-1];this._drainInertiaBuffer(),l.push([Date.now(),e._normalizeBearing(s,c[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)<this._bearingSnap?e.resetNorth({noMoveStart:!0},{originalEvent:t}):this._fireEvent(\"moveend\",t)}.bind(this);if(n.length<2)i();else{var a=n[0],o=n[n.length-1],l=n[n.length-2],c=e._normalizeBearing(r,l[1]),u=o[1]-a[1],f=u<0?-1:1,h=(o[0]-a[0])/1e3;if(0!==u&&0!==h){var d=Math.abs(u*(.25/h));d>180&&(d=180);var p=d/180;c+=f*d*(p/2),Math.abs(e._normalizeBearing(c,0))<this._bearingSnap&&(c=e._normalizeBearing(0,c)),e.rotateTo(c,{duration:1e3*p,easing:s,noMoveStart:!0},{originalEvent:t})}else i()}}},_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.dragPan&&e.dragPan.isActive())return!0;if(t.touches)return t.touches.length>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\":419,\"../../util/util\":433,\"point-geometry\":477}],408:[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))}}}}},{}],409:[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\"),c=-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,c&&(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\":417,\"../../util/dom\":419,\"../../util/util\":433}],410:[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 c={duration:0,around:l.unproject(n)};\"rotate\"===this._gestureIntent&&(c.bearing=this._startBearing+s),\"zoom\"!==this._gestureIntent&&\"rotate\"!==this._gestureIntent||(c.zoom=l.transform.scaleZoom(this._startScale*o)),l.stop(),this._drainInertiaBuffer(),this._inertia.push([Date.now(),o,n]),l.easeTo(c,{originalEvent:t})}else{var u=Math.abs(1-o)>.15;Math.abs(s)>4?this._gestureIntent=\"rotate\":u&&(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)r.snapToNorth({},{originalEvent:t});else{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,c=(n[0]-i[0])/1e3,u=n[2];if(0!==c&&a!==s){var f=.15*l/c;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var h=1e3*Math.abs(f/(12*.15)),d=a+f*h/2e3;d<0&&(d=0),r.easeTo({zoom:d,duration:h,easing:o,around:r.unproject(u)},{originalEvent:t})}else r.snapToNorth({},{originalEvent:t})}},_drainInertiaBuffer:function(){for(var t=this._inertia,e=Date.now();t.length>2&&e-t[0][0]>160;)t.shift()}}},{\"../../util/dom\":419,\"../../util/util\":433}],411:[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\":433}],412:[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\"),c=t(\"../util/dom\"),u=t(\"../style/style\"),f=t(\"../style/animation_loop\"),h=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\"),x=t(\"point-geometry\"),b=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)).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 f,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 b(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<t.length;n++)\"\"!==t[n]&&(r[t[n]]=!0);return this._classes=Object.keys(r),this._classOptions=e,this.style&&this.style.updateClasses(),this._update(!0)},hasClass:function(t){return this._classes.indexOf(t)>=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 x(0,0)),this.transform.pointLocation(this.transform.size));return(this.transform.angle||this.transform.pitch)&&(t.extend(this.transform.pointLocation(new x(this.transform.size.x,0))),t.extend(this.transform.pointLocation(new x(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()<t&&this.setZoom(t),this;throw new Error(\"minZoom must be between 0 and the current maxZoom, inclusive\")},setMaxZoom:function(t){if((t=null===t||void 0===t?20:t)>=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(x.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 x||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=[x.convert([0,0]),x.convert([this.transform.width,this.transform.height])]);var e;if(t instanceof x||\"number\"==typeof t[0]){e=[x.convert(t)]}else{var r=[x.convert(t[0]),x.convert(t[1])];e=[r[0],new x(r[1].x,r[0].y),r[1],new x(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 u?t:new u(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=c.create(\"div\",\"mapboxgl-canvas-container\",t);this._interactive&&e.classList.add(\"mapboxgl-interactive\"),this._canvas=new i(this,e);var r=this._controlContainer=c.create(\"div\",\"mapboxgl-control-container\",t),n=this._controlCorners={};[\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"].forEach(function(t){n[t]=c.create(\"div\",\"mapboxgl-ctrl-\"+t,r)})},_setupPainter:function(){var t=this._canvas.getWebGLContext({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer});t?this.painter=new h(t,this.transform):this.fire(\"error\",{error:new Error(\"Failed to initialize WebGL\")})},_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\":330,\"../geo/lng_lat_bounds\":331,\"../geo/transform\":332,\"../render/painter\":346,\"../style/animation_loop\":366,\"../style/style\":369,\"../util/browser\":417,\"../util/canvas\":418,\"../util/dom\":419,\"../util/evented\":425,\"../util/util\":433,\"./bind_handlers\":398,\"./camera\":399,\"./control/attribution\":400,\"./hash\":411,\"point-geometry\":477}],413:[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\":330,\"../util/dom\":419,\"point-geometry\":477}],414:[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;e=n.firstChild;)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.y<n?[\"top\"]:t.y>this._map.transform.height-n?[\"bottom\"]:[],t.x<r/2?e.push(\"left\"):t.x>this._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\":330,\"../util/dom\":419,\"../util/evented\":425,\"../util/util\":433}],415:[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:\"<response>\",id:String(i),error:t?String(t):null,data:e},r)}var r,n=t.data,i=n.id;if(\"<response>\"===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)}},{}],416:[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<t.length;i++){var a=document.createElement(\"source\");n(t[i])||(r.crossOrigin=\"Anonymous\"),a.src=t[i],r.appendChild(a)}return r.getData=function(){return r},r}},{}],417:[function(t,e,r){\"use strict\";r.window=window,e.exports.now=window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now.bind(Date);var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;r.frame=function(t){return n(t)};var i=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;r.cancelFrame=function(t){i(t)},r.timed=function(t,n,i){function a(l){o||((l=e.exports.now())>=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\":318}],418:[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\":433,\"mapbox-gl-supported\":318}],419:[function(t,e,r){\"use strict\";function n(t){for(var e=0;e<t.length;e++)if(t[e]in s)return t[e]}function i(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener(\"click\",i,!0)}var a=t(\"point-geometry\");r.create=function(t,e,r){var n=document.createElement(t);return e&&(n.className=e),r&&r.appendChild(n),n};var o,s=document.documentElement.style,l=n([\"userSelect\",\"MozUserSelect\",\"WebkitUserSelect\",\"msUserSelect\"]);r.disableDrag=function(){l&&(o=s[l],s[l]=\"none\")},r.enableDrag=function(){l&&(s[l]=o)};var c=n([\"transform\",\"WebkitTransform\"]);r.setTransform=function(t,e){t.style[c]=e},r.suppressClick=function(){window.addEventListener(\"click\",i,!0),window.setTimeout(function(){window.removeEventListener(\"click\",i,!0)},0)},r.mousePos=function(t,e){var r=t.getBoundingClientRect();return e=e.touches?e.touches[0]:e,new a(e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop)},r.touchPos=function(t,e){for(var r=t.getBoundingClientRect(),n=[],i=0;i<e.touches.length;i++)n.push(new a(e.touches[i].clientX-r.left-t.clientLeft,e.touches[i].clientY-r.top-t.clientTop));return n}},{\"point-geometry\":477}],420:[function(t,e,r){\"use strict\";var n=t(\"webworkify\");e.exports=function(){return new n(t(\"../../source/worker\"))}},{\"../../source/worker\":364,webworkify:578}],421:[function(t,e,r){\"use strict\";function n(t,e){return e.area-t.area}var i=t(\"quickselect\");e.exports=function(t,e){var r=t.length;if(r<=1)return[t];for(var a,o,s=[],l=0;l<r;l++){var c=function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}(t[l]);0!==c&&(t[l].area=Math.abs(c),void 0===o&&(o=c<0),o===c<0?(a&&s.push(a),a=[t[l]]):a.push(t[l]))}if(a&&s.push(a),e>1)for(var u=0;u<s.length;u++)s[u].length<=e||(i(s[u],e,1,s[u].length-1,n),s[u]=s[u].slice(0,e));return s}},{quickselect:494}],422:[function(t,e,r){\"use strict\";e.exports={API_URL:\"https://api.mapbox.com\",REQUIRE_ACCESS_TOKEN:!0}},{}],423:[function(t,e,r){\"use strict\";function n(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}}var i=t(\"assert\");e.exports=n,n.prototype.encode=function(t){return i(t in this._stringToNumber),this._stringToNumber[t]},n.prototype.decode=function(t){return i(t<this._numberToString.length),this._numberToString[t]}},{assert:51}],424:[function(t,e,r){\"use strict\";function n(t,e){this.actors=[],this.currentActor=0;for(var r=0;r<t;r++){var n=new o,i=new a(n,e);i.name=\"Worker \"+r,this.actors.push(i)}}var i=t(\"./util\"),a=t(\"./actor\"),o=t(\"./web_worker\");e.exports=n,n.prototype={broadcast:function(t,e,r){r=r||function(){},i.asyncAll(this.actors,function(r,n){r.send(t,e,n)},r)},send:function(t,e,r,n,i){return(\"number\"!=typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[n].send(t,e,r,i),n},remove:function(){for(var t=0;t<this.actors.length;t++)this.actors[t].target.terminate();this.actors=[]}}},{\"./actor\":415,\"./util\":433,\"./web_worker\":420}],425:[function(t,e,r){\"use strict\";var n=t(\"./util\"),i={on:function(t,e){return this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e),this},off:function(t,e){if(!t)return delete this._events,this;if(!this.listens(t))return this;if(e){var r=this._events[t].indexOf(e);r>=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<r.length;i++)r[i].call(this,e);return this},listens:function(t){return!(!this._events||!this._events[t])}};e.exports=i},{\"./util\":433}],426:[function(t,e,r){\"use strict\";function n(t,e,r){if(1===t){var n=r.readMessage(i,{glyphs:{}});e.push(n)}}function i(t,e,r){if(1===t)e.name=r.readString();else if(2===t)e.range=r.readString();else if(3===t){var n=r.readMessage(a,{});e.glyphs[n.id]=n}}function a(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}e.exports=function(t,e){this.stacks=t.readFields(n,[],e)}},{}],427:[function(t,e,r){\"use strict\";function n(t,e,r){return t*(1-r)+e*r}e.exports=n,n.number=n,n.vec2=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r)]},n.color=function(t,e,r){return[n(t[0],e[0],r),n(t[1],e[1],r),n(t[2],e[2],r),n(t[3],e[3],r)]},n.array=function(t,e,r){return t.map(function(t,i){return n(t,e[i],r)})}},{}],428:[function(t,e,r){\"use strict\";function n(t,e){for(var r=0;r<t.length-1;r++)for(var n=t[r],a=t[r+1],o=0;o<e.length-1;o++){if(function(t,e,r,n){return i(t,r,n)!==i(e,r,n)&&i(t,e,r)!==i(t,e,n)}(n,a,e[o],e[o+1]))return!0}return!1}function i(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function a(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++){if(function(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}(t,e[i-1],e[i])<n)return!0}return!1}function o(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.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 s(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.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:function(t,e,r){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<e.length;o++)for(var l=e[o],c=0;c<l.length;c++){var u=l[c];if(s(i,u))return!0;if(a(u,i,r))return!0}return!1},multiPolygonIntersectsMultiPolygon:function(t,e){if(1===t.length&&1===t[0].length)return o(e,t[0][0]);for(var r=0;r<e.length;r++)for(var i=e[r],a=0;a<i.length;a++)if(o(t,i[a]))return!0;for(var s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++)if(o(e,l[c]))return!0;for(var u=0;u<e.length;u++)if(n(l,e[u]))return!0}return!1},multiPolygonIntersectsBufferedMultiLine:function(t,e,r){for(var i=0;i<e.length;i++)for(var o=e[i],l=0;l<t.length;l++){var c=t[l];if(c.length>=3)for(var u=0;u<o.length;u++)if(s(c,o[u]))return!0;if(function(t,e,r){if(t.length>1){if(n(t,e))return!0;for(var i=0;i<e.length;i++)if(a(e[i],t,r))return!0}for(var o=0;o<t.length;o++)if(a(t[o],e,r))return!0;return!1}(c,o,r))return!0}return!1}}},{}],429:[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}},{}],430:[function(t,e,r){\"use strict\";function n(t,e,r){if(!(r=r||a.ACCESS_TOKEN)&&a.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:\\/\\//,a.API_URL+e),t+=-1!==t.indexOf(\"?\")?\"&access_token=\":\"?access_token=\",a.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:\"\"}var a=t(\"./config\"),o=t(\"./browser\"),s=t(\"url\"),l=t(\"./util\");e.exports.normalizeStyleURL=function(t,e){var r=s.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:\"!==s.parse(t).protocol?t:n(t+\".json\",\"/v4/\",e)+\"&secure\"},e.exports.normalizeGlyphsURL=function(t,e){var r=s.parse(t);if(\"mapbox:\"!==r.protocol)return t;return 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=s.parse(t);return\"mapbox:\"!==o.protocol?(o.pathname+=e+r,s.format(o)):n(\"mapbox:/\"+o.pathname+\"/sprite\"+e+r+i(o.query),\"/styles/v1/\",a)},e.exports.normalizeTileURL=function(t,e,r){var n=s.parse(t,!0);if(!e)return t;if(\"mapbox:\"!==s.parse(e).protocol)return t;var i=o.supportsWebp?\".webp\":\"$1\",c=o.devicePixelRatio>=2||512===r?\"@2x\":\"\";return s.format({protocol:n.protocol,hostname:n.hostname,pathname:n.pathname.replace(/(\\.(?:png|jpg)\\d*)/,c+i),query:function(t){return t.access_token&&\"tk.\"===t.access_token.slice(0,3)?l.extend({},t,{access_token:a.ACCESS_TOKEN}):t}(n.query)})}},{\"./browser\":417,\"./config\":422,\"./util\":433,url:559}],431:[function(t,e,r){\"use strict\";function n(){return{members:this.prototype.StructType.prototype.members,alignment:this.prototype.StructType.prototype.alignment,bytesPerElement:this.prototype.bytesPerElement}}function i(t,e){return Math.ceil(t/e)*e}function a(t){return f[t].BYTES_PER_ELEMENT}function o(t){return t.toLowerCase()}function s(t,e){var r=\"this._pos\"+a(t.type).toFixed(0)+\" + \"+(t.offset/a(t.type)+e).toFixed(0);return\"this._structArray.\"+o(t.type)+\"[\"+r+\"]\"}function l(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}function c(t){void 0!==t?(this.arrayBuffer=t.arrayBuffer,this.length=t.length,this.capacity=this.arrayBuffer.byteLength/this.bytesPerElement,this._refreshViews()):(this.capacity=-1,this.resize(0))}var u=t(\"assert\");e.exports=function(t){function e(){l.apply(this,arguments)}function r(){c.apply(this,arguments),this.members=e.prototype.members}var d=JSON.stringify(t);if(h[d])return h[d];void 0===t.alignment&&(t.alignment=1);var p=0,m=0,g=[\"Uint8\"];return(e.prototype=Object.create(l.prototype)).members=t.members.map(function(r){r={name:r.name,type:r.type,components:r.components||1},u(r.name.length),u(r.type in f),g.indexOf(r.type)<0&&g.push(r.type);var n=a(r.type);m=Math.max(m,n),r.offset=p=i(p,Math.max(t.alignment,n));for(var o=0;o<r.components;o++)Object.defineProperty(e.prototype,r.name+(1===r.components?\"\":o),{get:function(t,e){return new Function([],\"return \"+s(t,e)+\";\")}(r,o),set:function(t,e){return new Function([\"x\"],s(t,e)+\" = x;\")}(r,o)});return p+=n*r.components,r}),e.prototype.alignment=t.alignment,e.prototype.size=i(p,Math.max(m,t.alignment)),r.serialize=n,r.prototype=Object.create(c.prototype),r.prototype.StructType=e,r.prototype.bytesPerElement=e.prototype.size,r.prototype.emplaceBack=function(t,e){for(var r=[],n=[],i=\"var i = this.length;\\nthis.resize(this.length + 1);\\n\",s=0;s<t.length;s++){var l=t[s],c=a(l.type);r.indexOf(c)<0&&(r.push(c),i+=\"var o\"+c.toFixed(0)+\" = i * \"+(e/c).toFixed(0)+\";\\n\");for(var u=0;u<l.components;u++){var f=\"v\"+n.length,h=\"o\"+c.toFixed(0)+\" + \"+(l.offset/c+u).toFixed(0);i+=\"this.\"+o(l.type)+\"[\"+h+\"] = \"+f+\";\\n\",n.push(f)}}return i+=\"return i;\",new Function(n,i)}(e.prototype.members,e.prototype.size),r.prototype._usedTypes=g,h[d]=r,r};var f={Int8:Int8Array,Uint8:Uint8Array,Uint8Clamped:Uint8ClampedArray,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array,Float64:Float64Array},h={};c.prototype.DEFAULT_CAPACITY=128,c.prototype.RESIZE_MULTIPLIER=5,c.prototype.serialize=function(){return this.trim(),{length:this.length,arrayBuffer:this.arrayBuffer}},c.prototype.get=function(t){return new this.StructType(this,t)},c.prototype.trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},c.prototype.resize=function(t){if(this.length=t,t>this.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)}},c.prototype._refreshViews=function(){for(var t=0;t<this._usedTypes.length;t++){var e=this._usedTypes[t];this[o(e)]=new f[e](this.arrayBuffer)}},c.prototype.toArray=function(t,e){for(var r=[],n=t;n<e;n++){var i=this.get(n);r.push(i)}return r}},{assert:51}],432:[function(t,e,r){\"use strict\";e.exports=function(t,e){return e.replace(/{([^{}]+)}/g,function(e,r){return r in t?t[r]:\"\"})}},{}],433:[function(t,e,r){\"use strict\";var n=t(\"unitbezier\"),i=t(\"../geo/coordinate\");r.easeCubicInOut=function(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)},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<arguments.length;t++){var e=arguments[t];if(null!==e&&void 0!==e)return e}},r.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach(function(t,o){e(t,function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)})})},r.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},r.extend=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t},r.extendAll=function(t,e){for(var r in e)Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t},r.inherit=function(t,e){var n=\"function\"==typeof t?t.prototype:t,i=Object.create(n);return r.extendAll(i,e),i},r.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r};var a=1;r.uniqueId=function(){return a++},r.debounce=function(t,e){var r,n;return function(){n=arguments,clearTimeout(r),r=setTimeout(function(){t.apply(null,n)},e)}},r.bindAll=function(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})},r.bindHandlers=function(t){for(var e in t)\"function\"==typeof t[e]&&0===e.indexOf(\"_on\")&&(t[e]=t[e].bind(t))},r.setOptions=function(t,e){t.hasOwnProperty(\"options\")||(t.options=t.options?Object.create(t.options):{});for(var r in e)t.options[r]=e[r];return t.options},r.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,n=-1/0,a=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),r=Math.min(r,t[o].row),n=Math.max(n,t[o].column),a=Math.max(a,t[o].row);var s=n-e,l=a-r,c=Math.max(s,l);return new i((e+n)/2,(r+a)/2,0).zoomTo(Math.floor(-Math.log(c)/Math.LN2))},r.endsWith=function(t,e){return-1!==t.indexOf(e,t.length-e.length)},r.startsWith=function(t,e){return 0===t.indexOf(e)},r.mapObject=function(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n},r.filterObject=function(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n},r.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if(\"object\"==typeof e&&null!==e&&null!==r){if(\"object\"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},r.clone=function(t){return Array.isArray(t)?t.map(r.clone):\"object\"==typeof t?r.mapObject(t,r.clone):t},r.arraysIntersect=function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1};var o={};r.warnOnce=function(t){o[t]||(\"undefined\"!=typeof console&&console.warn(t),o[t]=!0)}},{\"../geo/coordinate\":329,unitbezier:557}],434:[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}}},{}],435:[function(t,e,r){e.exports={_args:[[\"mapbox-gl@0.22.1\",\"/Users/alex/plotly/plotly.js\"]],_from:\"mapbox-gl@0.22.1\",_id:\"mapbox-gl@0.22.1\",_inBundle:!1,_integrity:\"sha1-kqllVH1MLyTCLLxIfu2khpTLYno=\",_location:\"/mapbox-gl\",_phantomChildren:{},_requested:{type:\"version\",registry:!0,raw:\"mapbox-gl@0.22.1\",name:\"mapbox-gl\",escapedName:\"mapbox-gl\",rawSpec:\"0.22.1\",saveSpec:null,fetchSpec:\"0.22.1\"},_requiredBy:[\"/\"],_resolved:\"https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.22.1.tgz\",_spec:\"0.22.1\",_where:\"/Users/alex/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\"},engines:{node:\">=4.0.0\"},homepage:\"https://github.com/mapbox/mapbox-gl-js#readme\",license:\"BSD-3-Clause\",main:\"js/mapbox-gl.js\",name:\"mapbox-gl\",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\"}},{}],436:[function(t,e,r){\"use strict\";function n(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=0,i===e&&(n[i]+=.5),i===r&&(n[i]+=.5);return n}function i(t,e){if(0===e||e===(1<<t+1)-1)return[];for(var r=[],i=[],o=0;o<=t;++o)if(e&1<<o){r.push(n(t,o-1,o-1)),i.push(null);for(var s=0;s<=t;++s)~e&1<<s&&(r.push(n(t,o-1,s-1)),i.push([o,s]))}var l=a(r),c=[];t:for(o=0;o<l.length;++o){var u=l[o],f=[];for(s=0;s<u.length;++s){if(!i[u[s]])continue t;f.push(i[u[s]].slice())}c.push(f)}return c}e.exports=function(t){for(var e=1<<t+1,r=new Array(e),n=0;n<e;++n)r[n]=i(t,n);return r};var a=t(\"convex-hull\")},{\"convex-hull\":109}],437:[function(t,e,r){function n(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}var i=t(\"./normalize\"),a=t(\"gl-mat4/create\"),o=t(\"gl-mat4/clone\"),s=t(\"gl-mat4/determinant\"),l=t(\"gl-mat4/invert\"),c=t(\"gl-mat4/transpose\"),u={length:t(\"gl-vec3/length\"),normalize:t(\"gl-vec3/normalize\"),dot:t(\"gl-vec3/dot\"),cross:t(\"gl-vec3/cross\")},f=a(),h=a(),d=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],m=[0,0,0];e.exports=function(t,e,r,a,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),a||(a=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!i(f,t))return!1;if(o(h,f),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(s(h)<1e-8))return!1;var y=f[3],x=f[7],b=f[11],_=f[12],w=f[13],M=f[14],k=f[15];if(0!==y||0!==x||0!==b){d[0]=y,d[1]=x,d[2]=b,d[3]=k;if(!l(h,h))return!1;c(h,h),function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];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}(g,d,h)}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=_,e[1]=w,e[2]=M,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,f),r[0]=u.length(p[0]),u.normalize(p[0],p[0]),a[0]=u.dot(p[0],p[1]),n(p[1],p[1],p[0],1,-a[0]),r[1]=u.length(p[1]),u.normalize(p[1],p[1]),a[0]/=r[1],a[1]=u.dot(p[0],p[2]),n(p[2],p[2],p[0],1,-a[1]),a[2]=u.dot(p[1],p[2]),n(p[2],p[2],p[1],1,-a[2]),r[2]=u.length(p[2]),u.normalize(p[2],p[2]),a[1]/=r[2],a[2]/=r[2],u.cross(m,p[1],p[2]),u.dot(p[0],m)<0)for(var A=0;A<3;A++)r[A]*=-1,p[A][0]*=-1,p[A][1]*=-1,p[A][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(v[0]=-v[0]),p[0][2]>p[2][0]&&(v[1]=-v[1]),p[1][0]>p[0][1]&&(v[2]=-v[2]),!0}},{\"./normalize\":438,\"gl-mat4/clone\":180,\"gl-mat4/create\":181,\"gl-mat4/determinant\":182,\"gl-mat4/invert\":186,\"gl-mat4/transpose\":196,\"gl-vec3/cross\":260,\"gl-vec3/dot\":261,\"gl-vec3/length\":262,\"gl-vec3/normalize\":264}],438:[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}},{}],439:[function(t,e,r){function n(){return{translate:i(),scale:i(1),skew:i(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function i(t){return[t||0,t||0,t||0]}var a=t(\"gl-vec3/lerp\"),o=t(\"mat4-recompose\"),s=t(\"mat4-decompose\"),l=t(\"gl-mat4/determinant\"),c=t(\"quat-slerp\"),u=n(),f=n(),h=n();e.exports=function(t,e,r,n){if(0===l(e)||0===l(r))return!1;var i=s(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),d=s(r,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!(!i||!d||(a(h.translate,u.translate,f.translate,n),a(h.skew,u.skew,f.skew,n),a(h.scale,u.scale,f.scale,n),a(h.perspective,u.perspective,f.perspective,n),c(h.quaternion,u.quaternion,f.quaternion,n),o(t,h.translate,h.scale,h.skew,h.perspective,h.quaternion),0))}},{\"gl-mat4/determinant\":182,\"gl-vec3/lerp\":263,\"mat4-decompose\":437,\"mat4-recompose\":440,\"quat-slerp\":490}],440:[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\":181,\"gl-mat4/fromRotationTranslation\":184,\"gl-mat4/identity\":185,\"gl-mat4/multiply\":188,\"gl-mat4/scale\":194,\"gl-mat4/translate\":195}],441:[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]}var i=t(\"binary-search-bounds\"),a=t(\"mat4-interpolate\"),o=t(\"gl-mat4/invert\"),s=t(\"gl-mat4/rotateX\"),l=t(\"gl-mat4/rotateY\"),c=t(\"gl-mat4/rotateZ\"),u=t(\"gl-mat4/lookAt\"),f=t(\"gl-mat4/translate\"),h=(t(\"gl-mat4/scale\"),t(\"gl-vec3/normalize\")),d=[0,0,0];e.exports=function(t){return new n((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=n.prototype;p.recalcMatrix=function(t){var e=this._time,r=i.le(e,t),n=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)n[c]=s[l++];else{var u=e[r+1]-e[r],f=(l=16*r,this.prevMatrix),d=!0;for(c=0;c<16;++c)f[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],d=d&&f[c]===p[c];if(u<1e-6||d)for(c=0;c<16;++c)n[c]=f[c];else a(n,f,p,(t-e[r])/u)}var m=this.computedUp;m[0]=n[1],m[1]=n[5],m[2]=n[9],h(m,m);var g=this.computedInverse;o(g,n);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-n[2+4*c]*b}},p.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},p.flush=function(t){var e=i.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},p.lastT=function(){return this._time[this._time.length-1]},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||d,n=n||this.computedUp,this.setMatrix(t,u(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},p.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&l(i,i,e),r&&s(i,i,r),n&&c(i,i,n),this.setMatrix(t,o(this.computedMatrix,i))};var m=[0,0,0];p.pan=function(t,e,r,n){m[0]=-(e||0),m[1]=-(r||0),m[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;f(i,i,m),this.setMatrix(t,o(i,i))},p.translate=function(t,e,r,n){m[0]=e||0,m[1]=r||0,m[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;f(i,i,m),this.setMatrix(t,i)},p.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},p.setDistance=function(t,e){this.computedRadius[0]=e},p.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},p.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},{\"binary-search-bounds\":70,\"gl-mat4/invert\":186,\"gl-mat4/lookAt\":187,\"gl-mat4/rotateX\":191,\"gl-mat4/rotateY\":192,\"gl-mat4/rotateZ\":193,\"gl-mat4/scale\":194,\"gl-mat4/translate\":195,\"gl-vec3/normalize\":264,\"mat4-interpolate\":439}],442:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}var a=new Array(e);for(i=0;i<e;++i)a[i]=i;a.sort(function(e,r){var n=t[e][0]-t[r][0];return n||t[e][1]-t[r][1]});var o=[a[0],a[1]],s=[a[0],a[1]];for(i=2;i<e;++i){for(var l=a[i],c=t[l],u=o.length;u>1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i<h;++i)r[f++]=o[i];for(var d=s.length-2;d>0;--d)r[f++]=s[d];return r};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":515}],443:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(t){var e=!1;return\"altKey\"in t&&(e=e||t.altKey!==m.alt,m.alt=!!t.altKey),\"shiftKey\"in t&&(e=e||t.shiftKey!==m.shift,m.shift=!!t.shiftKey),\"ctrlKey\"in t&&(e=e||t.ctrlKey!==m.control,m.control=!!t.ctrlKey),\"metaKey\"in t&&(e=e||t.metaKey!==m.meta,m.meta=!!t.metaKey),e}function i(t,i){var a=n.x(i),o=n.y(i);\"buttons\"in i&&(t=0|i.buttons),(t!==h||a!==d||o!==p||r(i))&&(h=0|t,d=a||0,p=o||0,e&&e(h,d,p,m))}function a(t){i(0,t)}function o(){(h||d||p||m.shift||m.alt||m.meta||m.control)&&(d=p=0,h=0,m.shift=m.alt=m.control=m.meta=!1,e&&e(0,0,0,m))}function s(t){r(t)&&e&&e(h,d,p,m)}function l(t){0===n.buttons(t)?i(0,t):i(h,t)}function c(t){i(h|n.buttons(t),t)}function u(t){i(h&~n.buttons(t),t)}function f(){g||(g=!0,t.addEventListener(\"mousemove\",l),t.addEventListener(\"mousedown\",c),t.addEventListener(\"mouseup\",u),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)))}e||(e=t,t=window);var h=0,d=0,p=0,m={shift:!1,alt:!1,control:!1,meta:!1},g=!1;f();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return g},set:function(e){e?f():g&&(g=!1,t.removeEventListener(\"mousemove\",l),t.removeEventListener(\"mousedown\",c),t.removeEventListener(\"mouseup\",u),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)))},enumerable:!0},buttons:{get:function(){return h},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return m},enumerable:!0}}),v};var n=t(\"mouse-event\")},{\"mouse-event\":445}],444:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=function(t){return t===window||t===document||t===document.body?n:t.getBoundingClientRect()}(e);return r[0]=i-o.left,r[1]=a-o.top,r}},{}],445:[function(t,e,r){\"use strict\";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if(\"object\"==typeof t){if(\"buttons\"in t)return t.buttons;if(\"which\"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if(\"button\"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},r.element=n,r.x=function(t){if(\"object\"==typeof t){if(\"offsetX\"in t)return t.offsetX;var e=n(t).getBoundingClientRect();return t.clientX-e.left}return 0},r.y=function(t){if(\"object\"==typeof t){if(\"offsetY\"in t)return t.offsetY;var e=n(t).getBoundingClientRect();return t.clientY-e.top}return 0}},{}],446:[function(t,e,r){\"use strict\";var n=t(\"to-px\");e.exports=function(t,e,r){\"function\"==typeof t&&(r=!!e,e=t,t=window);var i=n(\"ex\",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=1;switch(t.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(n*=s,a*=s,o*=s,n||a||o)return e(n,a,o,t)};return t.addEventListener(\"wheel\",a),a}},{\"to-px\":548}],447:[function(t,e,r){\"use strict\";function n(t){return\"a\"+t}function i(t){return\"d\"+t}function a(t,e){return\"c\"+t+\"_\"+e}function o(t){return\"s\"+t}function s(t,e){return\"t\"+t+\"_\"+e}function l(t){return\"o\"+t}function c(t){return\"x\"+t}function u(t){return\"p\"+t}function f(t,e){return\"d\"+t+\"_\"+e}function h(t){return\"i\"+t}function d(t,e){return\"u\"+t+\"_\"+e}function p(t){return\"b\"+t}function m(t){return\"y\"+t}function g(t){return\"e\"+t}function v(t){return\"v\"+t}function y(t,e,r){for(var n=0,i=0;i<t;++i)e&1<<i&&(n|=1<<r[i]);return n}function x(t,e,r,x,S,E){function L(t,e){F.push(\"for(\",h(S[t]),\"=\",e,\";\",h(S[t]),\"<\",o(S[t]),\";\",\"++\",h(S[t]),\"){\")}function C(t){for(var e=0;e<I;++e)F.push(u(e),\"+=\",d(e,S[t]),\";\");F.push(\"}\")}function z(){for(var t=1;t<1<<P;++t)F.push(T,\"=\",g(t),\";\",g(t),\"=\",m(t),\";\",m(t),\"=\",T,\";\")}function D(t,e){if(t<0)!function(t){for(var e=0;e<I;++e)E[e]?F.push(a(e,0),\"=\",i(e),\".get(\",u(e),\");\"):F.push(a(e,0),\"=\",i(e),\"[\",u(e),\"];\");var r=[];for(e=0;e<I;++e)r.push(a(e,0));for(e=0;e<x;++e)r.push(c(e));F.push(p(0),\"=\",w,\"[\",A,\"]=phase(\",r.join(),\");\");for(var n=1;n<1<<P;++n)F.push(p(n),\"=\",w,\"[\",A,\"+\",g(n),\"];\");var o=[];for(n=1;n<1<<P;++n)o.push(\"(\"+p(0)+\"!==\"+p(n)+\")\");F.push(\"if(\",o.join(\"||\"),\"){\");var s=[];for(e=0;e<P;++e)s.push(h(e));for(e=0;e<I;++e)for(s.push(a(e,0)),n=1;n<1<<P;++n)E[e]?F.push(a(e,n),\"=\",i(e),\".get(\",u(e),\"+\",f(e,n),\");\"):F.push(a(e,n),\"=\",i(e),\"[\",u(e),\"+\",f(e,n),\"];\"),s.push(a(e,n));for(e=0;e<1<<P;++e)s.push(p(e));for(e=0;e<x;++e)s.push(c(e));F.push(\"vertex(\",s.join(),\");\",v(0),\"=\",_,\"[\",A,\"]=\",M,\"++;\");var l=(1<<P)-1,d=p(l);for(n=0;n<P;++n)if(0==(t&~(1<<n))){for(var m=l^1<<n,y=p(m),b=[],k=m;k>0;k=k-1&m)b.push(_+\"[\"+A+\"+\"+g(k)+\"]\");for(b.push(v(0)),k=0;k<I;++k)1&n?b.push(a(k,l),a(k,m)):b.push(a(k,m),a(k,l));for(1&n?b.push(d,y):b.push(y,d),k=0;k<x;++k)b.push(c(k));F.push(\"if(\",d,\"!==\",y,\"){\",\"face(\",b.join(),\")}\")}F.push(\"}\",A,\"+=1;\")}(e);else{!function(t){for(var e=t-1;e>=0;--e)L(e,0);var r=[];for(e=0;e<I;++e)E[e]?r.push(i(e)+\".get(\"+u(e)+\")\"):r.push(i(e)+\"[\"+u(e)+\"]\");for(e=0;e<x;++e)r.push(c(e));for(F.push(w,\"[\",A,\"++]=phase(\",r.join(),\");\"),e=0;e<t;++e)C(e);for(var n=0;n<I;++n)F.push(u(n),\"+=\",d(n,S[t]),\";\")}(t),F.push(\"if(\",o(S[t]),\">0){\",h(S[t]),\"=1;\"),D(t-1,e|1<<S[t]);for(var r=0;r<I;++r)F.push(u(r),\"+=\",d(r,S[t]),\";\");t===P-1&&(F.push(A,\"=0;\"),z()),L(t,2),D(t-1,e),t===P-1&&(F.push(\"if(\",h(S[P-1]),\"&1){\",A,\"=0;}\"),z()),C(t),F.push(\"}\")}}var I=E.length,P=S.length;if(P<2)throw new Error(\"ndarray-extract-contour: Dimension must be at least 2\");for(var O=\"extractContour\"+S.join(\"_\"),F=[],R=[],N=[],j=0;j<I;++j)N.push(n(j));for(j=0;j<x;++j)N.push(c(j));for(j=0;j<P;++j)R.push(o(j)+\"=\"+n(0)+\".shape[\"+j+\"]|0\");for(j=0;j<I;++j){R.push(i(j)+\"=\"+n(j)+\".data\",l(j)+\"=\"+n(j)+\".offset|0\");for(var B=0;B<P;++B)R.push(s(j,B)+\"=\"+n(j)+\".stride[\"+B+\"]|0\")}for(j=0;j<I;++j){R.push(u(j)+\"=\"+l(j)),R.push(a(j,0));for(B=1;B<1<<P;++B){for(var U=[],V=0;V<P;++V)B&1<<V&&U.push(\"-\"+s(j,V));R.push(f(j,B)+\"=(\"+U.join(\"\")+\")|0\"),R.push(a(j,B)+\"=0\")}}for(j=0;j<I;++j)for(B=0;B<P;++B){var q=[s(j,S[B])];B>0&&q.push(s(j,S[B-1])+\"*\"+o(S[B-1])),R.push(d(j,S[B])+\"=(\"+q.join(\"-\")+\")|0\")}for(j=0;j<P;++j)R.push(h(j)+\"=0\");R.push(M+\"=0\");var H=[\"2\"];for(j=P-2;j>=0;--j)H.push(o(S[j]));R.push(k+\"=(\"+H.join(\"*\")+\")|0\",w+\"=mallocUint32(\"+k+\")\",_+\"=mallocUint32(\"+k+\")\",A+\"=0\"),R.push(p(0)+\"=0\");for(B=1;B<1<<P;++B){var G=[],Y=[];for(V=0;V<P;++V)B&1<<V&&(0===Y.length?G.push(\"1\"):G.unshift(Y.join(\"*\"))),Y.push(o(S[V]));var W=\"\";G[0].indexOf(o(S[P-2]))<0&&(W=\"-\");var X=y(P,B,S);R.push(g(X)+\"=(-\"+G.join(\"-\")+\")|0\",m(X)+\"=(\"+W+G.join(\"-\")+\")|0\",p(X)+\"=0\")}R.push(v(0)+\"=0\",T+\"=0\"),D(P-1,0),F.push(\"freeUint32(\",_,\");freeUint32(\",w,\");\");var Z=[\"'use strict';\",\"function \",O,\"(\",N.join(),\"){\",\"var \",R.join(),\";\",F.join(\"\"),\"}\",\"return \",O].join(\"\");return new Function(\"vertex\",\"face\",\"phase\",\"mallocUint32\",\"freeUint32\",Z)(t,e,r,b.mallocUint32,b.freeUint32)}var b=t(\"typedarray-pool\");e.exports=function(t){function e(t){throw new Error(\"ndarray-extract-contour: \"+t)}\"object\"!=typeof t&&e(\"Must specify arguments\");var r=t.order;Array.isArray(r)||e(\"Must specify order\");var n=t.arrayArguments||1;n<1&&e(\"Must have at least one array argument\");var i=t.scalarArguments||0;i<0&&e(\"Scalar arg count must be > 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<n;++s)a.indexOf(s)>=0?o[s]=!0:o[s]=!1;return x(t.vertex,t.cell,t.phase,i,r,o)};var _=\"V\",w=\"P\",M=\"N\",k=\"Q\",A=\"X\",T=\"T\"},{\"typedarray-pool\":554}],448:[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\":119}],449:[function(t,e,r){\"use strict\";function n(t){if(t in o)return o[t];for(var e=[],r=0;r<t;++r)e.push(\"out\",r,\"s=0.5*(inp\",r,\"l-inp\",r,\"r);\");var n=[\"array\"],s=[\"junk\"];for(r=0;r<t;++r){n.push(\"array\"),s.push(\"out\"+r+\"s\");var c=i(t);c[r]=-1,n.push({array:0,offset:c.slice()}),c[r]=1,n.push({array:0,offset:c.slice()}),s.push(\"inp\"+r+\"l\",\"inp\"+r+\"r\")}return o[t]=a({args:n,pre:l,post:l,body:{body:e.join(\"\"),args:s.map(function(t){return{name:t,lvalue:0===t.indexOf(\"out\"),rvalue:0===t.indexOf(\"inp\"),count:\"junk\"!==t|0}}),thisVars:[],localVars:[]},funcName:\"fdTemplate\"+t})}e.exports=function(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?i(e.dimension,r):i(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 a=0;a<e.dimension;++a)if(t.shape[a]!==e.shape[a])throw new Error(\"ndarray-gradient: shape mismatch\");return 0===e.size?t:e.dimension<=0?(t.set(0),t):function(t){function e(e){for(var r=i-e.length,n=[],o=[],s=[],l=0;l<i;++l)e.indexOf(l+1)>=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 c=\".lo(\"+n.join()+\").hi(\"+o.join()+\")\";if(0===n.length&&(c=\"\"),r>0){for(a.push(\"if(1\"),l=0;l<i;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||a.push(\"&&s[\",l,\"]>2\");for(a.push(\"){grad\",r,\"(src.pick(\",s.join(),\")\",c),l=0;l<i;++l)e.indexOf(l+1)>=0||e.indexOf(-(l+1))>=0||a.push(\",dst.pick(\",s.join(),\",\",l,\")\",c);a.push(\");\")}for(l=0;l<e.length;++l){var u=Math.abs(e[l])-1,f=\"dst.pick(\"+s.join()+\",\"+u+\")\"+c;switch(t[u]){case\"clamp\":var h=s.slice(),d=s.slice();e[l]<0?h[u]=\"s[\"+u+\"]-2\":d[u]=\"1\",0===r?a.push(\"if(s[\",u,\"]>1){dst.set(\",s.join(),\",\",u,\",0.5*(src.get(\",h.join(),\")-src.get(\",d.join(),\")))}else{dst.set(\",s.join(),\",\",u,\",0)};\"):a.push(\"if(s[\",u,\"]>1){diff(\",f,\",src.pick(\",h.join(),\")\",c,\",src.pick(\",d.join(),\")\",c,\");}else{zero(\",f,\");};\");break;case\"mirror\":0===r?a.push(\"dst.set(\",s.join(),\",\",u,\",0);\"):a.push(\"zero(\",f,\");\");break;case\"wrap\":var p=s.slice(),m=s.slice();e[l]<0?(p[u]=\"s[\"+u+\"]-2\",m[u]=\"0\"):(p[u]=\"s[\"+u+\"]-1\",m[u]=\"1\"),0===r?a.push(\"if(s[\",u,\"]>2){dst.set(\",s.join(),\",\",u,\",0.5*(src.get(\",p.join(),\")-src.get(\",m.join(),\")))}else{dst.set(\",s.join(),\",\",u,\",0)};\"):a.push(\"if(s[\",u,\"]>2){diff(\",f,\",src.pick(\",p.join(),\")\",c,\",src.pick(\",m.join(),\")\",c,\");}else{zero(\",f,\");};\");break;default:throw new Error(\"ndarray-gradient: Invalid boundary condition\")}}r>0&&a.push(\"};\")}var r=t.join();if(v=s[r])return v;for(var i=t.length,a=[\"function gradient(dst,src){var s=src.shape.slice();\"],l=0;l<1<<i;++l){for(var f=[],h=0;h<i;++h)l&1<<h&&f.push(h+1);for(var d=0;d<1<<f.length;++d){var p=f.slice();for(h=0;h<f.length;++h)d&1<<h&&(p[h]=-p[h]);e(p)}}a.push(\"return dst;};return gradient\");var m=[\"diff\",\"zero\"],g=[c,u];for(l=1;l<=i;++l)m.push(\"grad\"+l),g.push(n(l));m.push(a.join(\"\"));var v=Function.apply(void 0,m).apply(void 0,g);return o[r]=v,v}(r)(t,e)};var i=t(\"dup\"),a=t(\"cwise-compiler\"),o={},s={},l={body:\"\",args:[],thisVars:[],localVars:[]},c=a({args:[\"array\",\"array\",\"array\"],pre:l,post:l,body:{args:[{name:\"out\",lvalue:!0,rvalue:!1,count:1},{name:\"left\",lvalue:!1,rvalue:!0,count:1},{name:\"right\",lvalue:!1,rvalue:!0,count:1}],body:\"out=0.5*(left-right)\",thisVars:[],localVars:[]},funcName:\"cdiff\"}),u=a({args:[\"array\"],pre:l,post:l,body:{args:[{name:\"out\",lvalue:!0,rvalue:!1,count:1}],body:\"out=0\",thisVars:[],localVars:[]},funcName:\"zero\"})},{\"cwise-compiler\":116,dup:134}],450:[function(t,e,r){\"use strict\";var n=t(\"ndarray-warp\"),i=t(\"gl-matrix-invert\");e.exports=function(t,e,r){var a=e.dimension,o=i([],r);return n(t,e,function(t,e){for(var r=0;r<a;++r){t[r]=o[(a+1)*a+r];for(var n=0;n<a;++n)t[r]+=o[(a+1)*n+r]*e[n]}var i=o[(a+1)*(a+1)-1];for(n=0;n<a;++n)i+=o[(a+1)*n+a]*e[n];var s=1/i;for(r=0;r<a;++r)t[r]*=s;return t}),t}},{\"gl-matrix-invert\":197,\"ndarray-warp\":457}],451:[function(t,e,r){\"use strict\";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function i(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,c=0<=s&&s<t.shape[1],u=0<=s+1&&s+1<t.shape[1],f=a&&c?t.get(n,s):0,h=a&&u?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&c?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&u?t.get(n+1,s+1):0))}function a(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),c=r-l,u=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),d=n-h,p=0<=h&&h<t.shape[2],m=0<=h+1&&h+1<t.shape[2],g=o&&u&&p?t.get(i,l,h):0,v=o&&f&&p?t.get(i,l+1,h):0,y=s&&u&&p?t.get(i+1,l,h):0,x=s&&f&&p?t.get(i+1,l+1,h):0,b=o&&u&&m?t.get(i,l,h+1):0,_=o&&f&&m?t.get(i,l+1,h+1):0;return(1-d)*((1-c)*((1-a)*g+a*y)+c*((1-a)*v+a*x))+d*((1-c)*((1-a)*b+a*(s&&u&&m?t.get(i+1,l,h+1):0))+c*((1-a)*_+a*(s&&f&&m?t.get(i+1,l+1,h+1):0)))}e.exports=function(t,e,r,o){switch(t.shape.length){case 0:return 0;case 1:return n(t,e);case 2:return i(t,e,r);case 3:return a(t,e,r,o);default:return function(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,c,u,f=0;t:for(e=0;e<1<<n;++e){for(c=1,u=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;c*=a[l],u+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;c*=1-a[l],u+=t.stride[l]*i[l]}f+=c*t.data[u]}return f}.apply(void 0,arguments)}},e.exports.d1=n,e.exports.d2=i,e.exports.d3=a},{}],452:[function(t,e,r){\"use strict\";function n(t){if(!t)return o;for(var e=0;e<t.args.length;++e){var r=t.args[e];t.args[e]=0===e?{name:r,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function i(t){for(var e=[],r=0;r<t.args.length;++r)e.push(\"a\"+r);return new Function(\"P\",[\"return function \",t.funcName,\"_ndarrayops(\",e.join(\",\"),\") {P(\",e.join(\",\"),\");return a0}\"].join(\"\"))(function(t){return a({args:t.args,pre:n(t.pre),body:n(t.body),post:n(t.proc),funcName:t.funcName})}(t))}var a=t(\"cwise-compiler\"),o={body:\"\",args:[],thisVars:[],localVars:[]},s={add:\"+\",sub:\"-\",mul:\"*\",div:\"/\",mod:\"%\",band:\"&\",bor:\"|\",bxor:\"^\",lshift:\"<<\",rshift:\">>\",rrshift:\">>>\"};!function(){for(var t in s){var e=s[t];r[t]=i({args:[\"array\",\"array\",\"array\"],body:{args:[\"a\",\"b\",\"c\"],body:\"a=b\"+e+\"c\"},funcName:t}),r[t+\"eq\"]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a\"+e+\"=b\"},rvalue:!0,funcName:t+\"eq\"}),r[t+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],body:{args:[\"a\",\"b\",\"s\"],body:\"a=b\"+e+\"s\"},funcName:t+\"s\"}),r[t+\"seq\"]=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"s\"],body:\"a\"+e+\"=s\"},rvalue:!0,funcName:t+\"seq\"})}}();var l={not:\"!\",bnot:\"~\",neg:\"-\",recip:\"1.0/\"};!function(){for(var t in l){var e=l[t];r[t]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=\"+e+\"b\"},funcName:t}),r[t+\"eq\"]=i({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]=i({args:[\"array\",\"array\",\"array\"],body:{args:[\"a\",\"b\",\"c\"],body:\"a=b\"+e+\"c\"},funcName:t}),r[t+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],body:{args:[\"a\",\"b\",\"s\"],body:\"a=b\"+e+\"s\"},funcName:t+\"s\"}),r[t+\"eq\"]=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=a\"+e+\"b\"},rvalue:!0,count:2,funcName:t+\"eq\"}),r[t+\"seq\"]=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"s\"],body:\"a=a\"+e+\"s\"},rvalue:!0,count:2,funcName:t+\"seq\"})}}();var u=[\"abs\",\"acos\",\"asin\",\"atan\",\"ceil\",\"cos\",\"exp\",\"floor\",\"log\",\"round\",\"sin\",\"sqrt\",\"tan\"];!function(){for(var t=0;t<u.length;++t){var e=u[t];r[e]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b)\",thisVars:[\"this_f\"]},funcName:e}),r[e+\"eq\"]=i({args:[\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\"],body:\"a=this_f(a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"eq\"})}}();var f=[\"max\",\"min\",\"atan2\",\"pow\"];!function(){for(var t=0;t<f.length;++t){var e=f[t];r[e]=i({args:[\"array\",\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(b,c)\",thisVars:[\"this_f\"]},funcName:e}),r[e+\"s\"]=i({args:[\"array\",\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(b,c)\",thisVars:[\"this_f\"]},funcName:e+\"s\"}),r[e+\"eq\"]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(a,b)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"eq\"}),r[e+\"seq\"]=i({args:[\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(a,b)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"seq\"})}}();var h=[\"atan2\",\"pow\"];!function(){for(var t=0;t<h.length;++t){var e=h[t];r[e+\"op\"]=i({args:[\"array\",\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(c,b)\",thisVars:[\"this_f\"]},funcName:e+\"op\"}),r[e+\"ops\"]=i({args:[\"array\",\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\",\"c\"],body:\"a=this_f(c,b)\",thisVars:[\"this_f\"]},funcName:e+\"ops\"}),r[e+\"opeq\"]=i({args:[\"array\",\"array\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b,a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"opeq\"}),r[e+\"opseq\"]=i({args:[\"array\",\"scalar\"],pre:{args:[],body:\"this_f=Math.\"+e,thisVars:[\"this_f\"]},body:{args:[\"a\",\"b\"],body:\"a=this_f(b,a)\",thisVars:[\"this_f\"]},rvalue:!0,count:2,funcName:e+\"opseq\"})}}(),r.any=a({args:[\"array\"],pre:o,body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"if(a){return true}\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\"return false\"},funcName:\"any\"}),r.all=a({args:[\"array\"],pre:o,body:{args:[{name:\"x\",lvalue:!1,rvalue:!0,count:1}],body:\"if(!x){return false}\",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:\"return true\"},funcName:\"all\"}),r.sum=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"this_s+=a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"sum\"}),r.prod=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=1\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:1}],body:\"this_s*=a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"prod\"}),r.norm2squared=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:2}],body:\"this_s+=a*a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return this_s\"},funcName:\"norm2squared\"}),r.norm2=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:2}],body:\"this_s+=a*a\",localVars:[],thisVars:[\"this_s\"]},post:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"return Math.sqrt(this_s)\"},funcName:\"norm2\"}),r.norminf=a({args:[\"array\"],pre:{args:[],localVars:[],thisVars:[\"this_s\"],body:\"this_s=0\"},body:{args:[{name:\"a\",lvalue:!1,rvalue:!0,count:4}],body:\"if(-a>this_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=a({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=a({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=a({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.argmin=a({args:[\"index\",\"array\",\"shape\"],pre:{body:\"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}\",args:[{name:\"_inline_0_arg0_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg1_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg2_\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\"this_i\",\"this_v\"],localVars:[]},body:{body:\"{if(_inline_1_arg1_<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.argmax=a({args:[\"index\",\"array\",\"shape\"],pre:{body:\"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}\",args:[{name:\"_inline_0_arg0_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg1_\",lvalue:!1,rvalue:!1,count:0},{name:\"_inline_0_arg2_\",lvalue:!1,rvalue:!0,count:1}],thisVars:[\"this_i\",\"this_v\"],localVars:[]},body:{body:\"{if(_inline_1_arg1_>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=i({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=i({args:[\"array\",\"array\"],body:{args:[\"a\",\"b\"],body:\"a=b\"},funcName:\"assign\"}),r.assigns=i({args:[\"array\",\"scalar\"],body:{args:[\"a\",\"b\"],body:\"a=b\"},funcName:\"assigns\"}),r.equals=a({args:[\"array\",\"array\"],pre:o,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\":116}],453:[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\":454,ndarray:458}],454:[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\":116}],455:[function(t,e,r){\"use strict\";function n(t){switch(t){case\"uint8\":return[a.mallocUint8,a.freeUint8];case\"uint16\":return[a.mallocUint16,a.freeUint16];case\"uint32\":return[a.mallocUint32,a.freeUint32];case\"int8\":return[a.mallocInt8,a.freeInt8];case\"int16\":return[a.mallocInt16,a.freeInt16];case\"int32\":return[a.mallocInt32,a.freeInt32];case\"float32\":return[a.mallocFloat,a.freeFloat];case\"float64\":return[a.mallocDouble,a.freeDouble];default:return null}}function i(t){for(var e=[],r=0;r<t;++r)e.push(\"s\"+r);for(r=0;r<t;++r)e.push(\"n\"+r);for(r=1;r<t;++r)e.push(\"d\"+r);for(r=1;r<t;++r)e.push(\"e\"+r);for(r=1;r<t;++r)e.push(\"f\"+r);return e}var a=t(\"typedarray-pool\"),o=32;e.exports=function(t,e){var r=[\"'use strict'\"],a=[\"ndarraySortWrapper\",t.join(\"d\"),e].join(\"\");r.push([\"function \",a,\"(\",[\"array\"].join(\",\"),\"){\"].join(\"\"));for(var s=[\"data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride\"],l=0;l<t.length;++l)s.push([\"s\",l,\"=stride[\",l,\"]|0,n\",l,\"=shape[\",l,\"]|0\"].join(\"\"));var c=new Array(t.length),u=[];for(l=0;l<t.length;++l)0!==(p=t[l])&&(0===u.length?c[p]=\"1\":c[p]=u.join(\"*\"),u.push(\"n\"+p));var f=-1,h=-1;for(l=0;l<t.length;++l){var d=t[l];0!==d&&(f>0?s.push([\"d\",d,\"=s\",d,\"-d\",f,\"*n\",f].join(\"\")):s.push([\"d\",d,\"=s\",d].join(\"\")),f=d);var p;0!=(p=t.length-1-l)&&(h>0?s.push([\"e\",p,\"=s\",p,\"-e\",h,\"*n\",h,\",f\",p,\"=\",c[p],\"-f\",h,\"*n\",h].join(\"\")):s.push([\"e\",p,\"=s\",p,\",f\",p,\"=\",c[p]].join(\"\")),h=p)}r.push(\"var \"+s.join(\",\"));var m=[\"0\",\"n0-1\",\"data\",\"offset\"].concat(i(t.length));r.push([\"if(n0<=\",o,\"){\",\"insertionSort(\",m.join(\",\"),\")}else{\",\"quickSort(\",m.join(\",\"),\")}\"].join(\"\")),r.push(\"}return \"+a);var g=new Function(\"insertionSort\",\"quickSort\",r.join(\"\\n\")),v=function(t,e){function r(t){return\"generic\"===e?[\"data.get(\",t,\")\"].join(\"\"):[\"data[\",t,\"]\"].join(\"\")}function a(t,r){return\"generic\"===e?[\"data.set(\",t,\",\",r,\")\"].join(\"\"):[\"data[\",t,\"]=\",r].join(\"\")}var o=[\"'use strict'\"],s=[\"ndarrayInsertionSort\",t.join(\"d\"),e].join(\"\"),l=[\"left\",\"right\",\"data\",\"offset\"].concat(i(t.length)),c=n(e),u=[\"i,j,cptr,ptr=left*s0+offset\"];if(t.length>1){for(var f=[],h=1;h<t.length;++h)u.push(\"i\"+h),f.push(\"n\"+h);c?u.push(\"scratch=malloc(\"+f.join(\"*\")+\")\"):u.push(\"scratch=new Array(\"+f.join(\"*\")+\")\"),u.push(\"dptr\",\"sptr\",\"a\",\"b\")}else u.push(\"scratch\");if(o.push([\"function \",s,\"(\",l.join(\",\"),\"){var \",u.join(\",\")].join(\"\"),\"for(i=left+1;i<=right;++i){\",\"j=i;ptr+=s0\",\"cptr=ptr\"),t.length>1){for(o.push(\"dptr=0;sptr=ptr\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(\"scratch[dptr++]=\",r(\"sptr\")),h=0;h<t.length;++h)0!==(d=t[h])&&o.push(\"sptr+=d\"+d,\"}\");for(o.push(\"__g:while(j--\\x3eleft){\",\"dptr=0\",\"sptr=cptr-s0\"),h=1;h<t.length;++h)1===h&&o.push(\"__l:\"),o.push([\"for(i\",h,\"=0;i\",h,\"<n\",h,\";++i\",h,\"){\"].join(\"\"));for(o.push([\"a=\",r(\"sptr\"),\"\\nb=scratch[dptr]\\nif(a<b){break __g}\\nif(a>b){break __l}\"].join(\"\")),h=t.length-1;h>=1;--h)o.push(\"sptr+=e\"+h,\"dptr+=f\"+h,\"}\");for(o.push(\"dptr=cptr;sptr=cptr-s0\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(a(\"dptr\",r(\"sptr\"))),h=0;h<t.length;++h)0!==(d=t[h])&&o.push([\"dptr+=d\",d,\";sptr+=d\",d].join(\"\"),\"}\");for(o.push(\"cptr-=s0\\n}\"),o.push(\"dptr=cptr;sptr=0\"),h=t.length-1;h>=0;--h)0!==(d=t[h])&&o.push([\"for(i\",d,\"=0;i\",d,\"<n\",d,\";++i\",d,\"){\"].join(\"\"));for(o.push(a(\"dptr\",\"scratch[sptr++]\")),h=0;h<t.length;++h){var d;0!==(d=t[h])&&o.push(\"dptr+=d\"+d,\"}\")}}else o.push(\"scratch=\"+r(\"ptr\"),\"while((j--\\x3eleft)&&(\"+r(\"cptr-s0\")+\">scratch)){\",a(\"cptr\",r(\"cptr-s0\")),\"cptr-=s0\",\"}\",a(\"cptr\",\"scratch\"));return o.push(\"}\"),t.length>1&&c&&o.push(\"free(scratch)\"),o.push(\"} return \"+s),c?new Function(\"malloc\",\"free\",o.join(\"\\n\"))(c[0],c[1]):new Function(o.join(\"\\n\"))()}(t,e);return g(v,function(t,e,r){function a(t){return[\"(offset+\",t,\"*s0)\"].join(\"\")}function s(t){return\"generic\"===e?[\"data.get(\",t,\")\"].join(\"\"):[\"data[\",t,\"]\"].join(\"\")}function l(t,r){return\"generic\"===e?[\"data.set(\",t,\",\",r,\")\"].join(\"\"):[\"data[\",t,\"]=\",r].join(\"\")}function c(e,r,n){if(1===e.length)_.push(\"ptr0=\"+a(e[0]));else for(var i=0;i<e.length;++i)_.push([\"b_ptr\",i,\"=s0*\",e[i]].join(\"\"));for(r&&_.push(\"pivot_ptr=0\"),_.push(\"ptr_shift=offset\"),i=t.length-1;i>=0;--i)0!==(o=t[i])&&_.push([\"for(i\",o,\"=0;i\",o,\"<n\",o,\";++i\",o,\"){\"].join(\"\"));if(e.length>1)for(i=0;i<e.length;++i)_.push([\"ptr\",i,\"=b_ptr\",i,\"+ptr_shift\"].join(\"\"));for(_.push(n),r&&_.push(\"++pivot_ptr\"),i=0;i<t.length;++i){var o;0!==(o=t[i])&&(e.length>1?_.push(\"ptr_shift+=d\"+o):_.push(\"ptr0+=d\"+o),_.push(\"}\"))}}function u(e,r,n,i){if(1===r.length)_.push(\"ptr0=\"+a(r[0]));else{for(var o=0;o<r.length;++o)_.push([\"b_ptr\",o,\"=s0*\",r[o]].join(\"\"));_.push(\"ptr_shift=offset\")}for(n&&_.push(\"pivot_ptr=0\"),e&&_.push(e+\":\"),o=1;o<t.length;++o)_.push([\"for(i\",o,\"=0;i\",o,\"<n\",o,\";++i\",o,\"){\"].join(\"\"));if(r.length>1)for(o=0;o<r.length;++o)_.push([\"ptr\",o,\"=b_ptr\",o,\"+ptr_shift\"].join(\"\"));for(_.push(i),o=t.length-1;o>=1;--o)n&&_.push(\"pivot_ptr+=f\"+o),r.length>1?_.push(\"ptr_shift+=e\"+o):_.push(\"ptr0+=e\"+o),_.push(\"}\")}function f(){t.length>1&&k&&_.push(\"free(pivot1)\",\"free(pivot2)\")}function h(e,r){var n=\"el\"+e,i=\"el\"+r;if(t.length>1){var o=\"__l\"+ ++A;u(o,[n,i],!1,[\"comp=\",s(\"ptr0\"),\"-\",s(\"ptr1\"),\"\\n\",\"if(comp>0){tmp0=\",n,\";\",n,\"=\",i,\";\",i,\"=tmp0;break \",o,\"}\\n\",\"if(comp<0){break \",o,\"}\"].join(\"\"))}else _.push([\"if(\",s(a(n)),\">\",s(a(i)),\"){tmp0=\",n,\";\",n,\"=\",i,\";\",i,\"=tmp0}\"].join(\"\"))}function d(e,r){t.length>1?c([e,r],!1,l(\"ptr0\",s(\"ptr1\"))):_.push(l(a(e),s(a(r))))}function p(e,r,n){if(t.length>1){var i=\"__l\"+ ++A;u(i,[r],!0,[e,\"=\",s(\"ptr0\"),\"-pivot\",n,\"[pivot_ptr]\\n\",\"if(\",e,\"!==0){break \",i,\"}\"].join(\"\"))}else _.push([e,\"=\",s(a(r)),\"-pivot\",n].join(\"\"))}function m(e,r){t.length>1?c([e,r],!1,[\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",\"tmp\")].join(\"\")):_.push([\"ptr0=\",a(e),\"\\n\",\"ptr1=\",a(r),\"\\n\",\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",\"tmp\")].join(\"\"))}function g(e,r,n){t.length>1?(c([e,r,n],!1,[\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",s(\"ptr2\")),\"\\n\",l(\"ptr2\",\"tmp\")].join(\"\")),_.push(\"++\"+r,\"--\"+n)):_.push([\"ptr0=\",a(e),\"\\n\",\"ptr1=\",a(r),\"\\n\",\"ptr2=\",a(n),\"\\n\",\"++\",r,\"\\n\",\"--\",n,\"\\n\",\"tmp=\",s(\"ptr0\"),\"\\n\",l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",s(\"ptr2\")),\"\\n\",l(\"ptr2\",\"tmp\")].join(\"\"))}function v(t,e){m(t,e),_.push(\"--\"+e)}function y(e,r,n){t.length>1?c([e,r],!0,[l(\"ptr0\",s(\"ptr1\")),\"\\n\",l(\"ptr1\",[\"pivot\",n,\"[pivot_ptr]\"].join(\"\"))].join(\"\")):_.push(l(a(e),s(a(r))),l(a(r),\"pivot\"+n))}function x(e,r){_.push([\"if((\",r,\"-\",e,\")<=\",o,\"){\\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 b(e,r,n){t.length>1?(_.push([\"__l\",++A,\":while(true){\"].join(\"\")),c([e],!0,[\"if(\",s(\"ptr0\"),\"!==pivot\",r,\"[pivot_ptr]){break __l\",A,\"}\"].join(\"\")),_.push(n,\"}\")):_.push([\"while(\",s(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;E<t.length;++E)S.push(\"n\"+E),T.push(\"i\"+E);for(E=0;E<8;++E)T.push(\"b_ptr\"+E);T.push(\"ptr3\",\"ptr4\",\"ptr5\",\"ptr6\",\"ptr7\",\"pivot_ptr\",\"ptr_shift\",\"elementSize=\"+S.join(\"*\")),k?T.push(\"pivot1=malloc(elementSize)\",\"pivot2=malloc(elementSize)\"):T.push(\"pivot1=new Array(elementSize),pivot2=new Array(elementSize)\")}else T.push(\"pivot1\",\"pivot2\");return _.push(\"var \"+T.join(\",\")),h(1,2),h(4,5),h(1,3),h(2,3),h(1,4),h(3,4),h(2,5),h(2,3),h(4,5),t.length>1?c([\"el1\",\"el2\",\"el3\",\"el4\",\"el5\",\"index1\",\"index3\",\"index5\"],!0,[\"pivot1[pivot_ptr]=\",s(\"ptr1\"),\"\\n\",\"pivot2[pivot_ptr]=\",s(\"ptr3\"),\"\\n\",\"pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\\n\",\"x=\",s(\"ptr0\"),\"\\n\",\"y=\",s(\"ptr2\"),\"\\n\",\"z=\",s(\"ptr4\"),\"\\n\",l(\"ptr5\",\"x\"),\"\\n\",l(\"ptr6\",\"y\"),\"\\n\",l(\"ptr7\",\"z\")].join(\"\")):_.push([\"pivot1=\",s(a(\"el2\")),\"\\n\",\"pivot2=\",s(a(\"el4\")),\"\\n\",\"pivots_are_equal=pivot1===pivot2\\n\",\"x=\",s(a(\"el1\")),\"\\n\",\"y=\",s(a(\"el3\")),\"\\n\",\"z=\",s(a(\"el5\")),\"\\n\",l(a(\"index1\"),\"x\"),\"\\n\",l(a(\"index3\"),\"y\"),\"\\n\",l(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(--great<k){break}\"),_.push(\"continue\"),_.push(\"}else{\"),p(\"comp\",\"great\",1),_.push(\"if(comp<0){\"),g(\"k\",\"less\",\"great\"),_.push(\"}else{\"),v(\"k\",\"great\"),_.push(\"}\"),_.push(\"break\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),y(\"left\",\"(less-1)\",1),y(\"right\",\"(great+1)\",2),x(\"left\",\"(less-2)\"),x(\"(great+2)\",\"right\"),_.push(\"if(pivots_are_equal){\"),f(),_.push(\"return\"),_.push(\"}\"),_.push(\"if(less<index1&&great>index5){\"),b(\"less\",1,\"++less\"),b(\"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(--great<k){break}\"),_.push(\"continue\"),_.push(\"}else{\"),p(\"comp\",\"great\",1),_.push(\"if(comp<0){\"),g(\"k\",\"less\",\"great\"),_.push(\"}else{\"),v(\"k\",\"great\"),_.push(\"}\"),_.push(\"break\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),_.push(\"}\"),f(),x(\"less\",\"great\"),_.push(\"}return \"+w),t.length>1&&k?new Function(\"insertionSort\",\"malloc\",\"free\",_.join(\"\\n\"))(r,k[0],k[1]):new Function(\"insertionSort\",_.join(\"\\n\"))(r)}(t,e,v))}},{\"typedarray-pool\":554}],456:[function(t,e,r){\"use strict\";var n=t(\"./lib/compile_sort.js\"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(\":\"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{\"./lib/compile_sort.js\":455}],457:[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\":119,\"ndarray-linear-interpolate\":451}],458:[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;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(n);var i=new Array(r.length);for(t=0;t<i.length;++t)i[t]=r[t][1];return i}function a(t,e){var r=[\"View\",e,\"d\",t].join(\"\");e<0&&(r=\"View_Nil\"+t);var n=\"generic\"===t;if(-1===e){var a=\"function \"+r+\"(a){this.data=a;};var proto=\"+r+\".prototype;proto.dtype='\"+t+\"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new \"+r+\"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_\"+r+\"(a){return new \"+r+\"(a);}\";return new Function(a)()}if(0===e){a=\"function \"+r+\"(a,d) {this.data = a;this.offset = d};var proto=\"+r+\".prototype;proto.dtype='\"+t+\"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function \"+r+\"_copy() {return new \"+r+\"(this.data,this.offset)};proto.pick=function \"+r+\"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function \"+r+\"_get(){return \"+(n?\"this.data.get(this.offset)\":\"this.data[this.offset]\")+\"};proto.set=function \"+r+\"_set(v){return \"+(n?\"this.data.set(this.offset,v)\":\"this.data[this.offset]=v\")+\"};return function construct_\"+r+\"(a,b,c,d){return new \"+r+\"(a,d)}\";return new Function(\"TrivialArray\",a)(c[t][0])}a=[\"'use strict'\"];var s=o(e),l=s.map(function(t){return\"i\"+t}),u=\"this.offset+\"+s.map(function(t){return\"this.stride[\"+t+\"]*i\"+t}).join(\"+\"),f=s.map(function(t){return\"b\"+t}).join(\",\"),h=s.map(function(t){return\"c\"+t}).join(\",\");a.push(\"function \"+r+\"(a,\"+f+\",\"+h+\",d){this.data=a\",\"this.shape=[\"+f+\"]\",\"this.stride=[\"+h+\"]\",\"this.offset=d|0}\",\"var proto=\"+r+\".prototype\",\"proto.dtype='\"+t+\"'\",\"proto.dimension=\"+e),a.push(\"Object.defineProperty(proto,'size',{get:function \"+r+\"_size(){return \"+s.map(function(t){return\"this.shape[\"+t+\"]\"}).join(\"*\"),\"}})\"),1===e?a.push(\"proto.order=[0]\"):(a.push(\"Object.defineProperty(proto,'order',{get:\"),e<4?(a.push(\"function \"+r+\"_order(){\"),2===e?a.push(\"return (Math.abs(this.stride[0])>Math.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(\"+l.join(\",\")+\",v){\"),n?a.push(\"return this.data.set(\"+u+\",v)}\"):a.push(\"return this.data[\"+u+\"]=v}\"),a.push(\"proto.get=function \"+r+\"_get(\"+l.join(\",\")+\"){\"),n?a.push(\"return this.data.get(\"+u+\")}\"):a.push(\"return this.data[\"+u+\"]}\"),a.push(\"proto.index=function \"+r+\"_index(\",l.join(),\"){return \"+u+\"}\"),a.push(\"proto.hi=function \"+r+\"_hi(\"+l.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 d=s.map(function(t){return\"a\"+t+\"=this.shape[\"+t+\"]\"}),p=s.map(function(t){return\"c\"+t+\"=this.stride[\"+t+\"]\"});a.push(\"proto.lo=function \"+r+\"_lo(\"+l.join(\",\")+\"){var b=this.offset,d=0,\"+d.join(\",\")+\",\"+p.join(\",\"));for(var m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'&&i\"+m+\">=0){d=i\"+m+\"|0;b+=c\"+m+\"*d;a\"+m+\"-=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(\"+l.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(m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'){d=i\"+m+\"|0;if(d<0){c+=b\"+m+\"*(a\"+m+\"-1);a\"+m+\"=ceil(-a\"+m+\"/d)}else{a\"+m+\"=ceil(a\"+m+\"/d)}b\"+m+\"*=d}\");a.push(\"return new \"+r+\"(this.data,\"+s.map(function(t){return\"a\"+t}).join(\",\")+\",\"+s.map(function(t){return\"b\"+t}).join(\",\")+\",c)}\");var g=new Array(e),v=new Array(e);for(m=0;m<e;++m)g[m]=\"a[i\"+m+\"]\",v[m]=\"b[i\"+m+\"]\";a.push(\"proto.transpose=function \"+r+\"_transpose(\"+l+\"){\"+l.map(function(t,e){return t+\"=(\"+t+\"===undefined?\"+e+\":\"+t+\"|0)\"}).join(\";\"),\"var a=this.shape,b=this.stride;return new \"+r+\"(this.data,\"+g.join(\",\")+\",\"+v.join(\",\")+\",this.offset)}\"),a.push(\"proto.pick=function \"+r+\"_pick(\"+l+\"){var a=[],b=[],c=this.offset\");for(m=0;m<e;++m)a.push(\"if(typeof i\"+m+\"==='number'&&i\"+m+\">=0){c=(c+this.stride[\"+m+\"]*i\"+m+\")|0}else{a.push(this.shape[\"+m+\"]);b.push(this.stride[\"+m+\"])}\");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)}\");return new Function(\"CTOR_LIST\",\"ORDER\",a.join(\"\\n\"))(c[t],i)}var o=t(\"iota-array\"),s=t(\"is-buffer\"),l=\"undefined\"!=typeof Float64Array,c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);\"number\"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var i=e.length;if(void 0===r){r=new Array(i);for(var o=i-1,u=1;o>=0;--o)r[o]=u,u*=e[o]}if(void 0===n)for(n=0,o=0;o<i;++o)r[o]<0&&(n-=(e[o]-1)*r[o]);for(var f=function(t){if(s(t))return\"buffer\";if(l)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\"}(t),h=c[f];h.length<=i+1;)h.push(a(f,h.length-1));return(0,h[i+1])(t,e,r,n)}},{\"iota-array\":281,\"is-buffer\":283}],459:[function(t,e,r){\"use strict\";var n=t(\"double-bits\"),i=Math.pow(2,-1074),a=-1>>>0;e.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);return e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},{\"double-bits\":131}],460:[function(t,e,r){function n(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function i(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function a(t,e,r,n,i,s,u,f,h,d){if(d)M=d[0],k=d[1],_=d[2],w=d[3];else{var p=o(t,e,-i);t=p.x,e=p.y;var m=(t-(f=(p=o(f,h,-i)).x))/2,g=(e-(h=p.y))/2,v=m*m/(r*r)+g*g/(n*n);v>1&&(r*=v=Math.sqrt(v),n*=v);var y=r*r,x=n*n,b=(s==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var _=b*r*g/n+(t+f)/2,w=b*-n*m/r+(e+h)/2,M=Math.asin(((e-w)/n).toFixed(9)),k=Math.asin(((h-w)/n).toFixed(9));M=t<_?l-M:M,k=f<_?l-k:k,M<0&&(M=2*l+M),k<0&&(k=2*l+k),u&&M>k&&(M-=2*l),!u&&k>M&&(k-=2*l)}if(Math.abs(k-M)>c){var A=k,T=f,S=h;k=M+c*(u&&k>M?1:-1);var E=a(f=_+r*Math.cos(k),h=w+n*Math.sin(k),r,n,i,0,u,T,S,[k,A,_,w])}var L=Math.tan((k-M)/4),C=4/3*r*L,z=4/3*n*L,D=[2*t-(t+C*Math.sin(M)),2*e-(e-z*Math.cos(M)),f+C*Math.sin(k),h-z*Math.cos(k),f,h];if(d)return D;E&&(D=D.concat(E));for(var I=0;I<D.length;){var P=o(D[I],D[I+1],i);D[I++]=P.x,D[I++]=P.y}return D}function o(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function s(t){return t*(l/180)}var l=Math.PI,c=s(120);e.exports=function(t){for(var e,r=[],o=0,l=0,c=0,u=0,f=null,h=null,d=0,p=0,m=0,g=t.length;m<g;m++){var v=t[m],y=v[0];switch(y){case\"M\":c=v[1],u=v[2];break;case\"A\":(v=a(d,p,v[1],v[2],s(v[3]),v[4],v[5],v[6],v[7])).unshift(\"C\"),v.length>7&&(r.push(v.splice(0,7)),v.unshift(\"C\"));break;case\"S\":var x=d,b=p;\"C\"!=e&&\"S\"!=e||(x+=x-o,b+=b-l),v=[\"C\",x,b,v[1],v[2],v[3],v[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(f=2*d-f,h=2*p-h):(f=d,h=p),v=i(d,p,f,h,v[1],v[2]);break;case\"Q\":f=v[1],h=v[2],v=i(d,p,v[1],v[2],v[3],v[4]);break;case\"L\":v=n(d,p,v[1],v[2]);break;case\"H\":v=n(d,p,v[1],p);break;case\"V\":v=n(d,p,d,v[1]);break;case\"Z\":v=n(d,p,c,u)}e=y,d=v[v.length-2],p=v[v.length-1],v.length>4?(o=v[v.length-4],l=v[v.length-3]):(o=d,l=p),r.push(v)}return r}},{}],461:[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;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,c=s[s.length-1],u=s[0],f=0;f<s.length;++f){l=c,c=u,u=s[(f+1)%s.length];for(var h=e[l],d=e[c],p=e[u],m=new Array(3),g=0,v=new Array(3),y=0,x=0;x<3;++x)m[x]=h[x]-d[x],g+=m[x]*m[x],v[x]=p[x]-d[x],y+=v[x]*v[x];if(g*y>a){var b=i[c],_=1/Math.sqrt(g*y);for(x=0;x<3;++x){var w=(x+1)%3,M=(x+2)%3;b[x]+=_*(v[w]*m[M]-v[M]*m[w])}}}for(o=0;o<n;++o){b=i[o];var k=0;for(x=0;x<3;++x)k+=b[x]*b[x];if(k>a)for(_=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=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;o<n;++o){for(var s=t[o],l=new Array(3),c=0;c<3;++c)l[c]=e[s[c]];var u=new Array(3),f=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],f[c]=l[2][c]-l[0][c];var h=new Array(3),d=0;for(c=0;c<3;++c){var p=(c+1)%3,m=(c+2)%3;h[c]=u[p]*f[m]-u[m]*f[p],d+=h[c]*h[c]}d=d>a?1/Math.sqrt(d):0;for(c=0;c<3;++c)h[c]*=d;i[o]=h}return i}},{}],462:[function(t,e,r){\"use strict\";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=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,o,s=function(t){if(null===t||void 0===t)throw new TypeError(\"Object.assign cannot be called with null or undefined\");return Object(t)}(t),l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var c in r)i.call(r,c)&&(s[c]=r[c]);if(n){o=n(r);for(var u=0;u<o.length;u++)a.call(r,o[u])&&(s[o[u]]=r[o[u]])}}return s}},{}],463:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f>0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c);f=Math.sqrt(2*h-u+1),e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],464:[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=s([r]),this.center=s(e),this.rotation=s(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)}e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),a(r=[].slice.call(r,0,4),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};var s=t(\"filtered-vector\"),l=t(\"gl-mat4/lookAt\"),c=t(\"gl-mat4/fromQuat\"),u=t(\"gl-mat4/invert\"),f=t(\"./lib/quatFromFrame\"),h=o.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.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,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.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},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.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],c=n(o,s,l);o/=c,s/=c,l/=c;var u=a[0],f=a[4],h=a[8],d=u*o+f*s+h*l,p=n(u-=o*d,f-=s*d,h-=l*d);u/=p,f/=p,h/=p;var m=a[2],g=a[6],v=a[10],y=m*o+g*s+v*l,x=m*u+g*f+v*h,b=n(m-=y*o+x*u,g-=y*s+x*f,v-=y*l+x*h);m/=b,g/=b,v/=b;var _=u*e+o*r,w=f*e+s*r,M=h*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))},h.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],c=o[8],u=o[1],f=o[5],h=o[9],d=o[2],p=o[6],m=o[10],g=e*s+r*u,v=e*l+r*f,y=e*c+r*h,x=-(p*y-m*v),b=-(m*g-d*y),_=-(d*v-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),M=i(x,b,_,w);M>1e-6?(x/=M,b/=M,_/=M,w/=M):(x=b=_=0,w=1);var k=this.computedRotation,A=k[0],T=k[1],S=k[2],E=k[3],L=A*w+E*x+T*_-S*b,C=T*w+E*b+S*x-A*_,z=S*w+E*_+A*b-T*x,D=E*w-A*x-T*b-S*_;if(a){x=d,b=p,_=m;var I=Math.sin(a)/n(x,b,_);x*=I,b*=I,_*=I,D=D*(w=Math.cos(e))-(L=L*w+D*x+C*_-z*b)*x-(C=C*w+D*b+z*x-L*_)*b-(z=z*w+D*_+L*b-C*x)*_}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)},h.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;l(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,c=0;c<3;++c)s+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(s,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.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;u(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 c=Math.exp(this.computedRadius[0]);this.center.set(t,o-n[2]*c,s-n[6]*c,l-n[10]*c),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.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},h.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])]},h.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]}},h.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\":463,\"filtered-vector\":142,\"gl-mat4/fromQuat\":183,\"gl-mat4/invert\":186,\"gl-mat4/lookAt\":187}],465:[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\":507}],466:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),\"m\"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o=\"l\",r=\"m\"==r?\"l\":\"L\");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length<n[o])throw new Error(\"malformed path data\");e.push([r].concat(i.splice(0,n[o])))}}),e};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=/([astvzqmhlc])([^astvzqmhlc]*)/gi,a=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi},{}],467:[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}},{}],468:[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<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var i=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/,a=function(t){return i.exec(t).slice(1)};r.resolve=function(){for(var r=\"\",i=!1,a=arguments.length-1;a>=-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(\"/\"))||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<t.length&&\"\"===t[e];e++);for(var r=t.length-1;r>=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;l<o;l++)if(i[l]!==a[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push(\"..\");return(c=c.concat(a.slice(s))).join(\"/\")},r.sep=\"/\",r.delimiter=\":\",r.dirname=function(t){var e=a(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):\".\"},r.basename=function(t,e){var r=a(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return a(t)[3]};var o=\"b\"===\"ab\".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t(\"_process\"))},{_process:488}],469:[function(t,e,r){\"use strict\";function n(t){var e;t&&t.length&&(t=(e=t).length);var r=new Uint8Array(t||0);return e&&r.set(e),r.readUInt32LE=a.readUInt32LE,r.writeUInt32LE=a.writeUInt32LE,r.readInt32LE=a.readInt32LE,r.writeInt32LE=a.writeInt32LE,r.readFloatLE=a.readFloatLE,r.writeFloatLE=a.writeFloatLE,r.readDoubleLE=a.readDoubleLE,r.writeDoubleLE=a.writeDoubleLE,r.toString=a.toString,r.write=a.write,r.slice=a.slice,r.copy=a.copy,r._isBuffer=!0,r}function i(t){for(var e,r,n=t.length,i=[],a=0;a<n;a++){if((e=t.charCodeAt(a))>55295&&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<r;a++){var o=this[a];o<=127?(n+=decodeURIComponent(i)+String.fromCharCode(o),i=\"\"):i+=\"%\"+o.toString(16)}return n+=decodeURIComponent(i)},write:function(t,e){for(var r=t===o?s:i(t),n=0;n<r.length;n++)this[e+n]=r[n]},slice:function(t,e){return this.subarray(t,e)},copy:function(t,e){e=e||0;for(var r=0;r<this.length;r++)t[e+r]=this[r]}}).writeInt32LE=a.writeUInt32LE,n.byteLength=function(t){return o=t,(s=i(t)).length},n.isBuffer=function(t){return!(!t||!t._isBuffer)}},{ieee754:277}],470:[function(t,e,r){(function(r){\"use strict\";function n(t){this.buf=d.isBuffer(t)?t:new d(t||0),this.pos=0,this.length=this.buf.length}function i(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function a(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function o(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function s(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function l(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function u(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}e.exports=n;var d=r.Buffer||t(\"./buffer\");n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;var p=Math.pow(2,63);n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>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:function(t,e){var r,n=e.buf;if(r=n[e.pos++],t+=268435456*(127&r),r<128)return t;if(r=n[e.pos++],t+=34359738368*(127&r),r<128)return t;if(r=n[e.pos++],t+=4398046511104*(127&r),r<128)return t;if(r=n[e.pos++],t+=562949953421312*(127&r),r<128)return t;if(r=n[e.pos++],t+=72057594037927940*(127&r),r<128)return t;if(r=n[e.pos++],t+=0x8000000000000000*(127&r),r<128)return t;throw new Error(\"Expected varint not more than 10 bytes\")}(t,this))))},readVarint64:function(){var t=this.pos,e=this.readVarint();if(e<p)return e;for(var r=this.pos-2;255===this.buf[r];)r--;r<t&&(r=t),e=0;for(var n=0;n<r-t+1;n++){var i=127&~this.buf[t+n];e+=n<4?i<<7*n:i*Math.pow(2,7*n)}return-e-1},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.buf.toString(\"utf8\",this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.slice(this.pos,t);return this.pos=t,e},readPackedVarint:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readVarint());return e},readPackedSVarint:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(){for(var t=this.readVarint()+this.pos,e=[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);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;e<this.pos+t;)e*=2;if(e!==this.length){var r=new d(e);this.buf.copy(r),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.slice(0,this.length)},writeFixed32:function(t){this.realloc(4),this.buf.writeUInt32LE(t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),this.buf.writeInt32LE(t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),this.buf.writeInt32LE(-1&t,this.pos),this.buf.writeUInt32LE(Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),this.buf.writeInt32LE(-1&t,this.pos),this.buf.writeInt32LE(Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t)>268435455?function(t,e){e.realloc(10);for(var r=e.pos+10;t>=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}}(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=d.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<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&function(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]}(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,i,e)},writePackedSVarint:function(t,e){this.writeMessage(t,a,e)},writePackedBoolean:function(t,e){this.writeMessage(t,l,e)},writePackedFloat:function(t,e){this.writeMessage(t,o,e)},writePackedDouble:function(t,e){this.writeMessage(t,s,e)},writePackedFixed32:function(t,e){this.writeMessage(t,c,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,u,e)},writePackedFixed64:function(t,e){this.writeMessage(t,f,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,h,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\":469}],471:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.length;if(e<n){for(var r=1,a=0;a<e;++a)for(var o=0;o<a;++o)if(t[a]<t[o])r=-r;else if(t[a]===t[o])return 0;return r}var s=i.mallocUint8(e);for(a=0;a<e;++a)s[a]=0;for(r=1,a=0;a<e;++a)if(!s[a]){var l=1;for(s[a]=1,o=t[a];o!==a;o=t[o]){if(s[o])return i.freeUint8(s),0;l+=1,s[o]=1}1&l||(r=-r)}return i.freeUint8(s),r};var n=32,i=t(\"typedarray-pool\")},{\"typedarray-pool\":554}],472:[function(t,e,r){\"use strict\";var n=t(\"typedarray-pool\"),i=t(\"invert-permutation\");r.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var r,a,o,s=n.mallocUint32(e),l=n.mallocUint32(e),c=0;for(i(t,l),o=0;o<e;++o)s[o]=t[o];for(o=e-1;o>0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(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]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a<t;++a)r[a]=a,o=o*a|0;for(a=t-1;a>0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{\"invert-permutation\":280,\"typedarray-pool\":554}],473:[function(t,e,r){\"use strict\";function n(t){return i[t]?i[t]:(\"string\"==typeof t&&(t=i[t]=t.split(/\\s*,\\s*|\\s+/)),t)}e.exports=function(t,e,r){var i,a,o={};if(\"string\"==typeof e&&(e=n(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(i in e)e[i]=n(e[i]);var l={};for(i in e){var c=e[i];if(Array.isArray(c))for(a=0;a<c.length;a++){var u=c[a];if(r&&(l[u]=!0),u in t){if(o[i]=t[u],r)for(var f=a;f<c.length;f++)l[c[f]]=!0;break}}else i in t&&(e[i]&&(o[i]=t[i]),r&&(l[i]=!0))}if(r)for(i in t)l[i]||(o[i]=t[i]);return o};var i={}},{}],474:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(t,e){var r=c[e][t[e]];r.splice(r.indexOf(t),1)}function i(t,i,a){for(var o,s,l,u=0;u<2;++u)if(c[u][i].length>0){o=c[u][i][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=c[f][i],d=0;d<h.length;++d){var p=h[d],m=p[1^f];n(e[t],e[i],e[s],e[m])>0&&(o=p,s=m,l=f)}return a?s:(o&&r(o,l),s)}function a(t,a){var o=c[a][t][0],s=[t];r(o,a);for(var l=o[1^a];;){for(;l!==t;)s.push(l),l=i(s[s.length-2],l,!1);if(c[0][t].length+c[1][t].length===0)break;var u=s[s.length-1],f=t,h=s[1],d=i(u,f,!0);if(n(e[u],e[f],e[h],e[d])<0)break;s.push(t),l=i(u,f)}return s}function o(t,e){return e[1]===e[e.length-1]}for(var s=0|e.length,l=t.length,c=[new Array(s),new Array(s)],u=0;u<s;++u)c[0][u]=[],c[1][u]=[];for(u=0;u<l;++u){var f=t[u];c[0][f[0]].push(f),c[1][f[1]].push(f)}var h=[];for(u=0;u<s;++u)c[0][u].length+c[1][u].length===0&&h.push([u]);for(u=0;u<s;++u)for(var d=0;d<2;++d){for(var p=[];c[d][u].length>0;){c[0][u].length;var m=a(u,d);o(0,m)?p.push.apply(p,m):(p.length>0&&h.push(p),p=m)}p.length>0&&h.push(p)}return h};var n=t(\"compare-angle\")},{\"compare-angle\":106}],475:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){i[d=o.pop()]=!1;var c=r[d];for(s=0;s<c.length;++s){var u=c[s];0==--a[u]&&o.push(u)}}var f=new Array(e.length),h=[];for(s=0;s<e.length;++s)if(i[s]){var d=h.length;f[s]=d,h.push(e[s])}else f[s]=-1;var p=[];for(s=0;s<t.length;++s){var m=t[s];i[m[0]]&&i[m[1]]&&p.push([f[m[0]],f[m[1]]])}return[p,h]};var n=t(\"edges-to-adjacency-list\")},{\"edges-to-adjacency-list\":136}],476:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}e.exports=function(t,e){function r(t){for(var e=t.length,r=0;r<e;++r)if(!C[t[r]])return!1;return!0}t=(R=u(t,e))[0];for(var f=(e=R[1]).length,h=(t.length,i(t,e.length)),d=0;d<f;++d)if(h[d].length%2==1)throw new Error(\"planar-graph-to-polyline: graph must be manifold\");var p=a(t,e),m=(p=p.filter(function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],o=e[t[(i+1)%r]],c=s(-a[0],a[1]),u=s(-a[0],o[1]),f=s(o[0],a[1]),h=s(o[0],o[1]);n=l(n,l(l(c,u),l(f,h)))}return n[n.length-1]>0})).length,g=new Array(m),v=new Array(m);for(d=0;d<m;++d){g[d]=d;var y=new Array(m),x=p[d].map(function(t){return e[t]}),b=o([x]),_=0;t:for(var w=0;w<m;++w)if(y[w]=0,d!==w){for(var M=(H=p[w]).length,k=0;k<M;++k){var A=b(e[H[k]]);if(0!==A){A<0&&(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}v[d]=[_,d,y]}for(v.sort(function(t,e){return e[0]-t[0]}),d=0;d<m;++d){var T=(y=v[d])[1],S=y[2];for(w=0;w<m;++w)S[w]&&(g[w]=T)}var E=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(m);for(d=0;d<m;++d)E[d].push(g[d]),E[g[d]].push(d);var L={},C=n(f,!1);for(d=0;d<m;++d)for(M=(H=p[d]).length,w=0;w<M;++w){var z=H[w],D=H[(w+1)%M],I=Math.min(z,D)+\":\"+Math.max(z,D);if(I in L){var P=L[I];E[P].push(d),E[d].push(P),C[z]=C[D]=!0}else L[I]=d}var O=[],F=n(m,-1);for(d=0;d<m;++d)g[d]!==d||r(p[d])?F[d]=-1:(O.push(d),F[d]=0);for(var R=[];O.length>0;){var N=O.pop(),j=E[N];c(j,function(t,e){return t-e});var B,U=j.length,V=F[N];for(0===V&&(B=[H=p[N]]),d=0;d<U;++d){var q=j[d];if(!(F[q]>=0)&&(F[q]=1^V,O.push(q),0===V)){var H;r(H=p[q])||(H.reverse(),B.push(H))}}0===V&&R.push(B)}return R};var i=t(\"edges-to-adjacency-list\"),a=t(\"planar-dual\"),o=t(\"point-in-big-polygon\"),s=t(\"two-product\"),l=t(\"robust-sum\"),c=t(\"uniq\"),u=t(\"./lib/trim-leaves\")},{\"./lib/trim-leaves\":475,\"edges-to-adjacency-list\":136,\"planar-dual\":474,\"point-in-big-polygon\":478,\"robust-sum\":520,\"two-product\":552,uniq:556}],477:[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}},{}],478:[function(t,e,r){function n(){return!0}function i(t){for(var e={},r=0;r<t.length;++r){var i=t[r],a=i[0][0],o=i[0][1],s=i[1][1],c=[Math.min(o,s),Math.max(o,s)];a in e?e[a].push(c):e[a]=[c]}var u={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];u[f[r]]=l(h)}return function(t){return function(e,r){var i=t[e];return!!i&&!!i.queryPoint(r,n)}}(u)}function a(t){return 1}e.exports=function(t){for(var e=t.length,r=[],n=[],l=0;l<e;++l)for(var u=t[l],f=u.length,h=f-1,d=0;d<f;h=d++){var p=u[h],m=u[d];p[0]===m[0]?n.push([p,m]):r.push([p,m])}if(0===r.length)return 0===n.length?a:function(t){return function(e){return t(e[0],e[1])?0:1}}(i(n));var g=s(r),v=function(t,e){return function(r){var n=c.le(e,r[0]);if(n<0)return 1;var i=t[n];if(!i){if(!(n>0&&e[n]===r[0]))return 1;i=t[n-1]}for(var a=1;i;){var s=i.key,l=o(r,s[0],s[1]);if(s[0][0]<s[1][0])if(l<0)i=i.left;else{if(!(l>0))return 0;a=-1,i=i.right}else if(l>0)i=i.left;else{if(!(l<0))return 0;a=1,i=i.right}}return a}}(g.slabs,g.coordinates);return 0===n.length?v:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(i(n),v)};var o=t(\"robust-orientation\")[3],s=t(\"slab-decomposition\"),l=t(\"interval-tree-1d\"),c=t(\"binary-search-bounds\")},{\"binary-search-bounds\":70,\"interval-tree-1d\":279,\"robust-orientation\":515,\"slab-decomposition\":532}],479:[function(t,e,r){function n(t,e,r){var n=i.segments(t),a=i.segments(e),o=r(i.combine(n,a));return i.polygon(o)}var i,a=t(\"./lib/build-log\"),o=t(\"./lib/epsilon\"),s=t(\"./lib/intersecter\"),l=t(\"./lib/segment-chainer\"),c=t(\"./lib/segment-selector\"),u=t(\"./lib/geojson\"),f=!1,h=o();i={buildLog:function(t){return!0===t?f=a():!1===t&&(f=!1),!1!==f&&f.list},epsilon:function(t){return h.epsilon(t)},segments:function(t){var e=s(!0,h,f);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:s(!1,h,f).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:c.union(t.combined,f),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:c.intersect(t.combined,f),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:c.difference(t.combined,f),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:c.differenceRev(t.combined,f),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:c.xor(t.combined,f),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:l(t.segments,h,f),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(i,t)},polygonToGeoJSON:function(t){return u.fromPolygon(i,h,t)},union:function(t,e){return n(t,e,i.selectUnion)},intersect:function(t,e){return n(t,e,i.selectIntersect)},difference:function(t,e){return n(t,e,i.selectDifference)},differenceRev:function(t,e){return n(t,e,i.selectDifferenceRev)},xor:function(t,e){return n(t,e,i.selectXor)}},\"object\"==typeof window&&(window.PolyBool=i),e.exports=i},{\"./lib/build-log\":480,\"./lib/epsilon\":481,\"./lib/geojson\":482,\"./lib/intersecter\":483,\"./lib/segment-chainer\":485,\"./lib/segment-selector\":486}],480:[function(t,e,r){e.exports=function(){function t(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}var e,r=0,n=!1;return e={list:[],segmentId:function(){return r++},checkIntersection:function(e,r){return t(\"check\",{seg1:e,seg2:r})},segmentChop:function(e,r){return t(\"div_seg\",{seg:e,pt:r}),t(\"chop\",{seg:e,pt:r})},statusRemove:function(e){return t(\"pop_seg\",{seg:e})},segmentUpdate:function(e){return t(\"seg_update\",{seg:e})},segmentNew:function(e,r){return t(\"new_seg\",{seg:e,primary:r})},segmentRemove:function(e){return t(\"rem_seg\",{seg:e})},tempStatus:function(e,r,n){return t(\"temp_status\",{seg:e,above:r,below:n})},rewind:function(e){return t(\"rewind\",{seg:e})},status:function(e,r,n){return t(\"status\",{seg:e,above:r,below:n})},vert:function(r){return r===n?e:(n=r,t(\"vert\",{x:r}))},log:function(e){return\"string\"!=typeof e&&(e=JSON.stringify(e,!1,\" \")),t(\"log\",{txt:e})},reset:function(){return t(\"reset\")},selected:function(e){return t(\"selected\",{segs:e})},chainStart:function(e){return t(\"chain_start\",{seg:e})},chainRemoveHead:function(e,r){return t(\"chain_rem_head\",{index:e,pt:r})},chainRemoveTail:function(e,r){return t(\"chain_rem_tail\",{index:e,pt:r})},chainNew:function(e,r){return t(\"chain_new\",{pt1:e,pt2:r})},chainMatch:function(e){return t(\"chain_match\",{index:e})},chainClose:function(e){return t(\"chain_close\",{index:e})},chainAddHead:function(e,r){return t(\"chain_add_head\",{index:e,pt:r})},chainAddTail:function(e,r){return t(\"chain_add_tail\",{index:e,pt:r})},chainConnect:function(e,r){return t(\"chain_con\",{index1:e,index2:r})},chainReverse:function(e){return t(\"chain_rev\",{index:e})},chainJoin:function(e,r){return t(\"chain_join\",{index1:e,index2:r})},done:function(){return t(\"done\")}}}},{}],481:[function(t,e,r){e.exports=function(t){\"number\"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return\"number\"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t)&&!(l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],c=a*l-o*s;if(Math.abs(c)<t)return!1;var u=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*u)/c,d=(a*f-o*u)/c,p={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return p.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,p.alongB=d<=-t?-2:d<t?-1:d-1<=-t?0:d-1<t?1:2,p},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var c=r[l][0],u=r[l][1];u-i>t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],482:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}if(e.length<=0)return t.segments({inverted:!1,regions:[]});for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if(\"Polygon\"===e.type)return t.polygon(r(e.coordinates));if(\"MultiPolygon\"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}function a(t,e){for(var r=0;r<t.children.length;r++){if(n(e,(s=t.children[r]).region))return void a(s,e)}var o=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(o.children.push(s),t.children.splice(r,1),r--)}t.children.push(o)}function o(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}function s(t){var e=[o(t.region,!1)];f.push(e);for(var r=0;r<t.children.length;r++)e.push(function(t){for(var e=0;e<t.children.length;e++)s(t.children[e]);return o(t.region,!0)}(t.children[r]))}r=t.polygon(t.segments(r));for(var l=i(null),c=0;c<r.regions.length;c++){var u=r.regions[c];u.length<3||a(l,u)}var f=[];for(c=0;c<l.children.length;c++)s(l.children[c]);return f.length<=0?{type:\"Polygon\",coordinates:[]}:1==f.length?{type:\"Polygon\",coordinates:f[0]}:{type:\"MultiPolygon\",coordinates:f}}};e.exports=n},{}],483:[function(t,e,r){var n=t(\"./linked-list\");e.exports=function(t,e,r){function i(t,e){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:null,below:null},otherFill:null}}function a(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}function o(t,r){u.insertBefore(t,function(n){return function(t,r,n,i,a,o){var s=e.pointsCompare(r,a);return 0!==s?s:e.pointsSame(n,o)?0:t!==i?t?1:-1:e.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(t.isStart,t.pt,r,n.isStart,n.pt,n.other.pt)<0})}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=a(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function c(i,a){function o(t){return c.findTransition(function(r){return function(t,r){var n=t.seg.start,i=t.seg.end,a=r.seg.start,o=r.seg.end;return e.pointsCollinear(n,a,o)?e.pointsCollinear(i,a,o)?1:e.pointAboveOrOnLine(i,a,o)?1:-1:e.pointAboveOrOnLine(n,a,o)?1:-1}(t,r.ev)>0})}function s(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),d=e.pointsSame(s,u);if(h&&d)return n;var p=!h&&e.pointBetween(o,c,u),m=!d&&e.pointBetween(s,c,u);if(h)return m?l(n,s):l(t,u),n;p&&(d||(m?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var c=n.create(),f=[];!u.isEmpty();){var h=u.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var d=o(h),p=d.before?d.before.ev:null,m=d.after?d.after.ev:null;r&&r.tempStatus(h.seg,!!p&&p.seg,!!m&&m.seg);var g=function(){if(p){var t=s(h,p);if(t)return t}return!!m&&s(h,m)}();if(g&&(t?(v=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(g.seg.myFill.above=!g.seg.myFill.above):g.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(g.seg),h.other.remove(),h.remove()),u.getHead()!==h){r&&r.rewind(h.seg);continue}if(t){var v;v=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=v?!h.seg.myFill.below:h.seg.myFill.below}else if(null===h.seg.otherFill){var y;y=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?a:i,h.seg.otherFill={above:y,below:y}}r&&r.status(h.seg,!!p&&p.seg,!!m&&m.seg),h.other.status=d.insert(n.node({ev:h}))}else{var x=h.status;if(null===x)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(c.exists(x.prev)&&c.exists(x.next)&&s(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!h.primary){var b=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=b}f.push(h.seg)}u.getHead().remove()}return r&&r.done(),f}var u=n.create();return t?{addRegion:function(t){for(var r,n=t[t.length-1],a=0;a<t.length;a++){r=n,n=t[a];var o=e.pointsCompare(r,n);0!==o&&s(i(o<0?r:n,o<0?n:r),!0)}},calculate:function(t){return c(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach(function(t){s(a(t.start,t.end,t),!0)}),r.forEach(function(t){s(a(t.start,t.end,t),!1)}),c(e,n)}}}},{\"./linked-list\":484}],484:[function(t,e,r){e.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},{}],485:[function(t,e,r){e.exports=function(t,e,r){var n=[],i=[];return t.forEach(function(t){function a(t,e,r){return h.index=t,h.matches_head=e,h.matches_pt1=r,h===u?(h=f,!1):(h=null,!0)}function o(t){r&&r.chainReverse(t),n[t].reverse()}function s(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],c=o[0],u=o[1];e.pointsCollinear(l,s,c)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,c,u)&&(r&&r.chainRemoveHead(i,c),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}var l=t.start,c=t.end;if(e.pointsSame(l,c))console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");else{r&&r.chainStart(t);for(var u={index:0,matches_head:!1,matches_pt1:!1},f={index:0,matches_head:!1,matches_pt1:!1},h=u,d=0;d<n.length;d++){var p=(x=n[d])[0],m=(x[1],x[x.length-1]);if(x[x.length-2],e.pointsSame(p,l)){if(a(d,!0,!0))break}else if(e.pointsSame(p,c)){if(a(d,!0,!1))break}else if(e.pointsSame(m,l)){if(a(d,!1,!0))break}else if(e.pointsSame(m,c)&&a(d,!1,!1))break}if(h===u)return n.push([l,c]),void(r&&r.chainNew(l,c));if(h===f){r&&r.chainMatch(u.index);var g=u.index,v=u.matches_pt1?c:l,y=u.matches_head,x=n[g],b=y?x[0]:x[x.length-1],_=y?x[1]:x[x.length-2],w=y?x[x.length-1]:x[0],M=y?x[x.length-2]:x[1];return e.pointsCollinear(_,b,v)&&(y?(r&&r.chainRemoveHead(u.index,v),x.shift()):(r&&r.chainRemoveTail(u.index,v),x.pop()),b=_),e.pointsSame(w,v)?(n.splice(g,1),e.pointsCollinear(M,w,b)&&(y?(r&&r.chainRemoveTail(u.index,b),x.pop()):(r&&r.chainRemoveHead(u.index,b),x.shift())),r&&r.chainClose(u.index),void i.push(x)):void(y?(r&&r.chainAddHead(u.index,v),x.unshift(v)):(r&&r.chainAddTail(u.index,v),x.push(v)))}var k=u.index,A=f.index;r&&r.chainConnect(k,A);var T=n[k].length<n[A].length;u.matches_head?f.matches_head?T?(o(k),s(k,A)):(o(A),s(A,k)):s(A,k):f.matches_head?s(k,A):T?(o(k),s(A,k)):(o(A),s(k,A))}}),i}},{}],486:[function(t,e,r){function n(t,e,r){var n=[];return t.forEach(function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})}),r&&r.selected(n),n}var i={union:function(t,e){return n(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],e)},intersect:function(t,e){return n(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],e)},difference:function(t,e){return n(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],e)},differenceRev:function(t,e){return n(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],e)},xor:function(t,e){return n(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],e)}};e.exports=i},{}],487:[function(t,e,r){\"use strict\";var n=new Float64Array(4),i=new Float64Array(4),a=new Float64Array(4);e.exports=function(t,e,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),i=new Float64Array(o.length),a=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=t[l]-o[l],i[l]=e[l]-t[l],a[l]=r[l]-t[l];var c=0,u=0,f=0,h=0,d=0,p=0;for(l=0;l<o.length;++l){var m=i[l],g=a[l],v=n[l];c+=m*m,u+=m*g,f+=g*g,h+=v*m,d+=v*g,p+=v*v}var y,x=Math.abs(c*f-u*u),b=u*d-f*h,_=u*h-c*d;if(b+_<=x)if(b<0)_<0&&h<0?(_=0,-h>=c?(b=1,y=c+2*h+p):y=h*(b=-h/c)+p):(b=0,d>=0?(_=0,y=p):-d>=f?(_=1,y=f+2*d+p):y=d*(_=-d/f)+p);else if(_<0)_=0,h>=0?(b=0,y=p):-h>=c?(b=1,y=c+2*h+p):y=h*(b=-h/c)+p;else{var w=1/x;y=(b*=w)*(c*b+u*(_*=w)+2*h)+_*(u*b+f*_+2*d)+p}else{var M,k,A,T;b<0?(k=f+d)>(M=u+h)?(A=k-M)>=(T=c-2*u+f)?(b=1,_=0,y=c+2*h+p):y=(b=A/T)*(c*b+u*(_=1-b)+2*h)+_*(u*b+f*_+2*d)+p:(b=0,k<=0?(_=1,y=f+2*d+p):d>=0?(_=0,y=p):y=d*(_=-d/f)+p):_<0?(k=c+h)>(M=u+d)?(A=k-M)>=(T=c-2*u+f)?(_=1,b=0,y=f+2*d+p):y=(b=1-(_=A/T))*(c*b+u*_+2*h)+_*(u*b+f*_+2*d)+p:(_=0,k<=0?(b=1,y=c+2*h+p):h>=0?(b=0,y=p):y=h*(b=-h/c)+p):(A=f+d-u-h)<=0?(b=0,_=1,y=f+2*d+p):A>=(T=c-2*u+f)?(b=1,_=0,y=c+2*h+p):y=(b=A/T)*(c*b+u*(_=1-b)+2*h)+_*(u*b+f*_+2*d)+p}var S=1-b-_;for(l=0;l<o.length;++l)s[l]=S*t[l]+b*e[l]+_*r[l];return y<0?0:y}},{}],488:[function(t,e,r){function n(){throw new Error(\"setTimeout has not been defined\")}function i(){throw new Error(\"clearTimeout has not been defined\")}function a(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function o(){m&&d&&(m=!1,d.length?p=d.concat(p):g=-1,p.length&&s())}function s(){if(!m){var t=a(o);m=!0;for(var e=p.length;e;){for(d=p,p=[];++g<e;)d&&d[g].run();g=-1,e=p.length}d=null,m=!1,function(t){if(f===clearTimeout)return clearTimeout(t);if((f===i||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var u,f,h=e.exports={};!function(){try{u=\"function\"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{f=\"function\"==typeof clearTimeout?clearTimeout:i}catch(t){f=i}}();var d,p=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];p.push(new l(t,e)),1!==p.length||m||a(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title=\"browser\",h.browser=!0,h.env={},h.argv=[],h.version=\"\",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error(\"process.binding is not supported\")},h.cwd=function(){return\"/\"},h.chdir=function(t){throw new Error(\"process.chdir is not supported\")},h.umask=function(){return 0}},{}],489:[function(t,e,r){(function(t){!function(n){function i(t){throw new RangeError(z[t])}function a(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function o(t,e){var r=t.split(\"@\"),n=\"\";r.length>1&&(n=r[0]+\"@\",t=r[1]);return n+a((t=t.replace(C,\".\")).split(\".\"),e).join(\".\")}function s(t){for(var e,r,n=[],i=0,a=t.length;i<a;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<a?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function l(t){return a(t,function(t){var e=\"\";return t>65535&&(e+=P((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=P(t)}).join(\"\")}function c(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function u(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?I(t/k):t>>1,t+=I(t/e);t>D*w>>1;n+=b)t=I(t/D);return I(n+(D+1)*t/(t+M))}function h(t){var e,r,n,a,o,s,u,h,d,p,m=[],g=t.length,v=0,y=T,M=A;for((r=t.lastIndexOf(S))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&i(\"not-basic\"),m.push(t.charCodeAt(n));for(a=r>0?r+1:0;a<g;){for(o=v,s=1,u=b;a>=g&&i(\"invalid-input\"),((h=c(t.charCodeAt(a++)))>=b||h>I((x-v)/s))&&i(\"overflow\"),v+=h*s,d=u<=M?_:u>=M+w?w:u-M,!(h<d);u+=b)s>I(x/(p=b-d))&&i(\"overflow\"),s*=p;M=f(v-o,e=m.length+1,0==o),I(v/e)>x-y&&i(\"overflow\"),y+=I(v/e),v%=e,m.splice(v++,0,y)}return l(m)}function d(t){var e,r,n,a,o,l,c,h,d,p,m,g,v,y,M,k=[];for(g=(t=s(t)).length,e=T,r=0,o=A,l=0;l<g;++l)(m=t[l])<128&&k.push(P(m));for(n=a=k.length,a&&k.push(S);n<g;){for(c=x,l=0;l<g;++l)(m=t[l])>=e&&m<c&&(c=m);for(c-e>I((x-r)/(v=n+1))&&i(\"overflow\"),r+=(c-e)*v,e=c,l=0;l<g;++l)if((m=t[l])<e&&++r>x&&i(\"overflow\"),m==e){for(h=r,d=b;p=d<=o?_:d>=o+w?w:d-o,!(h<p);d+=b)M=h-p,y=b-p,k.push(P(u(p+M%y,0))),h=I(M/y);k.push(P(u(h,0))),o=f(r,v,n==a),r=0,++n}++r,++e}return k.join(\"\")}var p=\"object\"==typeof r&&r&&!r.nodeType&&r,m=\"object\"==typeof e&&e&&!e.nodeType&&e,g=\"object\"==typeof t&&t;g.global!==g&&g.window!==g&&g.self!==g||(n=g);var v,y,x=2147483647,b=36,_=1,w=26,M=38,k=700,A=72,T=128,S=\"-\",E=/^xn--/,L=/[^\\x20-\\x7E]/,C=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,z={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},D=b-_,I=Math.floor,P=String.fromCharCode;if(v={version:\"1.4.1\",ucs2:{decode:s,encode:l},decode:h,encode:d,toASCII:function(t){return o(t,function(t){return L.test(t)?\"xn--\"+d(t):t})},toUnicode:function(t){return o(t,function(t){return E.test(t)?h(t.slice(4).toLowerCase()):t})}},p&&m)if(e.exports==p)m.exports=v;else for(y in v)v.hasOwnProperty(y)&&(p[y]=v[y]);else n.punycode=v}(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],490:[function(t,e,r){e.exports=t(\"gl-quat/slerp\")},{\"gl-quat/slerp\":236}],491:[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;var s=/\\+/g;t=t.split(e);var l=1e3;a&&\"number\"==typeof a.maxKeys&&(l=a.maxKeys);var c=t.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var f,h,d,p,m=t[u].replace(s,\"%20\"),g=m.indexOf(r);g>=0?(f=m.substr(0,g),h=m.substr(g+1)):(f=m,h=\"\"),d=decodeURIComponent(f),p=decodeURIComponent(h),n(o,d)?i(o[d])?o[d].push(p):o[d]=[o[d],p]:o[d]=p}return o};var i=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}},{}],492:[function(t,e,r){\"use strict\";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return\"\"}};e.exports=function(t,e,r,s){return e=e||\"&\",r=r||\"=\",null===t&&(t=void 0),\"object\"==typeof t?n(o(t),function(o){var s=encodeURIComponent(i(o))+r;return a(t[o])?n(t[o],function(t){return s+encodeURIComponent(i(t))}).join(e):s+encodeURIComponent(i(t[o]))}).join(e):s?encodeURIComponent(i(s))+r+encodeURIComponent(i(t)):\"\"};var a=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)},o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],493:[function(t,e,r){\"use strict\";r.decode=r.parse=t(\"./decode\"),r.encode=r.stringify=t(\"./encode\")},{\"./decode\":491,\"./encode\":492}],494:[function(t,e,r){\"use strict\";function n(t,e,r,a,o){for(r=r||0,a=a||t.length-1,o=o||function(t,e){return t<e?-1:t>e?1:0};a>r;){if(a-r>600){var s=a-r+1,l=e-r+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);n(t,e,Math.max(r,Math.floor(e-l*u/s+f)),Math.min(a,Math.floor(e+(s-l)*u/s+f)),o)}var h=t[e],d=r,p=a;for(i(t,r,e),o(t[a],h)>0&&i(t,r,a);d<p;){for(i(t,d,p),d++,p--;o(t[d],h)<0;)d++;for(;o(t[p],h)>0;)p--}0===o(t[r],h)?i(t,r,p):i(t,++p,a),p<=e&&(r=p+1),e<=p&&(a=p-1)}}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}e.exports=n},{}],495:[function(t,e,r){\"use strict\";var n=t(\"big-rat/add\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/add\":54}],496:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=t(\"big-rat\")},{\"big-rat\":57}],497:[function(t,e,r){\"use strict\";var n=t(\"big-rat\"),i=t(\"big-rat/mul\");e.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},{\"big-rat\":57,\"big-rat/mul\":66}],498:[function(t,e,r){\"use strict\";var n=t(\"big-rat/sub\");e.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},{\"big-rat/sub\":68}],499:[function(t,e,r){\"use strict\";var n=t(\"compare-cell\"),i=t(\"compare-oriented-cell\"),a=t(\"cell-orientation\");e.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{\"cell-orientation\":90,\"compare-cell\":107,\"compare-oriented-cell\":108}],500:[function(t,e,r){\"use strict\";var n=t(\"array-bounds\"),i=t(\"color-normalize\"),a=t(\"update-diff\"),o=t(\"pick-by-alias\"),s=t(\"object-assign\"),l=t(\"flatten-vertex-data\"),c=t(\"to-float32\"),u=c.float32,f=c.fract32;e.exports=function(t,e){function r(t){t?p(t):null===t&&m(),c()}function c(e){if(\"number\"==typeof e)return d(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),k.forEach(function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?d(r):t.draw=!0)})}function d(t){\"number\"==typeof t&&(t=k[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],g(t),t.after&&t.after(t))}function p(t){if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(k=t.map(function(t,c){var u=k[c];return t?(\"function\"==typeof t?t={after:t}:\"number\"==typeof t[0]&&(t={positions:t}),t=o(t,{color:\"color colors fill\",capSize:\"capSize cap capsize cap-size\",lineWidth:\"lineWidth line-width width line thickness\",opacity:\"opacity alpha\",range:\"range dataBox\",viewport:\"viewport viewBox\",errors:\"errors error\",positions:\"positions position data points\"}),u||(k[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},M,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,\"float64\"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t=\"transparent\"),!Array.isArray(t)||\"number\"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error(\"Not enough colors\");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],\"uint8\");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:w.drawingBufferWidth,height:w.drawingBufferHeight},e}}]),u):u}),e||r){var c=k.reduce(function(t,e,r){return t+(e?e.count:0)},0),h=new Float64Array(2*c),d=new Uint8Array(4*c),p=new Float32Array(4*c);k.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(d.set(a,4*i),p.set(o,4*i),h.set(r,2*i))}}),v(u(h)),y(f(h)),x(d),b(p)}}}function m(){v.destroy(),y.destroy(),x.destroy(),b.destroy(),_.destroy()}if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");var g,v,y,x,b,_,w=t._gl,M={color:\"black\",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},k=[];return x=t.buffer({usage:\"dynamic\",type:\"uint8\",data:null}),v=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),y=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),b=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),_=t.buffer({usage:\"static\",type:\"float\",data:h}),p(e),g=t({vert:\"\\n\\t\\tprecision highp float;\\n\\n\\t\\tattribute vec2 position, positionFract;\\n\\t\\tattribute vec4 error;\\n\\t\\tattribute vec4 color;\\n\\n\\t\\tattribute vec2 direction, lineOffset, capOffset;\\n\\n\\t\\tuniform vec4 viewport;\\n\\t\\tuniform float lineWidth, capSize;\\n\\t\\tuniform vec2 scale, scaleFract, translate, translateFract;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tfragColor = color / 255.;\\n\\n\\t\\t\\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\\n\\n\\t\\t\\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\\n\\n\\t\\t\\tvec2 position = position + dxy;\\n\\n\\t\\t\\tvec2 pos = (position + translate) * scale\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n\\t\\t\\tpos += pixelOffset / viewport.zw;\\n\\n\\t\\t\\tgl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\t\\t}\\n\\t\\t\",frag:\"\\n\\t\\tprecision mediump float;\\n\\n\\t\\tvarying vec4 fragColor;\\n\\n\\t\\tuniform float opacity;\\n\\n\\t\\tvoid main() {\\n\\t\\t\\tgl_FragColor = fragColor;\\n\\t\\t\\tgl_FragColor.a *= opacity;\\n\\t\\t}\\n\\t\\t\",uniforms:{range:t.prop(\"range\"),lineWidth:t.prop(\"lineWidth\"),capSize:t.prop(\"capSize\"),opacity:t.prop(\"opacity\"),scale:t.prop(\"scale\"),translate:t.prop(\"translate\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:x,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:v,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:y,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:b,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,stride:24,offset:16}},primitive:\"triangles\",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:!1,instances:t.prop(\"count\"),count:h.length}),s(r,{update:p,draw:c,destroy:m,regl:t,gl:w,canvas:w.canvas,groups:k}),r};var h=[[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]]},{\"array-bounds\":48,\"color-normalize\":99,\"flatten-vertex-data\":143,\"object-assign\":462,\"pick-by-alias\":473,\"to-float32\":547,\"update-diff\":558}],501:[function(t,e,r){\"use strict\";function n(t){var e=new Float32Array(t.length);e.set(t);for(var r=0,n=e.length;r<n;r++)e[r]=t[r]-e[r];return e}var i=t(\"color-normalize\"),a=t(\"array-bounds\"),o=t(\"object-assign\"),s=t(\"glslify\"),l=t(\"pick-by-alias\"),c=t(\"update-diff\"),u=t(\"flatten-vertex-data\"),f=t(\"earcut\"),h=t(\"array-normalize\");e.exports=function(t,e){function r(t){t?m(t):null===t&&g(),d()}function d(t){if(\"number\"==typeof t)return p(t);t&&!Array.isArray(t)&&(t=[t]),S.forEach(function(e,r){t&&(t[r]?e.draw=!0:e.draw=!1),e.draw?p(r):e.draw=!0})}function p(e){\"number\"==typeof e&&(e=S[e]),e&&e.count&&e.opacity&&e.positions&&e.positions.length>2&&(t._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&x(e),e.thickness&&e.color&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],e.scaleRatio[0]>L||e.scaleRatio[1]>L?y(e):\"rect\"===e.join||!e.join&&(e.thickness<=2||e.positions.length>=C)?y(e):v(e),e.after&&e.after(e)))}function m(t){if(t){null!=t.length?\"number\"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0;if(S=t.map(function(t,r){var s=S[r];return t?(\"function\"==typeof t?t={after:t}:\"number\"==typeof t[0]&&(t={positions:t}),t=l(t,{positions:\"positions points data coords\",thickness:\"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth\",join:\"lineJoin linejoin join type mode\",miterLimit:\"miterlimit miterLimit\",dashes:\"dash dashes dasharray dash-array dashArray\",color:\"color stroke colors stroke-color strokeColor\",fill:\"fill fill-color fillColor\",opacity:\"alpha opacity\",overlay:\"overlay crease overlap intersect\",close:\"closed close closed-path closePath\",range:\"range dataBox\",viewport:\"viewport viewBox\",hole:\"holes hole hollow\",after:\"after callback done pass\"}),s||(S[r]=s={id:r,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,offset:0,dashLength:0,hole:!0},t=o({},T,t)),c(s,t,[{thickness:parseFloat,opacity:parseFloat,miterLimit:parseFloat,overlay:Boolean,join:function(t){return t},after:function(t){return t},hole:function(t){return t||[]},positions:function(t,r,n){t=u(t,\"float64\");var i=Math.floor(t.length/2),o=a(t,2);return r.range||n.range||(n.range=o),r.count=i,r.bounds=o,e+=i,t},fill:function(t){return t?i(t,\"uint8\"):null},dashes:function(t,e,r){var n,i=e.dashLength;if(!t||t.length<2)i=1,n=new Uint8Array([255,255,255,255,255,255,255,255]);else{i=0;for(var a=0;a<t.length;++a)i+=t[a];n=new Uint8Array(i*E);for(var o=0,s=255,l=0;l<2;l++)for(var c=0;c<t.length;++c){for(var u=0,f=t[c]*E*.5;u<f;++u)n[o++]=s;s^=255}}return k.subimage({data:n,width:n.length,height:1},0,e.id),e.dashLength=i,n}},{close:function(t,e,r){return null!=t?t:e.positions.length>=4&&e.positions[0]===e.positions[e.positions.length-2]&&e.positions[1]===e.positions[e.positions.length-1]},positions:function(t,e,r){if(e.fill&&t.length){for(var n=[],i={},a=0,o=0,s=0,l=e.count;o<l;o++){var c=e.positions[2*o],u=e.positions[2*o+1];Number.isNaN(c)||Number.isNaN(u)?(c=e.positions[2*a],u=e.positions[2*a+1],i[o]=a):a=o,n[s++]=c,n[s++]=u}for(var h=f(n,e.hole),d=0,p=h.length;d<p;d++)null!=i[h[d]]&&(h[d]=i[h[d]]);e.triangles=h}return e.positions},color:function(t,e,r){var n=e.count;if(t||(t=\"transparent\"),!Array.isArray(t)||\"number\"==typeof t[0]){var a=t;t=Array(n);for(var o=0;o<n;o++)t[o]=a}if(t.length<n)throw Error(\"Not enough colors\");for(var s=new Uint8Array(4*n+4),l=0;l<n;l++){var c=i(t[l],\"uint8\");s.set(c,4*l)}return s},range:function(t,e,r){if(!e.count)return null;var i=e.bounds;t||(t=i);var a=h(t.slice(),2,i);return e.scale=[1/(a[2]-a[0]),1/(a[3]-a[1])],e.translate=[-a[0],-a[1]],e.scaleFract=n(e.scale),e.translateFract=n(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:A.drawingBufferWidth,height:A.drawingBufferHeight},e}}]),s):s}),e){var s=2*e+6*S.length,d=new Float64Array(s),p=0,m=new Uint8Array(2*s);S.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.color;if(t.offset=p,n){var a=new Float64Array(r.length);a.set(r),h(a,2,t.bounds),t.close?r[0]===r[2*n-2]&&r[1]===r[2*n-1]?(d[2*p+0]=a[2*n-4],d[2*p+1]=a[2*n-3]):(d[2*p+0]=a[2*n-2],d[2*p+1]=a[2*n-1]):(d[2*p+0]=a[0],d[2*p+1]=a[1]),m[4*p+0]=i[0],m[4*p+1]=i[1],m[4*p+2]=i[2],m[4*p+3]=i[3],d.set(a,2*p+2),m.set(i,4*p+4),t.close?r[0]===r[2*n-2]&&r[1]===r[2*n-1]?(d[2*p+2*n+2]=a[2],d[2*p+2*n+3]=a[3],p+=n+2,t.count-=1):(d[2*p+2*n+2]=a[0],d[2*p+2*n+3]=a[1],d[2*p+2*n+4]=a[2],d[2*p+2*n+5]=a[3],p+=n+3):(d[2*p+2*n+2]=a[2*n-2],d[2*p+2*n+3]=a[2*n-1],d[2*p+2*n+4]=a[2*n-2],d[2*p+2*n+5]=a[2*n-1],p+=n+3)}}}),b(m),w(function(t){if(t instanceof Float32Array)return t;var e=new Float32Array(t);return e.set(t),e}(d)),M(n(d))}return r}}function g(){S.length=0,b.destroy(),_.destroy(),w.destroy(),k.destroy()}if(\"function\"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension(\"ANGLE_instanced_arrays\"))throw Error(\"regl-error2d: `ANGLE_instanced_arrays` extension should be enabled\");var v,y,x,b,_,w,M,k,A=t._gl,T={positions:[],dashes:null,join:null,miterLimit:1,thickness:10,cap:\"square\",color:\"black\",opacity:1,overlay:!1,viewport:null,range:null,close:null,fill:null},S=[],E=2,L=3e6,C=1e4;b=t.buffer({usage:\"dynamic\",type:\"uint8\",data:null}),_=t.buffer({usage:\"static\",type:\"float\",data:[0,1,0,0,1,1,1,0]}),w=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),M=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),k=t.texture({channels:1,data:new Uint8Array(524288),width:256,height:2048,mag:\"linear\",min:\"linear\"}),m(e);var z={primitive:\"triangle strip\",instances:t.prop(\"count\"),count:4,offset:0,uniforms:{miterMode:function(t,e){return\"round\"===e.join?2:1},miterLimit:t.prop(\"miterLimit\"),scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),thickness:t.prop(\"thickness\"),dashPattern:k,dashLength:t.prop(\"dashLength\"),dashShape:[256,2048],opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),scaleRatio:t.prop(\"scaleRatio\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:\"add\",alpha:\"add\"},func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},depth:{enable:function(t,e){return!e.overlay}},scissor:{enable:!0,box:t.prop(\"viewport\")},stencil:!1,viewport:t.prop(\"viewport\")};return v=t(o({cull:{enable:!0,face:\"back\"},vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\\nattribute vec4 aColor, bColor;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, translate, scaleRatio;\\nuniform float thickness, pixelRatio, id;\\nuniform vec4 viewport;\\nuniform float miterLimit, dashLength, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 tangent;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nconst float MAX_LINES = 256.;\\nconst float REVERSE_THRESHOLD = -.875;\\nconst float MIN_DIST = 1.;\\n\\n//TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\\n//TODO: precalculate dot products, normalize things beforehead etc.\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nbool isNaN( float val ){\\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\\n}\\n\\nvoid main() {\\n\\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineBot = 1. - lineTop;\\n\\tfloat depth = (MAX_LINES - 1. - id) / MAX_LINES;\\n\\n\\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\\n\\n\\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\\n\\n\\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\\n\\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\\n\\n\\tvec2 prevDiff = aCoord - prevCoord;\\n\\tvec2 currDiff = bCoord - aCoord;\\n\\tvec2 nextDiff = nextCoord - bCoord;\\n\\n\\tvec2 prevDirection = normalize(prevDiff);\\n\\tvec2 currDirection = normalize(currDiff);\\n\\tvec2 nextDirection = normalize(nextDiff);\\n\\n\\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\\n\\tvec2 currTangent = normalize(currDiff * scaleRatio);\\n\\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\\n\\n\\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\\n\\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\\n\\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\\n\\n\\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\\n\\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\\n\\n\\t//collapsed/unidirectional segment cases\\n\\tif (prevDirection == currDirection) {\\n\\t\\tstartJoinDirection = currNormal;\\n\\t}\\n\\tif (nextDirection == currDirection) {\\n\\t\\tendJoinDirection = currNormal;\\n\\t}\\n\\tif (aCoord == bCoord) {\\n\\t\\tendJoinDirection = startJoinDirection;\\n\\t\\tcurrNormal = prevNormal;\\n\\t\\tcurrTangent = prevTangent;\\n\\t}\\n\\n\\ttangent = currTangent;\\n\\n\\t//calculate join shifts relative to normals\\n\\tfloat startJoinShift = dot(currNormal, startJoinDirection);\\n\\tfloat endJoinShift = dot(currNormal, endJoinDirection);\\n\\n\\tfloat startMiterRatio = abs(1. / startJoinShift);\\n\\tfloat endMiterRatio = abs(1. / endJoinShift);\\n\\n\\tvec2 startJoin = startJoinDirection * startMiterRatio;\\n\\tvec2 endJoin = endJoinDirection * endMiterRatio;\\n\\n\\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\\n\\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\\n\\tstartBotJoin = -startTopJoin;\\n\\n\\tendTopJoin = sign(endJoinShift) * endJoin * .5;\\n\\tendBotJoin = -endTopJoin;\\n\\n\\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\\n\\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\\n\\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\\n\\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\\n\\n\\t//miter anti-clipping\\n\\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\\n\\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\\n\\n\\t//prevent close to reverse direction switch\\n\\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\\n\\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\\n\\n\\tif (prevReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\\n\\t\\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\tbTopCoord -= normalWidth * endTopJoin;\\n\\t\\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\\n\\t}\\n\\n\\tif (nextReverse) {\\n\\t\\t//make join rectangular\\n\\t\\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\\n\\t\\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\\n\\t\\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\\n\\t\\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\\n\\t}\\n\\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\\n\\t\\t//handle miter clipping\\n\\t\\taBotCoord -= normalWidth * startBotJoin;\\n\\t\\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\\n\\t}\\n\\n\\tvec2 aTopPosition = (aTopCoord + translate) * scale;\\n\\tvec2 aBotPosition = (aBotCoord + translate) * scale;\\n\\n\\tvec2 bTopPosition = (bTopCoord + translate) * scale;\\n\\tvec2 bBotPosition = (bBotCoord + translate) * scale;\\n\\n\\t//position is normalized 0..1 coord on the screen\\n\\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\\n\\n\\tstartCoord = (aCoord + translate) * scaleRatio + viewport.xy;\\n\\tendCoord = (bCoord + translate) * scaleRatio + viewport.xy;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\\n\\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\\n\\n\\t//bevel miter cutoffs\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = (startCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\\n\\t\\t\\tendCutoff = (endCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n\\n\\t//round miter cutoffs\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\\n\\t\\t\\tstartCutoff = vec4(aCoord, aCoord);\\n\\t\\t\\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\\n\\t\\t\\tstartCutoff = (startCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tstartCutoff += viewport.xyxy;\\n\\t\\t\\tstartCutoff += startMiterWidth.xyxy;\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\\n\\t\\t\\tendCutoff = vec4(bCoord, bCoord);\\n\\t\\t\\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\\n\\t\\t\\tendCutoff = (endCutoff + translate.xyxy) * scaleRatio.xyxy;\\n\\t\\t\\tendCutoff += viewport.xyxy;\\n\\t\\t\\tendCutoff += endMiterWidth.xyxy;\\n\\t\\t}\\n\\t}\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\nuniform vec2 dashShape;\\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\nvarying vec4 startCutoff, endCutoff;\\nvarying vec2 startCoord, endCoord;\\nvarying float enableStartMiter, enableEndMiter;\\n\\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\\n\\tvec2 diff = b - a;\\n\\tvec2 perp = normalize(vec2(-diff.y, diff.x));\\n\\treturn dot(p - a, perp);\\n}\\n\\nvoid main() {\\n\\tfloat alpha = 1., distToStart, distToEnd;\\n\\tfloat cutoff = thickness * .5;\\n\\n\\t//bevel miter\\n\\tif (miterMode == 1.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToStart + 1., 0.), 1.);\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < -1.) {\\n\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\talpha *= min(max(distToEnd + 1., 0.), 1.);\\n\\t\\t}\\n\\t}\\n\\n\\t// round miter\\n\\telse if (miterMode == 2.) {\\n\\t\\tif (enableStartMiter == 1.) {\\n\\t\\t\\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\\n\\t\\t\\tif (distToStart < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - startCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif (enableEndMiter == 1.) {\\n\\t\\t\\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\\n\\t\\t\\tif (distToEnd < 0.) {\\n\\t\\t\\t\\tfloat radius = length(gl_FragCoord.xy - endCoord);\\n\\n\\t\\t\\t\\tif(radius > cutoff + .5) {\\n\\t\\t\\t\\t\\tdiscard;\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t * dashLength * 2. / dashShape.x, (id + .5) / dashShape.y)).r;\\n\\n\\tgl_FragColor = fragColor * dash;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:_,divisor:0,stride:8,offset:0},lineTop:{buffer:_,divisor:0,stride:8,offset:4},aColor:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset},divisor:1},bColor:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset+4},divisor:1},prevCoord:{buffer:w,stride:8,offset:function(t,e){return 8*e.offset},divisor:1},aCoord:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoord:{buffer:w,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},nextCoord:{buffer:w,stride:8,offset:function(t,e){return 24+8*e.offset},divisor:1}}},z)),y=t(o({vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\\nattribute vec4 color;\\nattribute float lineEnd, lineTop;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract, scaleRatio;\\nuniform float thickness, pixelRatio, id;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nconst float MAX_LINES = 256.;\\n\\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\\n return (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n}\\n\\nvoid main() {\\n\\t// vec2 scaleRatio = scale * viewport.zw;\\n\\tvec2 normalWidth = thickness / scaleRatio;\\n\\n\\tfloat lineStart = 1. - lineEnd;\\n\\tfloat lineOffset = lineTop * 2. - 1.;\\n\\tfloat depth = (MAX_LINES - 1. - id) / (MAX_LINES);\\n\\n\\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\\n\\ttangent = normalize(diff * scaleRatio);\\n\\tvec2 normal = vec2(-tangent.y, tangent.x);\\n\\n\\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\\n\\t\\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\\n\\n\\t\\t+ thickness * normal * .5 * lineOffset / viewport.zw;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform sampler2D dashPattern;\\nuniform vec2 dashShape;\\nuniform float dashLength, pixelRatio, thickness, opacity, id;\\n\\nvarying vec4 fragColor;\\nvarying vec2 tangent;\\n\\nvoid main() {\\n\\tfloat alpha = 1.;\\n\\n\\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\\n\\tfloat dash = texture2D(dashPattern, vec2(t * dashLength * 2. / dashShape.x, (id + .5) / dashShape.y)).r;\\n\\n\\tgl_FragColor = fragColor * dash;\\n\\tgl_FragColor.a *= alpha * opacity * dash;\\n}\\n\"]),attributes:{lineEnd:{buffer:_,divisor:0,stride:8,offset:0},lineTop:{buffer:_,divisor:0,stride:8,offset:4},aCoord:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoord:{buffer:w,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},aCoordFract:{buffer:M,stride:8,offset:function(t,e){return 8+8*e.offset},divisor:1},bCoordFract:{buffer:M,stride:8,offset:function(t,e){return 16+8*e.offset},divisor:1},color:{buffer:b,stride:4,offset:function(t,e){return 4*e.offset},divisor:1}}},z)),x=t({primitive:\"triangle\",elements:function(t,e){return e.triangles},offset:0,vert:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\n\\nuniform vec4 color;\\nuniform vec2 scale, scaleFract, translate, translateFract, scaleRatio;\\nuniform float pixelRatio, id;\\nuniform vec4 viewport;\\n\\nvarying vec4 fragColor;\\n\\nconst float MAX_LINES = 256.;\\n\\nvoid main() {\\n\\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\\n\\n\\tvec2 position = (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n\\n\\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\\n\\n\\tfragColor = color / 255.;\\n}\\n\"]),frag:s([\"precision highp float;\\n#define GLSLIFY 1\\n\\nuniform float opacity;\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n\\tgl_FragColor = fragColor;\\n\\tgl_FragColor.a *= opacity;\\n}\\n\"]),uniforms:{scale:t.prop(\"scale\"),color:t.prop(\"fill\"),scaleFract:t.prop(\"scaleFract\"),translateFract:t.prop(\"translateFract\"),translate:t.prop(\"translate\"),opacity:t.prop(\"opacity\"),pixelRatio:t.context(\"pixelRatio\"),id:t.prop(\"id\"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:w,stride:8,offset:function(t,e){return 8+8*e.offset}},positionFract:{buffer:M,stride:8,offset:function(t,e){return 8+8*e.offset}}},blend:z.blend,depth:{enable:!1},scissor:z.scissor,stencil:z.stencil,viewport:z.viewport}),o(r,{update:m,draw:d,destroy:g,regl:t,gl:A,canvas:A.canvas,lines:S}),r}},{\"array-bounds\":48,\"array-normalize\":49,\"color-normalize\":99,earcut:135,\"flatten-vertex-data\":143,glslify:502,\"object-assign\":462,\"pick-by-alias\":473,\"update-diff\":558}],502:[function(t,e,r){arguments[4][169][0].apply(r,arguments)},{dup:169}],503:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\"),i=t(\"array-bounds\"),a=t(\"color-id\"),o=t(\"snap-points-2d\"),s=t(\"object-assign\"),l=t(\"glslify\"),c=t(\"binary-search-bounds\"),u=t(\"pick-by-alias\"),f=t(\"update-diff\"),h=t(\"flatten-vertex-data\"),d=t(\"is-iexplorer\"),p=t(\"to-float32\"),m=p.float32,g=p.fract32;e.exports=function(t,e){function r(t){t?x(t):null===t&&M(),p()}function p(t){if(\"number\"==typeof t)return v(t);Array.isArray(t)?t.forEach(function(t,e){if(null!=t)return t.length?v(t,e):v(t)}):O.forEach(function(t,e){t&&v(e)})}function v(e,r){\"number\"==typeof e&&(e=O[e]);var n;if(Array.isArray(e)&&(n=e,e=O[r]),e&&e.count&&e.opacity){var i;if(n){i=Array(e.count);for(var a=0;a<n.length;a++)i[n[a]]=!0}if(e.markerIds[0]){t._refresh();var o=y(e.markerIds[0],e,i);A(o)}for(var s=[],l=1;l<e.markerIds.length;l++){var c=e.markerIds[l];c&&c.length&&[].push.apply(s,y(c,e,i))}s.length&&(t._refresh(),k(s))}}function y(t,e,r){function n(t,e){for(var r=[],n=0,i=t.length;n<i;n++){var o=t[n];e[o-a]&&r.push(o)}return r}var i=e.range,a=e.offset;if(!t.snap){var o=r?n(t.data,r):t.elements;return[s({},e,{elements:o,offset:0,count:r?o.length:t.length,marker:F[t.id]})]}for(var l=[],u=t.lod,f=t.x,h=t.id,d=(i[2]-i[0])/e.viewport.width,p=u.length;p--;){var m=u[p];if(!(m.pixelSize&&m.pixelSize<d&&p>1)){var g=m.offset,v=m.count+g,y=c.ge(f,i[0],g,v-1),x=c.lt(f,i[2],y,v-1)+1;if(!(x<=y))if(r){var b=n(t.data.subarray(y,x),r);l.push(s({},e,{elements:b,marker:F[h],offset:0,count:b.length}))}else l.push(s({},e,{elements:t.elements,marker:F[h],offset:y,count:x-y}))}}return l}function x(e){if(e){null!=e.length?\"number\"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var r=0,n=0,a=0;O=e.map(function(e,l){var c=O[l];return e?(\"function\"==typeof e?e={after:e}:\"number\"==typeof e[0]&&(e={positions:e}),e=u(e,{positions:\"positions data points\",snap:\"snap cluster\",size:\"sizes size radius\",borderSize:\"borderSizes borderSize stroke-width strokeWidth outline\",color:\"colors color fill fill-color fillColor\",borderColor:\"borderColors borderColor stroke stroke-color strokeColor\",palette:\"palette swatch\",marker:\"markers marker shape\",range:\"range dataBox\",viewport:\"viewport viewBox\",opacity:\"opacity alpha\"}),c||(O[l]=c={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,markerIds:[]},e=s({},P,e)),!e.positions||\"marker\"in e||(e.marker=c.marker,delete c.marker),f(c,e,[{snap:!0,size:function(t){return n+=t.length?1:0,t},borderSize:function(t){return n+=t.length?1:0,t},opacity:parseFloat,color:function(t){return t=w(t),a++,t},borderColor:function(t){return t=w(t),a++,t},positions:function(t,e,n){t=h(t,\"float64\");var a=e.count=Math.floor(t.length/2),o=e.bounds=a?i(t,2):null;return n.range||e.range||(delete e.range,n.range=o),e.offset=r,r+=a,n.marker||e.marker||(delete e.marker,n.marker=null),t}},{marker:function(t,e,r){if(e.markerIds.length=0,t&&\"number\"!=typeof t[0])for(var n=0,i=t.length;n<i;n++){var a=_(t[n]);e.markerIds[a]||(e.markerIds[a]=[]),e.markerIds[a].push(n)}else{for(var o=_(t),s=Array(e.count),l=0;l<e.count;l++)s[l]=l;e.markerIds[o]=s}return t}},{positions:function(e,r){for(var n=r.markerIds,i=r.snap,a=r.bounds,s=r.offset,l=0;l<n.length;l++){var c=n[l];if(c&&c.length){var u=c.length,f=void 0;if(c.id=l,i&&(!0===i||u>i)){c.snap=!0;var h=c.x=Array(u),d=c.w=Array(u),p=void 0;if(n.length>1){p=Array(2*u);for(var m=0;m<u;m++){var g=c[m];p[2*m]=e[2*g],p[2*m+1]=e[2*g+1]}}else(p=new Float64Array(e.length)).set(e);var v=new Uint32Array(u);c.lod=o(p,v,d,a),f=new Uint32Array(u);for(var y=0;y<u;y++){var x=c[v[y]];f[y]=x+s,h[y]=e[2*x]}}else{f=new Uint32Array(u);for(var b=0;b<u;b++)f[b]=c[b]+s}c.data=f,c.elements=t.elements({primitive:\"points\",type:\"uint32\",data:f})}}},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=g(e.scale),e.translateFract=g(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:z.drawingBufferWidth,height:z.drawingBufferHeight},e}}]),c):c}),b({point:r,size:n,color:a})}}function b(t){var e=t.point,r=t.size,n=t.color,i=O.reduce(function(t,e,r){return t+(e?e.count:0)},0);if(e){var a=new Float32Array(2*i),o=new Float32Array(2*i);O.forEach(function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset;n&&(a.set(m(r),2*i),o.set(g(r),2*i))}}),S(a),E(o)}if(r){var s=new Uint8Array(2*i);O.forEach(function(t,e){if(t){var r=t.count,n=t.offset,i=t.size,a=t.borderSize;if(r&&(i.length||a.length)){for(var o=new Uint8Array(2*r),l=0;l<r;l++)o[2*l]=Math.round(255*(null==i[l]?i:i[l])/j),o[2*l+1]=Math.round(255*(null==a[l]?a:a[l])/j);s.set(o,2*n)}}}),T(s)}if(n){var l=new Uint16Array(2*i);O.forEach(function(t,e){if(t){var r=t.count,n=t.offset,i=t.color,a=t.borderColor;if(r&&(i.length||a.length)){for(var o=new Uint16Array(2*r),s=0;s<r;s++)o[2*s]=null==i[s]?i:i[s],o[2*s+1]=null==a[s]?a:a[s];l.set(o,2*n)}}}),L(l)}}function _(e){var r=null==e?0:R.indexOf(e);if(r>=0)return r;var n;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)n=e;else{n=new Uint8Array(e.length);for(var i=0,a=e.length;i<a;i++)n[i]=255*e[i]}var o=Math.floor(Math.sqrt(n.length));return r=F.length,R.push(e),F.push(t.texture({channels:1,data:n,radius:o,mag:\"linear\",min:\"linear\"})),r}function w(t){Array.isArray(t)||(t=[t]);for(var e=D.length,r=[],i=0;i<t.length;i++){var o=t[i];if(\"number\"!=typeof o){o=n(o,\"uint8\");var s=a(o,!1);if(null==I[s]){var l=D.length;I[s]=Math.floor(l/4),D[l]=o[0],D[l+1]=o[1],D[l+2]=o[2],D[l+3]=o[3]}r[i]=Math.min(I[s],N-1)}else r[i]=o}return e<4*N&&C.subimage({width:Math.min(.25*D.length,N),height:1,data:D.slice(0,4*N)},0,0),1===r.length?r[0]:r}function M(){O.length=0,T.destroy(),S.destroy(),E.destroy(),L.destroy(),C.destroy()}\"function\"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var k,A,T,S,E,L,C,z=(t=e.regl)._gl,D=[],I={},P={color:\"black\",borderColor:\"transparent\",borderSize:1,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,offset:0,count:0,bounds:null,positions:[],snap:1e4},O=[],F=[null],R=[null],N=4096,j=100;C=t.texture({data:new Uint8Array(4*N),width:N,height:1,type:\"uint8\",format:\"rgba\",wrapS:\"clamp\",wrapT:\"clamp\",mag:\"nearest\",min:\"nearest\"}),T=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),L=t.buffer({usage:\"dynamic\",type:\"uint16\",data:null}),S=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),E=t.buffer({usage:\"dynamic\",type:\"float\",data:null}),e.clone?(O=e.clone.groups.map(function(e){return(e=s({},e)).markerIds&&(e.markerIds=e.markerIds.map(function(e){var r=e.slice();return r.lod=e.lod,r.snap=e.snap,r.data=e.data,r.id=e.id,r.x=e.x,r.w=e.w,r.elements=t.elements({primitive:\"points\",type:\"uint32\",data:e.data}),r})),e}),e.clone.markers.forEach(function(t){_(t)}),b({point:!0,color:!0,size:!0})):x(e);var B={uniforms:{pixelRatio:t.context(\"pixelRatio\"),palette:C,scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translate:t.prop(\"translate\"),translateFract:t.prop(\"translateFract\"),opacity:t.prop(\"opacity\"),marker:t.prop(\"marker\")},attributes:{position:S,positionFract:E,size:function(t,e){return e.size.length?{buffer:T,stride:2,offset:0}:{constant:[Math.round(255*e.size/j)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:T,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/j)]}},colorId:function(t,e){return e.color.length?{buffer:L,stride:4,offset:0}:{constant:[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:L,stride:4,offset:2}:{constant:[e.borderColor]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:\"one minus dst alpha\",dstAlpha:\"one\"}},scissor:{enable:!0,box:t.prop(\"viewport\")},viewport:t.prop(\"viewport\"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop(\"elements\"),count:t.prop(\"count\"),offset:t.prop(\"offset\"),primitive:\"points\"};if(d)A=t(s({},B,{frag:l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nuniform vec4 color, borderColor;\\nuniform float opacity;\\nvarying float fragBorderRadius, fragWidth, fragBorderSize, fragSize;\\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\\n float centerFraction = fragBorderSize == 0. ? 2. : fragSize / (fragSize + fragBorderSize + 1.25);\\n\\n vec4 baseColor = mix(borderColor, color, smoothStep(radius, centerFraction));\\n float alpha = 1.0 - pow(1.0 - baseColor.a, 1.);\\n gl_FragColor = vec4(baseColor.rgb * alpha, alpha);\\n}\\n\"]),vert:l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth, fragBorderSize, fragSize;\\n\\nvoid main() {\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n fragBorderSize = borderSize;\\n fragSize = size;\\n\\n gl_PointSize = (size + borderSize) * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragBorderRadius = borderSize == 0. ? 2. : 1. - 2. * borderSize / (size + borderSize);\\n fragWidth = 1. / gl_PointSize;\\n}\\n\"]),uniforms:{color:function(t,e){var r=e.color.length?e.color[0]:e.color;return D.slice(4*r,4*r+4).map(function(t){return t/255})},borderColor:function(t,e){var r=e.borderColor.length?e.borderColor[0]:e.borderColor;return D.slice(4*r,4*r+4).map(function(t){return t/255})},pixelRatio:t.context(\"pixelRatio\"),palette:C,scale:t.prop(\"scale\"),scaleFract:t.prop(\"scaleFract\"),translate:t.prop(\"translate\"),translateFract:t.prop(\"translateFract\"),opacity:t.prop(\"opacity\"),marker:t.prop(\"marker\")},attributes:{position:S,positionFract:E,size:B.attributes.size,borderSize:B.attributes.borderSize}}));else{var U=s({},B);U.frag=l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nuniform sampler2D marker;\\nuniform float pixelRatio, opacity;\\n\\nfloat smoothStep(float x, float y) {\\n return 1.0 / (1.0 + exp(50.0*(x - y)));\\n}\\n\\nvoid main() {\\n float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\\n\\n //max-distance alpha\\n if (dist < 0.003) discard;\\n\\n //null-border case\\n if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\\n float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\\n gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a);\\n return;\\n }\\n\\n float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\\n float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\\n\\n vec4 color = fragBorderColor;\\n color.a *= borderColorAmt;\\n color = mix(color, fragColor, colorAmt);\\n color.a *= opacity;\\n\\n gl_FragColor = color;\\n}\\n\"]),U.vert=l([\"precision mediump float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\nattribute float colorId, borderColorId;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\nconst float borderLevel = .5;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragPointSize, fragBorderRadius,\\n\\t\\tfragWidth, fragBorderColorLevel, fragColorLevel;\\n\\nvoid main() {\\n vec4 color = texture2D(palette, vec2((colorId + .5) / paletteSize, 0));\\n vec4 borderColor = texture2D(palette, vec2((borderColorId + .5) / paletteSize, 0));\\n\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n\\n gl_PointSize = 2. * size * pixelRatio;\\n fragPointSize = size * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n + (positionFract + translateFract) * scale\\n + (position + translate) * scaleFract\\n + (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragColor = color;\\n fragBorderColor = borderColor;\\n fragWidth = 1. / gl_PointSize;\\n\\n fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\\n fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\\n}\\n\"]),k=t(U);var V=s({},B);V.frag=l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor, fragBorderColor;\\n\\nuniform float opacity;\\nvarying float fragBorderRadius, fragWidth;\\n\\nvoid main() {\\n\\tfloat radius, alpha = 1.0, delta = fragWidth;\\n\\n\\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\\n\\n\\tif(radius > 1.0 + delta) {\\n\\t\\tdiscard;\\n\\t\\treturn;\\n\\t}\\n\\n\\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\\n\\n\\tfloat borderRadius = fragBorderRadius;\\n\\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\\n\\tvec4 color = mix(fragColor, fragBorderColor, ratio);\\n\\tcolor.a *= alpha * opacity;\\n\\tgl_FragColor = color;\\n}\\n\"]),V.vert=l([\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec2 position, positionFract;\\nattribute float size, borderSize;\\nattribute float colorId, borderColorId;\\n\\nuniform vec2 scale, scaleFract, translate, translateFract;\\nuniform float pixelRatio;\\nuniform sampler2D palette;\\n\\nconst float paletteSize = 4096., maxSize = 100.;\\n\\nvarying vec4 fragColor, fragBorderColor;\\nvarying float fragBorderRadius, fragWidth;\\n\\nvoid main() {\\n vec4 color = texture2D(palette, vec2((colorId + .5) / paletteSize, 0));\\n vec4 borderColor = texture2D(palette, vec2((borderColorId + .5) / paletteSize, 0));\\n\\n float size = size * maxSize / 255.;\\n float borderSize = borderSize * maxSize / 255.;\\n\\n gl_PointSize = (size + borderSize) * pixelRatio;\\n\\n vec2 pos = (position + translate) * scale\\n\\t\\t\\t+ (positionFract + translateFract) * scale\\n\\t\\t\\t+ (position + translate) * scaleFract\\n\\t\\t\\t+ (positionFract + translateFract) * scaleFract;\\n\\n gl_Position = vec4(pos * 2. - 1., 0, 1);\\n\\n fragBorderRadius = borderSize == 0. ? 2. : 1. - 2. * borderSize / (size + borderSize);\\n fragColor = color;\\n fragBorderColor = borderColor;\\n fragWidth = 1. / gl_PointSize;\\n}\\n\"]),A=t(V)}return s(r,{update:x,draw:p,destroy:M,regl:t,gl:z,canvas:z.canvas,groups:O,markers:R}),r}},{\"array-bounds\":48,\"binary-search-bounds\":504,\"color-id\":97,\"color-normalize\":99,\"flatten-vertex-data\":143,glslify:505,\"is-iexplorer\":284,\"object-assign\":462,\"pick-by-alias\":473,\"snap-points-2d\":534,\"to-float32\":547,\"update-diff\":558}],504:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=[\"function \",t,\"(a,l,h,\",n.join(\",\"),\"){\",i?\"\":\"var i=\",r?\"l-1\":\"h+1\",\";while(l<=h){var m=(l+h)>>>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)}},{}],505:[function(t,e,r){arguments[4][169][0].apply(r,arguments)},{dup:169}],506:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.createREGL=n()}(this,function(){function t(t,e){this.id=j++,this.type=t,this.data=e}function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(1<t.length&&r===n&&('\"'===r||\"'\"===r))return['\"'+t.substr(1,t.length-2).replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];if(r=/\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(t))return e(t.substr(0,r.index)).concat(e(r[1])).concat(e(t.substr(r.index+r[0].length)));if(1===(r=t.split(\".\")).length)return['\"'+t.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"')+'\"'];for(t=[],n=0;n<r.length;++n)t=t.concat(e(r[n]));return t}function r(t){return\"[\"+e(t).join(\"][\")+\"]\"}function n(t){return\"string\"==typeof t?t.split():t}function i(t){return\"string\"==typeof t?document.querySelector(t):t}function a(t){var e,r,a,o,s=t||{};t={};var l=[],c=[],u=\"undefined\"==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},d=function(){};if(\"string\"==typeof s?e=document.querySelector(s):\"object\"==typeof s&&(\"string\"==typeof s.nodeName&&\"function\"==typeof s.appendChild&&\"function\"==typeof s.getBoundingClientRect?e=s:\"function\"==typeof s.drawArrays||\"function\"==typeof s.drawElements?(o=s,a=o.canvas):(\"gl\"in s?o=s.gl:\"canvas\"in s?a=i(s.canvas):\"container\"in s&&(r=i(s.container)),\"attributes\"in s&&(t=s.attributes),\"extensions\"in s&&(l=n(s.extensions)),\"optionalExtensions\"in s&&(c=n(s.optionalExtensions)),\"onDone\"in s&&(h=s.onDone),\"profile\"in s&&(f=!!s.profile),\"pixelRatio\"in s&&(u=+s.pixelRatio))),e&&(\"canvas\"===e.nodeName.toLowerCase()?a=e:r=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(n=t.getBoundingClientRect(),e=n.right-n.left,n=n.bottom-n.top),i.width=r*e,i.height=r*n,N(i.style,{width:e+\"px\",height:n+\"px\"})}var i=document.createElement(\"canvas\");return N(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position=\"absolute\",N(t.style,{margin:0,padding:0})),window.addEventListener(\"resize\",n,!1),n(),{canvas:i,onDestroy:function(){window.removeEventListener(\"resize\",n),t.removeChild(i)}}}(r||document.body,0,u)))return null;a=e.canvas,d=e.onDestroy}o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r(\"webgl\")||r(\"experimental-webgl\")||r(\"webgl-experimental\")}(a,t)}return o?{gl:o,canvas:a,container:r,extensions:l,optionalExtensions:c,pixelRatio:u,profile:f,onDone:h,onDestroy:d}:(d(),h(\"webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org\"),null)}function o(t){return!!t&&\"object\"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&\"number\"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||q(t.data))}function s(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function l(t){var e,r;return e=(65535<t)<<4,t>>>=e,r=(255<t)<<3,t>>>=r,e|=r,r=(15<t)<<2,t>>>=r,e|=r,r=(3<t)<<1,e|r|t>>>r>>1}function c(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=G[l(t)>>2]).length?e.pop():new ArrayBuffer(t)}function u(t){G[l(t.byteLength)>>2].push(t)}function f(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)i[a++]=c[u]}function h(t,e,r,n,i){for(var a=1,o=r+1;o<e.length;++o)a*=e[o];var s=e[r];if(4==e.length-r){var l=e[r+1],c=e[r+2];for(e=e[r+3],o=0;o<s;++o)f(t[o],l,c,e,n,i),i+=a}else for(o=0;o<s;++o)h(t[o],e,r+1,n,i),i+=a}function d(t){return 0|X[Object.prototype.toString.call(t)]}function p(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function m(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)t[s++]=e[i*l+a*c+o]}function g(t){for(var e=Y.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{et[0]=t[r];var n=(a=rt[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function v(t){return Array.isArray(t)||q(t)}function y(t){return Array.isArray(t)&&(0===t.length||\"number\"==typeof t[0])}function x(t){return!(!Array.isArray(t)||0===t.length||!v(t[0]))}function b(t){return Object.prototype.toString.call(t)}function _(t){if(!t)return!1;var e=b(t);return 0<=ot.indexOf(e)||(y(t)||x(t)||o(t))}function w(t,e){36193===t.type?(t.data=g(e),Y.freeType(e)):t.data=e}function M(t,e,r,n,i,a){if(t=void 0!==lt[t]?lt[t]:at[t]*st[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function k(t,e,r,n,i,a,s){function l(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(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,e){if(\"object\"==typeof e&&e){\"premultiplyAlpha\"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),\"flipY\"in e&&(t.flipY=e.flipY),\"alignment\"in e&&(t.unpackAlignment=e.alignment),\"colorSpace\"in e&&(t.colorSpace=V[e.colorSpace]),\"type\"in e&&(t.type=G[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;\"shape\"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):(\"radius\"in e&&(r=n=e.radius),\"width\"in e&&(r=e.width),\"height\"in e&&(n=e.height),\"channels\"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,\"format\"in e&&(r=e.format,n=t.internalformat=Z[r],t.format=st[n],r in G&&!(\"type\"in e)&&(t.type=G[r]),r in J&&(t.compressed=!0),r=!0),!a&&r?t.channels=at[t.format]:a&&!r&&t.channels!==it[t.format]&&(t.format=t.internalformat=it[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){l.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function d(t,e){var r=null;if(_(e)?r=e:e&&(u(t,e),\"x\"in e&&(t.xOffset=0|e.x),\"y\"in e&&(t.yOffset=0|e.y),_(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(q(r))t.channels=t.channels||4,t.data=r,\"type\"in e||5121!==t.type||(t.type=0|X[Object.prototype.toString.call(r)]);else if(y(r)){switch(t.channels=t.channels||4,n=r,a=n.length,t.type){case 5121:case 5123:case 5125:case 5126:(a=Y.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=g(n)}t.alignment=1,t.needsFree=!0}else if(o(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|X[Object.prototype.toString.call(n)]);a=r.shape;var s,l,c,f,h=r.stride;3===a.length?(c=a[2],f=h[2]):f=c=1,s=a[0],l=a[1],a=h[0],h=h[1],t.alignment=1,t.width=s,t.height=l,t.channels=c,t.format=t.internalformat=it[c],t.needsFree=!0,s=f,r=r.offset,c=t.width,f=t.height,l=t.channels;for(var d=Y.allocType(36193===t.type?5126:t.type,c*f*l),p=0,m=0;m<f;++m)for(var M=0;M<c;++M)for(var k=0;k<l;++k)d[p++]=n[a*M+h*m+s*k+r];w(t,d)}else if(\"[object HTMLCanvasElement]\"===b(r)||\"[object CanvasRenderingContext2D]\"===b(r))\"[object HTMLCanvasElement]\"===b(r)?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(\"[object HTMLImageElement]\"===b(r))t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(\"[object HTMLVideoElement]\"===b(r))t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(x(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=v(r[0][0])?h||r[0][0].length:h||1,s=W.shape(r),c=1,f=0;f<s.length;++f)c*=s[f];c=Y.allocType(36193===t.type?5126:t.type,c),W.flatten(r,s,\"\",c),w(t,c),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=it[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function p(e,r,i,a,o){var s=e.element,l=e.data,c=e.internalformat,u=e.format,h=e.type,d=e.width,p=e.height;f(e),s?t.texSubImage2D(r,o,i,a,u,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,c,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,u,h,l)}function m(){return lt.pop()||new h}function k(t){t.needsFree&&Y.freeType(t.data),h.call(t),lt.push(t)}function A(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 T(t,e){var r=null;if(_(e))r=t.images[0]=m(),c(r,t),d(r,e),t.mipmask=1;else if(u(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)r=t.images[i]=m(),c(r,t),r.width>>=i,r.height>>=i,d(r,n[i]),t.mipmask|=1<<i;else r=t.images[0]=m(),c(r,t),d(r,e),t.mipmask=1;c(t,t.images[0])}function S(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,c=o.element,u=o.data,h=o.internalformat,d=o.format,p=o.type,m=o.width,g=o.height;f(o),c?t.texImage2D(s,l,d,d,p,c):o.compressed?t.compressedTexImage2D(s,l,h,m,g,0,u):o.needsCopy?(n(),t.copyTexImage2D(s,l,d,o.xOffset,o.yOffset,m,g,0)):t.texImage2D(s,l,d,m,g,0,d,p,u)}}function E(){var t=ct.pop()||new function(){l.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)};l.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&k(e[r]),e[r]=null;ct.push(t)}function C(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function z(t,e){\"min\"in e&&(t.minFilter=U[e.min],0<=nt.indexOf(t.minFilter)&&(t.genMipmaps=!0)),\"mag\"in e&&(t.magFilter=B[e.mag]);var r=t.wrapS,n=t.wrapT;if(\"wrap\"in e){var i=e.wrap;\"string\"==typeof i?r=n=j[i]:Array.isArray(i)&&(r=j[i[0]],n=j[i[1]])}else\"wrapS\"in e&&(r=j[e.wrapS]),\"wrapT\"in e&&(n=j[e.wrapT]);if(t.wrapS=r,t.wrapT=n,\"anisotropic\"in e&&(t.anisotropic=e.anisotropic),\"mipmap\"in e){switch(r=!1,typeof e.mipmap){case\"string\":t.mipmapHint=R[e.mipmap],r=t.genMipmaps=!0;break;case\"boolean\":r=t.genMipmaps=e.mipmap;break;case\"object\":t.genMipmaps=!1,r=!0}!r||\"min\"in e||(t.minFilter=9984)}}function D(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function I(e){l.call(this),this.mipmask=0,this.internalformat=6408,this.id=ut++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new C,s.profile&&(this.stats={size:0})}function P(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function O(){var e=dt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function F(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),dt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete ft[e.id],a.textureCount--}var R={\"don't care\":4352,\"dont care\":4352,nice:4354,fast:4353},j={repeat:10497,clamp:33071,mirror:33648},B={nearest:9728,linear:9729},U=N({mipmap:9987,\"nearest mipmap nearest\":9984,\"linear mipmap nearest\":9985,\"nearest mipmap linear\":9986,\"linear mipmap linear\":9987},B),V={none:0,browser:37444},G={uint8:5121,rgba4:32819,rgb565:33635,\"rgb5 a1\":32820},Z={alpha:6406,luminance:6409,\"luminance alpha\":6410,rgb:6407,rgba:6408,rgba4:32854,\"rgb5 a1\":32855,rgb565:36194},J={};e.ext_srgb&&(Z.srgb=35904,Z.srgba=35906),e.oes_texture_float&&(G.float32=G.float=5126),e.oes_texture_half_float&&(G.float16=G[\"half float\"]=36193),e.webgl_depth_texture&&(N(Z,{depth:6402,\"depth stencil\":34041}),N(G,{uint16:5123,uint32:5125,\"depth stencil\":34042})),e.webgl_compressed_texture_s3tc&&N(J,{\"rgb s3tc dxt1\":33776,\"rgba s3tc dxt1\":33777,\"rgba s3tc dxt3\":33778,\"rgba s3tc dxt5\":33779}),e.webgl_compressed_texture_atc&&N(J,{\"rgb atc\":35986,\"rgba atc explicit alpha\":35987,\"rgba atc interpolated alpha\":34798}),e.webgl_compressed_texture_pvrtc&&N(J,{\"rgb pvrtc 4bppv1\":35840,\"rgb pvrtc 2bppv1\":35841,\"rgba pvrtc 4bppv1\":35842,\"rgba pvrtc 2bppv1\":35843}),e.webgl_compressed_texture_etc1&&(J[\"rgb etc1\"]=36196);var K=Array.prototype.slice.call(t.getParameter(34467));Object.keys(J).forEach(function(t){var e=J[t];0<=K.indexOf(e)&&(Z[t]=e)});var Q=Object.keys(Z);r.textureFormats=Q;var $=[];Object.keys(Z).forEach(function(t){$[Z[t]]=t});var tt=[];Object.keys(G).forEach(function(t){tt[G[t]]=t});var et=[];Object.keys(B).forEach(function(t){et[B[t]]=t});var rt=[];Object.keys(U).forEach(function(t){rt[U[t]]=t});var ot=[];Object.keys(j).forEach(function(t){ot[j[t]]=t});var st=Q.reduce(function(t,e){var r=Z[e];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?t[r]=r:32855===r||0<=e.indexOf(\"rgba\")?t[r]=6408:t[r]=6407,t},{}),lt=[],ct=[],ut=0,ft={},ht=r.maxTextureUnits,dt=Array(ht).map(function(){return null});return N(I.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<ht;++r){var n=dt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}dt[r]=this,e=r;break}s.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&F(this)}}),s.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(ft).forEach(function(e){t+=ft[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;C.call(r);var a=E();return\"number\"==typeof t?\"number\"==typeof e?A(a,0|t,0|e):A(a,0|t,0|t):t?(z(r,t),T(a,t)):A(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,P(i),S(a,3553),D(r,3553),O(),L(a),s.profile&&(i.stats.size=M(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=$[i.internalformat],n.type=tt[i.type],n.mag=et[r.magFilter],n.min=rt[r.minFilter],n.wrapS=ot[r.wrapS],n.wrapT=ot[r.wrapT],n}var i=new I(3553);return ft[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=m();return c(o,i),o.width=0,o.height=0,d(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,P(i),p(o,3553,e,r,a),O(),k(o),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,P(i);for(var l=0;i.mipmask>>l;++l)t.texImage2D(3553,l,i.format,a>>l,o>>l,0,i.format,i.type,null);return O(),s.profile&&(i.stats.size=M(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType=\"texture2d\",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,o,l){function f(t,e,r,n,i,a){var o,l=h.texInfo;for(C.call(l),o=0;6>o;++o)g[o]=E();if(\"number\"!=typeof t&&t){if(\"object\"==typeof t)if(e)T(g[0],t),T(g[1],e),T(g[2],r),T(g[3],n),T(g[4],i),T(g[5],a);else if(z(l,t),u(h,t),\"faces\"in t)for(t=t.faces,o=0;6>o;++o)c(g[o],h),T(g[o],t[o]);else for(o=0;6>o;++o)T(g[o],t)}else for(t=0|t||1,o=0;6>o;++o)A(g[o],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,P(h),o=0;6>o;++o)S(g[o],34069+o);for(D(l,34067),O(),s.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=$[h.internalformat],f.type=tt[h.type],f.mag=et[l.magFilter],f.min=rt[l.minFilter],f.wrapS=ot[l.wrapS],f.wrapT=ot[l.wrapT],o=0;6>o;++o)L(g[o]);return f}var h=new I(34067);ft[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,o,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=m();return c(a,h),a.width=0,a.height=0,d(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,P(h),p(a,34069+t,r,n,i),O(),k(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,P(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return O(),s.profile&&(h.stats.size=M(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType=\"textureCube\",f._texture=h,s.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<ht;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),dt[e]=null;H(ft).forEach(F),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){H(ft).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)})}}}function A(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function T(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?l:c)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=t.createProgram();t.attachShader(u,l),t.attachShader(u,c),t.linkProgram(u);var f=t.getProgramParameter(u,35718);n.profile&&(r.stats.uniformsCount=f);var h=r.uniforms;for(l=0;l<f;++l)if(c=t.getActiveUniform(u,l))if(1<c.size)for(var d=0;d<c.size;++d){var p=c.name.replace(\"[0]\",\"[\"+d+\"]\");a(h,new i(p,e.id(p),t.getUniformLocation(u,p),c))}else a(h,new i(c.name,e.id(c.name),t.getUniformLocation(u,c.name),c));for(f=t.getProgramParameter(u,35721),n.profile&&(r.stats.attributesCount=f),h=r.attributes,l=0;l<f;++l)(c=t.getActiveAttrib(u,l))&&a(h,new i(c.name,e.id(c.name),t.getAttribLocation(u,c.name),c))}var l={},c={},u={},f=[],h=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return f.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return f.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);H(l).forEach(e),l={},H(c).forEach(e),c={},f.forEach(function(e){t.deleteProgram(e.program)}),f.length=0,u={},r.shaderCount=0},program:function(t,e,i){var a=u[e];a||(a=u[e]={});var o=a[t];return o||(o=new function(t,e){this.id=h++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}(e,t),r.shaderCount++,s(o),a[t]=o,f.push(o)),o},restore:function(){l={},c={};for(var t=0;t<f.length;++t)s(f[t])},shader:o,frag:-1,vert:-1}}function S(t,e,r,n,i,a){function o(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return q(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r(),i=l*c*4,u||(5121===a?u=new Uint8Array(i):5126===a&&(u=u||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,c,6408,a,u),u}return function(t){return t&&\"framebuffer\"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},function(){r=o(t)}),r}(t):o(t)}}function E(t){return Array.prototype.slice.call(t)}function L(t){return E(t).join(\"\")}function C(t){return Array.isArray(t)||q(t)||o(t)}function z(t){return t.sort(function(t,e){return\"viewport\"===t?-1:\"viewport\"===e?1:t<e?-1:1})}function D(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function I(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function P(t){return new D(!1,!1,!1,t)}function O(t,e){var r=t.type;return 0===r?(r=t.data.length,new D(!0,1<=r,2<=r,e)):4===r?(r=t.data,new D(r.thisDep,r.contextDep,r.propDep,e)):new D(3===r,2===r,1===r,e)}function F(t,e,r,n,i,a,o,l,c,u,f,h,d,p,m){function g(t){return t.replace(\".\",\"_\")}function y(t,e,r){var n=g(t);$.push(t),Q[n]=K[n]=!!r,et[n]=e}function x(t,e,r){var n=g(t);$.push(t),Array.isArray(r)?(K[n]=r.slice(),Q[n]=r.slice()):K[n]=Q[n]=r,rt[n]=e}function b(){var t=function(){function t(){var t=[],e=[];return N(function(){t.push.apply(t,E(arguments))},{def:function(){var n=\"v\"+r++;return e.push(n),0<arguments.length&&(t.push(n,\"=\"),t.push.apply(t,E(arguments)),t.push(\";\")),n},toString:function(){return L([0<e.length?\"var \"+e+\";\":\"\",L(t)])}})}function e(){function e(t,e){n(t,e,\"=\",r.def(t,e),\";\")}var r=t(),n=t(),i=r.toString,a=n.toString;return N(function(){r.apply(r,E(arguments))},{def:r.def,entry:r,exit:n,save:e,set:function(t,n,i){e(t,n),r(t,n,\"=\",i,\";\")},toString:function(){return i()+a()}})}var r=0,n=[],i=[],a=t(),o={};return{global:a,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return n[e];return e=\"g\"+r++,n.push(e),i.push(t),e},block:t,proc:function(t,r){function n(){var t=\"a\"+i.length;return i.push(t),t}var i=[];r=r||0;for(var a=0;a<r;++a)n();var s=(a=e()).toString;return o[t]=N(a,{arg:n,toString:function(){return L([\"function(\",i.join(),\"){\",s(),\"}\"])}})},scope:e,cond:function(){var t=L(arguments),r=e(),n=e(),i=r.toString,a=n.toString;return N(r,{then:function(){return r.apply(r,E(arguments)),this},else:function(){return n.apply(n,E(arguments)),this},toString:function(){var e=a();return e&&(e=\"else{\"+e+\"}\"),L([\"if(\",t,\"){\",i(),\"}\",e])}})},compile:function(){var t=['\"use strict\";',a,\"return {\"];Object.keys(o).forEach(function(e){t.push('\"',e,'\":',o[e].toString(),\",\")}),t.push(\"}\");var e=L(t).replace(/;/g,\";\\n\").replace(/}/g,\"}\\n\").replace(/{/g,\"{\\n\");return Function.apply(null,n.concat(e)).apply(null,i)}}}(),r=t.link,n=t.global;t.id=at++,t.batchId=\"0\";var i=r(nt),a=t.shared={props:\"a0\"};Object.keys(nt).forEach(function(t){a[t]=n.def(i,\".\",t)});var o=t.next={},s=t.current={};Object.keys(rt).forEach(function(t){Array.isArray(K[t])&&(o[t]=n.def(a.next,\".\",t),s[t]=n.def(a.current,\".\",t))});var l=t.constants={};Object.keys(it).forEach(function(t){l[t]=n.def(JSON.stringify(it[t]))}),t.invoke=function(e,n){switch(n.type){case 0: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 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def(\"this\",n.data);case 4:return n.data.append(t,e),n.data.ref}},t.attribCache={};var c={};return t.scopeAttrib=function(t){if((t=e.id(t))in c)return c[t];var n=u.scope[t];return n||(n=u.scope[t]=new Y),c[t]=r(n)},t}function _(t,r,n,o,c){var u=function(t,e){var r=t.static,n=t.dynamic;if(\"framebuffer\"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),P(function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\".width\"),e.set(n,\".framebufferHeight\",r+\".height\"),r})):P(function(t,e){var r=t.shared;return e.set(r.framebuffer,\".next\",\"null\"),r=r.context,e.set(r,\".framebufferWidth\",r+\".drawingBufferWidth\"),e.set(r,\".framebufferHeight\",r+\".drawingBufferHeight\"),\"null\"})}if(\"framebuffer\"in n){var a=n.framebuffer;return O(a,function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;return r=e.def(i,\".getFramebuffer(\",r,\")\"),e.set(i,\".next\",r),n=n.context,e.set(n,\".framebufferWidth\",r+\"?\"+r+\".width:\"+n+\".drawingBufferWidth\"),e.set(n,\".framebufferHeight\",r+\"?\"+r+\".height:\"+n+\".drawingBufferHeight\"),r})}return null}(t),h=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return\"width\"in r?n=0|r.width:t=!1,\"height\"in r?o=0|r.height:t=!1,new D(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,a=n;\"width\"in r||(a=e.def(i,\".\",\"framebufferWidth\",\"-\",s));var c=o;return\"height\"in r||(c=e.def(i,\".\",\"framebufferHeight\",\"-\",l)),[s,l,a,c]})}if(t in a){var c=a[t];return t=O(c,function(t,e){var r=t.invoke(e,c),n=t.shared.context,i=e.def(r,\".x|0\"),a=e.def(r,\".y|0\");return[i,a,e.def('\"width\" in ',r,\"?\",r,\".width|0:\",\"(\",n,\".\",\"framebufferWidth\",\"-\",i,\")\"),r=e.def('\"height\" in ',r,\"?\",r,\".height|0:\",\"(\",n,\".\",\"framebufferHeight\",\"-\",a,\")\")]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new D(e.thisDep,e.contextDep,e.propDep,function(t,e){var r=t.shared.context;return[0,0,e.def(r,\".\",\"framebufferWidth\"),e.def(r,\".\",\"framebufferHeight\")]}):null}var i=t.static,a=t.dynamic;if(t=n(\"viewport\")){var o=t;t=new D(t.thisDep,t.contextDep,t.propDep,function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,\".viewportWidth\",r[2]),e.set(n,\".viewportHeight\",r[3]),r})}return{viewport:t,scissor_box:n(\"scissor.box\")}}(t,u),d=function(t,e){function r(t,e){if(t in n){var r=0|n[t];return P(function(t,n){return e&&(t.OFFSET=r),r})}if(t in i){var a=i[t];return O(a,function(t,r){var n=t.invoke(r,a);return e&&(t.OFFSET=n),n})}return e&&o?P(function(t,e){return t.OFFSET=\"0\",0}):null}var n=t.static,i=t.dynamic,o=function(){if(\"elements\"in n){var t=n.elements;C(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t));var e=P(function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null});return e.value=t,e}if(\"elements\"in i){var r=i.elements;return O(r,function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def(\"null\");return n=e.def(n,\"(\",a,\")\"),a=t.cond(n).then(o,\"=\",i,\".createStream(\",a,\");\").else(o,\"=\",i,\".getElements(\",a,\");\"),e.entry(a),e.exit(t.cond(n).then(i,\".destroyStream(\",o,\");\")),t.ELEMENTS=o})}return null}(),s=r(\"offset\",!0);return{elements:o,primitive:function(){if(\"primitive\"in n){var t=n.primitive;return P(function(e,r){return tt[t]})}if(\"primitive\"in i){var e=i.primitive;return O(e,function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,\"[\",i,\"]\")})}return o?I(o)?P(o.value?function(t,e){return e.def(t.ELEMENTS,\".primType\")}:function(){return 4}):new D(o.thisDep,o.contextDep,o.propDep,function(t,e){var r=t.ELEMENTS;return e.def(r,\"?\",r,\".primType:\",4)}):null}(),count:function(){if(\"count\"in n){var t=0|n.count;return P(function(){return t})}if(\"count\"in i){var e=i.count;return O(e,function(t,r){return t.invoke(r,e)})}return o?I(o)?o?s?new D(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,\".vertCount-\",t.OFFSET)}):P(function(t,e){return e.def(t.ELEMENTS,\".vertCount\")}):P(function(){return-1}):new D(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\")}):null}(),instances:r(\"instances\",!1),offset:s}}(t),p=function(t,e){var r=t.static,n=t.dynamic,i={};return $.forEach(function(t){function e(e,o){if(t in r){var s=e(r[t]);i[a]=P(function(){return s})}else if(t in n){var l=n[t];i[a]=O(l,function(t,e){return o(t,e,t.invoke(e,l))})}}var a=g(t);switch(t){case\"cull.enable\":case\"blend.enable\":case\"dither\":case\"stencil.enable\":case\"depth.enable\":case\"scissor.enable\":case\"polygonOffset.enable\":case\"sample.alpha\":case\"sample.enable\":case\"depth.mask\":return e(function(t){return t},function(t,e,r){return r});case\"depth.func\":return e(function(t){return mt[t]},function(t,e,r){return e.def(t.constants.compareFuncs,\"[\",r,\"]\")});case\"depth.range\":return e(function(t){return t},function(t,e,r){return t=e.def(\"+\",r,\"[0]\"),e=e.def(\"+\",r,\"[1]\"),[t,e]});case\"blend.func\":return e(function(t){return[pt[\"srcRGB\"in t?t.srcRGB:t.src],pt[\"dstRGB\"in t?t.dstRGB:t.dst],pt[\"srcAlpha\"in t?t.srcAlpha:t.src],pt[\"dstAlpha\"in t?t.dstAlpha:t.dst]]},function(t,e,r){function n(t,n){return e.def('\"',t,n,'\" in ',r,\"?\",r,\".\",t,n,\":\",r,\".\",t)}t=t.constants.blendFuncs;var i=n(\"src\",\"RGB\"),a=n(\"dst\",\"RGB\"),o=(i=e.def(t,\"[\",i,\"]\"),e.def(t,\"[\",n(\"src\",\"Alpha\"),\"]\"));return a=e.def(t,\"[\",a,\"]\"),t=e.def(t,\"[\",n(\"dst\",\"Alpha\"),\"]\"),[i,a,o,t]});case\"blend.equation\":return e(function(t){return\"string\"==typeof t?[W[t],W[t]]:\"object\"==typeof t?[W[t.rgb],W[t.alpha]]:void 0},function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond(\"typeof \",r,'===\"string\"')).then(i,\"=\",a,\"=\",n,\"[\",r,\"];\"),t.else(i,\"=\",n,\"[\",r,\".rgb];\",a,\"=\",n,\"[\",r,\".alpha];\"),e(t),[i,a]});case\"blend.color\":return e(function(t){return s(4,function(e){return+t[e]})},function(t,e,r){return s(4,function(t){return e.def(\"+\",r,\"[\",t,\"]\")})});case\"stencil.mask\":return e(function(t){return 0|t},function(t,e,r){return e.def(r,\"|0\")});case\"stencil.func\":return e(function(t){return[mt[t.cmp||\"keep\"],t.ref||0,\"mask\"in t?t.mask:-1]},function(t,e,r){t=e.def('\"cmp\" in ',r,\"?\",t.constants.compareFuncs,\"[\",r,\".cmp]\",\":\",7680);var n=e.def(r,\".ref|0\");return e=e.def('\"mask\" in ',r,\"?\",r,\".mask|0:-1\"),[t,n,e]});case\"stencil.opFront\":case\"stencil.opBack\":return e(function(e){return[\"stencil.opBack\"===t?1029:1028,gt[e.fail||\"keep\"],gt[e.zfail||\"keep\"],gt[e.zpass||\"keep\"]]},function(e,r,n){function i(t){return r.def('\"',t,'\" in ',n,\"?\",a,\"[\",n,\".\",t,\"]:\",7680)}var a=e.constants.stencilOps;return[\"stencil.opBack\"===t?1029:1028,i(\"fail\"),i(\"zfail\"),i(\"zpass\")]});case\"polygonOffset.offset\":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,r){return t=e.def(r,\".factor|0\"),e=e.def(r,\".units|0\"),[t,e]});case\"cull.face\":return e(function(t){var e=0;return\"front\"===t?e=1028:\"back\"===t&&(e=1029),e},function(t,e,r){return e.def(r,'===\"front\"?',1028,\":\",1029)});case\"lineWidth\":return e(function(t){return t},function(t,e,r){return r});case\"frontFace\":return e(function(t){return vt[t]},function(t,e,r){return e.def(r+'===\"cw\"?2304:2305')});case\"colorMask\":return e(function(t){return t.map(function(t){return!!t})},function(t,e,r){return s(4,function(t){return\"!!\"+r+\"[\"+t+\"]\"})});case\"sample.coverage\":return e(function(t){return[\"value\"in t?t.value:1,!!t.invert]},function(t,e,r){return t=e.def('\"value\" in ',r,\"?+\",r,\".value:1\"),e=e.def(\"!!\",r,\".invert\"),[t,e]})}}),i}(t),m=function(t){function r(t){if(t in n){var r=e.id(n[t]);return t=P(function(){return r}),t.id=r,t}if(t in i){var a=i[t];return O(a,function(t,e){var r=t.invoke(e,a);return e.def(t.shared.strings,\".id(\",r,\")\")})}return null}var n=t.static,i=t.dynamic,a=r(\"frag\"),o=r(\"vert\"),s=null;return I(a)&&I(o)?(s=f.program(o.id,a.id),t=P(function(t,e){return t.link(s)})):t=new D(a&&a.thisDep||o&&o.thisDep,a&&a.contextDep||o&&o.contextDep,a&&a.propDep||o&&o.propDep,function(t,e){var r,n=t.shared.shader;r=a?a.append(t,e):e.def(n,\".\",\"frag\");var i;return i=o?o.append(t,e):e.def(n,\".\",\"vert\"),e.def(n+\".program(\"+i+\",\"+r+\")\")}),{frag:a,vert:o,progVar:t,program:s}}(t),y=h.viewport;return y&&(p.viewport=y),y=g(\"scissor.box\"),(h=h[y])&&(p[y]=h),h=0<Object.keys(p).length,u={framebuffer:u,draw:d,shader:m,state:p,dirty:h},u.profile=function(t){var e=t.static;t=t.dynamic;var r;if(\"profile\"in e){var n=!!e.profile;(r=P(function(t,e){return n})).enable=n}else if(\"profile\"in t){var i=t.profile;r=O(i,function(t,e){return t.invoke(e,i)})}return r}(t),u.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach(function(t){var e,n=r[t];if(\"number\"==typeof n||\"boolean\"==typeof n)e=P(function(){return n});else if(\"function\"==typeof n){var a=n._reglType;\"texture2d\"===a||\"textureCube\"===a?e=P(function(t){return t.link(n)}):\"framebuffer\"!==a&&\"framebufferCube\"!==a||(e=P(function(t){return t.link(n.color[0])}))}else v(n)&&(e=P(function(t){return t.global.def(\"[\",s(n.length,function(t){return n[t]}),\"]\")}));e.value=n,i[t]=e}),Object.keys(n).forEach(function(t){var e=n[t];i[t]=O(e,function(t,r){return t.invoke(r,e)})}),i}(n),u.attributes=function(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach(function(t){var r=n[t],a=e.id(t),s=new Y;if(C(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(c=i.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if(r.constant){var l=r.constant;s.buffer=\"null\",s.state=2,\"number\"==typeof l?s.x=l:ht.forEach(function(t,e){e<l.length&&(s[t]=l[e])})}else{var c=C(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),u=0|r.offset,f=0|r.stride,h=0|r.size,d=!!r.normalized,p=0;\"type\"in r&&(p=Z[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=h,s.normalized=d,s.type=p||c.dtype,s.offset=u,s.stride=f,s.divisor=r}o[t]=P(function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach(function(t){n[t]=s[t]}),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+\".dtype\"),r[a]=n})}),Object.keys(a).forEach(function(t){var e=a[t];o[t]=O(e,function(t,r){function n(t){r(l[t],\"=\",i,\".\",t,\"|0;\")}var i=t.invoke(r,e),a=t.shared,o=a.isBufferArgs,s=a.buffer,l={isStream:r.def(!1)},c=new Y;c.state=1,Object.keys(c).forEach(function(t){l[t]=r.def(\"\"+c[t])});var u=l.buffer,f=l.type;return r(\"if(\",o,\"(\",i,\")){\",l.isStream,\"=true;\",u,\"=\",s,\".createStream(\",34962,\",\",i,\");\",f,\"=\",u,\".dtype;\",\"}else{\",u,\"=\",s,\".getBuffer(\",i,\");\",\"if(\",u,\"){\",f,\"=\",u,\".dtype;\",'}else if(\"constant\" in ',i,\"){\",l.state,\"=\",2,\";\",\"if(typeof \"+i+'.constant === \"number\"){',l[ht[0]],\"=\",i,\".constant;\",ht.slice(1).map(function(t){return l[t]}).join(\"=\"),\"=0;\",\"}else{\",ht.map(function(t,e){return l[t]+\"=\"+i+\".constant.length>=\"+e+\"?\"+i+\".constant[\"+e+\"]:0;\"}).join(\"\"),\"}}else{\",\"if(\",o,\"(\",i,\".buffer)){\",u,\"=\",s,\".createStream(\",34962,\",\",i,\".buffer);\",\"}else{\",u,\"=\",s,\".getBuffer(\",i,\".buffer);\",\"}\",f,'=\"type\" in ',i,\"?\",a.glTypes,\"[\",i,\".type]:\",u,\".dtype;\",l.normalized,\"=!!\",i,\".normalized;\"),n(\"size\"),n(\"offset\"),n(\"stride\"),n(\"divisor\"),r(\"}}\"),r.exit(\"if(\",l.isStream,\"){\",s,\".destroyStream(\",u,\");\",\"}\"),l})}),o}(r),u.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach(function(t){var r=e[t];n[t]=P(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]=O(e,function(t,r){return t.invoke(r,e)})}),n}(o),u}function w(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,\".\"+a),i(n,\".\",a,\"=\",r[a].append(t,e),\";\")}),e(i)}function M(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;J&&(i=e.def(s.extensions,\".webgl_draw_buffers\"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,\".next\"),n||e(\"if(\",t,\"!==\",o,\".cur){\"),e(\"if(\",t,\"){\",a,\".bindFramebuffer(\",36160,\",\",t,\".framebuffer);\"),J&&e(i,\".drawBuffersWEBGL(\",s,\"[\",t,\".colorAttachments.length]);\"),e(\"}else{\",a,\".bindFramebuffer(\",36160,\",null);\"),J&&e(i,\".drawBuffersWEBGL(\",l,\");\"),e(\"}\",o,\".cur=\",t,\";\"),n||e(\"}\")}function k(t,e,r){var n=t.shared,i=n.gl,a=t.current,o=t.next,l=n.current,c=n.next,u=t.cond(l,\".dirty\");$.forEach(function(e){if(!((e=g(e))in r.state)){var n,f;if(e in o){n=o[e],f=a[e];var h=s(K[e].length,function(t){return u.def(n,\"[\",t,\"]\")});u(t.cond(h.map(function(t,e){return t+\"!==\"+f+\"[\"+e+\"]\"}).join(\"||\")).then(i,\".\",rt[e],\"(\",h,\");\",h.map(function(t,e){return f+\"[\"+e+\"]=\"+t}).join(\";\"),\";\"))}else n=u.def(c,\".\",e),h=t.cond(n,\"!==\",l,\".\",e),u(h),e in et?h(t.cond(n).then(i,\".enable(\",et[e],\");\").else(i,\".disable(\",et[e],\");\"),l,\".\",e,\"=\",n,\";\"):h(i,\".\",rt[e],\"(\",n,\");\",l,\".\",e,\"=\",n,\";\")}}),0===Object.keys(r.state).length&&u(l,\".dirty=false;\"),e(u)}function A(t,e,r,n){var i=t.shared,a=t.current,o=i.current,s=i.gl;z(Object.keys(r)).forEach(function(i){var l=r[i];if(!n||n(l)){var c=l.append(t,e);if(et[i]){var u=et[i];I(l)?c?e(s,\".enable(\",u,\");\"):e(s,\".disable(\",u,\");\"):e(t.cond(c).then(s,\".enable(\",u,\");\").else(s,\".disable(\",u,\");\")),e(o,\".\",i,\"=\",c,\";\")}else if(v(c)){var f=a[i];e(s,\".\",rt[i],\"(\",c,\");\",c.map(function(t,e){return f+\"[\"+e+\"]=\"+t}).join(\";\"),\";\")}else e(s,\".\",rt[i],\"(\",c,\");\",o,\".\",i,\"=\",c,\";\")}})}function T(t,e){X&&(t.instancing=e.def(t.shared.extensions,\".angle_instanced_arrays\"))}function S(t,e,r,n,i){function a(){return\"undefined\"==typeof performance?\"Date.now()\":\"performance.now()\"}function o(t){t(c=e.def(),\"=\",a(),\";\"),\"string\"==typeof i?t(h,\".count+=\",i,\";\"):t(h,\".count++;\"),p&&(n?(u=e.def(),t(u,\"=\",m,\".getNumPendingQueries();\")):t(m,\".beginQuery(\",h,\");\"))}function s(t){t(h,\".cpuTime+=\",a(),\"-\",c,\";\"),p&&(n?t(m,\".pushScopeStats(\",u,\",\",m,\".getNumPendingQueries(),\",h,\");\"):t(m,\".endQuery();\"))}function l(t){var r=e.def(d,\".profile\");e(d,\".profile=\",t,\";\"),e.exit(d,\".profile=\",r,\";\")}var c,u,f=t.shared,h=t.stats,d=f.current,m=f.timer;if(r=r.profile){if(I(r))return void(r.enable?(o(e),s(e.exit),l(\"true\")):l(\"false\"));l(r=r.append(t,e))}else r=e.def(d,\".profile\");o(f=t.block()),e(\"if(\",r,\"){\",f,\"}\"),s(t=t.block()),e.exit(\"if(\",r,\"){\",t,\"}\")}function F(t,e,r,n,i){var a=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(yt))return;var c=t.scopeAttrib(s);o={},Object.keys(new Y).forEach(function(t){o[t]=e.def(c,\".\",t)})}!function(r,n,i){function o(){e(\"if(!\",u,\".buffer){\",l,\".enableVertexAttribArray(\",c,\");}\");var r,a=i.type;r=i.size?e.def(i.size,\"||\",n):n,e(\"if(\",u,\".type!==\",a,\"||\",u,\".size!==\",r,\"||\",d.map(function(t){return u+\".\"+t+\"!==\"+i[t]}).join(\"||\"),\"){\",l,\".bindBuffer(\",34962,\",\",f,\".buffer);\",l,\".vertexAttribPointer(\",[c,r,a,i.normalized,i.stride,i.offset],\");\",u,\".type=\",a,\";\",u,\".size=\",r,\";\",d.map(function(t){return u+\".\"+t+\"=\"+i[t]+\";\"}).join(\"\"),\"}\"),X&&(a=i.divisor,e(\"if(\",u,\".divisor!==\",a,\"){\",t.instancing,\".vertexAttribDivisorANGLE(\",[c,a],\");\",u,\".divisor=\",a,\";}\"))}function s(){e(\"if(\",u,\".buffer){\",l,\".disableVertexAttribArray(\",c,\");\",\"}if(\",ht.map(function(t,e){return u+\".\"+t+\"!==\"+h[e]}).join(\"||\"),\"){\",l,\".vertexAttrib4f(\",c,\",\",h,\");\",ht.map(function(t,e){return u+\".\"+t+\"=\"+h[e]+\";\"}).join(\"\"),\"}\")}var l=a.gl,c=e.def(r,\".location\"),u=e.def(a.attributes,\"[\",c,\"]\");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],d=[\"buffer\",\"normalized\",\"offset\",\"stride\"];1===r?o():2===r?s():(e(\"if(\",r,\"===\",1,\"){\"),o(),e(\"}else{\"),s(),e(\"}\"))}(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function R(t,r,n,i,a){for(var o,l=t.shared,c=l.gl,u=0;u<i.length;++u){var f,h=(m=i[u]).name,d=m.info.type,p=n.uniforms[h],m=t.link(m)+\".location\";if(p){if(!a(p))continue;if(I(p)){if(h=p.value,35678===d||35680===d)d=t.link(h._texture||h.color[0]._texture),r(c,\".uniform1i(\",m,\",\",d+\".bind());\"),r.exit(d,\".unbind();\");else if(35674===d||35675===d||35676===d)h=t.global.def(\"new Float32Array([\"+Array.prototype.slice.call(h)+\"])\"),p=2,35675===d?p=3:35676===d&&(p=4),r(c,\".uniformMatrix\",p,\"fv(\",m,\",false,\",h,\");\");else{switch(d){case 5126:o=\"1f\";break;case 35664:o=\"2f\";break;case 35665:o=\"3f\";break;case 35666:o=\"4f\";break;case 35670:case 5124:o=\"1i\";break;case 35671:case 35667:o=\"2i\";break;case 35672:case 35668:o=\"3i\";break;case 35673:o=\"4i\";break;case 35669:o=\"4i\"}r(c,\".uniform\",o,\"(\",m,\",\",v(h)?Array.prototype.slice.call(h):h,\");\")}continue}f=p.append(t,r)}else{if(!a(yt))continue;f=r.def(l.uniforms,\"[\",e.id(h),\"]\")}switch(35678===d?r(\"if(\",f,\"&&\",f,'._reglType===\"framebuffer\"){',f,\"=\",f,\".color[0];\",\"}\"):35680===d&&r(\"if(\",f,\"&&\",f,'._reglType===\"framebufferCube\"){',f,\"=\",f,\".color[0];\",\"}\"),h=1,d){case 35678:case 35680:r(c,\".uniform1i(\",m,\",\",d=r.def(f,\"._texture\"),\".bind());\"),r.exit(d,\".unbind();\");continue;case 5124:case 35670:o=\"1i\";break;case 35667:case 35671:o=\"2i\",h=2;break;case 35668:case 35672:o=\"3i\",h=3;break;case 35669:case 35673:o=\"4i\",h=4;break;case 5126:o=\"1f\";break;case 35664:o=\"2f\",h=2;break;case 35665:o=\"3f\",h=3;break;case 35666:o=\"4f\",h=4;break;case 35674:o=\"Matrix2fv\";break;case 35675:o=\"Matrix3fv\";break;case 35676:o=\"Matrix4fv\"}if(r(c,\".uniform\",o,\"(\",m,\",\"),\"M\"===o.charAt(0)){m=Math.pow(d-35674+2,2);var g=t.global.def(\"new Float32Array(\",m,\")\");r(\"false,(Array.isArray(\",f,\")||\",f,\" instanceof Float32Array)?\",f,\":(\",s(m,function(t){return g+\"[\"+t+\"]=\"+f+\"[\"+t+\"]\"}),\",\",g,\")\")}else r(1<h?s(h,function(t){return f+\"[\"+t+\"]\"}):f);r(\");\")}}function j(t,e,r,n){function i(i){var a=u[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(c,\".\",i)}function a(){function t(){r(g,\".drawElementsInstancedANGLE(\",[h,p,v,d+\"<<((\"+v+\"-5121)>>1)\",m],\");\")}function e(){r(g,\".drawArraysInstancedANGLE(\",[h,d,p,m],\");\")}f?y?t():(r(\"if(\",f,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}function o(){function t(){r(l+\".drawElements(\"+[h,p,v,d+\"<<((\"+v+\"-5121)>>1)\"]+\");\")}function e(){r(l+\".drawArrays(\"+[h,d,p]+\");\")}f?y?t():(r(\"if(\",f,\"){\"),t(),r(\"}else{\"),e(),r(\"}\")):e()}var s=t.shared,l=s.gl,c=s.draw,u=n.draw,f=function(){var i=u.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(c,\".\",\"elements\"),i&&a(\"if(\"+i+\")\"+l+\".bindBuffer(34963,\"+i+\".buffer.buffer);\"),i}(),h=i(\"primitive\"),d=i(\"offset\"),p=function(){var i=u.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(c,\".\",\"count\"),i}();if(\"number\"==typeof p){if(0===p)return}else r(\"if(\",p,\"){\"),r.exit(\"}\");var m,g;X&&(m=i(\"instances\"),g=t.instancing);var v=f+\".type\",y=u.elements&&I(u.elements);X&&(\"number\"!=typeof m||0<=m)?\"string\"==typeof m?(r(\"if(\",m,\">0){\"),a(),r(\"}else if(\",m,\"<0){\"),o(),r(\"}\")):a():o()}function U(t,e,r,n,i){return e=b(),i=e.proc(\"body\",i),X&&(e.instancing=i.def(e.shared.extensions,\".angle_instanced_arrays\")),t(e,i,r,n),e.compile().body}function V(t,e,r,n){T(t,e),F(t,e,r,n.attributes,function(){return!0}),R(t,e,r,n.uniforms,function(){return!0}),j(t,e,e,r)}function q(t,e,r,n){function i(){return!0}t.batchId=\"a1\",T(t,e),F(t,e,r,n.attributes,i),R(t,e,r,n.uniforms,i),j(t,e,e,r)}function H(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}T(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,\"for(\",s,\"=0;\",s,\"<\",\"a1\",\";++\",s,\"){\",l,\"=\",\"a0\",\"[\",s,\"];\",u,\"}\",c.exit),r.needsContext&&w(t,u,r.context),r.needsFramebuffer&&M(t,u,r.framebuffer),A(t,u,r.state,i),r.profile&&i(r.profile)&&S(t,u,r,!1,!0),n?(F(t,c,r,n.attributes,a),F(t,u,r,n.attributes,i),R(t,c,r,n.uniforms,a),R(t,u,r,n.uniforms,i),j(t,c,u,r)):(e=t.global.def(\"{}\"),n=r.shader.progVar.append(t,u),l=u.def(n,\".id\"),c=u.def(e,\"[\",l,\"]\"),u(t.shared.gl,\".useProgram(\",n,\".program);\",\"if(!\",c,\"){\",c,\"=\",e,\"[\",l,\"]=\",t.link(function(e){return U(q,t,r,e,2)}),\"(\",n,\");}\",c,\".call(this,a0[\",s,\"],\",s,\");\"))}function G(t,e,r){function n(t,e){o.forEach(function(r){var n=i[r];B.isDynamic(n)&&(n=t.invoke(e,n),e(u,\".\",r,\"=\",n,\";\"))})}var i=e.static[r];if(i&&function(t){if(\"object\"==typeof t&&!v(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(B.isDynamic(t[e[r]]))return!0;return!1}}(i)){var a=t.global,o=Object.keys(i),s=!1,l=!1,c=!1,u=t.global.def(\"{}\");o.forEach(function(e){var r=i[e];if(B.isDynamic(r))\"function\"==typeof r&&(r=i[e]=B.unbox(r)),e=O(r,null),s=s||e.thisDep,c=c||e.propDep,l=l||e.contextDep;else{switch(a(u,\".\",e,\"=\"),typeof r){case\"number\":a(r);break;case\"string\":a('\"',r,'\"');break;case\"object\":Array.isArray(r)&&a(\"[\",r.join(),\"]\");break;default:a(t.link(r))}a(\";\")}}),e.dynamic[r]=new B.DynamicVariable(4,{thisDep:s,contextDep:l,propDep:c,ref:u,append:n}),delete e.static[r]}}var Y=u.Record,W={add:32774,subtract:32778,\"reverse subtract\":32779};r.ext_blend_minmax&&(W.min=32775,W.max=32776);var X=r.angle_instanced_arrays,J=r.webgl_draw_buffers,K={dirty:!0,profile:m.profile},Q={},$=[],et={},rt={};y(\"dither\",3024),y(\"blend.enable\",3042),x(\"blend.color\",\"blendColor\",[0,0,0,0]),x(\"blend.equation\",\"blendEquationSeparate\",[32774,32774]),x(\"blend.func\",\"blendFuncSeparate\",[1,0,1,0]),y(\"depth.enable\",2929,!0),x(\"depth.func\",\"depthFunc\",513),x(\"depth.range\",\"depthRange\",[0,1]),x(\"depth.mask\",\"depthMask\",!0),x(\"colorMask\",\"colorMask\",[!0,!0,!0,!0]),y(\"cull.enable\",2884),x(\"cull.face\",\"cullFace\",1029),x(\"frontFace\",\"frontFace\",2305),x(\"lineWidth\",\"lineWidth\",1),y(\"polygonOffset.enable\",32823),x(\"polygonOffset.offset\",\"polygonOffset\",[0,0]),y(\"sample.alpha\",32926),y(\"sample.enable\",32928),x(\"sample.coverage\",\"sampleCoverage\",[1,!1]),y(\"stencil.enable\",2960),x(\"stencil.mask\",\"stencilMask\",-1),x(\"stencil.func\",\"stencilFunc\",[519,0,-1]),x(\"stencil.opFront\",\"stencilOpSeparate\",[1028,7680,7680,7680]),x(\"stencil.opBack\",\"stencilOpSeparate\",[1029,7680,7680,7680]),y(\"scissor.enable\",3089),x(\"scissor.box\",\"scissor\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),x(\"viewport\",\"viewport\",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var nt={gl:t,context:d,strings:e,next:Q,current:K,draw:h,elements:a,buffer:i,shader:f,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:p,isBufferArgs:C},it={primTypes:tt,compareFuncs:mt,blendFuncs:pt,blendEquations:W,stencilOps:gt,glTypes:Z,orientationType:vt};J&&(it.backBuffer=[1029],it.drawBuffer=s(n.maxDrawbuffers,function(t){return 0===t?[0]:s(t,function(t){return 36064+t})}));var at=0;return{next:Q,current:K,procs:function(){var e=b(),r=e.proc(\"poll\"),i=e.proc(\"refresh\"),a=e.block();r(a),i(a);var o=e.shared,l=o.gl,c=o.next,u=o.current;a(u,\".dirty=false;\"),M(e,r),M(e,i,null,!0);var f,h=t.getExtension(\"angle_instanced_arrays\");h&&(f=e.link(h));for(var d=0;d<n.maxAttributes;++d){var p=i.def(o.attributes,\"[\",d,\"]\"),m=e.cond(p,\".buffer\");m.then(l,\".enableVertexAttribArray(\",d,\");\",l,\".bindBuffer(\",34962,\",\",p,\".buffer.buffer);\",l,\".vertexAttribPointer(\",d,\",\",p,\".size,\",p,\".type,\",p,\".normalized,\",p,\".stride,\",p,\".offset);\").else(l,\".disableVertexAttribArray(\",d,\");\",l,\".vertexAttrib4f(\",d,\",\",p,\".x,\",p,\".y,\",p,\".z,\",p,\".w);\",p,\".buffer=null;\"),i(m),h&&i(f,\".vertexAttribDivisorANGLE(\",d,\",\",p,\".divisor);\")}return Object.keys(et).forEach(function(t){var n=et[t],o=a.def(c,\".\",t),s=e.block();s(\"if(\",o,\"){\",l,\".enable(\",n,\")}else{\",l,\".disable(\",n,\")}\",u,\".\",t,\"=\",o,\";\"),i(s),r(\"if(\",o,\"!==\",u,\".\",t,\"){\",s,\"}\")}),Object.keys(rt).forEach(function(t){var n,o,f=rt[t],h=K[t],d=e.block();d(l,\".\",f,\"(\"),v(h)?(f=h.length,n=e.global.def(c,\".\",t),o=e.global.def(u,\".\",t),d(s(f,function(t){return n+\"[\"+t+\"]\"}),\");\",s(f,function(t){return o+\"[\"+t+\"]=\"+n+\"[\"+t+\"];\"}).join(\"\")),r(\"if(\",s(f,function(t){return n+\"[\"+t+\"]!==\"+o+\"[\"+t+\"]\"}).join(\"||\"),\"){\",d,\"}\")):(n=a.def(c,\".\",t),o=a.def(u,\".\",t),d(n,\");\",u,\".\",t,\"=\",n,\";\"),r(\"if(\",n,\"!==\",o,\"){\",d,\"}\")),i(d)}),e.compile()}(),compile:function(t,r,n,i,a){var o=b();return o.stats=o.link(a),Object.keys(r.static).forEach(function(t){G(o,r,t)}),dt.forEach(function(e){G(o,t,e)}),n=_(t,r,n,i),function(t,e){var r=t.proc(\"draw\",1);T(t,r),w(t,r,e.context),M(t,r,e.framebuffer),k(t,r,e),A(t,r,e.state),S(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,\".useProgram(\",n,\".program);\"),e.shader.program)V(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 U(V,t,e,r,1)}),\"(\",n,\");\",o,\".call(this,a0);\"))}0<Object.keys(e.state).length&&r(t.shared.current,\".dirty=true;\")}(o,n),function(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;w(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),z(Object.keys(r.state)).forEach(function(e){var n=r.state[e].append(t,i);v(n)?n.forEach(function(r,n){i.set(t.next[e],\"[\"+n+\"]\",r)}):i.set(a.next,\".\"+e,n)}),S(t,i,r,!0,!0),[\"elements\",\"offset\",\"count\",\"instances\",\"primitive\"].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 Y).forEach(function(t){i.set(a,\".\"+t,n[t])})}),n(\"vert\"),n(\"frag\"),0<Object.keys(r.state).length&&(i(o,\".dirty=true;\"),i.exit(o,\".dirty=true;\")),i(\"a1(\",t.shared.context,\",a0,\",t.batchId,\");\")}(o,n),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc(\"batch\",2);t.batchId=\"0\",T(t,n);var i=!1,a=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(w(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||M(t,n,s)):M(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),k(t,n,e),A(t,n,e.state,function(t){return!r(t)}),e.profile&&r(e.profile)||S(t,n,e,!1,\"a1\"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)H(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,\".useProgram(\",a,\".program);\"),e.shader.program)H(t,n,e,e.shader.program);else{var s=t.global.def(\"{}\"),l=(o=n.def(a,\".id\"),n.def(s,\"[\",o,\"]\"));n(t.cond(l).then(l,\".call(this,a0,a1);\").else(l,\"=\",s,\"[\",o,\"]=\",t.link(function(r){return U(H,t,e,r,2)}),\"(\",a,\");\",l,\".call(this,a0,a1);\"))}0<Object.keys(e.state).length&&n(t.shared.current,\".dirty=true;\")}(o,n),o.compile()}}}function R(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var N=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},j=0,B={DynamicVariable:t,define:function(e,n){return new t(e,r(n+\"\"))},isDynamic:function(e){return\"function\"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,r){return\"function\"==typeof e?new t(0,e):e},accessor:r},U={next:\"function\"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:\"function\"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},V=\"undefined\"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},q=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},H=function(t){return Object.keys(t).map(function(e){return t[e]})},G=s(8,function(){return[]}),Y={alloc:c,free:u,allocType:function(t,e){var r=null;switch(t){case 5120:r=new Int8Array(c(e),0,e);break;case 5121:r=new Uint8Array(c(e),0,e);break;case 5122:r=new Int16Array(c(2*e),0,e);break;case 5123:r=new Uint16Array(c(2*e),0,e);break;case 5124:r=new Int32Array(c(4*e),0,e);break;case 5125:r=new Uint32Array(c(4*e),0,e);break;case 5126:r=new Float32Array(c(4*e),0,e);break;default:return null}return r.length!==e?r.subarray(0,e):r},freeType:function(t){u(t.buffer)}},W={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||Y.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:f(t,e[0],e[1],e[2],r,0);break;default:h(t,e,0,r,0)}return r}},X={\"[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},Z={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},J={dynamic:35048,stream:35040,static:35044},K=W.flatten,Q=W.shape,$=[];$[5120]=1,$[5122]=2,$[5124]=4,$[5121]=1,$[5123]=2,$[5125]=4,$[5126]=4;var tt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,\"line loop\":2,\"line strip\":3,\"triangle strip\":5,\"triangle fan\":6},et=new Float32Array(1),rt=new Uint32Array(et.buffer),nt=[9984,9986,9985,9987],it=[0,6409,6410,6407,6408],at={};at[6409]=at[6406]=at[6402]=1,at[34041]=at[6410]=2,at[6407]=at[35904]=3,at[6408]=at[35906]=4;var ot=Object.keys(X).concat([\"[object HTMLCanvasElement]\",\"[object CanvasRenderingContext2D]\",\"[object HTMLImageElement]\",\"[object HTMLVideoElement]\"]),st=[];st[5121]=1,st[5126]=4,st[36193]=2,st[5123]=2,st[5125]=4;var lt=[];lt[32854]=2,lt[32855]=2,lt[36194]=2,lt[34041]=4,lt[33776]=.5,lt[33777]=.5,lt[33778]=1,lt[33779]=1,lt[35986]=.5,lt[35987]=1,lt[34798]=1,lt[35840]=.5,lt[35841]=.25,lt[35842]=.5,lt[35843]=.25,lt[36196]=.5;var ct=[];ct[32854]=2,ct[32855]=2,ct[36194]=2,ct[33189]=2,ct[36168]=1,ct[34041]=4,ct[35907]=4,ct[34836]=16,ct[34842]=8,ct[34843]=6;var ut=[];ut[6408]=4;var ft=[];ft[5121]=1,ft[5126]=4,ft[36193]=2;var ht=[\"x\",\"y\",\"z\",\"w\"],dt=\"blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset\".split(\" \"),pt={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},mt={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},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,\"increment wrap\":34055,\"decrement wrap\":34056,invert:5386},vt={cw:2304,ccw:2305},yt=new D(!1,!1,!1,function(){});return function(t){function e(){if(0===it.length)E&&E.update(),lt=null;else{lt=U.next(e),h();for(var t=it.length-1;0<=t;--t){var r=it[t];r&&r(D,null,0)}y.flush(),E&&E.update()}}function r(){!lt&&0<it.length&&(lt=U.next(e))}function n(){lt&&(U.cancel(e),lt=null)}function i(t){t.preventDefault(),n(),at.forEach(function(t){t()})}function s(t){y.getError(),b.restore(),j.restore(),P.restore(),G.restore(),W.restore(),X.restore(),E&&E.restore(),et.procs.refresh(),r(),ot.forEach(function(t){t()})}function l(t){function e(t){var e={},r={};return Object.keys(t).forEach(function(n){var i=t[n];B.isDynamic(i)?r[n]=B.unbox(i,n):e[n]=i}),{dynamic:r,static:e}}var r=e(t.context||{}),n=e(t.uniforms||{}),i=e(t.attributes||{}),a=e(function(e){function r(t){if(t in n){var e=n[t];delete n[t],Object.keys(e).forEach(function(r){n[t+\".\"+r]=e[r]})}}var n=N({},t);return delete n.uniforms,delete n.attributes,delete n.context,\"stencil\"in n&&n.stencil.op&&(n.stencil.opBack=n.stencil.opFront=n.stencil.op,delete n.stencil.op),r(\"blend\"),r(\"depth\"),r(\"cull\"),r(\"stencil\"),r(\"polygonOffset\"),r(\"scissor\"),r(\"sample\"),n}());t={gpuTime:0,cpuTime:0,count:0};var o=(r=et.compile(a,i,n,r,t)).draw,s=r.batch,l=r.scope,c=[];return N(function(t,e){var r;if(\"function\"==typeof t)return l.call(this,null,t,0);if(\"function\"==typeof e)if(\"number\"==typeof t)for(r=0;r<t;++r)l.call(this,null,e,r);else{if(!Array.isArray(t))return l.call(this,t,e,0);for(r=0;r<t.length;++r)l.call(this,t[r],e,r)}else if(\"number\"==typeof t){if(0<t)return s.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return o.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function c(t,e){var r=0;et.procs.poll();var n=e.color;n&&(y.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),\"depth\"in e&&(y.clearDepth(+e.depth),r|=256),\"stencil\"in e&&(y.clearStencil(0|e.stencil),r|=1024),y.clear(r)}function u(t){return it.push(t),r(),{cancel:function(){function e(){var t=R(it,e);it[t]=it[it.length-1],--it.length,0>=it.length&&n()}var r=R(it,t);it[r]=e}}}function f(){var t=rt.viewport,e=rt.scissor_box;t[0]=t[1]=e[0]=e[1]=0,D.viewportWidth=D.framebufferWidth=D.drawingBufferWidth=t[2]=e[2]=y.drawingBufferWidth,D.viewportHeight=D.framebufferHeight=D.drawingBufferHeight=t[3]=e[3]=y.drawingBufferHeight}function h(){D.tick+=1,D.time=v(),f(),et.procs.poll()}function g(){f(),et.procs.refresh(),E&&E.update()}function v(){return(V()-L)/1e3}if(!(t=a(t)))return null;var y=t.gl,x=y.getContextAttributes();y.isContextLost();var b=function(t,e){function r(e){e=e.toLowerCase();var r;try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('\"'+a+'\" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach(function(t){if(!r(t))throw Error(\"(regl): error restoring extension \"+t)})}}}(y,t);if(!b)return null;var _=function(){var t={\"\":0},e=[\"\"];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),w={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},M=b.extensions,E=function(t,e){function r(t,e,r){var n=o.pop()||new function(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null};n.startQueryIndex=t,n.endQueryIndex=e,n.sum=0,n.stats=r,s.push(n)}var n=e.ext_disjoint_timer_query;if(!n)return null;var i=[],a=[],o=[],s=[],l=[],c=[];return{beginQuery:function(t){var e=i.pop()||n.createQueryEXT();n.beginQueryEXT(35007,e),a.push(e),r(a.length-1,a.length,t)},endQuery:function(){n.endQueryEXT(35007)},pushScopeStats:r,update:function(){var t,e;if(0!==(t=a.length)){c.length=Math.max(c.length,t+1),l.length=Math.max(l.length,t+1),l[0]=0;var r=c[0]=0;for(e=t=0;e<a.length;++e){var u=a[e];n.getQueryObjectEXT(u,34919)?(r+=n.getQueryObjectEXT(u,34918),i.push(u)):a[t++]=u,l[e+1]=r,c[e+1]=t}for(a.length=t,e=t=0;e<s.length;++e){var f=(r=s[e]).startQueryIndex;u=r.endQueryIndex,r.sum+=l[u]-l[f],f=c[f],(u=c[u])===f?(r.stats.gpuTime+=r.sum/1e6,o.push(r)):(r.startQueryIndex=f,r.endQueryIndex=u,s[t++]=r)}s.length=t}},getNumPendingQueries:function(){return a.length},clear:function(){i.push.apply(i,a);for(var t=0;t<i.length;t++)n.deleteQueryEXT(i[t]);a.length=0,i.length=0},restore:function(){a.length=0,i.length=0}}}(0,M),L=V(),C=y.drawingBufferWidth,z=y.drawingBufferHeight,D={tick:0,time:0,viewportWidth:C,viewportHeight:z,framebufferWidth:C,framebufferHeight:z,drawingBufferWidth:C,drawingBufferHeight:z,pixelRatio:t.pixelRatio},I=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;return e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063)),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938)}}(y,M),P=function(t,e,r){function n(e){this.id=l++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function i(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function a(t,e,r,n,a,s){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){a=Q(e);for(var l=n=1;l<a.length;++l)n*=a[l];t.dimension=n,i(t,e=K(e,a,t.dtype),r),s?t.persistentData=e:Y.freeType(e)}else\"number\"==typeof e[0]?(t.dimension=a,a=Y.allocType(t.dtype,e.length),p(a,e),i(t,a,r),s?t.persistentData=a:Y.freeType(a)):q(e[0])&&(t.dimension=e[0].length,t.dtype=n||d(e[0])||5126,e=K(e,[e.length,e[0].length],t.dtype),i(t,e,r),s?t.persistentData=e:Y.freeType(e))}else if(q(e))t.dtype=n||d(e),t.dimension=a,i(t,e,r),s&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(o(e)){a=e.shape;var c=e.stride,u=(l=e.offset,0),f=0,h=0,g=0;1===a.length?(u=a[0],f=1,h=c[0],g=0):2===a.length&&(u=a[0],f=a[1],h=c[0],g=c[1]),t.dtype=n||d(e.data)||5126,t.dimension=f,m(a=Y.allocType(t.dtype,u*f),e.data,u,f,h,g,l),i(t,a,r),s?t.persistentData=a:Y.freeType(a)}}function s(r){e.bufferCount--,t.deleteBuffer(r.buffer),r.buffer=null,delete c[r.id]}var l=0,c={};n.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},n.prototype.destroy=function(){s(this)};var u=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(c).forEach(function(e){t+=c[e].stats.size}),t}),{create:function(i,l,u,f){function h(e){var n=35044,i=null,s=0,l=0,c=1;return Array.isArray(e)||q(e)||o(e)?i=e:\"number\"==typeof e?s=0|e:e&&(\"data\"in e&&(i=e.data),\"usage\"in e&&(n=J[e.usage]),\"type\"in e&&(l=Z[e.type]),\"dimension\"in e&&(c=0|e.dimension),\"length\"in e&&(s=0|e.length)),g.bind(),i?a(g,i,n,l,c,f):(t.bufferData(g.type,s,n),g.dtype=l||5121,g.usage=n,g.dimension=c,g.byteLength=s),r.profile&&(g.stats.size=g.byteLength*$[g.dtype]),h}e.bufferCount++;var g=new n(l);return c[g.id]=g,u||h(i),h._reglType=\"buffer\",h._buffer=g,h.subdata=function(e,r){var n,i=0|(r||0);if(g.bind(),q(e))t.bufferSubData(g.type,i,e);else if(Array.isArray(e)){if(0<e.length)if(\"number\"==typeof e[0]){var a=Y.allocType(g.dtype,e.length);p(a,e),t.bufferSubData(g.type,i,a),Y.freeType(a)}else(Array.isArray(e[0])||q(e[0]))&&(n=Q(e),a=K(e,n,g.dtype),t.bufferSubData(g.type,i,a),Y.freeType(a))}else if(o(e)){n=e.shape;var s=e.stride,l=a=0,c=0,u=0;1===n.length?(a=n[0],l=1,c=s[0],u=0):2===n.length&&(a=n[0],l=n[1],c=s[0],u=s[1]),n=Array.isArray(e.data)?g.dtype:d(e.data),m(n=Y.allocType(n,a*l),e.data,a,l,c,u,e.offset),t.bufferSubData(g.type,i,n),Y.freeType(n)}return h},r.profile&&(h.stats=g.stats),h.destroy=function(){s(g)},h},createStream:function(t,e){var r=u.pop();return r||(r=new n(t)),r.bind(),a(r,e,35040,0,1,!1),r},destroyStream:function(t){u.push(t)},clear:function(){H(c).forEach(s),u.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof n?t._buffer:null},restore:function(){H(c).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:a}}(y,w,t),O=function(t,e,r,n){function i(t){this.id=c++,l[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,s,l,c,u){if(n.buffer.bind(),i){var f=u;u||q(i)&&(!o(i)||q(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)}else t.bufferData(34963,c,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=c;if(f=u,!u){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=l)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=s,0>s&&(i=4,1===(s=n.buffer.dimension)&&(i=0),2===s&&(i=1),3===s&&(i=4)),n.primType=i}function s(t){n.elementsCount--,delete l[t.id],t.buffer.destroy(),t.buffer=null}var l={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function l(t){if(t)if(\"number\"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,s=0,h=0;Array.isArray(t)||q(t)||o(t)?e=t:(\"data\"in t&&(e=t.data),\"usage\"in t&&(r=J[t.usage]),\"primitive\"in t&&(n=tt[t.primitive]),\"count\"in t&&(i=0|t.count),\"type\"in t&&(h=u[t.type]),\"length\"in t?s=0|t.length:(s=i,5123===h||5122===h?s*=2:5125!==h&&5124!==h||(s*=4))),a(f,e,r,n,i,s,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return l}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,l(t),l._reglType=\"elements\",l._elements=f,l.subdata=function(t,e){return c.subdata(t,e),l},l.destroy=function(){s(f)},l},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return\"function\"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){H(l).forEach(s)}}}(y,M,P,w),j=(C=function(t,e,r,n,i){for(t=r.maxAttributes,e=Array(t),r=0;r<t;++r)e[r]=new A;return{Record:A,scope:{},state:e}}(y,M,I),T(y,_,w,t)),G=k(y,M,I,function(){et.procs.poll()},D,w,t),W=function(t,e,r,n,i){function a(t){this.id=c++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete u[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,\"rgb5 a1\":32855,depth:33189,stencil:36168,\"depth stencil\":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach(function(t){l[s[t]]=t});var c=0,u={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach(function(e){t+=u[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if(\"object\"==typeof e&&e?(\"shape\"in e?(a=e.shape,n=0|a[0],a=0|a[1]):(\"radius\"in e&&(n=a=0|e.radius),\"width\"in e&&(n=0|e.width),\"height\"in e&&(a=0|e.height)),\"format\"in e&&(u=s[e.format])):\"number\"==typeof e?(n=0|e,a=\"number\"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=ct[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height?o:(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=ct[c.format]*c.width*c.height),o)},o._reglType=\"renderbuffer\",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){H(u).forEach(o)},restore:function(){H(u).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}}(y,M,0,w,t),X=function(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return\"object\"==typeof t&&(i=t.data,\"target\"in t&&(e=0|t.target)),\"texture2d\"===(t=i._reglType)?r=i:\"textureCube\"===t?r=i:\"renderbuffer\"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?(t=n.create2D({width:t,height:e,format:a,type:s}),t._texture.refCount=0,new o(3553,t,null)):(t=i.create({width:t,height:e,format:a}),t._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function d(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r))}function p(){this.id=M++,k[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function g(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete k[e.id]}function v(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)c(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),c(36096,e.depthAttachment),c(36128,e.stencilAttachment),c(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,x.next),x.cur=x.next,t.getError()}function y(t,e){function r(t,e){var i,a=0,o=0,s=!0,c=!0;i=null;var d=!0,p=\"rgba\",g=\"uint8\",y=1,x=null,w=null,M=null,k=!1;\"number\"==typeof t?(a=0|t,o=0|e||a):t?(\"shape\"in t?(o=t.shape,a=o[0],o=o[1]):(\"radius\"in t&&(a=o=t.radius),\"width\"in t&&(a=t.width),\"height\"in t&&(o=t.height)),(\"color\"in t||\"colors\"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||(\"colorCount\"in t&&(y=0|t.colorCount),\"colorTexture\"in t&&(d=!!t.colorTexture,p=\"rgba4\"),\"colorType\"in t&&(g=t.colorType,!d)&&(\"half float\"===g||\"float16\"===g?p=\"rgba16f\":\"float\"!==g&&\"float32\"!==g||(p=\"rgba32f\")),\"colorFormat\"in t&&(p=t.colorFormat,0<=b.indexOf(p)?d=!0:0<=_.indexOf(p)&&(d=!1))),(\"depthTexture\"in t||\"depthStencilTexture\"in t)&&(k=!(!t.depthTexture&&!t.depthStencilTexture)),\"depth\"in t&&(\"boolean\"==typeof t.depth?s=t.depth:(x=t.depth,c=!1)),\"stencil\"in t&&(\"boolean\"==typeof t.stencil?c=t.stencil:(w=t.stencil,s=!1)),\"depthStencil\"in t&&(\"boolean\"==typeof t.depthStencil?s=c=t.depthStencil:(M=t.depthStencil,c=s=!1))):a=o=1;var A=null,T=null,S=null,E=null;if(Array.isArray(i))A=i.map(u);else if(i)A=[u(i)];else for(A=Array(y),i=0;i<y;++i)A[i]=f(a,o,d,p,g);for(a=a||A[0].width,o=o||A[0].height,x?T=u(x):s&&!c&&(T=f(a,o,k,\"depth\",\"uint32\")),w?S=u(w):c&&!s&&(S=f(a,o,!1,\"stencil\",\"uint8\")),M?E=u(M):!x&&!w&&c&&s&&(E=f(a,o,k,\"depth stencil\",\"depth stencil\")),s=null,i=0;i<A.length;++i)l(A[i]),A[i]&&A[i].texture&&(c=ut[A[i].texture._texture.format]*ft[A[i].texture._texture.type],null===s&&(s=c));return l(T),l(S),l(E),m(n),n.width=a,n.height=o,n.colorAttachments=A,n.depthAttachment=T,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=A.map(h),r.depth=h(T),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,v(n),r}var n=new p;return a.framebufferCount++,r(t,e),N(r,{resize:function(t,e){var i=0|t,a=0|e||i;if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)d(o[s],i,a);return d(n.depthAttachment,i,a),d(n.stencilAttachment,i,a),d(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,v(n),r},_reglType:\"framebuffer\",_framebuffer:n,destroy:function(){g(n),m(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=[\"rgba\"],_=[\"rgba4\",\"rgb565\",\"rgb5 a1\"];e.ext_srgb&&_.push(\"srgba\"),e.ext_color_buffer_half_float&&_.push(\"rgba16f\",\"rgb16f\"),e.webgl_color_buffer_float&&_.push(\"rgba32f\");var w=[\"uint8\"];e.oes_texture_half_float&&w.push(\"half float\",\"float16\"),e.oes_texture_float&&w.push(\"float\",\"float32\");var M=0,k={};return N(x,{getFramebuffer:function(t){return\"function\"==typeof t&&\"framebuffer\"===t._reglType&&(t=t._framebuffer)instanceof p?t:null},create:y,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i=\"rgba\";var l=\"uint8\",c=1;if(\"number\"==typeof t?o=0|t:t?(\"shape\"in t?o=t.shape[0]:(\"radius\"in t&&(o=0|t.radius),\"width\"in t?o=0|t.width:\"height\"in t&&(o=0|t.height)),(\"color\"in t||\"colors\"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||(\"colorCount\"in t&&(c=0|t.colorCount),\"colorType\"in t&&(l=t.colorType),\"colorFormat\"in t&&(i=t.colorFormat)),\"depth\"in t&&(a.depth=t.depth),\"stencil\"in t&&(a.stencil=t.stencil),\"depthStencil\"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(c),s={radius:o,format:i,type:l},i=0;i<c;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)c=t[i],o=o||c.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(c=0;c<t.length;++c)a.color[c].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=y(a)}return N(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),N(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:\"framebufferCube\",destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){H(k).forEach(g)},restore:function(){H(k).forEach(function(e){e.framebuffer=t.createFramebuffer(),v(e)})}})}(y,M,I,G,W,w),et=F(y,_,M,I,P,O,0,X,{},C,j,{elements:null,primitive:4,count:-1,offset:0,instances:-1},D,E,t),rt=(_=S(y,X,et.procs.poll,D),et.next),nt=y.canvas,it=[],at=[],ot=[],st=[t.onDestroy],lt=null;nt&&(nt.addEventListener(\"webglcontextlost\",i,!1),nt.addEventListener(\"webglcontextrestored\",s,!1));var ht=X.setFBO=l({framebuffer:B.define.call(null,1,\"framebuffer\")});return g(),x=N(l,{clear:function(t){if(\"framebuffer\"in t)if(t.framebuffer&&\"framebufferCube\"===t.framebuffer_reglType)for(var e=0;6>e;++e)ht(N({framebuffer:t.framebuffer.faces[e]},t),c);else ht(t,c);else c(0,t)},prop:B.define.bind(null,1),context:B.define.bind(null,2),this:B.define.bind(null,3),draw:l({}),buffer:function(t){return P.create(t,34962,!1,!1)},elements:function(t){return O.create(t,!1)},texture:G.create2D,cube:G.createCube,renderbuffer:W.create,framebuffer:X.create,framebufferCube:X.createCube,attributes:x,frame:u,on:function(t,e){var r;switch(t){case\"frame\":return u(e);case\"lost\":r=at;break;case\"restore\":r=ot;break;case\"destroy\":r=st}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:I,hasExtension:function(t){return 0<=I.extensions.indexOf(t.toLowerCase())},read:_,destroy:function(){it.length=0,n(),nt&&(nt.removeEventListener(\"webglcontextlost\",i),nt.removeEventListener(\"webglcontextrestored\",s)),j.clear(),X.clear(),W.clear(),G.clear(),O.clear(),P.clear(),E&&E.clear(),st.forEach(function(t){t()})},_gl:y,_refresh:g,poll:function(){h(),E&&E.update()},now:v,stats:w}),t.onDone(null,x),x}})},{}],507:[function(t,e,r){\"use strict\";var n,i=\"\";e.exports=function(t,e){if(\"string\"!=typeof t)throw new TypeError(\"expected a string\");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i=\"\";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i+=t,i=i.substr(0,r)}},{}],508:[function(t,e,r){!function(t,n){\"object\"==typeof r?e.exports=n():t.resolveUrl=n()}(this,function(){return function(){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<t;a++)i.href=arguments[a],n=i.href,e.href=n;return r.removeChild(e),n}})},{}],509:[function(t,e,r){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],510:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r;(l=(s=t[i])-((r=a+s)-a))&&(t[--n]=r,r=l)}var o=0;for(i=n;i<e;++i){var s,l;(l=(s=r)-((r=(a=t[i])+s)-a))&&(t[o++]=l)}return t[o++]=r,t.length=o,t}},{}],511:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){return 1&t?\"-\":\"\"}function a(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",a(t.slice(0,e)),\",\",a(t.slice(e)),\")\"].join(\"\")}function o(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<t.length;++r)e.push([\"scale(\",o(n(t,r)),\",\",i(r),t[0][r],\")\"].join(\"\"));return a(e)}function s(t){return new Function(\"sum\",\"scale\",\"prod\",\"compress\",[\"function robustDeterminant\",t,\"(m){return compress(\",o(function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m[\",r,\"][\",n,\"]\"].join(\"\")}return e}(t)),\")};return robustDeterminant\",t].join(\"\"))(c,u,l,f)}var l=t(\"two-product\"),c=t(\"robust-sum\"),u=t(\"robust-scale\"),f=t(\"robust-compress\"),h=6,d=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;d.length<h;)d.push(s(d.length));for(var t=[],r=[\"function robustDeterminant(m){switch(m.length){\"],n=0;n<h;++n)t.push(\"det\"+n),r.push(\"case \",n,\":return det\",n,\"(m);\");r.push(\"}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant\"),t.push(\"CACHE\",\"gen\",r.join(\"\"));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,d.concat([d,s])),n=0;n<d.length;++n)e.exports[n]=d[n]}()},{\"robust-compress\":510,\"robust-scale\":517,\"robust-sum\":520,\"two-product\":552}],512:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"robust-sum\");e.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},{\"robust-sum\":520,\"two-product\":552}],513:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",i(t.slice(0,e)),\",\",i(t.slice(e)),\")\"].join(\"\")}function a(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 a(e,t)}function o(t){return!0&t?\"-\":\"\"}function s(t){if(2===t.length)return[[\"diff(\",a(t[0][0],t[1][1]),\",\",a(t[1][0],t[0][1]),\")\"].join(\"\")];for(var e=[],r=0;r<t.length;++r)e.push([\"scale(\",i(s(n(t,r))),\",\",o(r),t[0][r],\")\"].join(\"\"));return e}function l(t,e){for(var r=[],n=0;n<e-2;++n)r.push([\"prod(m\",t,\"[\",n,\"],m\",t,\"[\",n,\"])\"].join(\"\"));return i(r)}function c(t){for(var e=[],r=[],a=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m\",n,\"[\",t-r-2,\"]\"].join(\"\")}return e}(t),o=0;o<t;++o)a[0][o]=\"1\",a[t-1][o]=\"w\"+o;for(o=0;o<t;++o)0==(1&o)?e.push.apply(e,s(n(a,o))):r.push.apply(r,s(n(a,o)));var c=i(e),p=i(r),m=\"exactInSphere\"+t,g=[];for(o=0;o<t;++o)g.push(\"m\"+o);var v=[\"function \",m,\"(\",g.join(),\"){\"];for(o=0;o<t;++o){v.push(\"var w\",o,\"=\",l(o,t),\";\");for(var y=0;y<t;++y)y!==o&&v.push(\"var w\",o,\"m\",y,\"=scale(w\",o,\",m\",y,\"[0]);\")}v.push(\"var p=\",c,\",n=\",p,\",d=diff(p,n);return d[d.length-1];}return \",m);return new Function(\"sum\",\"diff\",\"prod\",\"scale\",v.join(\"\"))(f,h,u,d)}var u=t(\"two-product\"),f=t(\"robust-sum\"),h=t(\"robust-subtract\"),d=t(\"robust-scale\"),p=6,m=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;m.length<=p;)m.push(c(m.length));for(var t=[],r=[\"slow\"],n=0;n<=p;++n)t.push(\"a\"+n),r.push(\"o\"+n);var i=[\"function testInSphere(\",t.join(),\"){switch(arguments.length){case 0:case 1:return 0;\"];for(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;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere\"),r.push(i.join(\"\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=c(t.length)),e.apply(void 0,t)}].concat(m)),n=0;n<=p;++n)e.exports[n]=m[n]}()},{\"robust-scale\":517,\"robust-subtract\":519,\"robust-sum\":520,\"two-product\":552}],514:[function(t,e,r){\"use strict\";function n(t){for(var e=\"robustLinearSolve\"+t+\"d\",r=[\"function \",e,\"(A,b){return [\"],n=0;n<t;++n){r.push(\"det([\");for(var a=0;a<t;++a){a>0&&r.push(\",\"),r.push(\"[\");for(var o=0;o<t;++o)o>0&&r.push(\",\"),o===n?r.push(\"+b[\",a,\"]\"):r.push(\"+A[\",a,\"][\",o,\"]\");r.push(\"]\")}r.push(\"]),\")}r.push(\"det(A)]}return \",e);var s=new Function(\"det\",r.join(\"\"));return s(t<6?i[t]:i)}var i=t(\"robust-determinant\"),a=6,o=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;o.length<a;)o.push(n(o.length));for(var t=[],r=[\"function dispatchLinearSolve(A,b){switch(A.length){\"],i=0;i<a;++i)t.push(\"s\"+i),r.push(\"case \",i,\":return s\",i,\"(A,b);\");r.push(\"}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve\"),t.push(\"CACHE\",\"g\",r.join(\"\"));var s=Function.apply(void 0,t);for(e.exports=s.apply(void 0,o.concat([o,n])),i=0;i<a;++i)e.exports[i]=o[i]}()},{\"robust-determinant\":511}],515:[function(t,e,r){\"use strict\";function n(t,e){for(var r=new Array(t.length-1),n=1;n<t.length;++n)for(var i=r[n-1]=new Array(t.length-1),a=0,o=0;a<t.length;++a)a!==e&&(i[o++]=t[n][a]);return r}function i(t){return 1&t?\"-\":\"\"}function a(t){if(1===t.length)return t[0];if(2===t.length)return[\"sum(\",t[0],\",\",t[1],\")\"].join(\"\");var e=t.length>>1;return[\"sum(\",a(t.slice(0,e)),\",\",a(t.slice(e)),\")\"].join(\"\")}function o(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<t.length;++r)e.push([\"scale(\",a(o(n(t,r))),\",\",i(r),t[0][r],\")\"].join(\"\"));return e}function s(t){for(var e=[],r=[],i=function(t){for(var e=new Array(t),r=0;r<t;++r){e[r]=new Array(t);for(var n=0;n<t;++n)e[r][n]=[\"m\",n,\"[\",t-r-1,\"]\"].join(\"\")}return e}(t),s=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,o(n(i,h))):r.push.apply(r,o(n(i,h))),s.push(\"m\"+h);var d=a(e),p=a(r),m=\"orientation\"+t+\"Exact\",g=[\"function \",m,\"(\",s.join(),\"){var p=\",d,\",n=\",p,\",d=sub(p,n);return d[d.length-1];};return \",m].join(\"\");return new Function(\"sum\",\"prod\",\"scale\",\"sub\",g)(c,l,u,f)}var l=t(\"two-product\"),c=t(\"robust-sum\"),u=t(\"robust-scale\"),f=t(\"robust-subtract\"),h=5,d=s(3),p=s(4),m=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){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:d(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],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],h=r[2]-n[2],d=a*c,m=o*l,g=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-m)+f*(g-v)+h*(y-x),_=7.771561172376103e-16*((Math.abs(d)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>_||-b>_?b:p(t,e,r,n)}];!function(){for(;m.length<=h;)m.push(s(m.length));for(var t=[],r=[\"slow\"],n=0;n<=h;++n)t.push(\"a\"+n),r.push(\"o\"+n);var i=[\"function getOrientation(\",t.join(),\"){switch(arguments.length){case 0:case 1:return 0;\"];for(n=2;n<=h;++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;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation\"),r.push(i.join(\"\"));var a=Function.apply(void 0,r);for(e.exports=a.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=s(t.length)),e.apply(void 0,t)}].concat(m)),n=0;n<=h;++n)e.exports[n]=m[n]}()},{\"robust-scale\":517,\"robust-subtract\":519,\"robust-sum\":520,\"two-product\":552}],516:[function(t,e,r){\"use strict\";var n=t(\"robust-sum\"),i=t(\"robust-scale\");e.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},{\"robust-scale\":517,\"robust-sum\":520}],517:[function(t,e,r){\"use strict\";var n=t(\"two-product\"),i=t(\"two-sum\");e.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(t[0],e,s),s[0]&&(o[c++]=s[0]);for(var u=1;u<r;++u){n(t[u],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[c++]=s[0]);var h=l[1],d=s[1],p=h+d,m=d-(p-h);s[1]=p,m&&(o[c++]=m)}return s[1]&&(o[c++]=s[1]),0===c&&(o[c++]=0),o.length=c,o}},{\"two-product\":552,\"two-sum\":553}],518:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u);if(Math.max(c,u)<s||l<f)return!1}return!0}(t,e,r,i))};var n=t(\"robust-orientation\")[3]},{\"robust-orientation\":515}],519:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],-e[0]);var i,a,o=r+n,s=new Array(o),l=0,c=0,u=0,f=Math.abs,h=t[c],d=f(h),p=-e[u],m=f(p);d<m?(a=h,(c+=1)<r&&(d=f(h=t[c]))):(a=p,(u+=1)<n&&(m=f(p=-e[u]))),c<r&&d<m||u>=n?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=-e[u])));for(var g,v,y=i+a,x=y-i,b=a-x,_=b,w=y;c<r&&u<n;)d<m?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=-e[u]))),(b=(a=_)-(x=(y=i+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g;for(;c<r;)(b=(a=_)-(x=(y=(i=h)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(c+=1)<r&&(h=t[c]);for(;u<n;)(b=(a=_)-(x=(y=(i=p)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(u+=1)<n&&(p=-e[u]);return _&&(s[l++]=_),w&&(s[l++]=w),l||(s[l++]=0),s.length=l,s}},{}],520:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],e[0]);var i,a,o=r+n,s=new Array(o),l=0,c=0,u=0,f=Math.abs,h=t[c],d=f(h),p=e[u],m=f(p);d<m?(a=h,(c+=1)<r&&(d=f(h=t[c]))):(a=p,(u+=1)<n&&(m=f(p=e[u]))),c<r&&d<m||u>=n?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=e[u])));for(var g,v,y=i+a,x=y-i,b=a-x,_=b,w=y;c<r&&u<n;)d<m?(i=h,(c+=1)<r&&(d=f(h=t[c]))):(i=p,(u+=1)<n&&(m=f(p=e[u]))),(b=(a=_)-(x=(y=i+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g;for(;c<r;)(b=(a=_)-(x=(y=(i=h)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(c+=1)<r&&(h=t[c]);for(;u<n;)(b=(a=_)-(x=(y=(i=p)+a)-i))&&(s[l++]=b),_=w-((g=w+y)-(v=g-w))+(y-v),w=g,(u+=1)<n&&(p=e[u]);return _&&(s[l++]=_),w&&(s[l++]=w),l||(s[l++]=0),s.length=l,s}},{}],521:[function(t,e,r){!function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():t.ShelfPack=n()}(this,function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.stats={},this.count=function(t){this.stats[t]=1+(0|this.stats[t])}}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,n,i,a=[],o=0;o<t.length;o++)if(r=t[o].w||t[o].width,n=t[o].h||t[o].height,r&&n){if(!(i=this.packOne(r,n)))continue;e.inPlace&&(t[o].x=i.x,t[o].y=i.y),a.push(i)}if(this.shelves.length>0){for(var s=0,l=0,c=0;c<this.shelves.length;c++){var u=this.shelves[c];l+=u.h,s=Math.max(u.w-u.free,s)}this.resize(s,l)}return a},t.prototype.packOne=function(t,r){for(var n,i,a=0,o={shelf:-1,waste:1/0},s=0;s<this.shelves.length;s++){if(n=this.shelves[s],a+=n.h,r===n.h&&t<=n.free)return this.count(r),n.alloc(t,r);r>n.h||t>n.free||r<n.h&&t<=n.free&&(i=n.h-r)<o.waste&&(o.waste=i,o.shelf=s)}if(-1!==o.shelf)return n=this.shelves[o.shelf],this.count(r),n.alloc(t,r);if(r<=this.h-a&&t<=this.w)return n=new e(a,this.w,r),this.shelves.push(n),this.count(r),n.alloc(t,r);if(this.autoResize){var l,c,u,f;return l=c=this.h,((u=f=this.w)<=l||t>u)&&(f=2*Math.max(t,u)),(l<u||r>l)&&(c=2*Math.max(r,l)),this.resize(f,c),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;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e){if(t>this.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})},{}],522:[function(t,e,r){\"use strict\";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],523:[function(t,e,r){\"use strict\";e.exports=function(t){return i(n(t))};var n=t(\"boundary-cells\"),i=t(\"reduce-simplicial-complex\")},{\"boundary-cells\":74,\"reduce-simplicial-complex\":499}],524:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t)),0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),c=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,c=0;c<r;++c)for(var u=t[c],f=(e=u.length,0);f<e;++f)for(var h=0;h<f;++h){var d=u[h],p=u[f];s[l++]=0|Math.min(d,p),s[l++]=0|Math.max(d,p)}a(n(s,[l/2|0,2]));var m=2;for(c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[m++]=s[c],s[m++]=s[c+1]);return n(s,[m/2|0,2])}(t,s),u=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),c=0,u=0;u<s;++u){var f=o[2*u],h=o[2*u+1];if(r[f]!==r[h]){var d=e[f],p=e[h];o[2*c]=f,o[2*c+1]=h,l[c++]=(p-a)/(p-d)}}return t.shape[0]=c,n(l,[c])}(c,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}for(r[2*o+1]=n;++o<e;)r[2*o]=r[2*o+1]=n;return r}(c,0|e.length),h=o(s)(t,c.data,f,l),d=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(c),p=[].slice.call(u.data,0,u.shape[0]);return i.free(l),i.free(c.data),i.free(u.data),i.free(f),{cells:h,vertexIds:d,vertexWeights:p}};var n=t(\"ndarray\"),i=t(\"typedarray-pool\"),a=t(\"ndarray-sort\"),o=t(\"./lib/codegen\")},{\"./lib/codegen\":525,ndarray:458,\"ndarray-sort\":456,\"typedarray-pool\":554}],525:[function(t,e,r){\"use strict\";e.exports=function(t){var e=a[t];return e||(e=a[t]=function(t){function e(t){if(!(t.length<=0)){c.push(\"R.push(\");for(var e=0;e<t.length;++e){var r=t[e];e>0&&c.push(\",\"),c.push(\"[\");for(var n=0;n<r.length;++n){var i=r[n];n>0&&c.push(\",\"),c.push(\"B(C,E,c[\",i[0],\"],c[\",i[1],\"])\")}c.push(\"]\")}c.push(\");\")}}var r=0,a=new Array(t+1);a[0]=[[]];for(var o=1;o<=t;++o)for(var s=a[o]=i(o),l=0;l<s.length;++l)r=Math.max(r,s[o].length);var c=[\"function B(C,E,i,j){\",\"var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];\",\"while(l<h){\",\"var m=(l+h)>>1,v=E[2*m+1];\",\"if(v===b){return m}\",\"if(b<v){h=m}else{l=m+1}\",\"}\",\"return l;\",\"};\",\"function getContour\",t,\"d(F,E,C,S){\",\"var n=F.length,R=[];\",\"for(var i=0;i<n;++i){var c=F[i],l=c.length;\"];for(o=t+1;o>1;--o){o<t+1&&c.push(\"else \"),c.push(\"if(l===\",o,\"){\");var u=[];for(l=0;l<o;++l)u.push(\"(S[c[\"+l+\"]]<<\"+l+\")\");for(c.push(\"var M=\",u.join(\"+\"),\";if(M===0||M===\",(1<<o)-1,\"){continue}switch(M){\"),s=a[o-1],l=0;l<s.length;++l)c.push(\"case \",l,\":\"),e(s[l]),c.push(\"break;\");c.push(\"}}\")}return c.push(\"}return R;};return getContour\",t,\"d\"),new Function(\"pool\",c.join(\"\"))(n)}(t)),e};var n=t(\"typedarray-pool\"),i=t(\"marching-simplex-table\"),a={}},{\"marching-simplex-table\":436,\"typedarray-pool\":554}],526:[function(t,e,r){\"use strict\";\"use restrict\";function n(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),c=i(e[0],e[1]);return(s=i(l,t[2])-i(c,e[2]))||i(l+t[2],a)-i(c+e[2],o);default:var u=t.slice(0);u.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=u[h]-f[h])return n;return 0}}function i(t,e){return n(t[0],e[0])}function a(t,e){if(e){for(var r=t.length,a=new Array(r),o=0;o<r;++o)a[o]=[t[o],e[o]];a.sort(i);for(o=0;o<r;++o)t[o]=a[o][0],e[o]=a[o][1];return t}return t.sort(n),t}function o(t){if(0===t.length)return[];for(var e=1,r=t.length,i=1;i<r;++i){var a=t[i];if(n(a,t[i-1])){if(i===e){e++;continue}t[e++]=a}}return t.length=e,t}function s(t,e){for(var r=0,i=t.length-1,a=-1;r<=i;){var o=r+i>>1,s=n(t[o],e);s<=0?(0===s&&(a=o),r=o+1):s>0&&(i=o-1)}return a}function l(t,e){for(var r=new Array(t.length),i=0,a=r.length;i<a;++i)r[i]=[];for(var o=[],l=(i=0,e.length);i<l;++i)for(var c=e[i],f=c.length,h=1,d=1<<f;h<d;++h){o.length=u.popCount(h);for(var p=0,m=0;m<f;++m)h&1<<m&&(o[p++]=c[m]);var g=s(t,o);if(!(g<0))for(;r[g++].push(i),!(g>=t.length||0!==n(t[g],o)););}return r}function c(t,e){if(e<0)return[];for(var r=[],n=(1<<e+1)-1,i=0;i<t.length;++i)for(var o=t[i],s=n;s<1<<o.length;s=u.nextCombination(s)){for(var l=new Array(e+1),c=0,f=0;f<o.length;++f)s&1<<f&&(l[c++]=o[f]);r.push(l)}return a(r)}var u=t(\"bit-twiddle\"),f=t(\"union-find\");r.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},r.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},r.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},r.compareCells=n,r.normalize=a,r.unique=o,r.findCell=s,r.incidence=l,r.dual=function(t,e){if(!e)return l(o(c(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],s=0,u=a.length;s<u;++s)r[a[s]].push(n);return r},r.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],o=0|i.length,s=1,l=1<<o;s<l;++s){for(var c=[],u=0;u<o;++u)s>>>u&1&&c.push(i[u]);e.push(c)}return a(e)},r.skeleton=c,r.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,s=i.length;o<s;++o){for(var l=new Array(i.length-1),c=0,u=0;c<s;++c)c!==o&&(l[u++]=i[c]);e.push(l)}return a(e)},r.connectedComponents=function(t,e){return e?function(t,e){for(var r=new f(e),n=0;n<t.length;++n)for(var i=t[n],a=0;a<i.length;++a)for(var o=a+1;o<i.length;++o)r.link(i[a],i[o]);var s=[],l=r.ranks;for(n=0;n<l.length;++n)l[n]=-1;for(n=0;n<t.length;++n){var c=r.find(t[n][0]);l[c]<0?(l[c]=s.length,s.push([t[n].slice(0)])):s[l[c]].push(t[n].slice(0))}return s}(t,e):function(t){for(var e=o(a(c(t,0))),r=new f(e.length),n=0;n<t.length;++n)for(var i=t[n],l=0;l<i.length;++l)for(var u=s(e,[i[l]]),h=l+1;h<i.length;++h)r.link(u,s(e,[i[h]]));var d=[],p=r.ranks;for(n=0;n<p.length;++n)p[n]=-1;for(n=0;n<t.length;++n){var m=r.find(s(e,[t[n][0]]));p[m]<0?(p[m]=d.length,d.push([t[n].slice(0)])):d[p[m]].push(t[n].slice(0))}return d}(t)}},{\"bit-twiddle\":71,\"union-find\":555}],527:[function(t,e,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],528:[function(t,e,r){arguments[4][526][0].apply(r,arguments)},{\"bit-twiddle\":527,dup:526,\"union-find\":529}],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;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},n.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},n.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],530:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){function a(t){if(b[t])return 1/0;var r=v[t],i=y[t];return r<0||i<0?1/0:function(t,e,r){return Math.abs(n(t,e,r))/Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}(e[t],e[r],e[i])}function o(t,e){var r=A[t],n=A[e];A[t]=n,A[e]=r,T[r]=e,T[n]=t}function s(t){return x[A[t]]}function l(t){return 1&t?t-1>>1:(t>>1)-1}function c(t){for(var e=s(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<S){var l=s(n);l<r&&(a=n,r=l)}if(i<S&&s(i)<r&&(a=i),a===t)return t;o(t,a),t=a}}function u(t){for(var e=s(t);t>0;){var r=l(t);if(!(r>=0&&e<s(r)))return t;o(t,r),t=r}}function f(){if(S>0){var t=A[0];return o(0,S-1),S-=1,c(0),t}return-1}function h(t,e){var r=A[t];return x[r]===e?t:(x[r]=-1/0,u(t),f(),x[r]=e,S+=1,u(S-1))}function d(t){if(!b[t]){b[t]=!0;var e=v[t],r=y[t];v[r]>=0&&(v[r]=e),y[e]>=0&&(y[e]=r),T[e]>=0&&h(T[e],a(e)),T[r]>=0&&h(T[r],a(r))}}function p(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 m=e.length,g=t.length,v=new Array(m),y=new Array(m),x=new Array(m),b=new Array(m),_=0;_<m;++_)v[_]=y[_]=-1,x[_]=1/0,b[_]=!1;for(_=0;_<g;++_){var w=t[_];if(2!==w.length)throw new Error(\"Input must be a graph\");var M=w[1],k=w[0];-1!==y[k]?y[k]=-2:y[k]=M,-1!==v[M]?v[M]=-2:v[M]=k}var A=[],T=new Array(m);for(_=0;_<m;++_)(x[_]=a(_))<1/0?(T[_]=A.length,A.push(_)):T[_]=-1;var S=A.length;for(_=S>>1;_>=0;--_)c(_);for(;;){var E=f();if(E<0||x[E]>r)break;d(E)}var L=[];for(_=0;_<m;++_)b[_]||(T[_]=L.length,L.push(e[_].slice()));L.length;var C=[];return t.forEach(function(t){var e=p(v,t[0]),r=p(y,t[1]);if(e>=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&C.push([n,i])}}),i.unique(i.normalize(C)),{positions:L,edges:C}};var n=t(\"robust-orientation\"),i=t(\"simplicial-complex\")},{\"robust-orientation\":515,\"simplicial-complex\":528}],531:[function(t,e,r){\"use strict\";function n(t,e){var r,n;if(e[0][0]<e[1][0])r=e[0],n=e[1];else{if(!(e[0][0]>e[1][0])){var a=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 o<s?o-s:a>l?a-l:o-l}r=e[1],n=e[0]}var c,u;t[0][1]<t[1][1]?(c=t[0],u=t[1]):(c=t[1],u=t[0]);var f=i(n,r,c);return f||((f=i(n,r,u))||u-n)}e.exports=function(t,e){var r,a;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return n(e,t);r=e[1],a=e[0]}var o,s;if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-n(t,e);o=t[1],s=t[0]}var l=i(r,a,s),c=i(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=i(s,o,a),c=i(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var i=t(\"robust-orientation\")},{\"robust-orientation\":515}],532:[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]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=u(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=a(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=a(t.right,e))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}e.exports=function(t){for(var e=t.length,r=2*e,i=new Array(r),a=0;a<e;++a){var l=t[a],u=l[0][0]<l[1][0];i[2*a]=new s(l[0][0],l,u,a),i[2*a+1]=new s(l[1][0],l,!u,a)}i.sort(function(t,e){var r=t.x-e.x;return r||(r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1])});var h=c(f),d=[],p=[],m=[];for(a=0;a<r;){for(var g=i[a].x,v=[];a<r;){var y=i[a];if(y.x!==g)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(v.push(new o(y.segment[0][1],y.index,!0,!0)),v.push(new o(y.segment[1][1],y.index,!1,!1))):(v.push(new o(y.segment[1][1],y.index,!0,!1)),v.push(new o(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}d.push(h.root),p.push(g),m.push(v)}return new n(d,p,m)};var l=t(\"binary-search-bounds\"),c=t(\"functional-red-black-tree\"),u=t(\"robust-orientation\"),f=t(\"./lib/order-segments\");n.prototype.castUp=function(t){var e=l.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=a(this.slabs[e],t),n=-1;if(r&&(n=r.value),this.coordinates[e]===t[0]){var o=null;if(r&&(o=r.key),e>0){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 c=this.horizontal[e];if(c.length>0){var h=l.ge(c,t[1],i);if(h<c.length){var d=c[h];if(t[1]===d.y){if(d.closed)return d.index;for(;h<c.length-1&&c[h+1].y===t[1];)if(h+=1,(d=c[h]).closed)return d.index;if(d.y===t[1]&&!d.start){if((h+=1)>=c.length)return n;d=c[h]}}if(d.start)if(o){var p=u(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\":531,\"binary-search-bounds\":70,\"functional-red-black-tree\":144,\"robust-orientation\":515}],533:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a){for(var o=t+1;o<=e;++o){for(var s=r[o],l=n[2*o],c=n[2*o+1],u=i[o],f=a[o],h=o;h>t;){var d=r[h-1],p=n[2*(h-1)];if((d-s||l-p)>=0)break;r[h]=d,n[2*h]=p,n[2*h+1]=n[2*h-1],i[h]=i[h-1],a[h]=a[h-1],h-=1}r[h]=s,n[2*h]=l,n[2*h+1]=c,i[h]=u,a[h]=f}}function i(t,e,r,n,i,a){var o=r[t],s=n[2*t],l=n[2*t+1],c=i[t],u=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]=c,a[e]=u}function a(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 o(t,e,r,n,i,a,o){var s=n[t],l=i[2*t],c=i[2*t+1],u=a[t],f=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]=c,a[r]=u,o[r]=f}function s(t,e,r,n,i,a,o,s,l,c,u){s[t]=s[e],l[2*t]=l[2*e],l[2*t+1]=l[2*e+1],c[t]=c[e],u[t]=u[e],s[e]=r,l[2*e]=n,l[2*e+1]=i,c[e]=a,u[e]=o}function l(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 u(t,e,r,h,d,p){var m=(e-t+1)/6|0,g=t+m,v=e-m,y=t+e>>1,x=y-m,b=y+m,_=g,w=x,M=y,k=b,A=v,T=t+1,S=e-1,E=0;l(_,w,r,h,d)&&(E=_,_=w,w=E),l(k,A,r,h,d)&&(E=k,k=A,A=E),l(_,M,r,h,d)&&(E=_,_=M,M=E),l(w,M,r,h,d)&&(E=w,w=M,M=E),l(_,k,r,h,d)&&(E=_,_=k,k=E),l(M,k,r,h,d)&&(E=M,M=k,k=E),l(w,A,r,h,d)&&(E=w,w=A,A=E),l(w,M,r,h,d)&&(E=w,w=M,M=E),l(k,A,r,h,d)&&(E=k,k=A,A=E);var L=r[w],C=h[2*w],z=h[2*w+1],D=d[w],I=p[w],P=r[k],O=h[2*k],F=h[2*k+1],R=d[k],N=p[k],j=_,B=M,U=A,V=g,q=y,H=v,G=r[j],Y=r[B],W=r[U];r[V]=G,r[q]=Y,r[H]=W;for(var X=0;X<2;++X){var Z=h[2*j+X],J=h[2*B+X],K=h[2*U+X];h[2*V+X]=Z,h[2*q+X]=J,h[2*H+X]=K}var Q=d[j],$=d[B],tt=d[U];d[V]=Q,d[q]=$,d[H]=tt;var et=p[j],rt=p[B],nt=p[U];p[V]=et,p[q]=rt,p[H]=nt,a(x,t,r,h,d,p),a(b,e,r,h,d,p);for(var it=T;it<=S;++it)if(c(it,L,C,0,D,r,h,d))it!==T&&i(it,T,r,h,d,p),++T;else if(!c(it,P,O,0,R,r,h,d))for(;;){if(c(S,P,O,0,R,r,h,d)){c(S,L,C,0,D,r,h,d)?(o(it,T,S,r,h,d,p),++T,--S):(i(it,S,r,h,d,p),--S);break}if(--S<it)break}s(t,T-1,L,C,z,D,I,r,h,d,p),s(e,S+1,P,O,F,R,N,r,h,d,p),T-2-t<=f?n(t,T-2,r,h,d,p):u(t,T-2,r,h,d,p),e-(S+2)<=f?n(S+2,e,r,h,d,p):u(S+2,e,r,h,d,p),S-T<=f?n(T,S,r,h,d,p):u(T,S,r,h,d,p)}e.exports=function(t,e,r,i,a){a<=4*f?n(0,a-1,t,e,r,i):u(0,a-1,t,e,r,i)};var f=32},{}],534:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s){for(var l=r,c=r;c<n;++c){var u=t[2*c],f=t[2*c+1],h=e[c];i<=u&&u<=o&&a<=f&&f<=s&&(c===l?l+=1:(t[2*c]=t[2*l],t[2*c+1]=t[2*l+1],e[c]=e[l],t[2*l]=u,t[2*l+1]=f,e[l]=h,l+=1))}return l}function i(t,e,r){this.pixelSize=t,this.offset=e,this.count=r}var a=t(\"./lib/sort\"),o=t(\"array-bounds\");e.exports=function(t,e,r,s){function l(i,a,o,s,c,u){var f=.5*o,h=s+1,d=c-s;r[b]=d,x[b++]=u;for(var p=0;p<2;++p)for(var m=0;m<2;++m){var g=i+p*f,v=a+m*f,y=n(t,e,h,c,g,v,g+f,v+f);if(y!==h){if(y-h>=Math.max(.9*d,32)){var _=c+s>>>1;l(g,v,f,h,_,u+1),h=_}l(g,v,f,h,y,u+1),h=y}}}var c=t.length>>>1;if(c<1)return[];e||(e=Array(c)),r||(r=Array(c)),s||(s=[]);for(var u=0;u<c;++u)e[u]=u;if(!s.length||s.length<4||s[0]>=s[2]||s[1]>=s[3]){var f=o(t,2);f[0]===f[2]&&(f[2]+=1),f[1]===f[3]&&(f[3]+=1),s[0]=f[0],s[1]=f[1],s[2]=f[2],s[3]=f[3]}var h=s[0],d=s[1],p=s[2],m=s[3],g=1/(p-h),v=1/(m-d),y=Math.max(p-h,m-d),x=new Int32Array(c),b=0;l(h,d,y,0,c,0),a(x,t,e,r,c);var _=[],w=0,M=c;for(b=c-1;b>=0;--b){t[2*b]=(t[2*b]-h)*g,t[2*b+1]=(t[2*b+1]-d)*v;var k=x[b];k!==w&&(_.push(new i(y*Math.pow(.5,k),b+1,M-(b+1))),M=b+1,w=k)}return _.push(new i(y*Math.pow(.5,k+1),0,M)),_}},{\"./lib/sort\":533,\"array-bounds\":48}],535:[function(t,e,r){\"use strict\";function n(t,e){var r=o(a(t,e),[e[e.length-1]]);return r[r.length-1]}function i(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}var a=t(\"robust-dot-product\"),o=t(\"robust-sum\");e.exports=function(t,e){for(var r=[],a=[],o=n(t[t.length-1],e),s=t[t.length-1],l=t[0],c=0;c<t.length;++c,s=l){var u=n(l=t[c],e);if(o<0&&u>0||o>0&&u<0){var f=i(s,u,l,o);r.push(f),a.push(f.slice())}u<0?a.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),a.push(l.slice())),o=u}return{positive:r,negative:a}},e.exports.positive=function(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l<t.length;++l,o=s){var c=n(s=t[l],e);(a<0&&c>0||a>0&&c<0)&&r.push(i(o,c,s,a)),c>=0&&r.push(s.slice()),a=c}return r},e.exports.negative=function(t,e){for(var r=[],a=n(t[t.length-1],e),o=t[t.length-1],s=t[0],l=0;l<t.length;++l,o=s){var c=n(s=t[l],e);(a<0&&c>0||a>0&&c<0)&&r.push(i(o,c,s,a)),c<=0&&r.push(s.slice()),a=c}return r}},{\"robust-dot-product\":512,\"robust-sum\":520}],536:[function(t,e,r){!function(t){function e(){var t=arguments[0],r=e.cache;return r[t]&&r.hasOwnProperty(t)||(r[t]=e.parse(t)),e.format.call(null,r[t],arguments)}function n(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var i={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:/^[\\+\\-]/};e.format=function(t,r){var a,o,s,l,c,u,f,h=1,d=t.length,p=\"\",m=[],g=!0,v=\"\";for(o=0;o<d;o++)if(\"string\"===(p=n(t[o])))m[m.length]=t[o];else if(\"array\"===p){if((l=t[o])[2])for(a=r[h],s=0;s<l[2].length;s++){if(!a.hasOwnProperty(l[2][s]))throw new Error(e(\"[sprintf] property '%s' does not exist\",l[2][s]));a=a[l[2][s]]}else a=l[1]?r[l[1]]:r[h++];if(\"function\"==n(a)&&(a=a()),i.not_string.test(l[8])&&i.not_json.test(l[8])&&\"number\"!=n(a)&&isNaN(a))throw new TypeError(e(\"[sprintf] expecting number but found %s\",n(a)));switch(i.number.test(l[8])&&(g=a>=0),l[8]){case\"b\":a=a.toString(2);break;case\"c\":a=String.fromCharCode(a);break;case\"d\":case\"i\":a=parseInt(a,10);break;case\"j\":a=JSON.stringify(a,null,l[6]?parseInt(l[6]):0);break;case\"e\":a=l[7]?a.toExponential(l[7]):a.toExponential();break;case\"f\":a=l[7]?parseFloat(a).toFixed(l[7]):parseFloat(a);break;case\"g\":a=l[7]?parseFloat(a).toPrecision(l[7]):parseFloat(a);break;case\"o\":a=a.toString(8);break;case\"s\":a=(a=String(a))&&l[7]?a.substring(0,l[7]):a;break;case\"u\":a>>>=0;break;case\"x\":a=a.toString(16);break;case\"X\":a=a.toString(16).toUpperCase()}i.json.test(l[8])?m[m.length]=a:(!i.number.test(l[8])||g&&!l[3]?v=\"\":(v=g?\"+\":\"-\",a=a.toString().replace(i.sign,\"\")),u=l[4]?\"0\"===l[4]?\"0\":l[4].charAt(1):\" \",f=l[6]-(v+a).length,c=l[6]&&f>0?function(t,e){return Array(e+1).join(t)}(u,f):\"\",m[m.length]=l[5]?v+a+c:\"0\"===u?v+c+a:c+v+a)}return m.join(\"\")},e.cache={},e.parse=function(t){for(var e=t,r=[],n=[],a=0;e;){if(null!==(r=i.text.exec(e)))n[n.length]=r[0];else if(null!==(r=i.modulo.exec(e)))n[n.length]=\"%\";else{if(null===(r=i.placeholder.exec(e)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(r[2]){a|=1;var o=[],s=r[2],l=[];if(null===(l=i.key.exec(s)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o[o.length]=l[1];\"\"!==(s=s.substring(l[0].length));)if(null!==(l=i.key_access.exec(s)))o[o.length]=l[1];else{if(null===(l=i.index_access.exec(s)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o[o.length]=l[1]}r[2]=o}else a|=2;if(3===a)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 a=function(t,r,n){return(n=(r||[]).slice(0)).splice(0,0,t),e.apply(null,n)};void 0!==r?(r.sprintf=e,r.vsprintf=a):(t.sprintf=e,t.vsprintf=a)}(\"undefined\"==typeof window?this:window)},{}],537:[function(t,e,r){\"use strict\";e.exports=function(t){function e(e){var r=[e],c=[e];for(n[e]=i[e]=u,a[e]=!0,u+=1;c.length>0;){e=c[c.length-1];var d=t[e];if(o[e]<d.length){for(var p=o[e];p<d.length;++p){var m=d[p];if(n[m]<0){n[m]=i[m]=u,a[m]=!0,u+=1,r.push(m),c.push(m);break}a[m]&&(i[e]=0|Math.min(i[e],i[m])),s[m]>=0&&l[e].push(s[m])}o[e]=p}else{if(i[e]===n[e]){var g=[],v=[],y=0;for(p=r.length-1;p>=0;--p){var x=r[p];if(a[x]=!1,g.push(x),v.push(l[x]),y+=l[x].length,s[x]=f.length,x===e){r.length=p;break}}f.push(g);var b=new Array(y);for(p=0;p<v.length;p++)for(var _=0;_<v[p].length;_++)b[--y]=v[p][_];h.push(b)}c.pop()}}}for(var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o=new Array(r),s=new Array(r),l=new Array(r),c=0;c<r;++c)n[c]=-1,i[c]=0,a[c]=!1,o[c]=0,s[c]=-1,l[c]=[];var u=0,f=[],h=[];for(c=0;c<r;++c)n[c]<0&&e(c);var d;for(c=0;c<h.length;c++){var p=h[c];if(0!==p.length){p.sort(function(t,e){return t-e}),d=[p[0]];for(var m=1;m<p.length;m++)p[m]!==p[m-1]&&d.push(p[m]);h[c]=d}}return{components:f,adjacencyList:h}}},{}],538:[function(t,e,r){\"use strict\";function n(t){this.options=c(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function i(t,e){var r=t.geometry.coordinates;return{x:s(r[0]),y:l(r[1]),zoom:1/0,id:e,parentId:-1}}function a(t){return{type:\"Feature\",properties:o(t),geometry:{type:\"Point\",coordinates:[function(t){return 360*(t-.5)}(t.x),function(t){var e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}(t.y)]}}}function o(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+\"k\":e>=1e3?Math.round(e/100)/10+\"k\":e;return c(c({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function s(t){return t/360+.5}function l(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 c(t,e){for(var r in e)t[r]=e[r];return t}function u(t){return t.x}function f(t){return t.y}var h=t(\"kdbush\");e.exports=function(t){return new n(t)},n.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(i);e&&console.timeEnd(r);for(var a=this.options.maxZoom;a>=this.options.minZoom;a--){var o=+Date.now();this.trees[a+1]=h(n,u,f,this.options.nodeSize,Float32Array),n=this._cluster(n,a),e&&console.log(\"z%d: %d clusters in %dms\",a,n.length,+Date.now()-o)}return this.trees[this.options.minZoom]=h(n,u,f,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(s(t[0]),l(t[3]),s(t[2]),l(t[1])),i=[],o=0;o<n.length;o++){var c=r.points[n[o]];i.push(c.numPoints?a(c):this.points[c.id])}return i},getChildren:function(t,e){for(var r=this.trees[e+1].points[t],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=this.trees[e+1].within(r.x,r.y,n),o=[],s=0;s<i.length;s++){var l=this.trees[e+1].points[i[s]];l.parentId===t&&o.push(l.numPoints?a(l):this.points[l.id])}return o},getLeaves:function(t,e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,t,e,r,n,0),i},getTile:function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options.extent,o=this.options.radius/a,s=(r-o)/i,l=(r+1+o)/i,c={features:[]};return this._addTileFeatures(n.range((e-o)/i,s,(e+1+o)/i,l),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-o/i,s,1,l),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,s,o/i,l),n.points,-1,r,i,c),c.features.length?c:null},getClusterExpansionZoom:function(t,e){for(;e<this.options.maxZoom;){var r=this.getChildren(t,e);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,n,i,a){for(var o=this.getChildren(e,r),s=0;s<o.length;s++){var l=o[s].properties;if(l.cluster?a+l.point_count<=i?a+=l.point_count:a=this._appendLeaves(t,l.cluster_id,r+1,n,i,a):a<i?a++:t.push(o[s]),t.length===n)break}return a},_addTileFeatures:function(t,e,r,n,i,a){for(var s=0;s<t.length;s++){var l=e[t[s]];a.features.push({type:1,geometry:[[Math.round(this.options.extent*(l.x*i-r)),Math.round(this.options.extent*(l.y*i-n))]],tags:l.numPoints?o(l):this.points[l.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],n=this.options.radius/(this.options.extent*Math.pow(2,e)),i=0;i<t.length;i++){var a=t[i];if(!(a.zoom<=e)){a.zoom=e;var o=this.trees[e+1],s=o.within(a.x,a.y,n),l=a.numPoints||1,c=a.x*l,u=a.y*l,f=null;this.options.reduce&&(f=this.options.initial(),this._accumulate(f,a));for(var h=0;h<s.length;h++){var d=o.points[s[h]];if(e<d.zoom){var p=d.numPoints||1;d.zoom=e,c+=d.x*p,u+=d.y*p,l+=p,d.parentId=i,this.options.reduce&&this._accumulate(f,d)}}1===l?r.push(a):(a.parentId=i,r.push(function(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:n,properties:i,parentId:-1,numPoints:r}}(c/l,u/l,l,i,f)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}}},{kdbush:288}],539:[function(t,e,r){\"use strict\";e.exports=function(t){return t.split(\"\").map(function(t){return t in n?n[t]:\"\"}).join(\"\")};var n={\" \":\" \",0:\"\\u2070\",1:\"\\xb9\",2:\"\\xb2\",3:\"\\xb3\",4:\"\\u2074\",5:\"\\u2075\",6:\"\\u2076\",7:\"\\u2077\",8:\"\\u2078\",9:\"\\u2079\",\"+\":\"\\u207a\",\"-\":\"\\u207b\",a:\"\\u1d43\",b:\"\\u1d47\",c:\"\\u1d9c\",d:\"\\u1d48\",e:\"\\u1d49\",f:\"\\u1da0\",g:\"\\u1d4d\",h:\"\\u02b0\",i:\"\\u2071\",j:\"\\u02b2\",k:\"\\u1d4f\",l:\"\\u02e1\",m:\"\\u1d50\",n:\"\\u207f\",o:\"\\u1d52\",p:\"\\u1d56\",r:\"\\u02b3\",s:\"\\u02e2\",t:\"\\u1d57\",u:\"\\u1d58\",v:\"\\u1d5b\",w:\"\\u02b7\",x:\"\\u02e3\",y:\"\\u02b8\",z:\"\\u1dbb\"}},{}],540:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=a(t,e),n=r.length,i=new Array(n),o=new Array(n),s=0;s<n;++s)i[s]=[r[s]],o[s]=[s];return{positions:i,cells:o}}(t,e);var r=t.order.join()+\"-\"+t.dtype,s=o[r];return e=+e||0,s||(s=o[r]=function(t,e){var r=t.length,a=[\"'use strict';\"],o=\"surfaceNets\"+t.join(\"_\")+\"d\"+e;a.push(\"var contour=genContour({\",\"order:[\",t.join(),\"],\",\"scalarArguments: 3,\",\"phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },\"),\"generic\"===e&&a.push(\"getters:[0],\");for(var s=[],l=[],c=0;c<r;++c)s.push(\"d\"+c),l.push(\"d\"+c);for(c=0;c<1<<r;++c)s.push(\"v\"+c),l.push(\"v\"+c);for(c=0;c<1<<r;++c)s.push(\"p\"+c),l.push(\"p\"+c);s.push(\"a\",\"b\",\"c\"),l.push(\"a\",\"c\"),a.push(\"vertex:function vertexFunc(\",s.join(),\"){\");var u=[];for(c=0;c<1<<r;++c)u.push(\"(p\"+c+\"<<\"+c+\")\");a.push(\"var m=(\",u.join(\"+\"),\")|0;if(m===0||m===\",(1<<(1<<r))-1,\"){return}\");var f=[],h=[];for(1<<(1<<r)<=128?(a.push(\"switch(m){\"),h=a):a.push(\"switch(m>>>7){\"),c=0;c<1<<(1<<r);++c){if(1<<(1<<r)>128&&c%128==0){f.length>0&&h.push(\"}}\");var d=\"vExtra\"+f.length;a.push(\"case \",c>>>7,\":\",d,\"(m&0x7f,\",l.join(),\");break;\"),h=[\"function \",d,\"(m,\",l.join(),\"){switch(m){\"],f.push(h)}h.push(\"case \",127&c,\":\");for(var p=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,x=0;x<r;++x)p[x]=[],m[x]=[],g[x]=0,v[x]=0;for(x=0;x<1<<r;++x)for(var b=0;b<r;++b){var _=x^1<<b;if(!(_>x)&&!(c&1<<_)!=!(c&1<<x)){var w=1;c&1<<_?m[b].push(\"v\"+_+\"-v\"+x):(m[b].push(\"v\"+x+\"-v\"+_),w=-w),w<0?(p[b].push(\"-v\"+x+\"-v\"+_),g[b]+=2):(p[b].push(\"v\"+x+\"+v\"+_),g[b]-=2),y+=1;for(var M=0;M<r;++M)M!==b&&(_&1<<M?v[M]+=1:v[M]-=1)}}var k=[];for(b=0;b<r;++b)if(0===p[b].length)k.push(\"d\"+b+\"-0.5\");else{var A=\"\";g[b]<0?A=g[b]+\"*c\":g[b]>0&&(A=\"+\"+g[b]+\"*c\");var T=p[b].length/y*.5,S=.5+v[b]/y*.5;k.push(\"d\"+b+\"-\"+S+\"-\"+T+\"*(\"+p[b].join(\"+\")+A+\")/(\"+m[b].join(\"+\")+\")\")}h.push(\"a.push([\",k.join(),\"]);\",\"break;\")}a.push(\"}},\"),f.length>0&&h.push(\"}}\");var E=[];for(c=0;c<1<<r-1;++c)E.push(\"v\"+c);E.push(\"c0\",\"c1\",\"p0\",\"p1\",\"a\",\"b\",\"c\"),a.push(\"cell:function cellFunc(\",E.join(),\"){\");var L=i(r-1);for(a.push(\"if(p0){b.push(\",L.map(function(t){return\"[\"+t.map(function(t){return\"v\"+t})+\"]\"}).join(),\")}else{b.push(\",L.map(function(t){var e=t.slice();return e.reverse(),\"[\"+e.map(function(t){return\"v\"+t})+\"]\"}).join(),\")}}});function \",o,\"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return \",o,\";\"),c=0;c<f.length;++c)a.push(f[c].join(\"\"));return new Function(\"genContour\",a.join(\"\"))(n)}(t.order,t.dtype)),s(t,e)};var n=t(\"ndarray-extract-contour\"),i=t(\"triangulate-hypercube\"),a=t(\"zero-crossings\"),o={}},{\"ndarray-extract-contour\":447,\"triangulate-hypercube\":550,\"zero-crossings\":598}],541:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),i=2*Math.PI,a=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},o=function(t,e){var r=4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},s=function(t,e,r,n){var i=t*n-e*r<0?-1:1,a=(t*r+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,d=void 0===h?0:h,p=t.largeArcFlag,m=void 0===p?0:p,g=t.sweepFlag,v=void 0===g?0:g,y=[];if(0===u||0===f)return[];var x=Math.sin(d*i/360),b=Math.cos(d*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var M=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);M>1&&(u*=Math.sqrt(M),f*=Math.sqrt(M));var k=function(t,e,r,n,a,o,l,c,u,f,h,d){var p=Math.pow(a,2),m=Math.pow(o,2),g=Math.pow(h,2),v=Math.pow(d,2),y=p*m-p*v-m*g;y<0&&(y=0),y/=p*v+m*g;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*d,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,M=(h-x)/a,k=(d-b)/o,A=(-h-x)/a,T=(-d-b)/o,S=s(1,0,M,k),E=s(M,k,A,T);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,m,v,x,b,_,w),A=n(k,4),T=A[0],S=A[1],E=A[2],L=A[3],C=Math.max(Math.ceil(Math.abs(L)/(i/4)),1);L/=C;for(var z=0;z<C;z++)y.push(o(E,L)),E+=L;return y.map(function(t){var e=a(t[0],u,f,b,x,T,S),r=e.x,n=e.y,i=a(t[1],u,f,b,x,T,S),o=i.x,s=i.y,l=a(t[2],u,f,b,x,T,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}})},e.exports=r.default},{}],542:[function(t,e,r){\"use strict\";var n=t(\"parse-svg-path\"),i=t(\"abs-svg-path\"),a=t(\"normalize-svg-path\"),o=t(\"is-svg-path\"),s=t(\"assert\");e.exports=function(t){if(Array.isArray(t)&&1===t.length&&\"string\"==typeof t[0]&&(t=t[0]),\"string\"==typeof t&&(s(o(t),\"String is not an SVG path.\"),t=n(t)),s(Array.isArray(t),\"Argument should be a string or an array of path segments.\"),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var c=t[r].slice(1),u=0;u<c.length;u+=2)c[u+0]<e[0]&&(e[0]=c[u+0]),c[u+1]<e[1]&&(e[1]=c[u+1]),c[u+0]>e[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{\"abs-svg-path\":43,assert:51,\"is-svg-path\":287,\"normalize-svg-path\":543,\"parse-svg-path\":466}],543:[function(t,e,r){\"use strict\";function n(t,e,r,n){return[\"C\",t,e,r,n,r,n]}function i(t,e,r,n,i,a){return[\"C\",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,d=0,p=0,m=t.length;p<m;p++){var g=t[p],v=g[0];switch(v){case\"M\":l=g[1],c=g[2];break;case\"A\":var y=a({px:h,py:d,cx:g[6],cy:g[7],rx:g[1],ry:g[2],xAxisRotation:g[3],largeArcFlag:g[4],sweepFlag:g[5]});if(!y.length)continue;for(var x,b=0;b<y.length;b++)g=[\"C\",(x=y[b]).x1,x.y1,x.x2,x.y2,x.x,x.y],b<y.length-1&&r.push(g);break;case\"S\":var _=h,w=d;\"C\"!=e&&\"S\"!=e||(_+=_-o,w+=w-s),g=[\"C\",_,w,g[1],g[2],g[3],g[4]];break;case\"T\":\"Q\"==e||\"T\"==e?(u=2*h-u,f=2*d-f):(u=h,f=d),g=i(h,d,u,f,g[1],g[2]);break;case\"Q\":u=g[1],f=g[2],g=i(h,d,g[1],g[2],g[3],g[4]);break;case\"L\":g=n(h,d,g[1],g[2]);break;case\"H\":g=n(h,d,g[1],d);break;case\"V\":g=n(h,d,h,g[1]);break;case\"Z\":g=n(h,d,l,c)}e=v,h=g[g.length-2],d=g[g.length-1],g.length>4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=d),r.push(g)}return r};var a=t(\"svg-arc-to-cubic-bezier\")},{\"svg-arc-to-cubic-bezier\":541}],544:[function(t,e,r){(function(r){\"use strict\";var n=t(\"svg-path-bounds\"),i=t(\"parse-svg-path\"),a=t(\"draw-svg-path\"),o=t(\"is-svg-path\"),s=t(\"bitmap-sdf\"),l=document.createElement(\"canvas\"),c=l.getContext(\"2d\");e.exports=function(t,e){if(!o(t))throw Error(\"Argument should be valid svg path string\");e||(e={});var u,f;e.shape?(u=e.shape[0],f=e.shape[1]):(u=l.width=e.w||e.width||200,f=l.height=e.h||e.height||200);var h=Math.min(u,f),d=e.stroke||0,p=e.viewbox||e.viewBox||n(t),m=[u/(p[2]-p[0]),f/(p[3]-p[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(c.fillStyle=\"black\",c.fillRect(0,0,u,f),c.fillStyle=\"white\",d&&(\"number\"!=typeof d&&(d=1),c.strokeStyle=d>0?\"white\":\"black\",c.lineWidth=Math.abs(d)),c.translate(.5*u,.5*f),c.scale(g,g),r.Path2D){var v=new Path2D(t);c.fill(v),d&&c.stroke(v)}else{var y=i(t);a(c,y),c.fill(),d&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"bitmap-sdf\":72,\"draw-svg-path\":132,\"is-svg-path\":287,\"parse-svg-path\":466,\"svg-path-bounds\":542}],545:[function(t,e,r){(function(r){\"use strict\";function n(t,e,r){r=r||{};var a=o[t];a||(a=o[t]={\" \":{data:new Float32Array(0),shape:.2}});var s=a[e];if(!s)if(e.length<=1||!/\\d/.test(e))s=a[e]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var c=r[s[l]];n[i++]=c[0],n[i++]=c[1]+1.4,a=Math.max(c[0],a)}return{data:n,shape:a}}(i(e,{triangles:!0,font:t,textAlign:r.textAlign||\"left\",textBaseline:\"alphabetic\"}));else{for(var l=e.split(/(\\d|\\s)/),c=new Array(l.length),u=0,f=0,h=0;h<l.length;++h)c[h]=n(t,l[h]),u+=c[h].data.length,f+=c[h].shape,h>0&&(f+=.02);var d=new Float32Array(u),p=0,m=-.5*f;for(h=0;h<c.length;++h){for(var g=c[h].data,v=0;v<g.length;v+=2)d[p++]=g[v]+m,d[p++]=g[v+1];m+=c[h].shape+.02}s=a[e]={data:d,shape:f}}return s}e.exports=n;var i=t(\"vectorize-text\"),a=window||r.global||{},o=a.__TEXT_CACHE||{};a.__TEXT_CACHE={}}).call(this,t(\"_process\"))},{_process:488,\"vectorize-text\":568}],546:[function(t,e,r){!function(t){function r(e,n){if(e=e||\"\",n=n||{},e instanceof r)return e;if(!(this instanceof r))return new r(e,n);var i=function(e){var r={r:0,g:0,b:0},n=1,i=null,a=null,o=null,s=!1,l=!1;\"string\"==typeof e&&(e=function(t){t=t.replace(L,\"\").replace(C,\"\").toLowerCase();var e=!1;if(F[t])t=F[t],e=!0;else if(\"transparent\"==t)return{r:0,g:0,b:0,a:0,format:\"name\"};var r;if(r=N.rgb.exec(t))return{r:r[1],g:r[2],b:r[3]};if(r=N.rgba.exec(t))return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=N.hsl.exec(t))return{h:r[1],s:r[2],l:r[3]};if(r=N.hsla.exec(t))return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=N.hsv.exec(t))return{h:r[1],s:r[2],v:r[3]};if(r=N.hsva.exec(t))return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=N.hex8.exec(t))return{r:M(r[1]),g:M(r[2]),b:M(r[3]),a:S(r[4]),format:e?\"name\":\"hex8\"};if(r=N.hex6.exec(t))return{r:M(r[1]),g:M(r[2]),b:M(r[3]),format:e?\"name\":\"hex\"};if(r=N.hex4.exec(t))return{r:M(r[1]+\"\"+r[1]),g:M(r[2]+\"\"+r[2]),b:M(r[3]+\"\"+r[3]),a:S(r[4]+\"\"+r[4]),format:e?\"name\":\"hex8\"};if(r=N.hex3.exec(t))return{r:M(r[1]+\"\"+r[1]),g:M(r[2]+\"\"+r[2]),b:M(r[3]+\"\"+r[3]),format:e?\"name\":\"hex\"};return!1}(e));\"object\"==typeof e&&(E(e.r)&&E(e.g)&&E(e.b)?(r=function(t,e,r){return{r:255*_(t,255),g:255*_(e,255),b:255*_(r,255)}}(e.r,e.g,e.b),s=!0,l=\"%\"===String(e.r).substr(-1)?\"prgb\":\"rgb\"):E(e.h)&&E(e.s)&&E(e.v)?(i=A(e.s),a=A(e.v),r=function(e,r,n){e=6*_(e,360),r=_(r,100),n=_(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,i,a),s=!0,l=\"hsv\"):E(e.h)&&E(e.s)&&E(e.l)&&(i=A(e.s),o=A(e.l),r=function(t,e,r){function n(t,e,r){return r<0&&(r+=1),r>1&&(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;t=_(t,360),e=_(e,100),r=_(r,100);if(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}}(e.h,i,o),s=!0,l=\"hsl\"),e.hasOwnProperty(\"a\")&&(n=e.a));return n=b(n),{ok:s,format:e.format||l,r:I(255,P(r.r,0)),g:I(255,P(r.g,0)),b:I(255,P(r.b,0)),a:n}}(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=D(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=D(this._r)),this._g<1&&(this._g=D(this._g)),this._b<1&&(this._b=D(this._b)),this._ok=i.ok,this._tc_id=z++}function n(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n,i,a=P(t,e,r),o=I(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,l:s}}function i(t,e,r){t=_(t,255),e=_(e,255),r=_(r,255);var n,i,a=P(t,e,r),o=I(t,e,r),s=a-o;if(i=0===a?0:s/a,a==o)n=0;else{switch(a){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:i,v:a}}function a(t,e,r,n){var i=[k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(\"\")}function o(t,e,r,n){return[k(T(n)),k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16))].join(\"\")}function s(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s-=e/100,n.s=w(n.s),r(n)}function l(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s+=e/100,n.s=w(n.s),r(n)}function c(t){return r(t).desaturate(100)}function u(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l+=e/100,n.l=w(n.l),r(n)}function f(t,e){e=0===e?0:e||10;var n=r(t).toRgb();return n.r=P(0,I(255,n.r-D(-e/100*255))),n.g=P(0,I(255,n.g-D(-e/100*255))),n.b=P(0,I(255,n.b-D(-e/100*255))),r(n)}function h(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l-=e/100,n.l=w(n.l),r(n)}function d(t,e){var n=r(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,r(n)}function p(t){var e=r(t).toHsl();return e.h=(e.h+180)%360,r(e)}function m(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+120)%360,s:e.s,l:e.l}),r({h:(n+240)%360,s:e.s,l:e.l})]}function g(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+90)%360,s:e.s,l:e.l}),r({h:(n+180)%360,s:e.s,l:e.l}),r({h:(n+270)%360,s:e.s,l:e.l})]}function v(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+72)%360,s:e.s,l:e.l}),r({h:(n+216)%360,s:e.s,l:e.l})]}function y(t,e,n){e=e||6,n=n||30;var i=r(t).toHsl(),a=360/n,o=[r(t)];for(i.h=(i.h-(a*e>>1)+720)%360;--e;)i.h=(i.h+a)%360,o.push(r(i));return o}function x(t,e){e=e||6;for(var n=r(t).toHsv(),i=n.h,a=n.s,o=n.v,s=[],l=1/e;e--;)s.push(r({h:i,s:a,v:o})),o=(o+l)%1;return s}function b(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function _(e,r){(function(t){return\"string\"==typeof t&&-1!=t.indexOf(\".\")&&1===parseFloat(t)})(e)&&(e=\"100%\");var n=function(t){return\"string\"==typeof t&&-1!=t.indexOf(\"%\")}(e);return e=I(r,P(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function w(t){return I(1,P(0,t))}function M(t){return parseInt(t,16)}function k(t){return 1==t.length?\"0\"+t:\"\"+t}function A(t){return t<=1&&(t=100*t+\"%\"),t}function T(e){return t.round(255*parseFloat(e)).toString(16)}function S(t){return M(t)/255}function E(t){return!!N.CSS_UNIT.exec(t)}var L=/^\\s+/,C=/\\s+$/,z=0,D=t.round,I=t.min,P=t.max,O=t.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 e,r,n,i,a,o,s=this.toRgb();return e=s.r/255,r=s.g/255,n=s.b/255,i=e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4),a=r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4),o=n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(t){return this._a=b(t),this._roundA=D(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=D(360*t.h),r=D(100*t.s),n=D(100*t.v);return 1==this._a?\"hsv(\"+e+\", \"+r+\"%, \"+n+\"%)\":\"hsva(\"+e+\", \"+r+\"%, \"+n+\"%, \"+this._roundA+\")\"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=D(360*t.h),r=D(100*t.s),i=D(100*t.l);return 1==this._a?\"hsl(\"+e+\", \"+r+\"%, \"+i+\"%)\":\"hsla(\"+e+\", \"+r+\"%, \"+i+\"%, \"+this._roundA+\")\"},toHex:function(t){return a(this._r,this._g,this._b,t)},toHexString:function(t){return\"#\"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[k(D(t).toString(16)),k(D(e).toString(16)),k(D(r).toString(16)),k(T(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(\"\")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return\"#\"+this.toHex8(t)},toRgb:function(){return{r:D(this._r),g:D(this._g),b:D(this._b),a:this._a}},toRgbString:function(){return 1==this._a?\"rgb(\"+D(this._r)+\", \"+D(this._g)+\", \"+D(this._b)+\")\":\"rgba(\"+D(this._r)+\", \"+D(this._g)+\", \"+D(this._b)+\", \"+this._roundA+\")\"},toPercentageRgb:function(){return{r:D(100*_(this._r,255))+\"%\",g:D(100*_(this._g,255))+\"%\",b:D(100*_(this._b,255))+\"%\",a:this._a}},toPercentageRgbString:function(){return 1==this._a?\"rgb(\"+D(100*_(this._r,255))+\"%, \"+D(100*_(this._g,255))+\"%, \"+D(100*_(this._b,255))+\"%)\":\"rgba(\"+D(100*_(this._r,255))+\"%, \"+D(100*_(this._g,255))+\"%, \"+D(100*_(this._b,255))+\"%, \"+this._roundA+\")\"},toName:function(){return 0===this._a?\"transparent\":!(this._a<1)&&(R[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e=\"#\"+o(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?\"GradientType = 1, \":\"\";if(t){var a=r(t);n=\"#\"+o(a._r,a._g,a._b,a._a)}return\"progid:DXImageTransform.Microsoft.gradient(\"+i+\"startColorstr=\"+e+\",endColorstr=\"+n+\")\"},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 r(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(u,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(h,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(l,arguments)},greyscale:function(){return this._applyModification(c,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(g,arguments)}},r.fromRatio=function(t,e){if(\"object\"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=\"a\"===i?t[i]:A(t[i]));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:O(),g:O(),b:O()})},r.mix=function(t,e,n){n=0===n?0:n||50;var i=r(t).toRgb(),a=r(e).toRgb(),o=n/100;return r({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})},r.readability=function(e,n){var i=r(e),a=r(n);return(t.max(i.getLuminance(),a.getLuminance())+.05)/(t.min(i.getLuminance(),a.getLuminance())+.05)},r.isReadable=function(t,e,n){var i,a,o=r.readability(t,e);switch(a=!1,(i=function(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}}(n)).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},r.mostReadable=function(t,e,n){var i,a,o,s,l=null,c=0;a=(n=n||{}).includeFallbackColors,o=n.level,s=n.size;for(var u=0;u<e.length;u++)(i=r.readability(t,e[u]))>c&&(c=i,l=r(e[u]));return r.isReadable(t,l,{level:o,size:s})||!a?l:(n.includeFallbackColors=!1,r.mostReadable(t,[\"#fff\",\"#000\"],n))};var F=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\"},R=r.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(F),N=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!==e&&e.exports?e.exports=r:window.tinycolor=r}(Math)},{}],547:[function(t,e,r){\"use strict\";function n(t){if(t instanceof Float32Array)return t;if(\"number\"==typeof t)return new Float32Array([t])[0];var e=new Float32Array(t);return e.set(t),e}e.exports=n,e.exports.float32=e.exports.float=n,e.exports.fract32=e.exports.fract=function(t){if(\"number\"==typeof t)return n(t-n(t));for(var e=n(t),r=0,i=e.length;r<i;r++)e[r]=t[r]-e[r];return e}},{}],548:[function(t,e,r){\"use strict\";function n(t,e){var r=a(getComputedStyle(t).getPropertyValue(e));return r[0]*i(r[1],t)}function i(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 function(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}(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 o;case\"cm\":return o/2.54;case\"mm\":return o/25.4;case\"pt\":return o/72;case\"pc\":return o/6}return 1}var a=t(\"parse-unit\");e.exports=i;var o=96},{\"parse-unit\":467}],549:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.topojson=t.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=f[t<0?~t:t],n=0,i=r.length;n<i;++n)e.push(u(r[n].slice(),n));t<0&&l(e,i)}function n(t){return u(t.slice())}function i(t){for(var e=[],n=0,i=t.length;n<i;++n)r(t[n],e);return e.length<2&&e.push(e[0].slice()),e}function a(t){for(var e=i(t);e.length<4;)e.push(e[0].slice());return e}function s(t){return t.map(a)}function c(t){var e,r=t.type;switch(r){case\"GeometryCollection\":return{type:r,geometries:t.geometries.map(c)};case\"Point\":e=n(t.coordinates);break;case\"MultiPoint\":e=t.coordinates.map(n);break;case\"LineString\":e=i(t.arcs);break;case\"MultiLineString\":e=t.arcs.map(i);break;case\"Polygon\":e=s(t.arcs);break;case\"MultiPolygon\":e=t.arcs.map(s);break;default:return null}return{type:r,coordinates:e}}var u=o(t),f=t.arcs;return c(e)}function n(t,e,r){var n,i,a;if(arguments.length>1)n=function(t,e,r){function n(t){var e=t<0?~t:t;(c[e]||(c[e]=[])).push({i:t,g:s})}function i(t){t.forEach(n)}function a(t){t.forEach(i)}function o(t){switch(s=t,t.type){case\"GeometryCollection\":t.geometries.forEach(o);break;case\"LineString\":i(t.arcs);break;case\"MultiLineString\":case\"Polygon\":a(t.arcs);break;case\"MultiPolygon\":!function(t){t.forEach(a)}(t.arcs)}}var s,l=[],c=[];return o(e),c.forEach(null==r?function(t){l.push(t[0].i)}:function(t){r(t[0].g,t[t.length-1].g)&&l.push(t[0].i)}),l}(0,e,r);else for(i=0,n=new Array(a=t.arcs.length);i<a;++i)n[i]=i;return{type:\"MultiLineString\",arcs:c(t,n)}}function i(t,e){function n(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(n);break;case\"Polygon\":i(t.arcs);break;case\"MultiPolygon\":t.arcs.forEach(i)}}function i(t){t.forEach(function(e){e.forEach(function(e){(o[e=e<0?~e:e]||(o[e]=[])).push(t)})}),s.push(t)}function a(e){return function(t){for(var e,r=-1,n=t.length,i=t[n-1],a=0;++r<n;)e=i,i=t[r],a+=e[0]*i[1]-e[1]*i[0];return Math.abs(a)}(r(t,{type:\"Polygon\",arcs:[e]}).coordinates[0])}var o={},s=[],l=[];return e.forEach(n),s.forEach(function(t){if(!t._){var e=[],r=[t];for(t._=1,l.push(e);t=r.pop();)e.push(t),t.forEach(function(t){t.forEach(function(t){o[t<0?~t:t].forEach(function(t){t._||(t._=1,r.push(t))})})})}}),s.forEach(function(t){delete t._}),{type:\"MultiPolygon\",arcs:l.map(function(e){var r,n=[];if(e.forEach(function(t){t.forEach(function(t){t.forEach(function(t){o[t<0?~t:t].length<2&&n.push(t)})})}),n=c(t,n),(r=n.length)>1)for(var i,s,l=1,u=a(n[0]);l<r;++l)(i=a(n[l]))>u&&(s=n[0],n[0]=n[l],n[l]=s,u=i);return n})}}var a=function(t){return t},o=function(t){if(null==(e=t.transform))return a;var e,r,n,i=e.scale[0],o=e.scale[1],s=e.translate[0],l=e.translate[1];return function(t,e){return e||(r=n=0),t[0]=(r+=t[0])*i+s,t[1]=(n+=t[1])*o+l,t}},s=function(t){function e(t){l[0]=t[0],l[1]=t[1],s(l),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[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,s=o(t),l=new Array(2),c=1/0,u=c,f=-c,h=-c;t.arcs.forEach(function(t){for(var e=-1,r=t.length;++e<r;)i=t[e],l[0]=i[0],l[1]=i[1],s(l,e),l[0]<c&&(c=l[0]),l[0]>f&&(f=l[0]),l[1]<u&&(u=l[1]),l[1]>h&&(h=l[1])});for(a in t.objects)r(t.objects[a]);n=t.bbox=[c,u,f,h]}return n},l=function(t,e){for(var r,n=t.length,i=n-e;i<--n;)r=t[i],t[i++]=t[n],t[n]=r},c=function(t,e){function r(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach(function(t){n[t<0?~t:t]=1}),o.push(i)}}var n={},i={},a={},o=[],s=-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[++s],e[s]=r,e[n]=i)}),e.forEach(function(e){var r,n,o=function(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]}(e),s=o[0],l=o[1];if(r=a[s])if(delete a[r.end],r.push(e),r.end=l,n=i[l]){delete i[n.start];var c=n===r?r:r.concat(n);i[c.start=r.start]=a[c.end=n.end]=c}else i[r.start]=a[r.end]=r;else if(r=i[l])if(delete i[r.start],r.unshift(e),r.start=s,n=a[s]){delete a[n.end];var u=n===r?r:n.concat(r);i[u.start=n.start]=a[u.end=r.end]=u}else i[r.start]=a[r.end]=r;else i[(r=[e]).start=s]=a[r.end=l]=r}),r(a,i),r(i,a),e.forEach(function(t){n[t<0?~t:t]||o.push([t])}),o},u=function(t,e){for(var r=0,n=t.length;r<n;){var i=r+n>>>1;t[i]<e?r=i+1:n=i}return r};t.bbox=s,t.feature=function(t,r){return\"GeometryCollection\"===r.type?{type:\"FeatureCollection\",features:r.geometries.map(function(r){return e(t,r)})}:e(t,r)},t.mesh=function(t){return r(t,n.apply(this,arguments))},t.meshArcs=n,t.merge=function(t){return r(t,i.apply(this,arguments))},t.mergeArcs=i,t.neighbors=function(t){function e(t,e){t.forEach(function(t){t<0&&(t=~t);var r=i[t];r?r.push(e):i[t]=[e]})}function r(t,r){t.forEach(function(t){e(t,r)})}function n(t,e){\"GeometryCollection\"===t.type?t.geometries.forEach(function(t){n(t,e)}):t.type in o&&o[t.type](t.arcs,e)}var i={},a=t.map(function(){return[]}),o={LineString:e,MultiLineString:r,Polygon:r,MultiPolygon:function(t,e){t.forEach(function(t){r(t,e)})}};t.forEach(n);for(var s in i)for(var l=i[s],c=l.length,f=0;f<c;++f)for(var h=f+1;h<c;++h){var d,p=l[f],m=l[h];(d=a[p])[s=u(d,m)]!==m&&d.splice(s,0,m),(d=a[m])[s=u(d,p)]!==p&&d.splice(s,0,p)}return a},t.quantize=function(t,e){function r(t){t[0]=Math.round((t[0]-o)/l),t[1]=Math.round((t[1]-c)/u)}function n(t){switch(t.type){case\"GeometryCollection\":t.geometries.forEach(n);break;case\"Point\":r(t.coordinates);break;case\"MultiPoint\":t.coordinates.forEach(r)}}if(!((e=Math.floor(e))>=2))throw new Error(\"n must be \\u22652\");if(t.transform)throw new Error(\"already quantized\");var i,a=s(t),o=a[0],l=(a[2]-o)/(e-1)||1,c=a[1],u=(a[3]-c)/(e-1)||1;t.arcs.forEach(function(t){for(var e,r,n,i=1,a=1,s=t.length,f=t[0],h=f[0]=Math.round((f[0]-o)/l),d=f[1]=Math.round((f[1]-c)/u);i<s;++i)f=t[i],r=Math.round((f[0]-o)/l),n=Math.round((f[1]-c)/u),r===h&&n===d||((e=t[a++])[0]=r-h,h=r,e[1]=n-d,d=n);a<2&&((e=t[a++])[0]=0,e[1]=0),t.length=a});for(i in t.objects)n(t.objects[i]);return t.transform={scale:[l,u],translate:[o,c]},t},t.transform=o,t.untransform=function(t){if(null==(e=t.transform))return a;var e,r,n,i=e.scale[0],o=e.scale[1],s=e.translate[0],l=e.translate[1];return function(t,e){e||(r=n=0);var a=Math.round((t[0]-s)/i),c=Math.round((t[1]-l)/o);return t[0]=a-r,r=a,t[1]=c-n,n=c,t}},Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],550:[function(t,e,r){\"use strict\";e.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(a(t+1)),r=[],o=0;o<e;++o){for(var s=n.unrank(t,o),l=[0],c=0,u=0;u<s.length;++u)c+=1<<s[u],l.push(c);i(s)<1&&(l[0]=c,l[t]=0),r.push(l)}return r};var n=t(\"permutation-rank\"),i=t(\"permutation-parity\"),a=t(\"gamma\")},{gamma:145,\"permutation-parity\":471,\"permutation-rank\":472}],551:[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){return Math.min(1,Math.max(-1,t))}function a(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.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(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,l){this.center=s(r),this.up=s(n),this.right=s(i),this.radius=s([a]),this.angle=s([o,l]),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 c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],i=t.right||a(r),s=t.radius||1,l=t.theta||0,c=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 d=t.eye,p=[d[0]-e[0],d[1]-e[1],d[2]-e[2]];u(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=h(r,p)/s,g=h(i,p)/s;c=Math.acos(m),l=Math.acos(g)}return s=Math.log(s),new o(t.zoomMin,t.zoomMax,e,r,i,s,l,c)};var s=t(\"filtered-vector\"),l=t(\"gl-mat4/invert\"),c=t(\"gl-mat4/rotate\"),u=t(\"gl-vec3/cross\"),f=t(\"gl-vec3/normalize\"),h=t(\"gl-vec3/dot\"),d=o.prototype;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[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])]},d.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];var s=Math.sqrt(i),l=0;for(o=0;o<3;++o)r[o]-=e[o]*a/i,l+=r[o]*r[o],e[o]/=s;var c=Math.sqrt(l);for(o=0;o<3;++o)r[o]/=c;var h=this.computedToward;u(h,e,r),f(h,h);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),x=Math.sin(m),b=this.computedCenter,_=g*y,w=v*y,M=x,k=-g*x,A=-v*x,T=y,S=this.computedEye,E=this.computedMatrix;for(o=0;o<3;++o){var L=_*r[o]+w*h[o]+M*e[o];E[4*o+1]=k*r[o]+A*h[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],F=z*O-D*P,R=D*I-C*O,N=C*P-z*I,j=n(F,R,N);F/=j,R/=j,N/=j,E[0]=F,E[4]=R,E[8]=N;for(o=0;o<3;++o)S[o]=b[o]+E[2+4*o]*d;for(o=0;o<3;++o){l=0;for(var B=0;B<3;++B)l+=E[o+4*B]*S[B];E[12+o]=-l}E[15]=1},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};var p=[0,0,0];d.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[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,p);for(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])}},d.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],c=n(o,s,l);o/=c,s/=c,l/=c;var u=a[0],f=a[4],h=a[8],d=u*o+f*s+h*l,p=n(u-=o*d,f-=s*d,h-=l*d),m=(u/=p)*e+o*r,g=(f/=p)*e+s*r,v=(h/=p)*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))},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.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 c=e[o],u=e[o+4],f=e[o+8];if(a){var h=Math.abs(c),d=Math.abs(u),p=Math.abs(f),m=Math.max(h,d,p);h===m?(c=c<0?-1:1,u=f=0):p===m?(f=f<0?-1:1,c=u=0):(u=u<0?-1:1,c=f=0)}else{var g=n(c,u,f);c/=g,u/=g,f/=g}var v=e[s],y=e[s+4],x=e[s+8],b=v*c+y*u+x*f,_=n(v-=c*b,y-=u*b,x-=f*b),w=u*(x/=_)-f*(y/=_),M=f*(v/=_)-c*x,k=c*y-u*v,A=n(w,M,k);w/=A,M/=A,k/=A,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,c,u,f),this.right.jump(t,v,y,x);var T,S;if(2===o){var E=e[1],L=e[5],C=e[9],z=E*v+L*y+C*x,D=E*w+L*M+C*k;T=F<0?-Math.PI/2:Math.PI/2,S=Math.atan2(D,z)}else{var I=e[2],P=e[6],O=e[10],F=I*c+P*u+O*f,R=I*v+P*y+O*x,N=I*w+P*M+O*k;T=Math.asin(i(F)),S=Math.atan2(N,R)}this.angle.jump(t,S,T),this.recalcMatrix(t);var j=e[2],B=e[6],U=e[10],V=this.computedMatrix;l(V,e);var q=V[15],H=V[12]/q,G=V[13]/q,Y=V[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-j*W,G-B*W,Y-U*W)},d.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},d.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},d.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.lookAt=function(t,e,r,a){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var o=(a=a||this.computedUp)[0],s=a[1],l=a[2],c=n(o,s,l);if(!(c<1e-6)){o/=c,s/=c,l/=c;var u=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],d=n(u,f,h);if(!(d<1e-6)){u/=d,f/=d,h/=d;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=o*m+s*g+l*v,x=n(m-=y*o,g-=y*s,v-=y*l);if(!(x<.01&&(m=s*h-l*f,g=l*u-o*h,v=o*f-s*u,(x=n(m,g,v))<1e-6))){m/=x,g/=x,v/=x,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 b=s*v-l*g,_=l*m-o*v,w=o*g-s*m,M=n(b,_,w),k=o*u+s*f+l*h,A=m*u+g*f+v*h,T=(b/=M)*u+(_/=M)*f+(w/=M)*h,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);D<I&&(C+=2*Math.PI),P<I&&(C-=2*Math.PI),this.angle.jump(this.angle.lastT(),C,z),this.angle.set(t,E,S)}}}}},{\"filtered-vector\":142,\"gl-mat4/invert\":186,\"gl-mat4/rotate\":190,\"gl-vec3/cross\":260,\"gl-vec3/dot\":261,\"gl-vec3/normalize\":264}],552:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var i=t*e,a=n*t,o=a-(a-t),s=t-o,l=n*e,c=l-(l-e),u=e-c,f=s*u-(i-o*c-s*c-o*u);return r?(r[0]=f,r[1]=i,r):[f,i]};var n=+(Math.pow(2,27)+1)},{}],553:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);return r?(r[0]=o+a,r[1]=n,r):[o+a,n]}},{}],554:[function(t,e,r){(function(e,n){\"use strict\";function i(t){if(t){var e=t.length||t.byteLength,r=v.log2(e);_[r].push(t)}}function a(t){t=v.nextPow2(t);var e=v.log2(t),r=_[e];return r.length>0?r.pop():new ArrayBuffer(t)}function o(t){return new Uint8Array(a(t),0,t)}function s(t){return new Uint16Array(a(2*t),0,t)}function l(t){return new Uint32Array(a(4*t),0,t)}function c(t){return new Int8Array(a(t),0,t)}function u(t){return new Int16Array(a(2*t),0,t)}function f(t){return new Int32Array(a(4*t),0,t)}function h(t){return new Float32Array(a(4*t),0,t)}function d(t){return new Float64Array(a(8*t),0,t)}function p(t){return x?new Uint8ClampedArray(a(t),0,t):o(t)}function m(t){return new DataView(a(t),0,t)}function g(t){t=v.nextPow2(t);var e=v.log2(t),r=w[e];return r.length>0?r.pop():new n(t)}var v=t(\"bit-twiddle\"),y=t(\"dup\");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:y([32,0]),UINT16:y([32,0]),UINT32:y([32,0]),INT8:y([32,0]),INT16:y([32,0]),INT32:y([32,0]),FLOAT:y([32,0]),DOUBLE:y([32,0]),DATA:y([32,0]),UINT8C:y([32,0]),BUFFER:y([32,0])});var x=\"undefined\"!=typeof Uint8ClampedArray,b=e.__TYPEDARRAY_POOL;b.UINT8C||(b.UINT8C=y([32,0])),b.BUFFER||(b.BUFFER=y([32,0]));var _=b.DATA,w=b.BUFFER;r.free=function(t){if(n.isBuffer(t))w[v.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|v.log2(e);_[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=function(t){i(t.buffer)},r.freeArrayBuffer=i,r.freeBuffer=function(t){w[v.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||\"arraybuffer\"===e)return a(t);switch(e){case\"uint8\":return o(t);case\"uint16\":return s(t);case\"uint32\":return l(t);case\"int8\":return c(t);case\"int16\":return u(t);case\"int32\":return f(t);case\"float\":case\"float32\":return h(t);case\"double\":case\"float64\":return d(t);case\"uint8_clamped\":return p(t);case\"buffer\":return g(t);case\"data\":case\"dataview\":return m(t);default:return null}return null},r.mallocArrayBuffer=a,r.mallocUint8=o,r.mallocUint16=s,r.mallocUint32=l,r.mallocInt8=c,r.mallocInt16=u,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=h,r.mallocFloat64=r.mallocDouble=d,r.mallocUint8Clamped=p,r.mallocDataView=m,r.mallocBuffer=g,r.clearCache=function(){for(var t=0;t<32;++t)b.UINT8[t].length=0,b.UINT16[t].length=0,b.UINT32[t].length=0,b.INT8[t].length=0,b.INT16[t].length=0,b.INT32[t].length=0,b.FLOAT[t].length=0,b.DOUBLE[t].length=0,b.UINT8C[t].length=0,_[t].length=0,w[t].length=0}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{},t(\"buffer\").Buffer)},{\"bit-twiddle\":71,buffer:82,dup:134}],555:[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;e<t;++e)this.roots[e]=e,this.ranks[e]=0}e.exports=n;var i=n.prototype;Object.defineProperty(i,\"length\",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},i.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},{}],556:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,i=t[o],e(i,a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},{}],557:[function(t,e,r){function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}e.exports=n,n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){void 0===e&&(e=1e-6);var r,n,i,a,o;for(i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,(i=t)<r)return r;if(i>n)return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}},{}],558:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if(\"function\"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},{}],559:[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&&o.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}var a=t(\"punycode\"),o=t(\"./util\");r.parse=i,r.resolve=function(t,e){return i(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?i(t,!1,!0).resolveObject(e):e},r.format=function(t){return o.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)},r.Url=n;var s=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,c=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,u=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat([\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"]),f=[\"'\"].concat(u),h=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(f),d=[\"/\",\"?\",\"#\"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,\"javascript:\":!0},v={javascript:!0,\"javascript:\":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},x=t(\"querystring\");n.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof t);var n=t.indexOf(\"?\"),i=-1!==n&&n<t.indexOf(\"#\")?\"?\":\"#\",l=t.split(i);l[0]=l[0].replace(/\\\\/g,\"/\");var u=t=l.join(i);if(u=u.trim(),!r&&1===t.split(\"#\").length){var b=c.exec(u);if(b)return this.path=u,this.href=u,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search=\"\",this.query={}),this}var _=s.exec(u);if(_){var w=(_=_[0]).toLowerCase();this.protocol=w,u=u.substr(_.length)}if(r||_||u.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var M=\"//\"===u.substr(0,2);!M||_&&v[_]||(u=u.substr(2),this.slashes=!0)}if(!v[_]&&(M||_&&!y[_])){for(var k=-1,A=0;A<d.length;A++){-1!==(E=u.indexOf(d[A]))&&(-1===k||E<k)&&(k=E)}var T,S;-1!==(S=-1===k?u.lastIndexOf(\"@\"):u.lastIndexOf(\"@\",k))&&(T=u.slice(0,S),u=u.slice(S+1),this.auth=decodeURIComponent(T)),k=-1;for(A=0;A<h.length;A++){var E;-1!==(E=u.indexOf(h[A]))&&(-1===k||E<k)&&(k=E)}-1===k&&(k=u.length),this.host=u.slice(0,k),u=u.slice(k),this.parseHost(),this.hostname=this.hostname||\"\";var L=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!L)for(var C=this.hostname.split(/\\./),z=(A=0,C.length);A<z;A++){var D=C[A];if(D&&!D.match(p)){for(var I=\"\",P=0,O=D.length;P<O;P++)D.charCodeAt(P)>127?I+=\"x\":I+=D[P];if(!I.match(p)){var F=C.slice(0,A),R=C.slice(A+1),N=D.match(m);N&&(F.push(N[1]),R.unshift(N[2])),R.length&&(u=\"/\"+R.join(\".\")+u),this.hostname=F.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=a.toASCII(this.hostname));var j=this.port?\":\"+this.port:\"\",B=this.hostname||\"\";this.host=B+j,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==u[0]&&(u=\"/\"+u))}if(!g[w])for(A=0,z=f.length;A<z;A++){var U=f[A];if(-1!==u.indexOf(U)){var V=encodeURIComponent(U);V===U&&(V=escape(U)),u=u.split(U).join(V)}}var q=u.indexOf(\"#\");-1!==q&&(this.hash=u.substr(q),u=u.slice(0,q));var H=u.indexOf(\"?\");if(-1!==H?(this.search=u.substr(H),this.query=u.substr(H+1),e&&(this.query=x.parse(this.query)),u=u.slice(0,H)):e&&(this.search=\"\",this.query={}),u&&(this.pathname=u),y[w]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){j=this.pathname||\"\";var G=this.search||\"\";this.path=j+G}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||\"\";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,\":\"),t+=\"@\");var e=this.protocol||\"\",r=this.pathname||\"\",n=this.hash||\"\",i=!1,a=\"\";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(\":\")?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=x.stringify(this.query));var s=this.search||a&&\"?\"+a||\"\";return e&&\":\"!==e.substr(-1)&&(e+=\":\"),this.slashes||(!e||y[e])&&!1!==i?(i=\"//\"+(i||\"\"),r&&\"/\"!==r.charAt(0)&&(r=\"/\"+r)):i||(i=\"\"),n&&\"#\"!==n.charAt(0)&&(n=\"#\"+n),s&&\"?\"!==s.charAt(0)&&(s=\"?\"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace(\"#\",\"%23\"),e+i+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(o.isString(t)){var e=new n;e.parse(t,!1,!0),t=e}for(var r=new n,i=Object.keys(this),a=0;a<i.length;a++){var s=i[a];r[s]=this[s]}if(r.hash=t.hash,\"\"===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var l=Object.keys(t),c=0;c<l.length;c++){var u=l[c];\"protocol\"!==u&&(r[u]=t[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname=\"/\"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var f=Object.keys(t),h=0;h<f.length;h++){var d=f[h];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||v[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||\"\").split(\"/\");p.length&&!(t.host=p.shift()););t.host||(t.host=\"\"),t.hostname||(t.hostname=\"\"),\"\"!==p[0]&&p.unshift(\"\"),p.length<2&&p.unshift(\"\"),r.pathname=p.join(\"/\")}if(r.search=t.search,r.query=t.query,r.host=t.host||\"\",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||\"\",g=r.search||\"\";r.path=m+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var x=r.pathname&&\"/\"===r.pathname.charAt(0),b=t.host||t.pathname&&\"/\"===t.pathname.charAt(0),_=b||x||r.host&&t.pathname,w=_,M=r.pathname&&r.pathname.split(\"/\")||[],k=(p=t.pathname&&t.pathname.split(\"/\")||[],r.protocol&&!y[r.protocol]);if(k&&(r.hostname=\"\",r.port=null,r.host&&(\"\"===M[0]?M[0]=r.host:M.unshift(r.host)),r.host=\"\",t.protocol&&(t.hostname=null,t.port=null,t.host&&(\"\"===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(\"\"===p[0]||\"\"===M[0])),b)r.host=t.host||\"\"===t.host?t.host:r.host,r.hostname=t.hostname||\"\"===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,M=p;else if(p.length)M||(M=[]),M.pop(),M=M.concat(p),r.search=t.search,r.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(k){r.hostname=r.host=M.shift();(C=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.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 A=M.slice(-1)[0],T=(r.host||t.host||M.length>1)&&(\".\"===A||\"..\"===A)||\"\"===A,S=0,E=M.length;E>=0;E--)\".\"===(A=M[E])?M.splice(E,1):\"..\"===A?(M.splice(E,1),S++):S&&(M.splice(E,1),S--);if(!_&&!w)for(;S--;S)M.unshift(\"..\");!_||\"\"===M[0]||M[0]&&\"/\"===M[0].charAt(0)||M.unshift(\"\"),T&&\"/\"!==M.join(\"/\").substr(-1)&&M.push(\"\");var L=\"\"===M[0]||M[0]&&\"/\"===M[0].charAt(0);if(k){r.hostname=r.host=L?\"\":M.length?M.shift():\"\";var C;(C=!!(r.host&&r.host.indexOf(\"@\")>0)&&r.host.split(\"@\"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())}return(_=_||r.host&&M.length)&&!L&&M.unshift(\"\"),M.length?r.pathname=M.join(\"/\"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.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=l.exec(t);e&&(\":\"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{\"./util\":560,punycode:489,querystring:493}],560:[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}}},{}],561:[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}},{}],562:[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}},{}],563:[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]),f(e)?n.showHidden=e:e&&r._extend(n,e),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),s(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,e,n){if(t.customInspect&&e&&b(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return p(i)||(i=s(t,i,n)),i}var a=function(t,e){if(m(e))return t.stylize(\"undefined\",\"undefined\");if(p(e)){var r=\"'\"+JSON.stringify(e).replace(/^\"|\"$/g,\"\").replace(/'/g,\"\\\\'\").replace(/\\\\\"/g,'\"')+\"'\";return t.stylize(r,\"string\")}if(d(e))return t.stylize(\"\"+e,\"number\");if(f(e))return t.stylize(\"\"+e,\"boolean\");if(h(e))return t.stylize(\"null\",\"null\")}(t,e);if(a)return a;var o=Object.keys(e),v=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),x(e)&&(o.indexOf(\"message\")>=0||o.indexOf(\"description\")>=0))return l(e);if(0===o.length){if(b(e)){var _=e.name?\": \"+e.name:\"\";return t.stylize(\"[Function\"+_+\"]\",\"special\")}if(g(e))return t.stylize(RegExp.prototype.toString.call(e),\"regexp\");if(y(e))return t.stylize(Date.prototype.toString.call(e),\"date\");if(x(e))return l(e)}var w=\"\",k=!1,A=[\"{\",\"}\"];if(u(e)&&(k=!0,A=[\"[\",\"]\"]),b(e)){w=\" [Function\"+(e.name?\": \"+e.name:\"\")+\"]\"}if(g(e)&&(w=\" \"+RegExp.prototype.toString.call(e)),y(e)&&(w=\" \"+Date.prototype.toUTCString.call(e)),x(e)&&(w=\" \"+l(e)),0===o.length&&(!k||0==e.length))return A[0]+w+A[1];if(n<0)return g(e)?t.stylize(RegExp.prototype.toString.call(e),\"regexp\"):t.stylize(\"[Object]\",\"special\");t.seen.push(e);var T;return T=k?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)M(e,String(o))?a.push(c(t,e,r,n,String(o),!0)):a.push(\"\");return i.forEach(function(i){i.match(/^\\d+$/)||a.push(c(t,e,r,n,i,!0))}),a}(t,e,n,v,o):o.map(function(r){return c(t,e,n,v,r,k)}),t.seen.pop(),function(t,e,r){var n=0;if(t.reduce(function(t,e){return n++,e.indexOf(\"\\n\")>=0&&n++,t+e.replace(/\\u001b\\[\\d\\d?m/g,\"\").length+1},0)>60)return r[0]+(\"\"===e?\"\":e+\"\\n \")+\" \"+t.join(\",\\n \")+\" \"+r[1];return r[0]+e+\" \"+t.join(\", \")+\" \"+r[1]}(T,w,A)}function l(t){return\"[\"+Error.prototype.toString.call(t)+\"]\"}function c(t,e,r,n,i,a){var o,l,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?l=c.set?t.stylize(\"[Getter/Setter]\",\"special\"):t.stylize(\"[Getter]\",\"special\"):c.set&&(l=t.stylize(\"[Setter]\",\"special\")),M(n,i)||(o=\"[\"+i+\"]\"),l||(t.seen.indexOf(c.value)<0?(l=h(r)?s(t,c.value,null):s(t,c.value,r-1)).indexOf(\"\\n\")>-1&&(l=a?l.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\").substr(2):\"\\n\"+l.split(\"\\n\").map(function(t){return\" \"+t}).join(\"\\n\")):l=t.stylize(\"[Circular]\",\"special\")),m(o)){if(a&&i.match(/^\\d+$/))return l;(o=JSON.stringify(\"\"+i)).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+\": \"+l}function u(t){return Array.isArray(t)}function f(t){return\"boolean\"==typeof t}function h(t){return null===t}function d(t){return\"number\"==typeof t}function p(t){return\"string\"==typeof t}function m(t){return void 0===t}function g(t){return v(t)&&\"[object RegExp]\"===_(t)}function v(t){return\"object\"==typeof t&&null!==t}function y(t){return v(t)&&\"[object Date]\"===_(t)}function x(t){return v(t)&&(\"[object Error]\"===_(t)||t instanceof Error)}function b(t){return\"function\"==typeof t}function _(t){return Object.prototype.toString.call(t)}function w(t){return t<10?\"0\"+t.toString(10):t.toString(10)}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!p(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(\" \")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(k,function(t){if(\"%%\"===t)return\"%\";if(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<a;s=n[++r])h(s)||!v(s)?o+=\" \"+s:o+=\" \"+i(s);return o},r.deprecate=function(t,i){if(m(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var A,T={};r.debuglog=function(t){if(m(A)&&(A=e.env.NODE_DEBUG||\"\"),t=t.toUpperCase(),!T[t])if(new RegExp(\"\\\\b\"+t+\"\\\\b\",\"i\").test(A)){var n=e.pid;T[t]=function(){var e=r.format.apply(r,arguments);console.error(\"%s %d: %s\",t,n,e)}}else T[t]=function(){};return T[t]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:\"cyan\",number:\"yellow\",boolean:\"yellow\",undefined:\"grey\",null:\"bold\",string:\"green\",date:\"magenta\",regexp:\"red\"},r.isArray=u,r.isBoolean=f,r.isNull=h,r.isNullOrUndefined=function(t){return null==t},r.isNumber=d,r.isString=p,r.isSymbol=function(t){return\"symbol\"==typeof t},r.isUndefined=m,r.isRegExp=g,r.isObject=v,r.isDate=y,r.isError=x,r.isFunction=b,r.isPrimitive=function(t){return null===t||\"boolean\"==typeof t||\"number\"==typeof t||\"string\"==typeof t||\"symbol\"==typeof t||void 0===t},r.isBuffer=t(\"./support/isBuffer\");var S=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];r.log=function(){console.log(\"%s - %s\",function(){var t=new Date,e=[w(t.getHours()),w(t.getMinutes()),w(t.getSeconds())].join(\":\");return[t.getDate(),S[t.getMonth()],e].join(\" \")}(),r.format.apply(r,arguments))},r.inherits=t(\"inherits\"),r._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./support/isBuffer\":562,_process:488,inherits:561}],564:[function(t,e,r){e.exports.VectorTile=t(\"./lib/vectortile.js\"),e.exports.VectorTileFeature=t(\"./lib/vectortilefeature.js\"),e.exports.VectorTileLayer=t(\"./lib/vectortilelayer.js\")},{\"./lib/vectortile.js\":565,\"./lib/vectortilefeature.js\":566,\"./lib/vectortilelayer.js\":567}],565:[function(t,e,r){\"use strict\";function n(t,e,r){if(3===t){var n=new i(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}var i=t(\"./vectortilelayer\");e.exports=function(t,e){this.layers=t.readFields(n,{},e)}},{\"./vectortilelayer\":567}],566:[function(t,e,r){\"use strict\";function n(t,e,r,n,a){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=a,t.readFields(i,this,e)}function i(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){var r=t.readVarint()+t.pos;for(;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}var a=t(\"point-geometry\");e.exports=n,n.types=[\"Unknown\",\"Point\",\"LineString\",\"Polygon\"],n.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,s=0,l=[];t.pos<r;){if(!i){var c=t.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error(\"unknown command \"+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},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,c=-1/0;t.pos<e;){if(!n){var u=t.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),i<o&&(o=i),i>s&&(s=i),a<l&&(l=a),a>c&&(c=a);else if(7!==r)throw new Error(\"unknown command \"+r)}return[o,l,s,c]},n.prototype.toGeoJSON=function(t,e,r){function i(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+c)/s;t[e]=[360*(r.x+l)/s-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}var a,o,s=this.extent*Math.pow(2,r),l=this.extent*t,c=this.extent*e,u=this.loadGeometry(),f=n.types[this.type];switch(this.type){case 1:var h=[];for(a=0;a<u.length;a++)h[a]=u[a][0];i(u=h);break;case 2:for(a=0;a<u.length;a++)i(u[a]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=function(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],r=t[o],n+=(r.x-e.x)*(e.y+r.y);return n}(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(u),a=0;a<u.length;a++)for(o=0;o<u[a].length;o++)i(u[a][o])}1===u.length?u=u[0]:f=\"Multi\"+f;var d={type:\"Feature\",geometry:{type:f,coordinates:u},properties:this.properties};return\"id\"in this&&(d.id=this.id),d}},{\"point-geometry\":477}],567:[function(t,e,r){\"use strict\";function n(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(i,this,e),this.length=this._features.length}function i(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){var e=null,r=t.readVarint()+t.pos;for(;t.pos<r;){var n=t.readVarint()>>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}(r))}var a=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 a(this._pbf,e,this.extent,this._keys,this._values)}},{\"./vectortilefeature.js\":566}],568:[function(t,e,r){\"use strict\";e.exports=function(t,e){return\"object\"==typeof e&&null!==e||(e={}),n(t,e.canvas||i,e.context||a,e)};var n=t(\"./lib/vtext\"),i=null,a=null;\"undefined\"!=typeof document&&((i=document.createElement(\"canvas\")).width=8192,i.height=1024,a=i.getContext(\"2d\"))},{\"./lib/vtext\":569}],569:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=function(t,e){var r=a(t,128);return e?s(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}(t,n),o=function(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;l<s;++l)for(var c=t[l],u=0;u<2;++u)a[u]=0|Math.min(a[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var f=0;switch(n){case\"center\":f=-.5*(a[0]+o[0]);break;case\"right\":case\"end\":f=-o[0];break;case\"left\":case\"start\":f=-a[0];break;default:throw new Error(\"vectorize-text: Unrecognized textAlign: '\"+n+\"'\")}var h=0;switch(i){case\"hanging\":case\"top\":h=-a[1];break;case\"middle\":h=-.5*(a[1]+o[1]);break;case\"alphabetic\":case\"ideographic\":h=-3*r;break;case\"bottom\":h=-o[1];break;default:throw new Error(\"vectorize-text: Unrecoginized textBaseline: '\"+i+\"'\")}var d=1/r;return\"lineHeight\"in e?d*=+e.lineHeight:\"width\"in e?d=e.width/(o[0]-a[0]):\"height\"in e&&(d=e.height/(o[1]-a[1])),t.map(function(t){return[d*(t[0]+f),d*(t[1]+h)]})}(i.positions,e,r),f=i.edges,h=\"ccw\"===e.orientation;if(l(o,f),e.polygons||e.polygon||e.polyline){for(var d=u(f,o),p=new Array(d.length),m=0;m<d.length;++m){for(var g=d[m],v=new Array(g.length),y=0;y<g.length;++y){for(var x=g[y],b=new Array(x.length),_=0;_<x.length;++_)b[_]=o[x[_]].slice();h&&b.reverse(),v[y]=b}p[m]=v}return p}return e.triangles||e.triangulate||e.triangle?{cells:c(o,f,{delaunay:!1,exterior:!1,interior:!0}),positions:o}:{edges:f,positions:o}}function i(t,e,r){try{return n(t,e,r,!0)}catch(t){}try{return n(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}e.exports=function(t,e,r,n){var a=n.size||64,s=n.font||\"normal\";return r.font=a+\"px \"+s,r.textAlign=\"start\",r.textBaseline=\"alphabetic\",r.direction=\"ltr\",i(function(t,e,r,n){var i=0|Math.ceil(e.measureText(r).width+2*n);if(i>8192)throw new Error(\"vectorize-text: String too long (sorry, this will get fixed later)\");var a=3*n;t.height<a&&(t.height=a),e.fillStyle=\"#000\",e.fillRect(0,0,t.width,t.height),e.fillStyle=\"#fff\",e.fillText(r,n,2*n);var s=e.getImageData(0,0,i,a);return o(s.data,[a,i,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a),n,a)},e.exports.processPixels=i;var a=t(\"surface-nets\"),o=t(\"ndarray\"),s=t(\"simplify-planar-graph\"),l=t(\"clean-pslg\"),c=t(\"cdt2d\"),u=t(\"planar-graph-to-polyline\")},{cdt2d:84,\"clean-pslg\":94,ndarray:458,\"planar-graph-to-polyline\":476,\"simplify-planar-graph\":530,\"surface-nets\":540}],570:[function(t,e,r){function n(t){var e=[];for(var r in t.layers)e.push(function(t){for(var e={name:t.name||\"\",version:t.version||1,extent:t.extent||4096,keys:[],values:[],features:[]},r={},n={},o=0;o<t.length;o++){var s=t.feature(o);s.geometry=function(t){for(var e=[],r=0,n=0,o=t.length,s=0;s<o;s++){var l=t[s];e.push(i(1,1));for(var c=0;c<l.length;c++){1===c&&e.push(i(2,l.length-1));var u=l[c].x-r,f=l[c].y-n;e.push(a(u),a(f)),r+=u,n+=f}}return e}(s.loadGeometry());var l=[];for(var c in s.properties){var u=r[c];void 0===u&&(e.keys.push(c),u=e.keys.length-1,r[c]=u);var f=function(t){var e,r=typeof t;\"string\"===r?e={string_value:t}:\"boolean\"===r?e={bool_value:t}:\"number\"===r?e=t%1!=0?{double_value:t}:t<0?{sint_value:t}:{uint_value:t}:(t=JSON.stringify(t),e={string_value:t});return e.key=r+\":\"+t,e}(s.properties[c]),h=n[f.key];void 0===h&&(e.values.push(f),h=e.values.length-1,n[f.key]=h),l.push(u),l.push(h)}s.tags=l,e.features.push(s)}return e}(t.layers[r]));var n=new o;return s.tile.write({layers:e},n),n.finish()}function i(t,e){return(e<<3)+(7&t)}function a(t){return t<<1^t>>31}var o=t(\"pbf\"),s=t(\"./vector-tile-pb\"),l=t(\"./lib/geojson_wrapper\");e.exports=n,e.exports.fromVectorTileJs=n,e.exports.fromGeojsonVt=function(t){var e={};for(var r in t)e[r]=new l(t[r].features),e[r].name=r;return n({layers:e})},e.exports.GeoJSONWrapper=l},{\"./lib/geojson_wrapper\":571,\"./vector-tile-pb\":572,pbf:470}],571:[function(t,e,r){\"use strict\";function n(t){this.features=t,this.length=t.length}function i(t){this.id=\"number\"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=4096}var a=t(\"point-geometry\"),o=t(\"vector-tile\").VectorTileFeature;e.exports=n,n.prototype.feature=function(t){return new i(this.features[t])},i.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var e=0;e<t.length;e++){for(var r=t[e],n=[],i=0;i<r.length;i++)n.push(new a(r[i][0],r[i][1]));this.geometry.push(n)}return this.geometry},i.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},i.prototype.toGeoJSON=o.prototype.toGeoJSON},{\"point-geometry\":477,\"vector-tile\":564}],572:[function(t,e,r){\"use strict\";function n(t,e,r){3===t&&e.layers.push(u(r,r.readVarint()+r.pos))}function i(t,e){return t.readFields(a,{},e)}function a(t,e,r){1===t?e.string_value=r.readString():2===t?e.float_value=r.readFloat():3===t?e.double_value=r.readDouble():4===t?e.int_value=r.readVarint():5===t?e.uint_value=r.readVarint():6===t?e.sint_value=r.readSVarint():7===t&&(e.bool_value=r.readBoolean())}function o(t,e){void 0!==t.string_value&&e.writeStringField(1,t.string_value),void 0!==t.float_value&&e.writeFloatField(2,t.float_value),void 0!==t.double_value&&e.writeDoubleField(3,t.double_value),void 0!==t.int_value&&e.writeVarintField(4,t.int_value),void 0!==t.uint_value&&e.writeVarintField(5,t.uint_value),void 0!==t.sint_value&&e.writeSVarintField(6,t.sint_value),void 0!==t.bool_value&&e.writeBooleanField(7,t.bool_value)}function s(t,e){var r=t.readFields(l,{},e);return void 0===r.type&&(r.type=\"Unknown\"),r}function l(t,e,r){1===t?e.id=r.readVarint():2===t?e.tags=r.readPackedVarint():3===t?e.type=r.readVarint():4===t&&(e.geometry=r.readPackedVarint())}function c(t,e){void 0!==t.id&&e.writeVarintField(1,t.id),void 0!==t.tags&&e.writePackedVarint(2,t.tags),void 0!==t.type&&e.writeVarintField(3,t.type),void 0!==t.geometry&&e.writePackedVarint(4,t.geometry)}function u(t,e){return t.readFields(f,{features:[],keys:[],values:[]},e)}function f(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():2===t?e.features.push(s(r,r.readVarint()+r.pos)):3===t?e.keys.push(r.readString()):4===t?e.values.push(i(r,r.readVarint()+r.pos)):5===t&&(e.extent=r.readVarint())}function h(t,e){void 0!==t.version&&e.writeVarintField(15,t.version),void 0!==t.name&&e.writeStringField(1,t.name);var r;if(void 0!==t.features)for(r=0;r<t.features.length;r++)e.writeMessage(2,c,t.features[r]);if(void 0!==t.keys)for(r=0;r<t.keys.length;r++)e.writeStringField(3,t.keys[r]);if(void 0!==t.values)for(r=0;r<t.values.length;r++)e.writeMessage(4,o,t.values[r]);void 0!==t.extent&&e.writeVarintField(5,t.extent)}var d=r.tile={read:function(t,e){return t.readFields(n,{layers:[]},e)},write:function(t,e){var r;if(void 0!==t.layers)for(r=0;r<t.layers.length;r++)e.writeMessage(3,h,t.layers[r])}};d.GeomType={Unknown:0,Point:1,LineString:2,Polygon:3},d.value={read:i,write:o},d.feature={read:s,write:c},d.layer={read:u,write:h}},{}],573:[function(t,e,r){!function(){\"use strict\";function t(e){e.permitHostObjects___&&e.permitHostObjects___(t)}function r(t){return!(t.substr(0,d.length)==d&&\"___\"===t.substr(t.length-3))}function n(t){if(t!==Object(t))throw new TypeError(\"Not an object: \"+t);var e=t[p];if(e&&e.key===t)return e;if(h(t)){e={key:t};try{return f(t,p,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function i(t){return t.prototype=null,Object.freeze(t)}function a(){y||\"undefined\"==typeof console||(y=!0,console.warn(\"WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future.\"))}if(\"undefined\"==typeof ses||!ses.ok||ses.ok()){\"undefined\"!=typeof ses&&(ses.weakMapPermitHostObjects=t);var o=!1;if(\"function\"==typeof WeakMap){var s=WeakMap;if(\"undefined\"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var l=new s,c=Object.freeze({});if(l.set(c,1),1===l.get(c))return void(e.exports=WeakMap);o=!0}}Object.prototype.hasOwnProperty;var u=Object.getOwnPropertyNames,f=Object.defineProperty,h=Object.isExtensible,d=\"weakmap:\",p=d+\"ident:\"+Math.random()+\"___\";if(\"undefined\"!=typeof crypto&&\"function\"==typeof crypto.getRandomValues&&\"function\"==typeof ArrayBuffer&&\"function\"==typeof Uint8Array){var m=new ArrayBuffer(25),g=new Uint8Array(m);crypto.getRandomValues(g),p=d+\"rand:\"+Array.prototype.map.call(g,function(t){return(t%36).toString(36)}).join(\"\")+\"___\"}if(f(Object,\"getOwnPropertyNames\",{value:function(t){return u(t).filter(r)}}),\"getPropertyNames\"in Object){var v=Object.getPropertyNames;f(Object,\"getPropertyNames\",{value:function(t){return v(t).filter(r)}})}!function(){var t=Object.freeze;f(Object,\"freeze\",{value:function(e){return n(e),t(e)}});var e=Object.seal;f(Object,\"seal\",{value:function(t){return n(t),e(t)}});var r=Object.preventExtensions;f(Object,\"preventExtensions\",{value:function(t){return n(t),r(t)}})}();var y=!1,x=0,b=function(){this instanceof b||a();var t=[],e=[],r=x++;return Object.create(b.prototype,{get___:{value:i(function(i,a){var o,s=n(i);return s?r in s?s[r]:a:(o=t.indexOf(i))>=0?e[o]:a})},has___:{value:i(function(e){var i=n(e);return i?r in i:t.indexOf(e)>=0})},set___:{value:i(function(i,a){var o,s=n(i);return s?s[r]=a:(o=t.indexOf(i))>=0?e[o]=a:(o=t.length,e[o]=a,t[o]=i),this})},delete___:{value:i(function(i){var a,o,s=n(i);return s?r in s&&delete s[r]:!((a=t.indexOf(i))<0||(o=t.length-1,t[a]=void 0,e[a]=e[o],t[a]=t[o],t.length=o,e.length=o,0))})}})};b.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(){this instanceof b||a();var e,r=new s,n=void 0,l=!1;return e=o?function(t,e){return r.set(t,e),r.has(t)||(n||(n=new b),n.set(t,e)),this}:function(t,e){if(l)try{r.set(t,e)}catch(r){n||(n=new b),n.set___(t,e)}else r.set(t,e);return this},Object.create(b.prototype,{get___:{value:i(function(t,e){return n?r.has(t)?r.get(t):n.get___(t,e):r.get(t,e)})},has___:{value:i(function(t){return r.has(t)||!!n&&n.has___(t)})},set___:{value:i(e)},delete___:{value:i(function(t){var e=!!r.delete(t);return n?n.delete___(t)||e:e})},permitHostObjects___:{value:i(function(e){if(e!==t)throw new Error(\"bogus call to permitHostObjects___\");l=!0})}})}o&&\"undefined\"!=typeof Proxy&&(Proxy=void 0),r.prototype=b.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=b)}}()},{}],574:[function(t,e,r){var n=t(\"./hidden-store.js\");e.exports=function(){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:n(e,t)}}},{\"./hidden-store.js\":575}],575:[function(t,e,r){e.exports=function(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}},{}],576:[function(t,e,r){var n=t(\"./create-store.js\");e.exports=function(){var t=n();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}}}},{\"./create-store.js\":574}],577:[function(t,e,r){var n=t(\"get-canvas-context\");e.exports=function(t){return n(\"webgl\",t)}},{\"get-canvas-context\":156}],578:[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),c=0,u=l.length;c<u;c++){var f=l[c],h=a[f].exports;if(h===t||h&&h.default===t){s=f;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var d={};for(c=0,u=l.length;c<u;c++){d[f=l[c]]=f}i[s]=[Function([\"require\",\"module\",\"exports\"],\"(\"+t+\")(self)\"),d]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,i[p]=[Function([\"require\"],\"var f = require(\"+o(s)+\");(f.default ? f.default : f)(self);\"),m];var g={};r(p);var v=\"(\"+n+\")({\"+Object.keys(g).map(function(t){return o(t)+\":[\"+i[t][0]+\",\"+o(i[t][1])+\"]\"}).join(\",\")+\"},{},[\"+o(p)+\"])\",y=window.URL||window.webkitURL||window.mozURL||window.msURL,x=new Blob([v],{type:\"text/javascript\"});if(e&&e.bare)return x;var b=y.createObjectURL(x),_=new Worker(b);return _.objectURL=b,_}},{}],579:[function(t,e,r){e.exports.RADIUS=6378137,e.exports.FLATTENING=1/298.257223563,e.exports.POLAR_RADIUS=6356752.3142},{}],580:[function(t,e,r){!function(t,n){n(\"object\"==typeof r&&void 0!==e?r:t.WhooTS=t.WhooTS||{})}(this,function(t){function e(t,e,n){var i=r(256*t,256*(e=Math.pow(2,n)-e-1),n),a=r(256*(t+1),256*(e+1),n);return i[0]+\",\"+i[1]+\",\"+a[0]+\",\"+a[1]}function r(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}t.getURL=function(t,r,n,i,a,o){return o=o||{},t+\"?\"+[\"bbox=\"+e(n,i,a),\"format=\"+(o.format||\"image/png\"),\"service=\"+(o.service||\"WMS\"),\"version=\"+(o.version||\"1.1.1\"),\"request=\"+(o.request||\"GetMap\"),\"srs=\"+(o.srs||\"EPSG:3857\"),\"width=\"+(o.width||256),\"height=\"+(o.height||256),\"layers=\"+r].join(\"&\")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,\"__esModule\",{value:!0})})},{}],581:[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();a(n.prototype=new i.baseCalendar,{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(l);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(c);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"\\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\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"\\u95f0\"+i),i},monthNamesShort:function(t){if(\"string\"==typeof t){var e=t.match(u);return e?e[0]:\"\"}var r=this._validateYear(t),n=t.month(),i=[\"\\u4e00\",\"\\u4e8c\",\"\\u4e09\",\"\\u56db\",\"\\u4e94\",\"\\u516d\",\"\\u4e03\",\"\\u516b\",\"\\u4e5d\",\"\\u5341\",\"\\u5341\\u4e00\",\"\\u5341\\u4e8c\"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i=\"\\u95f0\"+i),i},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 i.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return n?!r&&e<=n?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw i.local.invalidMonth.replace(/\\{0\\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){t=this._validateYear(t);return f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).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,a=this._validateYear(t,i.local.invalidyear),s=h[a-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(n=o.newDate(l,c,u)).add(4-(n.dayOfWeek()||7),\"d\");var f=this.toJD(t,e,r)-n.toJD();return 1+Math.floor(f/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=f[t-f[0]];if(e>(r>>13?12:11))throw i.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,i.local.invalidDate);t=this._validateYear(n.year()),e=n.month(),r=n.day();var a=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o;if(\"object\"==typeof t)o=t,a=e||{};else{if(!(\"number\"==typeof t&&t>=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 c,u=f[o.year-f[0]],d=u>>13;c=d?o.month>d?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var p=0;p<c;p++)l+=u&1<<12-p?30:29;var m=h[o.year-h[0]],g=m>>9&4095,v=m>>5&15,y=31&m,x=new Date(g,v-1,y+l);return a.year=x.getFullYear(),a.month=1+x.getMonth(),a.day=x.getDate(),a}(t,s,r,a);return o.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=o.fromJD(t),r=function(t,e,r,n){var i,a;if(\"object\"==typeof t)i=t,a=e||{};else{if(!(\"number\"==typeof t&&t>=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=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1;var l,c=(o=h[a.year-h[0]])>>9&4095,u=o>>5&15,d=31&o,p=new Date(c,u-1,d),m=new Date(i.year,i.month-1,i.day);l=Math.round((m-p)/864e5);var g,v=f[a.year-f[0]];for(g=0;g<13;g++){var y=v&1<<12-g?30:29;if(l<y)break;l-=y}var x=v>>13;return!x||g<x?(a.isIntercalary=!1,a.month=1+g):g===x?(a.isIntercalary=!0,a.month=g):(a.isIntercalary=!1,a.month=g),a.day=1+l,a}(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(s),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 c=l.year(),u=l.month(),f=this.isIntercalaryMonth(c,s),h=o&&f?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);h!==u&&l.month(h)}return l}});var s=/^\\s*(-?\\d\\d\\d\\d|\\d\\d)[-/](\\d?\\d)([iI]?)[-/](\\d?\\d)/m,l=/^\\d?\\d[iI]?/m,c=/^\\u95f0?\\u5341?[\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d]?\\u6708/m,u=/^\\u95f0?\\u5341?[\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d]?/m;i.calendars.chinese=n;var f=[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],h=[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\":595,\"object-assign\":462}],582:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()+(e.year()<0?1:0))%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())<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\":595,\"object-assign\":462}],583:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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:a[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 a={20:\"Fruitbat\",21:\"Anchovy\"};i.calendars.discworld=n},{\"../main\":595,\"object-assign\":462}],584:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()+(e.year()<0?1:0))%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())<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\":595,\"object-assign\":462}],585:[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\");t(\"object-assign\")(n.prototype=new a.baseCalendar,{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(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return i(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.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\":595,\"object-assign\":462}],586:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],587:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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);return(t=e.year()<0?e.year()+1:e.year())%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)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),i.calendars.julian=n},{\"../main\":595,\"object-assign\":462}],588:[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\");t(\"object-assign\")(n.prototype=new o.baseCalendar,{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);t%=400,t+=t<0?400:0;return e+\".\"+Math.floor(t/20)+\".\"+t%20},forYear:function(t){if((t=t.split(\".\")).length<3)throw\"Invalid Mayan year\";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||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).toJD(),i=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(t){var e=i((t-=this.jdEpoch)+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\":595,\"object-assign\":462}],589:[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())<0&&t++;for(var a=n.day(),s=1;s<n.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=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\":595,\"object-assign\":462}],590:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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 c=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(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,\"d\").toJD()},fromJD:function(t){var e=i.instance().fromJD(t),r=e.year(),n=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),i.calendars.nepali=n},{\"../main\":595,\"object-assign\":462}],591:[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\");t(\"object-assign\")(n.prototype=new a.baseCalendar,{name:\"Persian\",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Persian\",epochs:[\"BP\",\"AP\"],monthNames:[\"Farvardin\",\"Ordibehesht\",\"Khordad\",\"Tir\",\"Mordad\",\"Shahrivar\",\"Mehr\",\"Aban\",\"Azar\",\"Day\",\"Bahman\",\"Esfand\"],monthNamesShort:[\"Far\",\"Ord\",\"Kho\",\"Tir\",\"Mor\",\"Sha\",\"Meh\",\"Aba\",\"Aza\",\"Day\",\"Bah\",\"Esf\"],dayNames:[\"Yekshambe\",\"Doshambe\",\"Seshambe\",\"Ch\\xe6harshambe\",\"Panjshambe\",\"Jom'e\",\"Shambe\"],dayNamesShort:[\"Yek\",\"Do\",\"Se\",\"Ch\\xe6\",\"Panj\",\"Jom\",\"Sha\"],dayNamesMin:[\"Ye\",\"Do\",\"Se\",\"Ch\",\"Pa\",\"Jo\",\"Sh\"],digits:null,dateFormat:\"yyyy/mm/dd\",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,a.local.invalidYear);return 682*((e.year()-(e.year()>0?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){var e=(t=Math.floor(t)+.5)-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 c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),a.calendars.persian=n,a.calendars.jalali=n},{\"../main\":595,\"object-assign\":462}],592:[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();a(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],593:[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();a(n.prototype=new i.baseCalendar,{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\":595,\"object-assign\":462}],594:[function(t,e,r){function n(t){this.local=this.regionalOptions[t||\"\"]||this.regionalOptions[\"\"]}var i=t(\"../main\");t(\"object-assign\")(n.prototype=new i.baseCalendar,{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).toJD()-24e5+.5,n=0,o=0;o<a.length;o++){if(a[o]>r)return a[n]-a[n-1];n++}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),o=12*(n.year()-1)+n.month()-15292;return n.day()+a[o-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<a.length&&!(a[n]>e);n++)r++;var i=r+15292,o=Math.floor((i-1)/12),s=o+1,l=i-12*o,c=e-a[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var n=i.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(n=(t=null!=t.year?t.year: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 a=[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\":595,\"object-assign\":462}],595:[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(c.local.invalidDate||c.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()).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(c.local.invalidDate||c.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(c.local.differentCalendars||c.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,c.local.invalidDate||c.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,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return(e.year()<0?\"-\":\"\")+a(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.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,c.local.invalidMonth||c.regionalOptions[\"\"].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.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(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-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,c.local.invalidDate||c.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.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(c.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[\"\"].differentCalendars).replace(/\\{0\\}/,this.local.name).replace(/\\{1\\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\\{0\\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l(s.prototype=new o,{name:\"Gregorian\",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{\"\":{name:\"Gregorian\",epochs:[\"BCE\",\"CE\"],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,c.local.invalidYear||c.regionalOptions[\"\"].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==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,c.local.invalidMonth||c.regionalOptions[\"\"].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,c.local.invalidDate||c.regionalOptions[\"\"].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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 c=e.exports=new n;c.cdate=i,c.baseCalendar=o,c.calendars.gregorian=s},{\"object-assign\":462}],596:[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;for(var n=(r=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,c=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;x+n<t.length&&t.charAt(x+n)===e;)n++;return x+=n-1,Math.floor(n/(r||1))>1}),u=function(t,e,r,n){var i=\"\"+e;if(c(t,n))for(;i.length<r;)i=\"0\"+i;return i},f=function(t,e,r,n){return c(t)?n[e]:r[e]},h=this,d=function(t){return\"function\"==typeof o?o.call(h,t,c(\"m\")):g(u(\"m\",t.month(),2))},p=function(t,e){return e?\"function\"==typeof l?l.call(h,t):l[t.month()-h.minMonth]:\"function\"==typeof s?s.call(h,t):s[t.month()-h.minMonth]},m=this.local.digits,g=function(t){return r.localNumbers&&m?m(t):t},v=\"\",y=!1,x=0;x<t.length;x++)if(y)\"'\"!==t.charAt(x)||c(\"'\")?v+=t.charAt(x):y=!1;else switch(t.charAt(x)){case\"d\":v+=g(u(\"d\",e.day(),2));break;case\"D\":v+=f(\"D\",e.dayOfWeek(),n,a);break;case\"o\":v+=u(\"o\",e.dayOfYear(),3);break;case\"w\":v+=u(\"w\",e.weekOfYear(),2);break;case\"m\":v+=d(e);break;case\"M\":v+=p(e,c(\"M\"));break;case\"y\":v+=c(\"y\",2)?e.year():(e.year()%100<10?\"0\":\"\")+e.year()%100;break;case\"Y\":c(\"Y\",2),v+=e.formatYear();break;case\"J\":v+=e.toJD();break;case\"@\":v+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case\"!\":v+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case\"'\":c(\"'\")?v+=\"'\":y=!0;break;default:v+=t.charAt(x)}return v},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[\"\"].invalidArguments;if(\"\"===(e=\"object\"==typeof e?e.toString():e+\"\"))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n=\"string\"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,h=-1,d=-1,p=-1,m=-1,g=!1,v=!1,y=function(e,r){for(var n=1;T+n<t.length&&t.charAt(T+n)===e;)n++;return T+=n-1,Math.floor(n/(r||1))>1},x=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(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[\"\"].missingNumberAt).replace(/\\{0\\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if(\"function\"==typeof l){y(\"m\");var t=l.call(b,e.substring(A));return A+=t.length,t}return x(\"m\")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[\"\"].unknownNameAt).replace(/\\{0\\}/,A)},M=function(){if(\"function\"==typeof u){var t=y(\"M\")?u.call(b,e.substring(A)):c.call(b,e.substring(A));return A+=t.length,t}return w(\"M\",c,u)},k=function(){if(e.charAt(A)!==t.charAt(T))throw(i.local.unexpectedLiteralAt||i.regionalOptions[\"\"].unexpectedLiteralAt).replace(/\\{0\\}/,A);A++},A=0,T=0;T<t.length;T++)if(v)\"'\"!==t.charAt(T)||y(\"'\")?k():v=!1;else switch(t.charAt(T)){case\"d\":p=x(\"d\");break;case\"D\":w(\"D\",a,o);break;case\"o\":m=x(\"o\");break;case\"w\":x(\"w\");break;case\"m\":d=_();break;case\"M\":d=M();break;case\"y\":var S=T;g=!y(\"y\",2),T=S,h=x(\"y\",2);break;case\"Y\":h=x(\"Y\",2);break;case\"J\":f=x(\"J\")+.5,\".\"===e.charAt(A)&&(A++,x(\"J\"));break;case\"@\":f=x(\"@\")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case\"!\":f=x(\"!\")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case\"*\":A=e.length;break;case\"'\":y(\"'\")?k():v=!0;break;default:k()}if(A<e.length)throw i.local.unexpectedText||i.regionalOptions[\"\"].unexpectedText;if(-1===h?h=this.today().year():h<100&&g&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),\"string\"==typeof d&&(d=s.call(this,h,d)),m>-1){d=1,p=m;for(var E=this.daysInMonth(h,d);p>E;E=this.daysInMonth(h,d))d++,p-=E}return f>-1?this.fromJD(f):this.newDate(h,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){}for(var e=((t=t.toLowerCase()).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\":595,\"object-assign\":462}],597:[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\":116}],598:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t(\"./lib/zc-core\")},{\"./lib/zc-core\":597}],599:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"./common_defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s,l){function c(r,i){return n.coerce(t,e,o,r,i)}s=s||{};var u=c(\"visible\",!(l=l||{}).itemIsNotPlainObject),f=c(\"clicktoshow\");if(!u&&!f)return e;a(t,e,r,c);for(var h=e.showarrow,d=[\"x\",\"y\"],p=[-10,-30],m={_fullLayout:r},g=0;g<2;g++){var v=d[g],y=i.coerceRef(t,e,m,v,\"\",\"paper\");if(i.coercePosition(e,m,c,y,v,.5),h){var x=\"a\"+v,b=i.coerceRef(t,e,m,x,\"pixel\");\"pixel\"!==b&&b!==y&&(b=e[x]=\"pixel\");var _=\"pixel\"===b?p[g]:.4;i.coercePosition(e,m,c,b,x,_)}c(v+\"anchor\"),c(v+\"shift\")}if(n.noneOrAll(t,e,[\"x\",\"y\"]),h&&n.noneOrAll(t,e,[\"ax\",\"ay\"]),f){var w=c(\"xclick\"),M=c(\"yclick\");e._xclick=void 0===w?e.x:i.cleanPosition(w,m,e.xref),e._yclick=void 0===M?e.y:i.cleanPosition(M,m,e.yref)}return e}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./attributes\":601,\"./common_defaults\":604}],600:[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,noRotate:!0},{path:\"M2,2V-2H-2V2Z\",backoff:0,noRotate:!0}]},{}],601:[function(t,e,r){\"use strict\";var n=t(\"./arrow_paths\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../plots/cartesian/constants\");e.exports={_isLinkedToArray:\"annotation\",visible:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},text:{valType:\"string\",editType:\"calcIfAutorange\"},textangle:{valType:\"angle\",dflt:0,editType:\"calcIfAutorange\"},font:i({editType:\"calcIfAutorange\",colorEditType:\"arraydraw\"}),width:{valType:\"number\",min:1,dflt:null,editType:\"calcIfAutorange\"},height:{valType:\"number\",min:1,dflt:null,editType:\"calcIfAutorange\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},align:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"center\",editType:\"arraydraw\"},valign:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\",editType:\"arraydraw\"},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},borderpad:{valType:\"number\",min:0,dflt:1,editType:\"calcIfAutorange\"},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"calcIfAutorange\"},showarrow:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},arrowcolor:{valType:\"color\",editType:\"arraydraw\"},arrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},startarrowhead:{valType:\"integer\",min:0,max:n.length,dflt:1,editType:\"arraydraw\"},arrowside:{valType:\"flaglist\",flags:[\"end\",\"start\"],extras:[\"none\"],dflt:\"end\",editType:\"arraydraw\"},arrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calcIfAutorange\"},startarrowsize:{valType:\"number\",min:.3,dflt:1,editType:\"calcIfAutorange\"},arrowwidth:{valType:\"number\",min:.1,editType:\"calcIfAutorange\"},standoff:{valType:\"number\",min:0,dflt:0,editType:\"calcIfAutorange\"},startstandoff:{valType:\"number\",min:0,dflt:0,editType:\"calcIfAutorange\"},ax:{valType:\"any\",editType:\"calcIfAutorange\"},ay:{valType:\"any\",editType:\"calcIfAutorange\"},axref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.x.toString()],editType:\"calc\"},ayref:{valType:\"enumerated\",dflt:\"pixel\",values:[\"pixel\",a.idRegex.y.toString()],editType:\"calc\"},xref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.x.toString()],editType:\"calc\"},x:{valType:\"any\",editType:\"calcIfAutorange\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"auto\",editType:\"calcIfAutorange\"},xshift:{valType:\"number\",dflt:0,editType:\"calcIfAutorange\"},yref:{valType:\"enumerated\",values:[\"paper\",a.idRegex.y.toString()],editType:\"calc\"},y:{valType:\"any\",editType:\"calcIfAutorange\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"calcIfAutorange\"},yshift:{valType:\"number\",dflt:0,editType:\"calcIfAutorange\"},clicktoshow:{valType:\"enumerated\",values:[!1,\"onoff\",\"onout\"],dflt:!1,editType:\"arraydraw\"},xclick:{valType:\"any\",editType:\"arraydraw\"},yclick:{valType:\"any\",editType:\"arraydraw\"},hovertext:{valType:\"string\",editType:\"arraydraw\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"arraydraw\"},bordercolor:{valType:\"color\",editType:\"arraydraw\"},font:i({editType:\"arraydraw\"}),editType:\"arraydraw\"},captureevents:{valType:\"boolean\",editType:\"arraydraw\"},editType:\"calc\",_deprecated:{ref:{valType:\"string\",editType:\"calc\"}}}},{\"../../plots/cartesian/constants\":794,\"../../plots/font_attributes\":816,\"./arrow_paths\":600}],602:[function(t,e,r){\"use strict\";function n(t){var e=t._fullLayout;i.filterVisible(e.annotations).forEach(function(e){var r,n,i,o,s=a.getFromId(t,e.xref),l=a.getFromId(t,e.yref),c=3*e.arrowsize*e.arrowwidth||0,u=3*e.startarrowsize*e.arrowwidth||0;s&&s.autorange&&(r=c+e.xshift,n=c-e.xshift,i=u+e.xshift,o=u-e.xshift,e.axref===e.xref?(a.expand(s,[s.r2c(e.x)],{ppadplus:r,ppadminus:n}),a.expand(s,[s.r2c(e.ax)],{ppadplus:Math.max(e._xpadplus,i),ppadminus:Math.max(e._xpadminus,o)})):(i=e.ax?i+e.ax:i,o=e.ax?o-e.ax:o,a.expand(s,[s.r2c(e.x)],{ppadplus:Math.max(e._xpadplus,r,i),ppadminus:Math.max(e._xpadminus,n,o)}))),l&&l.autorange&&(r=c-e.yshift,n=c+e.yshift,i=u-e.yshift,o=u+e.yshift,e.ayref===e.yref?(a.expand(l,[l.r2c(e.y)],{ppadplus:r,ppadminus:n}),a.expand(l,[l.r2c(e.ay)],{ppadplus:Math.max(e._ypadplus,i),ppadminus:Math.max(e._ypadminus,o)})):(i=e.ay?i+e.ay:i,o=e.ay?o-e.ay:o,a.expand(l,[l.r2c(e.y)],{ppadplus:Math.max(e._ypadplus,r,i),ppadminus:Math.max(e._ypadminus,n,o)})))})}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]=1,s[t.yref]=1});for(var l in s){var c=a.getFromId(t,l);if(c&&c.autorange)return i.syncOrAsync([o,n],t)}}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./draw\":607}],603:[function(t,e,r){\"use strict\";function n(t,e){var r,n,a,o,s,l,c,u=t._fullLayout.annotations,f=[],h=[],d=[],p=(e||[]).length;for(r=0;r<u.length;r++)if(a=u[r],o=a.clicktoshow){for(n=0;n<p;n++)if(s=e[n],l=s.xaxis,c=s.yaxis,l._id===a.xref&&c._id===a.yref&&l.d2r(s.x)===i(a._xclick,l)&&c.d2r(s.y)===i(a._yclick,c)){(a.visible?\"onout\"===o?h:d:f).push(r);break}n===p&&a.visible&&\"onout\"===o&&h.push(r)}return{on:f,off:h,explicitOff:d}}function i(t,e){return\"log\"===e.type?e.l2r(t):e.d2r(t)}var a=t(\"../../plotly\");e.exports={hasClickToShow:function(t,e){var r=n(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,i=n(t,e),o=i.on,s=i.off.concat(i.explicitOff),l={};if(o.length||s.length){for(r=0;r<o.length;r++)l[\"annotations[\"+o[r]+\"].visible\"]=!0;for(r=0;r<s.length;r++)l[\"annotations[\"+s[r]+\"].visible\"]=!1;return a.update(t,{},l)}}}},{\"../../plotly\":784}],604:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\");e.exports=function(t,e,r,a){a(\"opacity\");var o=a(\"bgcolor\"),s=a(\"bordercolor\"),l=i.opacity(s);a(\"borderpad\");var c=a(\"borderwidth\"),u=a(\"showarrow\");a(\"text\",u?\" \":r._dfltTitle.annotation),a(\"textangle\"),n.coerceFont(a,\"font\",r.font),a(\"width\"),a(\"align\");if(a(\"height\")&&a(\"valign\"),u){var f,h,d=a(\"arrowside\");-1!==d.indexOf(\"end\")&&(f=a(\"arrowhead\"),h=a(\"arrowsize\")),-1!==d.indexOf(\"start\")&&(a(\"startarrowhead\",f),a(\"startarrowsize\",h)),a(\"arrowcolor\",l?e.bordercolor:i.defaultLine),a(\"arrowwidth\",2*(l&&c||1)),a(\"standoff\"),a(\"startstandoff\")}var p=a(\"hovertext\"),m=r.hoverlabel||{};if(p){var g=a(\"hoverlabel.bgcolor\",m.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),v=a(\"hoverlabel.bordercolor\",m.bordercolor||i.contrast(g));n.coerceFont(a,\"hoverlabel.font\",{family:m.font.family,size:m.font.size,color:m.font.color||v})}a(\"captureevents\",!!p)}},{\"../../lib\":743,\"../color\":618}],605:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib/to_log_range\");e.exports=function(t,e,r,a){function o(t){var r=c[t],o=null;o=s?i(r,e.range):Math.pow(10,r),n(o)||(o=null),a(u+t,o)}e=e||{};var s=\"log\"===r&&\"linear\"===e.type,l=\"linear\"===r&&\"log\"===e.type;if(s||l)for(var c,u,f=t._fullLayout.annotations,h=e._id.charAt(0),d=0;d<f.length;d++)c=f[d],u=\"annotations[\"+d+\"].\",c[h+\"ref\"]===e._id&&o(h),c[\"a\"+h+\"ref\"]===e._id&&o(\"a\"+h)}},{\"../../lib/to_log_range\":768,\"fast-isnumeric\":140}],606:[function(t,e,r){\"use strict\";var n=t(\"../../plots/array_container_defaults\"),i=t(\"./annotation_defaults\");e.exports=function(t,e){n(t,e,{name:\"annotations\",handleItemDefaults:i})}},{\"../../plots/array_container_defaults\":786,\"./annotation_defaults\":599}],607:[function(t,e,r){\"use strict\";function n(t,e){var r=t._fullLayout.annotations[e]||{};i(t,r,e,!1,c.getFromId(t,r.xref),c.getFromId(t,r.yref))}function i(t,e,r,n,i,s){function c(r){return r.call(f.font,R).attr({\"text-anchor\":{left:\"start\",right:\"end\"}[e.align]||\"middle\"}),d.convertToTspans(r,t,v),r}function v(){function r(t,e){return\"auto\"===e&&(e=t<1/3?\"left\":t>2/3?\"right\":\"center\"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}var a=N.selectAll(\"a\");if(1===a.size()&&a.text()===N.text()){C.insert(\"a\",\":first-child\").attr({\"xlink:xlink:href\":a.attr(\"xlink:href\"),\"xlink:xlink:show\":a.attr(\"xlink:show\")}).style({cursor:\"pointer\"}).node().appendChild(P.node())}var c=C.select(\".annotation-text-math-group\"),h=!c.empty(),v=f.bBox((h?c:N).node()),y=v.width,L=v.height,D=e.width||y,R=e.height||L,j=Math.round(D+2*I),B=Math.round(R+2*I);e._w=D,e._h=R;for(var U=!1,V=[\"x\",\"y\"],q=0;q<V.length;q++){var H,G,Y,W,X,Z=V[q],J=e[Z+\"ref\"]||Z,K=e[\"a\"+Z+\"ref\"],Q={x:i,y:s}[Z],$=(A+(\"x\"===Z?0:-90))*Math.PI/180,tt=j*Math.cos($),et=B*Math.sin($),rt=Math.abs(tt)+Math.abs(et),nt=e[Z+\"anchor\"],it=e[Z+\"shift\"]*(\"x\"===Z?1:-1),at=k[Z];if(Q){var ot=Q.r2fraction(e[Z]);if((t._dragging||!Q.autorange)&&(ot<0||ot>1)&&(K===J?((ot=Q.r2fraction(e[\"a\"+Z]))<0||ot>1)&&(U=!0):U=!0,U))continue;H=Q._offset+Q.r2p(e[Z]),W=.5}else\"x\"===Z?(Y=e[Z],H=_.l+_.w*Y):(Y=1-e[Z],H=_.t+_.h*Y),W=e.showarrow?.5:Y;if(e.showarrow){at.head=H;var st=e[\"a\"+Z];X=tt*r(.5,e.xanchor)-et*r(.5,e.yanchor),K===J?(at.tail=Q._offset+Q.r2p(st),G=X):(at.tail=H+st,G=X+st),at.text=at.tail+X;var lt=b[\"x\"===Z?\"width\":\"height\"];if(\"paper\"===J&&(at.head=l.constrain(at.head,1,lt-1)),\"pixel\"===K){var ct=-Math.max(at.tail-3,at.text),ut=Math.min(at.tail+3,at.text)-lt;ct>0?(at.tail+=ct,at.text+=ct):ut>0&&(at.tail-=ut,at.text-=ut)}at.tail+=it,at.head+=it}else G=X=rt*r(W,nt),at.text=H+X;at.text+=it,X+=it,G+=it,e[\"_\"+Z+\"padplus\"]=rt/2+G,e[\"_\"+Z+\"padminus\"]=rt/2-G,e[\"_\"+Z+\"size\"]=rt,e[\"_\"+Z+\"shift\"]=X}if(U)C.remove();else{var ft=0,ht=0;if(\"left\"!==e.align&&(ft=(D-y)*(\"center\"===e.align?.5:1)),\"top\"!==e.valign&&(ht=(R-L)*(\"middle\"===e.valign?.5:1)),h)c.select(\"svg\").attr({x:I+ft-1,y:I+ht}).call(f.setClipUrl,O?M:null);else{var dt=I+ht-v.top,pt=I+ft-v.left;N.call(d.positionText,pt,dt).call(f.setClipUrl,O?M:null)}F.select(\"rect\").call(f.setRect,I,I,D,R),P.call(f.setRect,z/2,z/2,j-z,B-z),C.call(f.setTranslate,Math.round(k.x.text-j/2),Math.round(k.y.text-B/2)),S.attr({transform:\"rotate(\"+A+\",\"+k.x.text+\",\"+k.y.text+\")\"});var mt=function(r,a){T.selectAll(\".annotation-arrow-g\").remove();var c=k.x.head,h=k.y.head,d=k.x.tail+r,p=k.y.tail+a,v=k.x.text+r,y=k.y.text+a,b=l.rotationXYMatrix(A,v,y),M=l.apply2DTransform(b),E=l.apply2DTransform2(b),L=+P.attr(\"width\"),z=+P.attr(\"height\"),D=v-.5*L,I=D+L,O=y-.5*z,F=O+z,R=[[D,O,D,F],[D,F,I,F],[I,F,I,O],[I,O,D,O]].map(E);if(!R.reduce(function(t,e){return t^!!l.segmentsIntersect(c,h,c+1e6,h+1e6,e[0],e[1],e[2],e[3])},!1)){R.forEach(function(t){var e=l.segmentsIntersect(d,p,c,h,t[0],t[1],t[2],t[3]);e&&(d=e.x,p=e.y)});var N=e.arrowwidth,j=e.arrowcolor,B=e.arrowside,U=T.append(\"g\").style({opacity:u.opacity(j)}).classed(\"annotation-arrow-g\",!0),V=U.append(\"path\").attr(\"d\",\"M\"+d+\",\"+p+\"L\"+c+\",\"+h).style(\"stroke-width\",N+\"px\").call(u.stroke,u.rgb(j));if(g(V,B,e),w.annotationPosition&&V.node().parentNode&&!n){var q=c,H=h;if(e.standoff){var G=Math.sqrt(Math.pow(c-d,2)+Math.pow(h-p,2));q+=e.standoff*(d-c)/G,H+=e.standoff*(p-h)/G}var Y,W,X,Z=U.append(\"path\").classed(\"annotation-arrow\",!0).classed(\"anndrag\",!0).attr({d:\"M3,3H-3V-3H3ZM0,0L\"+(d-q)+\",\"+(p-H),transform:\"translate(\"+q+\",\"+H+\")\"}).style(\"stroke-width\",N+6+\"px\").call(u.stroke,\"rgba(0,0,0,0)\").call(u.fill,\"rgba(0,0,0,0)\");m.init({element:Z.node(),gd:t,prepFn:function(){var t=f.getTranslate(C);W=t.x,X=t.y,Y={},i&&i.autorange&&(Y[i._name+\".autorange\"]=!0),s&&s.autorange&&(Y[s._name+\".autorange\"]=!0)},moveFn:function(t,r){var n=M(W,X),a=n[0]+t,o=n[1]+r;C.call(f.setTranslate,a,o),Y[x+\".x\"]=i?i.p2r(i.r2p(e.x)+t):e.x+t/_.w,Y[x+\".y\"]=s?s.p2r(s.r2p(e.y)+r):e.y-r/_.h,e.axref===e.xref&&(Y[x+\".ax\"]=i.p2r(i.r2p(e.ax)+t)),e.ayref===e.yref&&(Y[x+\".ay\"]=s.p2r(s.r2p(e.ay)+r)),U.attr(\"transform\",\"translate(\"+t+\",\"+r+\")\"),S.attr({transform:\"rotate(\"+A+\",\"+a+\",\"+o+\")\"})},doneFn:function(){o.relayout(t,Y);var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&mt(0,0),E){var gt,vt;m.init({element:C.node(),gd:t,prepFn:function(){vt=S.attr(\"transform\"),gt={}},moveFn:function(t,r){var a=\"pointer\";if(e.showarrow)e.axref===e.xref?gt[x+\".ax\"]=i.p2r(i.r2p(e.ax)+t):gt[x+\".ax\"]=e.ax+t,e.ayref===e.yref?gt[x+\".ay\"]=s.p2r(s.r2p(e.ay)+r):gt[x+\".ay\"]=e.ay+r,mt(t,r);else{if(n)return;if(i)gt[x+\".x\"]=e.x+t/i._m;else{var o=e._xsize/_.w,l=e.x+(e._xshift-e.xshift)/_.w-o/2;gt[x+\".x\"]=m.align(l+t/_.w,o,0,1,e.xanchor)}if(s)gt[x+\".y\"]=e.y+r/s._m;else{var c=e._ysize/_.h,u=e.y-(e._yshift+e.yshift)/_.h-c/2;gt[x+\".y\"]=m.align(u-r/_.h,c,0,1,e.yanchor)}i&&s||(a=m.getCursor(i?.5:gt[x+\".x\"],s?.5:gt[x+\".y\"],e.xanchor,e.yanchor))}S.attr({transform:\"translate(\"+t+\",\"+r+\")\"+vt}),p(C,a)},doneFn:function(){p(C),o.relayout(t,gt);var e=document.querySelector(\".js-notes-box-panel\");e&&e.redraw(e.selectedObj)}})}}}var y,x,b=t._fullLayout,_=t._fullLayout._size,w=t._context.edits;n?(y=\"annotation-\"+n,x=n+\".annotations[\"+r+\"]\"):(y=\"annotation\",x=\"annotations[\"+r+\"]\"),b._infolayer.selectAll(\".\"+y+'[data-index=\"'+r+'\"]').remove();var M=\"clip\"+b._uid+\"_ann\"+r;if(e._input&&!1!==e.visible){var k={x:{},y:{}},A=+e.textangle||0,T=b._infolayer.append(\"g\").classed(y,!0).attr(\"data-index\",String(r)).style(\"opacity\",e.opacity),S=T.append(\"g\").classed(\"annotation-text-g\",!0),E=w[e.showarrow?\"annotationTail\":\"annotationPosition\"],L=e.captureevents||w.annotationText||E,C=S.append(\"g\").style(\"pointer-events\",L?\"all\":null).call(p,\"default\").on(\"click\",function(){t._dragging=!1;var i={index:r,annotation:e._input,fullAnnotation:e,event:a.event};n&&(i.subplotId=n),t.emit(\"plotly_clickannotation\",i)});e.hovertext&&C.on(\"mouseover\",function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();h.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:t})}).on(\"mouseout\",function(){h.loneUnhover(b._hoverlayer.node())});var z=e.borderwidth,D=e.borderpad,I=z+D,P=C.append(\"rect\").attr(\"class\",\"bg\").style(\"stroke-width\",z+\"px\").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),O=e.width||e.height,F=b._topclips.selectAll(\"#\"+M).data(O?[0]:[]);F.enter().append(\"clipPath\").classed(\"annclip\",!0).attr(\"id\",M).append(\"rect\"),F.exit().remove();var R=e.font,N=C.append(\"text\").classed(\"annotation-text\",!0).text(e.text);w.annotationText?N.call(d.makeEditable,{delegate:C,gd:t}).call(c).on(\"edit\",function(r){e.text=r,this.call(c);var n={};n[x+\".text\"]=e.text,i&&i.autorange&&(n[i._name+\".autorange\"]=!0),s&&s.autorange&&(n[s._name+\".autorange\"]=!0),o.relayout(t,n)}):N.call(c)}else a.selectAll(\"#\"+M).remove()}var a=t(\"d3\"),o=t(\"../../plotly\"),s=t(\"../../plots/plots\"),l=t(\"../../lib\"),c=t(\"../../plots/cartesian/axes\"),u=t(\"../color\"),f=t(\"../drawing\"),h=t(\"../fx\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib/setcursor\"),m=t(\"../dragelement\"),g=t(\"./draw_arrow_head\");e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(\".annotation\").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&n(t,r);return s.previousPromises(t)},drawOne:n,drawRaw:i}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../../plots/plots\":852,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"../fx\":660,\"./draw_arrow_head\":608,d3:128}],608:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../color\"),a=t(\"./arrow_paths\");e.exports=function(t,e,r){function o(){t.style(\"stroke-dasharray\",\"0px,100px\")}function s(e,a,o,s){e.path&&(e.noRotate&&(o=0),n.select(h.parentNode).append(\"path\").attr({class:t.attr(\"class\"),d:e.path,transform:\"translate(\"+a.x+\",\"+a.y+\")\"+(o?\"rotate(\"+180*o/Math.PI+\")\":\"\")+\"scale(\"+s+\")\"}).style({fill:i.rgb(r.arrowcolor),\"stroke-width\":0}))}var l,c,u,f,h=t.node(),d=a[r.arrowhead||0],p=a[r.startarrowhead||0],m=(r.arrowwidth||1)*(r.arrowsize||1),g=(r.arrowwidth||1)*(r.startarrowsize||1),v=e.indexOf(\"start\")>=0,y=e.indexOf(\"end\")>=0,x=d.backoff*m+r.standoff,b=p.backoff*g+r.startstandoff;if(\"line\"===h.nodeName){l={x:+t.attr(\"x1\"),y:+t.attr(\"y1\")},c={x:+t.attr(\"x2\"),y:+t.attr(\"y2\")};var _=l.x-c.x,w=l.y-c.y;if(u=Math.atan2(w,_),f=u+Math.PI,x&&b&&x+b>Math.sqrt(_*_+w*w))return void o();if(x){if(x*x>_*_+w*w)return void o();var M=x*Math.cos(u),k=x*Math.sin(u);c.x+=M,c.y+=k,t.attr({x2:c.x,y2:c.y})}if(b){if(b*b>_*_+w*w)return void o();var A=b*Math.cos(u),T=b*Math.sin(u);l.x-=A,l.y-=T,t.attr({x1:l.x,y1:l.y})}}else if(\"path\"===h.nodeName){var S=h.getTotalLength(),E=\"\";if(S<x+b)return void o();var L=h.getPointAtLength(0),C=h.getPointAtLength(.1);u=Math.atan2(L.y-C.y,L.x-C.x),l=h.getPointAtLength(Math.min(b,S)),E=\"0px,\"+b+\"px,\";var z=h.getPointAtLength(S),D=h.getPointAtLength(S-.1);f=Math.atan2(z.y-D.y,z.x-D.x),c=h.getPointAtLength(Math.max(0,S-x));E+=S-(E?b+x:x)+\"px,\"+S+\"px\",t.style(\"stroke-dasharray\",E)}v&&s(p,l,u,g),y&&s(d,c,f,m)}},{\"../color\":618,\"./arrow_paths\":600,d3:128}],609:[function(t,e,r){\"use strict\";var n=t(\"./draw\"),i=t(\"./click\");e.exports={moduleType:\"component\",name:\"annotations\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"annotations\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":601,\"./calc_autorange\":602,\"./click\":603,\"./convert_coords\":605,\"./defaults\":606,\"./draw\":607}],610:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../plot_api/edit_types\").overrideAll;e.exports=i({_isLinkedToArray:\"annotation\",visible:n.visible,x:{valType:\"any\"},y:{valType:\"any\"},z:{valType:\"any\"},ax:{valType:\"number\"},ay:{valType:\"number\"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents},\"calc\",\"from-root\")},{\"../../plot_api/edit_types\":773,\"../annotations/attributes\":601}],611:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\");e.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)!function(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:\"linear\",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t.pdata[0]/t.pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t.pdata[1]/t.pdata[3])*a.h*(r.y[1]-r.y[0])}}(e[r],t);t.fullLayout._infolayer.selectAll(\".annotation-\"+t.id).remove()}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789}],612:[function(t,e,r){\"use strict\";function n(t,e,r,n,o){function c(r,n){return i.coerce(t,e,l,r,n)}function u(t){var n=t+\"axis\",i={_fullLayout:{}};return i._fullLayout[n]=r[n],a.coercePosition(e,i,c,t,t,.5)}return c(\"visible\",!o.itemIsNotPlainObject)?(s(t,e,n.fullLayout,c),u(\"x\"),u(\"y\"),u(\"z\"),i.noneOrAll(t,e,[\"x\",\"y\",\"z\"]),e.xref=\"x\",e.yref=\"y\",e.zref=\"z\",c(\"xanchor\"),c(\"yanchor\"),c(\"xshift\"),c(\"yshift\"),e.showarrow&&(e.axref=\"pixel\",e.ayref=\"pixel\",c(\"ax\",-10),c(\"ay\",-30),i.noneOrAll(t,e,[\"ax\",\"ay\"])),e):e}var i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/array_container_defaults\"),s=t(\"../annotations/common_defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r){o(t,e,{name:\"annotations\",handleItemDefaults:n,fullLayout:r.fullLayout})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"../../plots/cartesian/axes\":789,\"../annotations/common_defaults\":604,\"./attributes\":610}],613:[function(t,e,r){\"use strict\";var n=t(\"../annotations/draw\").drawRaw,i=t(\"../../plots/gl3d/project\"),a=[\"x\",\"y\",\"z\"];e.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var f=a[u],h=l[f],d=e[f+\"axis\"].r2fraction(h);if(d<0||d>1){c=!0;break}}c?t.fullLayout._infolayer.select(\".annotation-\"+t.id+'[data-index=\"'+s+'\"]').remove():(l.pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{\"../../plots/gl3d/project\":841,\"../annotations/draw\":607}],614:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports={moduleType:\"component\",name:\"annotations3d\",schema:{subplots:{scene:{annotations:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:t(\"./convert\"),draw:t(\"./draw\")}},{\"../../lib\":743,\"../../registry\":873,\"./attributes\":610,\"./convert\":611,\"./defaults\":612,\"./draw\":613}],615:[function(t,e,r){\"use strict\";e.exports=t(\"world-calendars/dist/main\"),t(\"world-calendars/dist/plus\"),t(\"world-calendars/dist/calendars/chinese\"),t(\"world-calendars/dist/calendars/coptic\"),t(\"world-calendars/dist/calendars/discworld\"),t(\"world-calendars/dist/calendars/ethiopian\"),t(\"world-calendars/dist/calendars/hebrew\"),t(\"world-calendars/dist/calendars/islamic\"),t(\"world-calendars/dist/calendars/julian\"),t(\"world-calendars/dist/calendars/mayan\"),t(\"world-calendars/dist/calendars/nanakshahi\"),t(\"world-calendars/dist/calendars/nepali\"),t(\"world-calendars/dist/calendars/persian\"),t(\"world-calendars/dist/calendars/taiwan\"),t(\"world-calendars/dist/calendars/thai\"),t(\"world-calendars/dist/calendars/ummalqura\")},{\"world-calendars/dist/calendars/chinese\":581,\"world-calendars/dist/calendars/coptic\":582,\"world-calendars/dist/calendars/discworld\":583,\"world-calendars/dist/calendars/ethiopian\":584,\"world-calendars/dist/calendars/hebrew\":585,\"world-calendars/dist/calendars/islamic\":586,\"world-calendars/dist/calendars/julian\":587,\"world-calendars/dist/calendars/mayan\":588,\"world-calendars/dist/calendars/nanakshahi\":589,\"world-calendars/dist/calendars/nepali\":590,\"world-calendars/dist/calendars/persian\":591,\"world-calendars/dist/calendars/taiwan\":592,\"world-calendars/dist/calendars/thai\":593,\"world-calendars/dist/calendars/ummalqura\":594,\"world-calendars/dist/main\":595,\"world-calendars/dist/plus\":596}],616:[function(t,e,r){\"use strict\";function n(t){var e=m[t];return e||(e=m[t]=o.instance(t))}function i(t){return s.extendFlat({},f,{description:t})}function a(t){return\"Sets the calendar system to use with `\"+t+\"` date data.\"}var o=t(\"./calendars\"),s=t(\"../../lib\"),l=t(\"../../constants/numerical\"),c=l.EPOCHJD,u=l.ONEDAY,f={valType:\"enumerated\",values:Object.keys(o.calendars),editType:\"calc\",dflt:\"gregorian\"},h=function(t,e,r,n){var i={};return i[r]=f,s.coerce(t,e,i,r,n)},d=\"##\",p={d:{0:\"dd\",\"-\":\"d\"},e:{0:\"d\",\"-\":\"d\"},a:{0:\"D\",\"-\":\"D\"},A:{0:\"DD\",\"-\":\"DD\"},j:{0:\"oo\",\"-\":\"o\"},W:{0:\"ww\",\"-\":\"w\"},m:{0:\"mm\",\"-\":\"m\"},b:{0:\"M\",\"-\":\"M\"},B:{0:\"MM\",\"-\":\"MM\"},y:{0:\"yy\",\"-\":\"yy\"},Y:{0:\"yyyy\",\"-\":\"yyyy\"},U:d,w:d,c:{0:\"D M d %X yyyy\",\"-\":\"D M d %X yyyy\"},x:{0:\"mm/dd/yyyy\",\"-\":\"mm/dd/yyyy\"}},m={},g={xcalendar:i(a(\"x\"))},v=s.extendFlat({},g,{ycalendar:i(a(\"y\"))}),y=s.extendFlat({},v,{zcalendar:i(a(\"z\"))}),x=i([\"Sets the calendar system to use for `range` and `tick0`\",\"if this is a date axis. This does not set the calendar for\",\"interpreting data on this axis, that's specified in the trace\",\"or via the global `layout.calendar`\"].join(\" \"));e.exports={moduleType:\"component\",name:\"calendars\",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:g,candlestick:g},layout:{calendar:i([\"Sets the default calendar system to use for interpreting and\",\"displaying dates throughout the plot.\"].join(\" \"))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:i([\"Sets the calendar system to use for `value`, if it is a date.\"].join(\" \")),targetcalendar:i([\"Sets the calendar system to use for `target`, if it is an\",\"array of dates. If `target` is a string (eg *x*) we use the\",\"corresponding trace attribute (eg `xcalendar`) if it exists,\",\"even if `targetcalendar` is provided.\"].join(\" \"))}}},layoutAttributes:f,handleDefaults:h,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)h(t,e,r[i]+\"calendar\",n.calendar)},CANONICAL_SUNDAY:{chinese:\"2000-01-02\",coptic:\"2000-01-03\",discworld:\"2000-01-03\",ethiopian:\"2000-01-05\",hebrew:\"5000-01-01\",islamic:\"1000-01-02\",julian:\"2000-01-03\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-05\",nepali:\"2000-01-05\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-04\",thai:\"2000-01-04\",ummalqura:\"1400-01-06\"},CANONICAL_TICK:{chinese:\"2000-01-01\",coptic:\"2000-01-01\",discworld:\"2000-01-01\",ethiopian:\"2000-01-01\",hebrew:\"5000-01-01\",islamic:\"1000-01-01\",julian:\"2000-01-01\",mayan:\"5000-01-01\",nanakshahi:\"1000-01-01\",nepali:\"2000-01-01\",persian:\"1000-01-01\",jalali:\"1000-01-01\",taiwan:\"1000-01-01\",thai:\"2000-01-01\",ummalqura:\"1400-01-01\"},DFLTRANGE:{chinese:[\"2000-01-01\",\"2001-01-01\"],coptic:[\"1700-01-01\",\"1701-01-01\"],discworld:[\"1800-01-01\",\"1801-01-01\"],ethiopian:[\"2000-01-01\",\"2001-01-01\"],hebrew:[\"5700-01-01\",\"5701-01-01\"],islamic:[\"1400-01-01\",\"1401-01-01\"],julian:[\"2000-01-01\",\"2001-01-01\"],mayan:[\"5200-01-01\",\"5201-01-01\"],nanakshahi:[\"0500-01-01\",\"0501-01-01\"],nepali:[\"2000-01-01\",\"2001-01-01\"],persian:[\"1400-01-01\",\"1401-01-01\"],jalali:[\"1400-01-01\",\"1401-01-01\"],taiwan:[\"0100-01-01\",\"0101-01-01\"],thai:[\"2500-01-01\",\"2501-01-01\"],ummalqura:[\"1400-01-01\",\"1401-01-01\"]},getCal:n,worldCalFmt:function(t,e,r){for(var i,a,o,s,l,f=Math.floor((e+.05)/u)+c,h=n(r).fromJD(f),m=0;-1!==(m=t.indexOf(\"%\",m));)\"0\"===(i=t.charAt(m+1))||\"-\"===i||\"_\"===i?(o=3,a=t.charAt(m+2),\"_\"===i&&(i=\"-\")):(a=i,i=\"0\",o=2),(s=p[a])?(l=s===d?d:h.formatDate(s[i]),t=t.substr(0,m)+l+t.substr(m+o),m+=l.length):m+=o;return t}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./calendars\":615}],617:[function(t,e,r){\"use strict\";r.defaults=[\"#1f77b4\",\"#ff7f0e\",\"#2ca02c\",\"#d62728\",\"#9467bd\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\",\"#17becf\"],r.defaultLine=\"#444\",r.lightLine=\"#eee\",r.background=\"#fff\",r.borderLine=\"#BEC8D9\",r.lightFraction=1e3/11},{}],618:[function(t,e,r){\"use strict\";function n(t){if(a(t)||\"string\"!=typeof t)return t;var e=t.trim();if(\"rgb\"!==e.substr(0,3))return t;var r=e.match(/^rgba?\\s*\\(([^()]*)\\)$/);if(!r)return t;var n=r[1].trim().split(/\\s*[\\s,]\\s*/),i=\"a\"===e.charAt(3)&&4===n.length;if(!i&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=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 c=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||c).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);1!==n.getAlpha()&&(n=i(o.combine(t,c)));return(n.isDark()?e?n.lighten(e):c: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;e<s.length;e++)if(i=s[e],a=t[i],\"color\"===i.substr(i.length-5))if(Array.isArray(a))for(r=0;r<a.length;r++)a[r]=n(a[r]);else t[i]=n(a);else if(\"colorscale\"===i.substr(i.length-10)&&Array.isArray(a))for(r=0;r<a.length;r++)Array.isArray(a[r])&&(a[r][1]=n(a[r][1]));else if(Array.isArray(a)){var l=a[0];if(!Array.isArray(l)&&l&&\"object\"==typeof l)for(r=0;r<a.length;r++)o.clean(a[r])}else a&&\"object\"==typeof a&&o.clean(a)}}},{\"./attributes\":617,\"fast-isnumeric\":140,tinycolor2:546}],619:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/layout_attributes\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll;e.exports=o({thicknessmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"pixels\"},thickness:{valType:\"number\",min:0,dflt:30},lenmode:{valType:\"enumerated\",values:[\"fraction\",\"pixels\"],dflt:\"fraction\"},len:{valType:\"number\",min:0,dflt:1},x:{valType:\"number\",dflt:1.02,min:-2,max:3},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\"},xpad:{valType:\"number\",min:0,dflt:10},y:{valType:\"number\",dflt:.5,min:-2,max:3},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"middle\"},ypad:{valType:\"number\",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:\"number\",min:0,dflt:0},bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:\"\"}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{valType:\"string\"},titlefont:i({}),titleside:{valType:\"enumerated\",values:[\"right\",\"top\",\"bottom\"],dflt:\"top\"}},\"colorbars\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/font_attributes\":816}],620:[function(t,e,r){\"use strict\";e.exports={cn:{colorbar:\"colorbar\",cbbg:\"cbbg\",cbfill:\"cbfill\",cbfills:\"cbfills\",cbline:\"cbline\",cblines:\"cblines\",cbaxis:\"cbaxis\",cbtitleunshift:\"cbtitleunshift\",cbtitle:\"cbtitle\",cboutline:\"cboutline\",crisp:\"crisp\",jsPlaceholder:\"js-placeholder\"}}},{}],621:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/tick_value_defaults\"),a=t(\"../../plots/cartesian/tick_mark_defaults\"),o=t(\"../../plots/cartesian/tick_label_defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r){function l(t,e){return n.coerce(u,c,s,t,e)}var c=e.colorbar={},u=t.colorbar||{};l(\"thickness\",\"fraction\"===l(\"thicknessmode\")?30/(r.width-r.margin.l-r.margin.r):30);l(\"len\",\"fraction\"===l(\"lenmode\")?1:r.height-r.margin.t-r.margin.b),l(\"x\"),l(\"xanchor\"),l(\"xpad\"),l(\"y\"),l(\"yanchor\"),l(\"ypad\"),n.noneOrAll(u,c,[\"x\",\"y\"]),l(\"outlinecolor\"),l(\"outlinewidth\"),l(\"bordercolor\"),l(\"borderwidth\"),l(\"bgcolor\"),i(u,c,l,\"linear\"),o(u,c,l,\"linear\",{outerTicks:!1,font:r.font,noHover:!0}),a(u,c,l,\"linear\",{outerTicks:!1,font:r.font,noHover:!0}),l(\"title\",r._dfltTitle.colorbar),n.coerceFont(l,\"titlefont\",r.font),l(\"titleside\")}},{\"../../lib\":743,\"../../plots/cartesian/tick_label_defaults\":809,\"../../plots/cartesian/tick_mark_defaults\":810,\"../../plots/cartesian/tick_value_defaults\":811,\"./attributes\":619}],622:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"tinycolor2\"),a=t(\"../../plotly\"),o=t(\"../../plots/plots\"),s=t(\"../../registry\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../dragelement\"),u=t(\"../../lib\"),f=t(\"../../lib/extend\").extendFlat,h=t(\"../../lib/setcursor\"),d=t(\"../drawing\"),p=t(\"../color\"),m=t(\"../titles\"),g=t(\"../../lib/svg_text_utils\"),v=t(\"../../constants/alignment\").LINE_SPACING,y=t(\"../../plots/cartesian/axis_defaults\"),x=t(\"../../plots/cartesian/position_defaults\"),b=t(\"../../plots/cartesian/layout_attributes\"),_=t(\"./attributes\"),w=t(\"./constants\").cn;e.exports=function(t,e){function r(){function _(t,e){return u.coerce(tt,et,b,t,e)}function A(e,r){var n,i=M();n=s.traceIs(i,\"markerColorscale\")?\"marker.colorbar.title\":\"colorbar.title\";var a={propContainer:et,propName:n,traceIndex:i.index,placeholder:T._dfltTitle.colorbar,containerGroup:st.select(\".cbtitle\")},o=\"h\"===e.charAt(0)?e.substr(1):\"h\"+e;st.selectAll(\".\"+o+\",.\"+o+\"-math-group\").remove(),m.draw(t,e,f(a,r||{}))}var T=t._fullLayout,S=T._size;if(\"function\"==typeof k.fillcolor||\"function\"==typeof k.line.color){var E,L,C=n.extent((\"function\"==typeof k.fillcolor?k.fillcolor:k.line.color).domain()),z=[],D=[],I=\"function\"==typeof k.line.color?k.line.color:function(){return k.line.color},P=\"function\"==typeof k.fillcolor?k.fillcolor:function(){return k.fillcolor},O=k.levels.end+k.levels.size/100,F=k.levels.size,R=1.001*C[0]-.001*C[1],N=1.001*C[1]-.001*C[0];for(L=0;L<1e5&&(E=k.levels.start+L*F,!(F>0?E>=O:E<=O));L++)E>R&&E<N&&z.push(E);if(\"function\"==typeof k.fillcolor)if(k.filllevels)for(O=k.filllevels.end+k.filllevels.size/100,F=k.filllevels.size,L=0;L<1e5&&(E=k.filllevels.start+L*F,!(F>0?E>=O:E<=O));L++)E>C[0]&&E<C[1]&&D.push(E);else(D=z.map(function(t){return t-k.levels.size/2})).push(D[D.length-1]+k.levels.size);else k.fillcolor&&\"string\"==typeof k.fillcolor&&(D=[0]);k.levels.size<0&&(z.reverse(),D.reverse());var j,B=T.height-T.margin.t-T.margin.b,U=T.width-T.margin.l-T.margin.r,V=Math.round(k.thickness*(\"fraction\"===k.thicknessmode?U:1)),q=V/S.w,H=Math.round(k.len*(\"fraction\"===k.lenmode?B:1)),G=H/S.h,Y=k.xpad/S.w,W=(k.borderwidth+k.outlinewidth)/2,X=k.ypad/S.h,Z=Math.round(k.x*S.w+k.xpad),J=k.x-q*({middle:.5,right:1}[k.xanchor]||0),K=k.y+G*(({top:-.5,bottom:.5}[k.yanchor]||0)-.5),Q=Math.round(S.h*(1-K)),$=Q-H,tt={type:\"linear\",range:C,tickmode:k.tickmode,nticks:k.nticks,tick0:k.tick0,dtick:k.dtick,tickvals:k.tickvals,ticktext:k.ticktext,ticks:k.ticks,ticklen:k.ticklen,tickwidth:k.tickwidth,tickcolor:k.tickcolor,showticklabels:k.showticklabels,tickfont:k.tickfont,tickangle:k.tickangle,tickformat:k.tickformat,exponentformat:k.exponentformat,separatethousands:k.separatethousands,showexponent:k.showexponent,showtickprefix:k.showtickprefix,tickprefix:k.tickprefix,showticksuffix:k.showticksuffix,ticksuffix:k.ticksuffix,title:k.title,titlefont:k.titlefont,showline:!0,anchor:\"free\",position:1},et={type:\"linear\",_id:\"y\"+e},rt={letter:\"y\",font:T.font,noHover:!0,calendar:T.calendar};if(y(tt,et,_,rt,T),x(tt,et,_,rt),et.position=k.x+Y+q,r.axis=et,-1!==[\"top\",\"bottom\"].indexOf(k.titleside)&&(et.titleside=k.titleside,et.titlex=k.x+Y,et.titley=K+(\"top\"===k.titleside?G-X:X)),k.line.color&&\"auto\"===k.tickmode){et.tickmode=\"linear\",et.tick0=k.levels.start;var nt=k.levels.size,it=u.constrain((Q-$)/50,4,15)+1,at=(C[1]-C[0])/((k.nticks||it)*nt);if(at>1){var ot=Math.pow(10,Math.floor(Math.log(at)/Math.LN10));nt*=ot*u.roundUp(at/ot,[2,5,10]),(Math.abs(k.levels.start)/k.levels.size+1e-6)%1<2e-6&&(et.tick0=0)}et.dtick=nt}et.domain=[K+X,K+G-X],et.setScale();var st=T._infolayer.selectAll(\"g.\"+e).data([0]);st.enter().append(\"g\").classed(e,!0).classed(w.colorbar,!0).each(function(){var t=n.select(this);t.append(\"rect\").classed(w.cbbg,!0),t.append(\"g\").classed(w.cbfills,!0),t.append(\"g\").classed(w.cblines,!0),t.append(\"g\").classed(w.cbaxis,!0).classed(w.crisp,!0),t.append(\"g\").classed(w.cbtitleunshift,!0).append(\"g\").classed(w.cbtitle,!0),t.append(\"rect\").classed(w.cboutline,!0),t.select(\".cbtitle\").datum(0)}),st.attr(\"transform\",\"translate(\"+Math.round(S.l)+\",\"+Math.round(S.t)+\")\");var lt=st.select(\".cbtitleunshift\").attr(\"transform\",\"translate(-\"+Math.round(S.l)+\",-\"+Math.round(S.t)+\")\");et._axislayer=st.select(\".cbaxis\");var ct=0;if(-1!==[\"top\",\"bottom\"].indexOf(k.titleside)){var ut,ft=S.l+(k.x+Y)*S.w,ht=et.titlefont.size;ut=\"top\"===k.titleside?(1-(K+G-X))*S.h+S.t+3+.75*ht:(1-(K+X))*S.h+S.t-3-.25*ht,A(et._id+\"title\",{attributes:{x:ft,y:ut,\"text-anchor\":\"start\"}})}var dt=u.syncOrAsync([o.previousPromises,function(){if(-1!==[\"top\",\"bottom\"].indexOf(k.titleside)){var e=st.select(\".cbtitle\"),r=e.select(\"text\"),a=[-k.outlinewidth/2,k.outlinewidth/2],o=e.select(\".h\"+et._id+\"title-math-group\").node(),s=15.6;if(r.node()&&(s=parseInt(r.node().style.fontSize,10)*v),o?(ct=d.bBox(o).height)>s&&(a[1]-=(ct-s)/2):r.node()&&!r.classed(w.jsPlaceholder)&&(ct=d.bBox(r.node()).height),ct){if(ct+=5,\"top\"===k.titleside)et.domain[1]-=ct/S.h,a[1]*=-1;else{et.domain[0]+=ct/S.h;var c=g.lineCount(r);a[1]+=(1-c)*s}e.attr(\"transform\",\"translate(\"+a+\")\"),et.setScale()}}st.selectAll(\".cbfills,.cblines\").attr(\"transform\",\"translate(0,\"+Math.round(S.h*(1-et.domain[1]))+\")\"),et._axislayer.attr(\"transform\",\"translate(0,\"+Math.round(-S.t)+\")\");var f=st.select(\".cbfills\").selectAll(\"rect.cbfill\").data(D);f.enter().append(\"rect\").classed(w.cbfill,!0).style(\"stroke\",\"none\"),f.exit().remove(),f.each(function(t,e){var r=[0===e?C[0]:(D[e]+D[e-1])/2,e===D.length-1?C[1]:(D[e]+D[e+1])/2].map(et.c2p).map(Math.round);e!==D.length-1&&(r[1]+=r[1]>r[0]?1:-1);var a=P(t).replace(\"e-\",\"\"),o=i(a).toHexString();n.select(this).attr({x:Z,width:Math.max(V,2),y:n.min(r),height:Math.max(n.max(r)-n.min(r),2),fill:o})});var h=st.select(\".cblines\").selectAll(\"path.cbline\").data(k.line.color&&k.line.width?z:[]);return h.enter().append(\"path\").classed(w.cbline,!0),h.exit().remove(),h.each(function(t){n.select(this).attr(\"d\",\"M\"+Z+\",\"+(Math.round(et.c2p(t))+k.line.width/2%1)+\"h\"+V).call(d.lineGroupStyle,k.line.width,I(t),k.line.dash)}),et._axislayer.selectAll(\"g.\"+et._id+\"tick,path\").remove(),et._pos=Z+V+(k.outlinewidth||0)/2-(\"outside\"===k.ticks?1:0),et.side=\"right\",u.syncOrAsync([function(){return l.doTicks(t,et,!0)},function(){if(-1===[\"top\",\"bottom\"].indexOf(k.titleside)){var e=et.titlefont.size,r=et._offset+et._length/2,i=S.l+(et.position||0)*S.w+(\"right\"===et.side?10+e*(et.showticklabels?1:.5):-10-e*(et.showticklabels?.5:0));A(\"h\"+et._id+\"title\",{avoid:{selection:n.select(t).selectAll(\"g.\"+et._id+\"tick\"),side:k.titleside,offsetLeft:S.l,offsetTop:0,maxShift:T.width},attributes:{x:i,y:r,\"text-anchor\":\"middle\"},transform:{rotate:\"-90\",offset:0}})}}])},o.previousPromises,function(){var r=V+k.outlinewidth/2+d.bBox(et._axislayer.node()).width;if((j=lt.select(\"text\")).node()&&!j.classed(w.jsPlaceholder)){var n,i=lt.select(\".h\"+et._id+\"title-math-group\").node();n=i&&-1!==[\"top\",\"bottom\"].indexOf(k.titleside)?d.bBox(i).width:d.bBox(lt.node()).right-Z-S.l,r=Math.max(r,n)}var a=2*k.xpad+r+k.borderwidth+k.outlinewidth/2,s=Q-$;st.select(\".cbbg\").attr({x:Z-k.xpad-(k.borderwidth+k.outlinewidth)/2,y:$-W,width:Math.max(a,2),height:Math.max(s+2*W,2)}).call(p.fill,k.bgcolor).call(p.stroke,k.bordercolor).style({\"stroke-width\":k.borderwidth}),st.selectAll(\".cboutline\").attr({x:Z,y:$+k.ypad+(\"top\"===k.titleside?ct:0),width:Math.max(V,2),height:Math.max(s-2*k.ypad-ct,2)}).call(p.stroke,k.outlinecolor).style({fill:\"None\",\"stroke-width\":k.outlinewidth});var l=({center:.5,right:1}[k.xanchor]||0)*a;st.attr(\"transform\",\"translate(\"+(S.l-l)+\",\"+S.t+\")\"),o.autoMargin(t,e,{x:k.x,y:k.y,l:a*({right:1,center:.5}[k.xanchor]||0),r:a*({left:1,center:.5}[k.xanchor]||0),t:s*({bottom:1,middle:.5}[k.yanchor]||0),b:s*({top:1,middle:.5}[k.yanchor]||0)})}],t);if(dt&&dt.then&&(t._promises||[]).push(dt),t._context.edits.colorbarPosition){var pt,mt,gt;c.init({element:st.node(),gd:t,prepFn:function(){pt=st.attr(\"transform\"),h(st)},moveFn:function(t,e){st.attr(\"transform\",pt+\" translate(\"+t+\",\"+e+\")\"),mt=c.align(J+t/S.w,q,0,1,k.xanchor),gt=c.align(K-e/S.h,G,0,1,k.yanchor);var r=c.getCursor(mt,gt,k.xanchor,k.yanchor);h(st,r)},doneFn:function(){h(st),void 0!==mt&&void 0!==gt&&a.restyle(t,{\"colorbar.x\":mt,\"colorbar.y\":gt},M().index)}})}return dt}T._infolayer.selectAll(\"g.\"+e).remove()}function M(){var r,n,i=e.substr(2);for(r=0;r<t._fullData.length;r++)if((n=t._fullData[r]).uid===i)return n}var k={};return Object.keys(_).forEach(function(t){k[t]=null}),k.fillcolor=null,k.line={color:null,width:null,dash:null},k.levels={start:null,end:null,size:null},k.filllevels=null,Object.keys(k).forEach(function(t){r[t]=function(e){return arguments.length?(k[t]=u.isPlainObject(k[t])?u.extendFlat(k[t],e):e,r):k[t]}}),r.options=function(t){return Object.keys(t).forEach(function(e){\"function\"==typeof r[e]&&r[e](t[e])}),r},r._opts=k,r}},{\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/extend\":732,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/axis_defaults\":791,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/cartesian/position_defaults\":805,\"../../plots/plots\":852,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"../titles\":709,\"./attributes\":619,\"./constants\":620,d3:128,tinycolor2:546}],623:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{\"../../lib\":743}],624:[function(t,e,r){\"use strict\";e.exports={zauto:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{zmin:void 0,zmax:void 0}},zmin:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{zauto:!1}},zmax:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{zauto:!1}},colorscale:{valType:\"colorscale\",editType:\"calc\",impliedEdits:{autocolorscale:!1}},autocolorscale:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{colorscale:void 0}},reversescale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},showscale:{valType:\"boolean\",dflt:!0,editType:\"calc\"}}},{}],625:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./scales\"),a=t(\"./flip_scale\");e.exports=function(t,e,r,o){var s,l;r?(s=n.nestedProperty(t,r).get(),l=n.nestedProperty(t._input,r).get()):(s=t,l=t._input);var c=o+\"auto\",u=o+\"min\",f=o+\"max\",h=s[c],d=s[u],p=s[f],m=s.colorscale;!1===h&&void 0!==d||(d=n.aggNums(Math.min,null,e)),!1===h&&void 0!==p||(p=n.aggNums(Math.max,null,e)),d===p&&(d-=.5,p+=.5),s[u]=d,s[f]=p,l[u]=d,l[f]=p,l[c]=!1!==h||void 0===d&&void 0===p,s.autocolorscale&&(m=d*p<0?i.RdBu:d>=0?i.Reds:i.Blues,l.colorscale=m,s.reversescale&&(m=a(m)),s.colorscale=m)}},{\"../../lib\":743,\"./flip_scale\":630,\"./scales\":637}],626:[function(t,e,r){\"use strict\";var n=t(\"./attributes\"),i=t(\"../../lib/extend\").extendFlat;t(\"./scales.js\");e.exports=function(t,e,r){return{color:{valType:\"color\",arrayOk:!0,editType:e||\"style\"},colorscale:i({},n.colorscale,{}),cauto:i({},n.zauto,{impliedEdits:{cmin:void 0,cmax:void 0}}),cmax:i({},n.zmax,{editType:e||n.zmax.editType,impliedEdits:{cauto:!1}}),cmin:i({},n.zmin,{editType:e||n.zmin.editType,impliedEdits:{cauto:!1}}),autocolorscale:i({},n.autocolorscale,{dflt:!1===r?r:n.autocolorscale.dflt}),reversescale:i({},n.reversescale,{})}}},{\"../../lib/extend\":732,\"./attributes\":624,\"./scales.js\":637}],627:[function(t,e,r){\"use strict\";var n=t(\"./scales\");e.exports=n.RdBu},{\"./scales\":637}],628:[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,c,u){var f=u.prefix,h=u.cLetter,d=f.slice(0,f.length-1),p=f?i.nestedProperty(t,d).get()||{}:t,m=f?i.nestedProperty(e,d).get()||{}:e,g=p[h+\"min\"],v=p[h+\"max\"],y=p.colorscale;c(f+h+\"auto\",!(n(g)&&n(v)&&g<v)),c(f+h+\"min\"),c(f+h+\"max\");var x;void 0!==y&&(x=!s(y)),c(f+\"autocolorscale\",x);var b=c(f+\"colorscale\");if(c(f+\"reversescale\")&&(m.colorscale=l(b)),\"marker.line.\"!==f){var _;f&&(_=a(p));c(f+\"showscale\",_)&&o(p,m,r)}}},{\"../../lib\":743,\"../colorbar/defaults\":621,\"../colorbar/has_colorbar\":623,\"./flip_scale\":630,\"./is_valid_scale\":634,\"fast-isnumeric\":140}],629:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){for(var n=t.length,i=new Array(n),a=new Array(n),o=0;o<n;o++){var s=t[o];i[o]=e+s[0]*(r-e),a[o]=s[1]}return{domain:i,range:a}}},{}],630:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e,r=t.length,n=new Array(r),i=r-1,a=0;i>=0;i--,a++)e=t[i],n[a]=[1-e[0],e[1]];return n}},{}],631:[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\":627,\"./is_valid_scale_array\":635,\"./scales\":637}],632:[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;l<o.length;l++)if(n(o[l])){s=!0;break}return i.isPlainObject(r)&&(s||!0===r.showscale||n(r.cmin)&&n(r.cmax)||a(r.colorscale)||i.isPlainObject(r.colorbar))}},{\"../../lib\":743,\"./is_valid_scale\":634,\"fast-isnumeric\":140}],633:[function(t,e,r){\"use strict\";r.scales=t(\"./scales\"),r.defaultScale=t(\"./default_scale\"),r.attributes=t(\"./attributes\"),r.handleDefaults=t(\"./defaults\"),r.calc=t(\"./calc\"),r.hasColorscale=t(\"./has_colorscale\"),r.isValidScale=t(\"./is_valid_scale\"),r.getScale=t(\"./get_scale\"),r.flipScale=t(\"./flip_scale\"),r.extractScale=t(\"./extract_scale\"),r.makeColorScaleFunc=t(\"./make_color_scale_func\")},{\"./attributes\":624,\"./calc\":625,\"./default_scale\":627,\"./defaults\":628,\"./extract_scale\":629,\"./flip_scale\":630,\"./get_scale\":631,\"./has_colorscale\":632,\"./is_valid_scale\":634,\"./make_color_scale_func\":636,\"./scales\":637}],634:[function(t,e,r){\"use strict\";var n=t(\"./scales\"),i=t(\"./is_valid_scale_array\");e.exports=function(t){return void 0!==n[t]||i(t)}},{\"./is_valid_scale_array\":635,\"./scales\":637}],635:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\");e.exports=function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}},{tinycolor2:546}],636:[function(t,e,r){\"use strict\";function n(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return a(e).toRgbString()}var i=t(\"d3\"),a=t(\"tinycolor2\"),o=t(\"fast-isnumeric\"),s=t(\"../color\");e.exports=function(t,e){e=e||{};for(var r=t.domain,l=t.range,c=l.length,u=new Array(c),f=0;f<c;f++){var h=a(l[f]).toRgb();u[f]=[h.r,h.g,h.b,h.a]}var d,p=i.scale.linear().domain(r).range(u).clamp(!0),m=e.noNumericCheck,g=e.returnArray;return d=m&&g?p:m?function(t){return n(p(t))}:g?function(t){return o(t)?p(t):a(t).isValid()?t:s.defaultLine}:function(t){return o(t)?n(p(t)):a(t).isValid()?t:s.defaultLine},d.domain=p.domain,d.range=function(){return l},d}},{\"../color\":618,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],637:[function(t,e,r){\"use strict\";e.exports={Greys:[[0,\"rgb(0,0,0)\"],[1,\"rgb(255,255,255)\"]],YlGnBu:[[0,\"rgb(8,29,88)\"],[.125,\"rgb(37,52,148)\"],[.25,\"rgb(34,94,168)\"],[.375,\"rgb(29,145,192)\"],[.5,\"rgb(65,182,196)\"],[.625,\"rgb(127,205,187)\"],[.75,\"rgb(199,233,180)\"],[.875,\"rgb(237,248,217)\"],[1,\"rgb(255,255,217)\"]],Greens:[[0,\"rgb(0,68,27)\"],[.125,\"rgb(0,109,44)\"],[.25,\"rgb(35,139,69)\"],[.375,\"rgb(65,171,93)\"],[.5,\"rgb(116,196,118)\"],[.625,\"rgb(161,217,155)\"],[.75,\"rgb(199,233,192)\"],[.875,\"rgb(229,245,224)\"],[1,\"rgb(247,252,245)\"]],YlOrRd:[[0,\"rgb(128,0,38)\"],[.125,\"rgb(189,0,38)\"],[.25,\"rgb(227,26,28)\"],[.375,\"rgb(252,78,42)\"],[.5,\"rgb(253,141,60)\"],[.625,\"rgb(254,178,76)\"],[.75,\"rgb(254,217,118)\"],[.875,\"rgb(255,237,160)\"],[1,\"rgb(255,255,204)\"]],Bluered:[[0,\"rgb(0,0,255)\"],[1,\"rgb(255,0,0)\"]],RdBu:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(106,137,247)\"],[.5,\"rgb(190,190,190)\"],[.6,\"rgb(220,170,132)\"],[.7,\"rgb(230,145,90)\"],[1,\"rgb(178,10,28)\"]],Reds:[[0,\"rgb(220,220,220)\"],[.2,\"rgb(245,195,157)\"],[.4,\"rgb(245,160,105)\"],[1,\"rgb(178,10,28)\"]],Blues:[[0,\"rgb(5,10,172)\"],[.35,\"rgb(40,60,190)\"],[.5,\"rgb(70,100,245)\"],[.6,\"rgb(90,120,245)\"],[.7,\"rgb(106,137,247)\"],[1,\"rgb(220,220,220)\"]],Picnic:[[0,\"rgb(0,0,255)\"],[.1,\"rgb(51,153,255)\"],[.2,\"rgb(102,204,255)\"],[.3,\"rgb(153,204,255)\"],[.4,\"rgb(204,204,255)\"],[.5,\"rgb(255,255,255)\"],[.6,\"rgb(255,204,255)\"],[.7,\"rgb(255,153,255)\"],[.8,\"rgb(255,102,204)\"],[.9,\"rgb(255,102,102)\"],[1,\"rgb(255,0,0)\"]],Rainbow:[[0,\"rgb(150,0,90)\"],[.125,\"rgb(0,0,200)\"],[.25,\"rgb(0,25,255)\"],[.375,\"rgb(0,152,255)\"],[.5,\"rgb(44,255,150)\"],[.625,\"rgb(151,255,0)\"],[.75,\"rgb(255,234,0)\"],[.875,\"rgb(255,111,0)\"],[1,\"rgb(255,0,0)\"]],Portland:[[0,\"rgb(12,51,131)\"],[.25,\"rgb(10,136,186)\"],[.5,\"rgb(242,211,56)\"],[.75,\"rgb(242,143,56)\"],[1,\"rgb(217,30,30)\"]],Jet:[[0,\"rgb(0,0,131)\"],[.125,\"rgb(0,60,170)\"],[.375,\"rgb(5,255,255)\"],[.625,\"rgb(255,255,0)\"],[.875,\"rgb(250,0,0)\"],[1,\"rgb(128,0,0)\"]],Hot:[[0,\"rgb(0,0,0)\"],[.3,\"rgb(230,0,0)\"],[.6,\"rgb(255,210,0)\"],[1,\"rgb(255,255,255)\"]],Blackbody:[[0,\"rgb(0,0,0)\"],[.2,\"rgb(230,0,0)\"],[.4,\"rgb(230,210,0)\"],[.7,\"rgb(255,255,255)\"],[1,\"rgb(160,200,255)\"]],Earth:[[0,\"rgb(0,0,130)\"],[.1,\"rgb(0,180,180)\"],[.2,\"rgb(40,210,40)\"],[.4,\"rgb(230,230,50)\"],[.6,\"rgb(120,70,20)\"],[1,\"rgb(255,255,255)\"]],Electric:[[0,\"rgb(0,0,0)\"],[.15,\"rgb(30,0,100)\"],[.4,\"rgb(120,0,100)\"],[.6,\"rgb(160,90,0)\"],[.8,\"rgb(230,200,0)\"],[1,\"rgb(255,250,220)\"]],Viridis:[[0,\"#440154\"],[.06274509803921569,\"#48186a\"],[.12549019607843137,\"#472d7b\"],[.18823529411764706,\"#424086\"],[.25098039215686274,\"#3b528b\"],[.3137254901960784,\"#33638d\"],[.3764705882352941,\"#2c728e\"],[.4392156862745098,\"#26828e\"],[.5019607843137255,\"#21918c\"],[.5647058823529412,\"#1fa088\"],[.6274509803921569,\"#28ae80\"],[.6901960784313725,\"#3fbc73\"],[.7529411764705882,\"#5ec962\"],[.8156862745098039,\"#84d44b\"],[.8784313725490196,\"#addc30\"],[.9411764705882353,\"#d8e219\"],[1,\"#fde725\"]],Cividis:[[0,\"rgb(0,32,76)\"],[.058824,\"rgb(0,42,102)\"],[.117647,\"rgb(0,52,110)\"],[.176471,\"rgb(39,63,108)\"],[.235294,\"rgb(60,74,107)\"],[.294118,\"rgb(76,85,107)\"],[.352941,\"rgb(91,95,109)\"],[.411765,\"rgb(104,106,112)\"],[.470588,\"rgb(117,117,117)\"],[.529412,\"rgb(131,129,120)\"],[.588235,\"rgb(146,140,120)\"],[.647059,\"rgb(161,152,118)\"],[.705882,\"rgb(176,165,114)\"],[.764706,\"rgb(192,177,109)\"],[.823529,\"rgb(209,191,102)\"],[.882353,\"rgb(225,204,92)\"],[.941176,\"rgb(243,219,79)\"],[1,\"rgb(255,233,69)\"]]}},{}],638:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return\"left\"===i||\"bottom\"===i?a:\"center\"===i||\"middle\"===i?s:\"right\"===i||\"top\"===i?o:a<2/3-s?a:o>4/3-s?o:s}},{}],639:[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\":743}],640:[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){return a(t.changedTouches?t.changedTouches[0]:t,document.body)}var a=t(\"mouse-event-offset\"),o=t(\"has-hover\"),s=t(\"../../plotly\"),l=t(\"../../lib\"),c=t(\"../../plots/cartesian/constants\"),u=t(\"../../constants/interactions\"),f=e.exports={};f.align=t(\"./align\"),f.getCursor=t(\"./cursor\");var h=t(\"./unhover\");f.unhover=h.wrapped,f.unhoverRaw=h.raw;var d=l.eventListenerOptionsSupported();f.init=function(t){function e(e){_._dragged=!1,_._dragging=!0;var s=i(e);return h=s[0],p=s[1],x=e.target,y=e,b=e.buttons&&2===e.buttons||e.ctrlKey,(m=(new Date).getTime())-_._mouseDownTime<M?w+=1:(w=1,_._mouseDownTime=m),t.prepFn&&t.prepFn(e,h,p),o&&!b?(v=n()).style.cursor=window.getComputedStyle(k).cursor:o||(v=document,g=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(k).cursor),document.addEventListener(\"mousemove\",r),document.addEventListener(\"mouseup\",a),document.addEventListener(\"touchmove\",r),document.addEventListener(\"touchend\",a),l.pauseEvent(e)}function r(e){var r=i(e),n=t.minDrag||c.MINDRAG,a=A(r[0]-h,r[1]-p,n),o=a[0],s=a[1];return(o||s)&&(_._dragged=!0,f.unhover(_)),_._dragged&&t.moveFn&&!b&&t.moveFn(o,s),l.pauseEvent(e)}function a(e){if(document.removeEventListener(\"mousemove\",r),document.removeEventListener(\"mouseup\",a),document.removeEventListener(\"touchmove\",r),document.removeEventListener(\"touchend\",a),o?l.removeElement(v):g&&(v.documentElement.style.cursor=g,g=null),_._dragging){if(_._dragging=!1,(new Date).getTime()-_._mouseDownTime>M&&(w=Math.max(w-1,1)),_._dragged)t.doneFn&&t.doneFn(e);else if(t.clickFn&&t.clickFn(w,y),!b){var n;try{n=new MouseEvent(\"click\",e)}catch(t){var c=i(e);(n=document.createEvent(\"MouseEvents\")).initMouseEvent(\"click\",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,c[0],c[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}x.dispatchEvent(n)}return function(t){t._dragging=!1,t._replotPending&&s.plot(t)}(_),_._dragged=!1,l.pauseEvent(e)}_._dragged=!1}var h,p,m,g,v,y,x,b,_=t.gd,w=1,M=u.DBLCLICKDELAY,k=t.element;_._mouseDownTime||(_._mouseDownTime=0),k.style.pointerEvents=\"all\",k.onmousedown=e,d?(k._ontouchstart&&k.removeEventListener(\"touchstart\",k._ontouchstart),k._ontouchstart=e,k.addEventListener(\"touchstart\",e,{passive:!1})):k.ontouchstart=e;var A=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]}},f.coverSlip=n},{\"../../constants/interactions\":720,\"../../lib\":743,\"../../plotly\":784,\"../../plots/cartesian/constants\":794,\"./align\":638,\"./cursor\":639,\"./unhover\":641,\"has-hover\":276,\"mouse-event-offset\":444}],641:[function(t,e,r){\"use strict\";var n=t(\"../../lib/events\"),i=t(\"../../lib/throttle\"),a=t(\"../../lib/get_graph_div\"),o=t(\"../fx/constants\"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.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(),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\":731,\"../../lib/get_graph_div\":738,\"../../lib/throttle\":767,\"../fx/constants\":655}],642:[function(t,e,r){\"use strict\";r.dash={valType:\"string\",values:[\"solid\",\"dot\",\"dash\",\"longdash\",\"dashdot\",\"longdashdot\"],dflt:\"solid\",editType:\"style\"}},{}],643:[function(t,e,r){\"use strict\";function n(t,e){var r=t%100;return _.symbolFuncs[r](e)+(t>=200?k:\"\")}function i(t,e,r,n){var i=l.select(t.node().parentNode),a=-1!==e.indexOf(\"top\")?\"top\":-1!==e.indexOf(\"bottom\")?\"bottom\":\"middle\",o=-1!==e.indexOf(\"left\")?\"end\":-1!==e.indexOf(\"right\")?\"start\":\"middle\",s=n?n/.8+1:0,c=(m.lineCount(t)-1)*v+1,u=S[o]*s,f=.75*r+S[a]*s+(S[a]-1)*c*r/2;t.attr(\"text-anchor\",o),i.attr(\"transform\",\"translate(\"+u+\",\"+f+\")\")}function a(t,e){var r=t.ts||e.textfont.size;return c(r)&&r>0?r:0}function o(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],c=Math.pow(i*i+a*a,E/2),u=Math.pow(o*o+s*s,E/2),f=(u*u*i-c*c*o)*n,h=(u*u*a-c*c*s)*n,d=3*u*(c+u),p=3*c*(c+u);return[[l.round(e[0]+(d&&f/d),2),l.round(e[1]+(d&&h/d),2)],[l.round(e[0]-(p&&f/p),2),l.round(e[1]-(p&&h/p),2)]]}function s(t){var e=t.getAttribute(\"data-unformatted\");if(null!==e)return e+t.getAttribute(\"data-math\")+t.getAttribute(\"text-anchor\")+t.getAttribute(\"style\")}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../registry\"),h=t(\"../color\"),d=t(\"../colorscale\"),p=t(\"../../lib\"),m=t(\"../../lib/svg_text_utils\"),g=t(\"../../constants/xmlns_namespaces\"),v=t(\"../../constants/alignment\").LINE_SPACING,y=t(\"../../constants/interactions\").DESELECTDIM,x=t(\"../../traces/scatter/subtypes\"),b=t(\"../../traces/scatter/make_bubble_size_func\"),_=e.exports={};_.font=function(t,e,r,n){p.isPlainObject(e)&&(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(h.fill,n)},_.setPosition=function(t,e,r){t.attr(\"x\",e).attr(\"y\",r)},_.setSize=function(t,e,r){t.attr(\"width\",e).attr(\"height\",r)},_.setRect=function(t,e,r,n,i){t.call(_.setPosition,e,r).call(_.setSize,n,i)},_.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(c(i)&&c(a)&&e.node())&&(\"text\"===e.node().nodeName?e.attr(\"x\",i).attr(\"y\",a):e.attr(\"transform\",\"translate(\"+i+\",\"+a+\")\"),!0)},_.translatePoints=function(t,e,r){t.each(function(t){var n=l.select(this);_.translatePoint(t,n,e,r)})},_.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr(\"display\",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:\"none\")},_.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,n=e.yaxis;t.each(function(e){var i=e[0].trace,a=i.xcalendar,o=i.ycalendar;t.selectAll(\".point,.textpoint\").each(function(t){_.hideOutsideRangePoint(t,l.select(this),r,n,a,o)})})}},_.crispRound=function(t,e,r){return e&&c(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},_.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||\"\";h.stroke(e,n||a.color),_.dashLine(e,s,o)},_.lineGroupStyle=function(t,e,r,n){t.style(\"fill\",\"none\").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},a=e||i.width||0,o=n||i.dash||\"\";l.select(this).call(h.stroke,r||i.color).call(_.dashLine,o,a)})},_.dashLine=function(t,e,r){r=+r||0,e=_.dashStyle(e,r),t.style({\"stroke-dasharray\":e,\"stroke-width\":r+\"px\"})},_.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},_.singleFillStyle=function(t){var e=(((l.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(h.fill,e)},_.fillGroupStyle=function(t){t.style(\"stroke-width\",0).each(function(e){var r=l.select(this);try{r.call(h.fill,e[0].trace.fillcolor)}catch(e){p.error(e,t),r.remove()}})};var w=t(\"./symbol_defs\");_.symbolNames=[],_.symbolFuncs=[],_.symbolNeedLines={},_.symbolNoDot={},_.symbolNoFill={},_.symbolList=[],Object.keys(w).forEach(function(t){var e=w[t];_.symbolList=_.symbolList.concat([e.n,t,e.n+100,t+\"-open\"]),_.symbolNames[e.n]=t,_.symbolFuncs[e.n]=e.f,e.needLine&&(_.symbolNeedLines[e.n]=!0),e.noDot?_.symbolNoDot[e.n]=!0:_.symbolList=_.symbolList.concat([e.n+200,t+\"-dot\",e.n+300,t+\"-open-dot\"]),e.noFill&&(_.symbolNoFill[e.n]=!0)});var M=_.symbolNames.length,k=\"M0,0.5L0.5,0L0,-0.5L-0.5,0Z\";_.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=_.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=M||t>=400?0:Math.floor(Math.max(t,0))};var A={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0};_.gradient=function(t,e,r,n,i,a){var o=e._fullLayout._defs.select(\".gradients\").selectAll(\"#\"+r).data([n+i+a],p.identity);o.exit().remove(),o.enter().append(\"radial\"===n?\"radialGradient\":\"linearGradient\").each(function(){var t=l.select(this);\"horizontal\"===n?t.attr(A):\"vertical\"===n&&t.attr(T),t.attr(\"id\",r);var e=u(i),o=u(a);t.append(\"stop\").attr({offset:\"0%\",\"stop-color\":h.tinyRGB(o),\"stop-opacity\":o.getAlpha()}),t.append(\"stop\").attr({offset:\"100%\",\"stop-color\":h.tinyRGB(e),\"stop-opacity\":e.getAlpha()})}),t.style({fill:\"url(#\"+r+\")\",\"fill-opacity\":null})},_.initGradients=function(t){var e=t._fullLayout._defs.selectAll(\".gradients\").data([0]);e.enter().append(\"g\").classed(\"gradients\",!0),e.selectAll(\"linearGradient,radialGradient\").remove()},_.singlePointStyle=function(t,e,r,i,a,o){var s=r.marker;!function(t,e,r,i,a,o,s,l){if(f.traceIs(r,\"symbols\")){var c=b(r);e.attr(\"d\",function(t){var e;e=\"various\"===t.ms||\"various\"===o.size?3:x.isBubble(r)?c(t.ms):(o.size||6)/2,t.mrc=e;var i=_.symbolNumber(t.mx||o.symbol)||0;return t.om=i%200>=100,n(i,e)})}e.style(\"opacity\",function(t){return(t.mo+1||o.opacity+1)-1});var u,d,p,m=!1;if(t.so?(p=s.outlierwidth,d=s.outliercolor,u=o.outliercolor):(p=(t.mlw+1||s.width+1||(t.trace?t.trace.marker.line.width:0)+1)-1,d=\"mlc\"in t?t.mlcc=a(t.mlc):Array.isArray(s.color)?h.defaultLine:s.color,Array.isArray(o.color)&&(u=h.defaultLine,m=!0),u=\"mc\"in t?t.mcc=i(t.mc):o.color||\"rgba(0,0,0,0)\"),t.om)e.call(h.stroke,u).style({\"stroke-width\":(p||1)+\"px\",fill:\"none\"});else{e.style(\"stroke-width\",p+\"px\");var g=o.gradient,v=t.mgt;if(v?m=!0:v=g&&g.type,v&&\"none\"!==v){var y=t.mgc;y?m=!0:y=g.color;var w=\"g\"+l._fullLayout._uid+\"-\"+r.uid;m&&(w+=\"-\"+t.i),e.call(_.gradient,l,w,v,u,y)}else e.call(h.fill,u);p&&e.call(h.stroke,d)}}(t,e,r,i,a,s,s.line,o)},_.pointStyle=function(t,e,r){if(t.size()){var n=e.marker,i=_.tryColorscale(n,\"\"),a=_.tryColorscale(n,\"line\");t.each(function(t){_.singlePointStyle(t,l.select(this),e,i,a,r)})}},_.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=e.selected||{},i=e.unselected||{},a=e.marker||{},o=r.marker||{},s=i.marker||{},c=a.opacity,u=o.opacity,d=s.opacity,p=void 0!==u,m=void 0!==d;t.each(function(t){var e,r=l.select(this),n=t.mo,i=void 0!==n;(i||p||m)&&(t.selected?p&&(e=u):e=m?d:y*(i?n:c)),void 0!==e&&r.style(\"opacity\",e)});var g=o.color,v=s.color;(g||v)&&t.each(function(t){var e,r=l.select(this);t.selected?g&&(e=g):v&&(e=v),e&&h.fill(r,e)});var x=o.size,b=s.size,w=void 0!==x,M=void 0!==b;f.traceIs(e,\"symbols\")&&(w||M)&&t.each(function(t){var e,r=l.select(this),i=t.mrc,o=t.mx||a.symbol||0;e=t.selected?w?x/2:i:M?b/2:i,r.attr(\"d\",n(_.symbolNumber(o),e)),t.mrc2=e})}},_.tryColorscale=function(t,e){var r=e?p.nestedProperty(t,e).get():t,n=r.colorscale,i=r.color;return n&&Array.isArray(i)?d.makeColorScaleFunc(d.extractScale(n,r.cmin,r.cmax)):p.identity};var S={start:1,end:-1,middle:0,bottom:1,top:-1};_.textPointStyle=function(t,e,r){t.each(function(t){var n=l.select(this),o=p.extractOption(t,e,\"tx\",\"text\");if(o){var s=t.tp||e.textposition,c=a(t,e);n.call(_.font,t.tf||e.textfont.family,c,t.tc||e.textfont.color).text(o).call(m.convertToTspans,r).call(i,s,c,t.mrc)}else n.remove()})},_.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=e.selected||{},n=e.unselected||{};t.each(function(t){var o,s=l.select(this),c=t.tc||e.textfont.color,u=t.tp||e.textposition,f=a(t,e),d=(r.textfont||{}).color,p=(n.textfont||{}).color;t.selected?d&&(o=d):p?o=p:d||(o=h.addOpacity(c,y)),o&&h.fill(s,o),i(s,u,f,t.mrc2||t.mrc)})}};var E=.5;_.smoothopen=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\");var r,n=\"M\"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(o(t[r-1],t[r],t[r+1],e));for(n+=\"Q\"+i[0][0]+\" \"+t[1],r=2;r<t.length-1;r++)n+=\"C\"+i[r-2][1]+\" \"+i[r-1][0]+\" \"+t[r];return n+=\"Q\"+i[t.length-3][1]+\" \"+t[t.length-1]},_.smoothclosed=function(t,e){if(t.length<3)return\"M\"+t.join(\"L\")+\"Z\";var r,n=\"M\"+t[0],i=t.length-1,a=[o(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(o(t[r-1],t[r],t[r+1],e));for(a.push(o(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+=\"C\"+a[r-1][1]+\" \"+a[r][0]+\" \"+t[r];return n+=\"C\"+a[i][1]+\" \"+a[0][0]+\" \"+t[0]+\"Z\"};var L={hv:function(t,e){return\"H\"+l.round(e[0],2)+\"V\"+l.round(e[1],2)},vh:function(t,e){return\"V\"+l.round(e[1],2)+\"H\"+l.round(e[0],2)},hvh:function(t,e){return\"H\"+l.round((t[0]+e[0])/2,2)+\"V\"+l.round(e[1],2)+\"H\"+l.round(e[0],2)},vhv:function(t,e){return\"V\"+l.round((t[1]+e[1])/2,2)+\"H\"+l.round(e[0],2)+\"V\"+l.round(e[1],2)}};_.steps=function(t){var e=L[t]||function(t,e){return\"L\"+l.round(e[0],2)+\",\"+l.round(e[1],2)};return function(t){for(var r=\"M\"+l.round(t[0][0],2)+\",\"+l.round(t[0][1],2),n=1;n<t.length;n++)r+=e(t[n-1],t[n]);return r}},_.makeTester=function(){var t=l.select(\"body\").selectAll(\"#js-plotly-tester\").data([0]);t.enter().append(\"svg\").attr(\"id\",\"js-plotly-tester\").attr(g.svgAttrs).style({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",width:\"9000px\",height:\"9000px\",\"z-index\":\"1\"});var e=t.selectAll(\".js-reference-point\").data([0]);e.enter().append(\"path\").classed(\"js-reference-point\",!0).attr(\"d\",\"M0,0H1V1H0Z\").style({\"stroke-width\":0,fill:\"black\"}),_.tester=t,_.testref=e},_.savedBBoxes={};var C=0;_.bBox=function(t,e,r){r||(r=s(t));var n;if(r){if(n=_.savedBBoxes[r])return p.extendFlat({},n)}else if(1===t.childNodes.length){var i=t.childNodes[0];if(r=s(i)){var a=+i.getAttribute(\"x\")||0,o=+i.getAttribute(\"y\")||0,c=i.getAttribute(\"transform\");if(!c){var u=_.bBox(i,!1,r);return a&&(u.left+=a,u.right+=a),o&&(u.top+=o,u.bottom+=o),u}if(r+=\"~\"+a+\"~\"+o+\"~\"+c,n=_.savedBBoxes[r])return p.extendFlat({},n)}}var f,h;e?f=t:(h=_.tester.node(),f=t.cloneNode(!0),h.appendChild(f)),l.select(f).attr(\"transform\",null).call(m.positionText,0,0);var d=f.getBoundingClientRect(),g=_.testref.node().getBoundingClientRect();e||h.removeChild(f);var v={height:d.height,width:d.width,left:d.left-g.left,top:d.top-g.top,right:d.right-g.left,bottom:d.bottom-g.top};return C>=1e4&&(_.savedBBoxes={},C=0),r&&(_.savedBBoxes[r]=v),C++,p.extendFlat({},v)},_.setClipUrl=function(t,e){if(e){var r=\"#\"+e,n=l.select(\"base\");n.size()&&n.attr(\"href\")&&(r=window.location.href.split(\"#\")[0]+r),t.attr(\"clip-path\",\"url(\"+r+\")\")}else t.attr(\"clip-path\",null)},_.getTranslate=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\btranslate\\((-?\\d*\\.?\\d*)[^-\\d]*(-?\\d*\\.?\\d*)[^\\d].*/,function(t,e,r){return[e,r].join(\" \")}).split(\" \");return{x:+e[0]||0,y:+e[1]||0}},_.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},_.getScale=function(t){var e=(t[t.attr?\"attr\":\"getAttribute\"](\"transform\")||\"\").replace(/.*\\bscale\\((\\d*\\.?\\d*)[^\\d]*(\\d*\\.?\\d*)[^\\d].*/,function(t,e,r){return[e,r].join(\" \")}).split(\" \");return{x:+e[0]||1,y:+e[1]||1}},_.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},_.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=(n+=i).trim(),this.setAttribute(\"transform\",n)}),i};var z=/translate\\([^)]*\\)\\s*$/;_.setTextPointsScale=function(t,e,r){t.each(function(){var t,n=l.select(this),i=n.select(\"text\");if(i.node()){var a=parseFloat(i.attr(\"x\")||0),o=parseFloat(i.attr(\"y\")||0),s=(n.attr(\"transform\")||\"\").match(z);t=1===e&&1===r?[]:[\"translate(\"+a+\",\"+o+\")\",\"scale(\"+e+\",\"+r+\")\",\"translate(\"+-a+\",\"+-o+\")\"],s&&t.push(s),n.attr(\"transform\",t.join(\" \"))}})}},{\"../../constants/alignment\":716,\"../../constants/interactions\":720,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../registry\":873,\"../../traces/scatter/make_bubble_size_func\":1083,\"../../traces/scatter/subtypes\":1088,\"../color\":618,\"../colorscale\":633,\"./symbol_defs\":644,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],644:[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),c=n.round(.118*e,2),u=n.round(.809*e,2);return\"M\"+r+\",\"+l+\"H\"+i+\"L\"+a+\",\"+c+\"L\"+o+\",\"+u+\"L0,\"+n.round(.382*e,2)+\"L-\"+o+\",\"+u+\"L-\"+a+\",\"+c+\"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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!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,noFill:!0}}},{d3:128}],645:[function(t,e,r){\"use strict\";e.exports={visible:{valType:\"boolean\",editType:\"calc\"},type:{valType:\"enumerated\",values:[\"percent\",\"constant\",\"sqrt\",\"data\"],editType:\"calc\"},symmetric:{valType:\"boolean\",editType:\"calc\"},array:{valType:\"data_array\",editType:\"calc\"},arrayminus:{valType:\"data_array\",editType:\"calc\"},value:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},valueminus:{valType:\"number\",min:0,dflt:10,editType:\"calc\"},traceref:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},tracerefminus:{valType:\"integer\",min:0,dflt:0,editType:\"style\"},copy_ystyle:{valType:\"boolean\",editType:\"plot\"},copy_zstyle:{valType:\"boolean\",editType:\"style\"},color:{valType:\"color\",editType:\"style\"},thickness:{valType:\"number\",min:0,dflt:2,editType:\"style\"},width:{valType:\"number\",min:0,editType:\"plot\"},editType:\"calc\",_deprecated:{opacity:{valType:\"number\",editType:\"style\"}}}},{}],646:[function(t,e,r){\"use strict\";function n(t,e,r,n){var a=e[\"error_\"+n]||{},l=[];if(a.visible&&-1!==[\"linear\",\"log\"].indexOf(r.type)){for(var c=s(a),u=0;u<t.length;u++){var f=t[u],h=f[n];if(i(r.c2l(h))){var d=c(h,u);if(i(d[0])&&i(d[1])){var p=f[n+\"s\"]=h-d[0],m=f[n+\"h\"]=h+d[1];l.push(p,m)}}}o.expand(r,l,{padded:!0})}}var i=t(\"fast-isnumeric\"),a=t(\"../../registry\"),o=t(\"../../plots/cartesian/axes\"),s=t(\"./compute_error\");e.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var i=e[r],s=i[0].trace;if(a.traceIs(s,\"errorBarsOK\")){var l=o.getFromId(t,s.xaxis),c=o.getFromId(t,s.yaxis);n(i,s,l,\"x\"),n(i,s,c,\"y\")}}}},{\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./compute_error\":647,\"fast-isnumeric\":140}],647:[function(t,e,r){\"use strict\";function n(t,e){return\"percent\"===t?function(t){return Math.abs(t*e/100)}:\"constant\"===t?function(){return Math.abs(e)}:\"sqrt\"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}e.exports=function(t){var e=t.type,r=t.symmetric;if(\"data\"===e){var i=t.array,a=t.arrayminus;return r||void 0===a?function(t,e){var r=+i[e];return[r,r]}:function(t,e){return[+a[e],+i[e]]}}var o=n(e,t.value),s=n(e,t.valueminus);return r||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},{}],648:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(t,e){return a.coerce(f,u,o,t,e)}var c=\"error_\"+s.axis,u=e[c]={},f=t[c]||{};if(!1!==l(\"visible\",void 0!==f.array||void 0!==f.value||\"sqrt\"===f.type)){var h=l(\"type\",\"array\"in f?\"data\":\"percent\"),d=!0;if(\"sqrt\"!==h&&(d=l(\"symmetric\",!((\"data\"===h?\"arrayminus\":\"valueminus\")in f))),\"data\"===h){if(l(\"array\")||(u.array=[]),l(\"traceref\"),!d){l(\"arrayminus\")||(u.arrayminus=[]),l(\"tracerefminus\")}}else\"percent\"!==h&&\"constant\"!==h||(l(\"value\"),d||l(\"valueminus\"));var p=\"copy_\"+s.inherit+\"style\";if(s.inherit){(e[\"error_\"+s.inherit]||{}).visible&&l(p,!(f.color||n(f.thickness)||n(f.width)))}s.inherit&&u[p]||(l(\"color\",r),l(\"thickness\"),l(\"width\",i.traceIs(e,\"gl3d\")?0:4))}}},{\"../../lib\":743,\"../../registry\":873,\"./attributes\":645,\"fast-isnumeric\":140}],649:[function(t,e,r){\"use strict\";var n=e.exports={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.calcFromTrace=function(t,e){for(var r=t.x||[],i=t.y||[],a=r.length||i.length,o=new Array(a),s=0;s<a;s++)o[s]={x:r[s],y:i[s]};return o[0].trace=t,n.calc({calcdata:[o],_fullLayout:e}),o},n.plot=t(\"./plot\"),n.style=t(\"./style\"),n.hoverInfo=function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}},{\"./attributes\":645,\"./calc\":646,\"./defaults\":648,\"./plot\":650,\"./style\":651}],650:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../drawing\"),o=t(\"../../traces/scatter/subtypes\");e.exports=function(t,e,r){var s,l=e.xaxis,c=e.yaxis,u=r&&r.duration>0;t.each(function(t){var f,h=t[0].trace,d=h.error_x||{},p=h.error_y||{};h.ids&&(f=function(t){return t.id});var m=o.hasMarkers(h)&&h.marker.maxdisplayed>0;p.visible||d.visible||(t=[]);var g=n.select(this).selectAll(\"g.errorbar\").data(t,f);if(g.exit().remove(),t.length){d.visible||g.selectAll(\"path.xerror\").remove(),p.visible||g.selectAll(\"path.yerror\").remove(),g.style(\"opacity\",1);var v=g.enter().append(\"g\").classed(\"errorbar\",!0);u&&v.style(\"opacity\",0).transition().duration(r.duration).style(\"opacity\",1),a.setClipUrl(g,e.layerClipId),g.each(function(t){var e=n.select(this),a=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!m||t.vis){var o;if(p.visible&&i(a.x)&&i(a.yh)&&i(a.ys)){var f=p.width;o=\"M\"+(a.x-f)+\",\"+a.yh+\"h\"+2*f+\"m-\"+f+\",0V\"+a.ys,a.noYS||(o+=\"m-\"+f+\",0h\"+2*f);var h=e.select(\"path.yerror\");(s=!h.size())?h=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"yerror\",!0):u&&(h=h.transition().duration(r.duration).ease(r.easing)),h.attr(\"d\",o)}if(d.visible&&i(a.y)&&i(a.xh)&&i(a.xs)){var g=(d.copy_ystyle?p:d).width;o=\"M\"+a.xh+\",\"+(a.y-g)+\"v\"+2*g+\"m0,-\"+g+\"H\"+a.xs,a.noXS||(o+=\"m0,-\"+g+\"v\"+2*g);var v=e.select(\"path.xerror\");(s=!v.size())?v=e.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").classed(\"xerror\",!0):u&&(v=v.transition().duration(r.duration).ease(r.easing)),v.attr(\"d\",o)}}})}})}},{\"../../traces/scatter/subtypes\":1088,\"../drawing\":643,d3:128,\"fast-isnumeric\":140}],651:[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\":618,d3:128}],652:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\");e.exports={hoverlabel:{bgcolor:{valType:\"color\",arrayOk:!0,editType:\"none\"},bordercolor:{valType:\"color\",arrayOk:!0,editType:\"none\"},font:n({arrayOk:!0,editType:\"none\"}),namelength:{valType:\"integer\",min:-1,arrayOk:!0,editType:\"none\"},editType:\"calc\"}}},{\"../../plots/font_attributes\":816}],653:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../registry\");e.exports=function(t){function e(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},a)}}for(var r=t.calcdata,a=t._fullLayout,o=0;o<r.length;o++){var s=r[o],l=s[0].trace;if(!i.traceIs(l,\"pie\")){var c=i.traceIs(l,\"2dMap\")?function(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}:n.fillArray;c(l.hoverinfo,s,\"hi\",e(l)),l.hoverlabel&&(c(l.hoverlabel.bgcolor,s,\"hbg\"),c(l.hoverlabel.bordercolor,s,\"hbc\"),c(l.hoverlabel.font.size,s,\"hts\"),c(l.hoverlabel.font.color,s,\"htc\"),c(l.hoverlabel.font.family,s,\"htf\"),c(l.hoverlabel.namelength,s,\"hnl\"))}}}},{\"../../lib\":743,\"../../registry\":873}],654:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./hover\").hover;e.exports=function(t,e,r){function a(){t.emit(\"plotly_click\",{points:t._hoverdata,event:e})}var o=n.getComponentMethod(\"annotations\",\"onClick\")(t,t._hoverdata);void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(o&&o.then?o.then(a):a(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},{\"../../registry\":873,\"./hover\":658}],655:[function(t,e,r){\"use strict\";e.exports={MAXDIST:20,YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:\"Arial, sans-serif\",HOVERMINTIME:50,HOVERID:\"-hover\"}},{}],656:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"./hoverlabel_defaults\");e.exports=function(t,e,r,o){a(t,e,function(r,a){return n.coerce(t,e,i,r,a)},o.hoverlabel)}},{\"../../lib\":743,\"./attributes\":652,\"./hoverlabel_defaults\":659}],657:[function(t,e,r){\"use strict\";function n(t){return s[t]||t}function i(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var a=t(\"../../lib\"),o=t(\"./constants\");r.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},r.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},r.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},r.getDistanceFunction=function(t,e,n,i){return\"closest\"===t?i||r.quadrature(e,n):\"x\"===t?e:n},r.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},r.inbox=function(t,e){return t*e<0||0===t?o.MAXDIST*(.6-.3/Math.max(3,Math.abs(t-e))):1/0},r.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},r.makeEventData=function(t,e,n){var i=\"index\"in t?t.index:t.pointNumber,a={data:e._input,fullData:e,curveNumber:e.index,pointNumber:i};if(e._indexToPoints){var o=e._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return e._module.eventData?a=e._module.eventData(a,t,e,n,i):(\"xVal\"in t?a.x=t.xVal:\"x\"in t&&(a.x=t.x),\"yVal\"in t?a.y=t.yVal:\"y\"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),r.appendArrayPointValue(a,e,i),a},r.appendArrayPointValue=function(t,e,r){var o=e._arrayAttrs;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=n(l);if(void 0===t[c]){var u=i(a.nestedProperty(e,l).get(),r);void 0!==u&&(t[c]=u)}}},r.appendArrayMultiPointValues=function(t,e,r){var o=e._arrayAttrs;if(o)for(var s=0;s<o.length;s++){var l=o[s],c=n(l);if(void 0===t[c]){for(var u=a.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=i(u,r[h]);t[c]=f}}};var s={ids:\"id\",locations:\"location\",labels:\"label\",values:\"value\",\"marker.colors\":\"color\"}},{\"../../lib\":743,\"./constants\":655}],658:[function(t,e,r){\"use strict\";function n(t,e,r,n){function u(t,e){if(!t.length)return null;var r=t.map(function(t,e){var r=t.xa,n=t.ya,i=r.c2p(q),a=n.c2p(H);return{distance:function(t){var e=t.kink,r=(t.x1+t.x0)/2-i,n=(t.y1+t.y0)/2-a;return Math.max(Math.sqrt(r*r+n*n)-e,1-3/e)}(t),index:e}});return r=r.filter(function(t){return t.distance<=e}).sort(function(t,e){return t.distance-e.distance}),r.length?t[r[0].index]:null}function d(t){return t?{xa:t.xa,ya:t.ya,x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1,distance:t.distance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}r||(r=\"xy\");var m=Array.isArray(r)?r:[r],_=t._fullLayout,w=_._plots||[],M=w[r];if(M){var A=M.overlays.map(function(t){return t.id});m=m.concat(A)}for(var T=m.length,S=new Array(T),E=new Array(T),L=0;L<T;L++){var C=m[L],z=w[C];if(z)S[L]=y.getFromId(t,z.xaxis._id),E[L]=y.getFromId(t,z.yaxis._id);else{var D=_[C]._subplot;S[L]=D.xaxis,E[L]=D.yaxis}}var I=e.hovermode||_.hovermode;if(-1===[\"x\",\"y\",\"closest\"].indexOf(I)||!t.calcdata||t.querySelector(\".zoombox\")||t._dragging)return v.unhoverRaw(t,e);var P,O,F,R,N,j,B,U,V,q,H,G,Y,W=-1===_.hoverdistance?1/0:_.hoverdistance,X=-1===_.spikedistance?1/0:_.spikedistance,Z=[],J=[],K={hLinePoint:null,vLinePoint:null};if(Array.isArray(e))for(I=\"array\",F=0;F<e.length;F++)\"skip\"!==(N=t.calcdata[e[F].curveNumber||0])[0].trace.hoverinfo&&J.push(N);else{for(R=0;R<t.calcdata.length;R++)\"skip\"!==(j=(N=t.calcdata[R])[0].trace).hoverinfo&&-1!==m.indexOf(b.getSubplot(j))&&J.push(N);var Q,$;if(!e.target)Q=\"xpx\"in e?e.xpx:S[0]._length/2,e.pointerX=Q+S[0]._offset,$=\"ypx\"in e?e.ypx:E[0]._length/2,e.pointerY=$+E[0]._offset;else{if(!1===h.triggerHandler(t,\"plotly_beforehover\",e))return;var tt=e.target.getBoundingClientRect();if(Q=e.clientX-tt.left,$=e.clientY-tt.top,Q<0||Q>tt.width||$<0||$>tt.height)return v.unhoverRaw(t,e);e.pointerX=e.offsetX,e.pointerY=e.offsetY}if(P=\"xval\"in e?b.flat(m,e.xval):b.p2c(S,Q),O=\"yval\"in e?b.flat(m,e.yval):b.p2c(E,$),!c(P[0])||!c(O[0]))return f.warn(\"Fx.hover failed\",e,t),v.unhoverRaw(t,e)}var et=1/0;for(R=0;R<J.length;R++)if((N=J[R])&&N[0]&&N[0].trace&&!0===N[0].trace.visible&&(j=N[0].trace,-1===[\"carpet\",\"contourcarpet\"].indexOf(j._module.name))){if(B=b.getSubplot(j),U=m.indexOf(B),V=I,G={cd:N,trace:j,xa:S[U],ya:E[U],index:!1,distance:Math.min(et,W),color:g.defaultLine,name:j.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},_[B]&&(G.subplot=_[B]._subplot),Y=Z.length,\"array\"===V){var rt=e[R];\"pointNumber\"in rt?(G.index=rt.pointNumber,V=\"closest\"):(V=\"\",\"xval\"in rt&&(q=rt.xval,V=\"x\"),\"yval\"in rt&&(H=rt.yval,V=V?\"closest\":\"y\"))}else q=P[U],H=O[U];if(0!==W)if(j._module&&j._module.hoverPoints){var nt=j._module.hoverPoints(G,q,H,V,_._hoverlayer);if(nt)for(var it,at=0;at<nt.length;at++)it=nt[at],c(it.x0)&&c(it.y0)&&Z.push(function(t,e){function r(e,r,n){var i=s(r,n);i&&(t[e]=i)}var n=t.index,i=t.trace||{},a=t.cd[0],o=t.cd[n]||{},s=Array.isArray(n)?function(t,e){return f.castOption(a,n,t)||f.extractOption({},i,\"\",e)}:function(t,e){return f.extractOption(o,i,t,e)};r(\"hoverinfo\",\"hi\",\"hoverinfo\"),r(\"color\",\"hbg\",\"hoverlabel.bgcolor\"),r(\"borderColor\",\"hbc\",\"hoverlabel.bordercolor\"),r(\"fontFamily\",\"htf\",\"hoverlabel.font.family\"),r(\"fontSize\",\"hts\",\"hoverlabel.font.size\"),r(\"fontColor\",\"htc\",\"hoverlabel.font.color\"),r(\"nameLength\",\"hnl\",\"hoverlabel.namelength\"),t.posref=\"y\"===e?(t.x0+t.x1)/2:(t.y0+t.y1)/2,t.x0=f.constrain(t.x0,0,t.xa._length),t.x1=f.constrain(t.x1,0,t.xa._length),t.y0=f.constrain(t.y0,0,t.ya._length),t.y1=f.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel=\"xLabel\"in t?t.xLabel:y.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal));void 0!==t.yLabelVal&&(t.yLabel=\"yLabel\"in t?t.yLabel:y.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal));void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal));if(!(isNaN(t.xerr)||\"log\"===t.xa.type&&t.xerr<=0)){var l=y.tickText(t.xa,t.xa.c2l(t.xerr),\"hover\").text;void 0!==t.xerrneg?t.xLabel+=\" +\"+l+\" / -\"+y.tickText(t.xa,t.xa.c2l(t.xerrneg),\"hover\").text:t.xLabel+=\" \\xb1 \"+l,\"x\"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||\"log\"===t.ya.type&&t.yerr<=0)){var c=y.tickText(t.ya,t.ya.c2l(t.yerr),\"hover\").text;void 0!==t.yerrneg?t.yLabel+=\" +\"+c+\" / -\"+y.tickText(t.ya,t.ya.c2l(t.yerrneg),\"hover\").text:t.yLabel+=\" \\xb1 \"+c,\"y\"===e&&(t.distance+=1)}var u=t.hoverinfo||t.trace.hoverinfo;\"all\"!==u&&(-1===(u=Array.isArray(u)?u:u.split(\"+\")).indexOf(\"x\")&&(t.xLabel=void 0),-1===u.indexOf(\"y\")&&(t.yLabel=void 0),-1===u.indexOf(\"z\")&&(t.zLabel=void 0),-1===u.indexOf(\"text\")&&(t.text=void 0),-1===u.indexOf(\"name\")&&(t.name=void 0));return t}(it,I))}else f.log(\"Unrecognized trace type in hover:\",j);if(\"closest\"===I&&Z.length>Y&&(Z.splice(0,Y),et=Z[0].distance),_._has(\"cartesian\")&&0!==X&&0===Z.length){G.distance=X,G.index=!1;var ot=j._module.hoverPoints(G,q,H,\"closest\",_._hoverlayer);if(ot){var st,lt=ot.filter(function(t){return t.xa.showspikes});if(lt.length){var ct=lt[0];c(ct.x0)&&c(ct.y0)&&(st=d(ct),(!K.vLinePoint||K.vLinePoint.distance>st.distance)&&(K.vLinePoint=st))}var ut=ot.filter(function(t){return t.ya.showspikes});if(ut.length){var ft=ut[0];c(ft.x0)&&c(ft.y0)&&(st=d(ft),(!K.hLinePoint||K.hLinePoint.distance>st.distance)&&(K.hLinePoint=st))}}}}var ht={fullLayout:_,container:_._hoverlayer,outerContainer:_._paperdiv,event:e},dt=t._spikepoints,pt={vLinePoint:K.vLinePoint,hLinePoint:K.hLinePoint};if(t._spikepoints=pt,_._has(\"cartesian\")&&0!==X&&0!==Z.length){var mt=u(Z.filter(function(t){return t.ya.showspikes}),X);K.hLinePoint=d(mt);var gt=u(Z.filter(function(t){return t.xa.showspikes}),X);K.vLinePoint=d(gt)}if(0===Z.length){var vt=v.unhoverRaw(t,e);return!_._has(\"cartesian\")||null===K.hLinePoint&&null===K.vLinePoint||s(dt)&&o(K,ht),vt}_._has(\"cartesian\")&&s(dt)&&o(K,ht),Z.sort(function(t,e){return t.distance-e.distance});var yt=t._hoverdata,xt=[];for(F=0;F<Z.length;F++){var bt=Z[F];xt.push(b.makeEventData(bt,bt.trace,bt.cd))}t._hoverdata=xt;var _t=\"y\"===I&&J.length>1,wt=i(Z,{hovermode:I,rotateLabels:_t,bgColor:g.combine(_.plot_bgcolor||g.background,_.paper_bgcolor),container:_._hoverlayer,outerContainer:_._paperdiv,commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance},t);if(function(t,e,r){function n(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(c=t[s]).pos+c.dp+c.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((c=t[s]).pos<e.pmin+1)for(c.del=!0,n--,o=2*c.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}var i,a,o,s,l,c,u,f=0,h=t.map(function(t,n){var i=t[e];return[{i:n,dp:0,pos:t.pos,posref:t.posref,size:t.by*(\"x\"===i._id.charAt(0)?k:1)/2,pmin:0,pmax:\"x\"===i._id.charAt(0)?r.width:r.height}]}).sort(function(t,e){return t[0].posref-e[0].posref});for(;!i&&f<=t.length;){for(f++,i=!0,s=0;s<h.length-1;){var d=h[s],p=h[s+1],m=d[d.length-1],g=p[0];if((a=m.pos+m.dp+m.size-g.pos-g.dp+g.size)>.01&&m.pmin===g.pmin&&m.pmax===g.pmax){for(l=p.length-1;l>=0;l--)p[l].dp+=a;for(d.push.apply(d,p),h.splice(s+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;i=!1}else s++}h.forEach(n)}for(s=h.length-1;s>=0;s--){var v=h[s];for(l=v.length-1;l>=0;l--){var y=v[l],x=t[y.i];x.offset=y.dp,x.del=y.del}}}(Z,_t?\"xa\":\"ya\",_),a(wt,_t),e.target&&e.target.tagName){var Mt=x.getComponentMethod(\"annotations\",\"hasClickToShow\")(t,xt);p(l.select(e.target),Mt?\"pointer\":\"\")}e.target&&!n&&function(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}(t,0,yt)&&(yt&&t.emit(\"plotly_unhover\",{event:e,points:yt}),t.emit(\"plotly_hover\",{event:e,points:t._hoverdata,xaxes:S,yaxes:E,xvals:P,yvals:O}))}function i(t,e,r){var n,i,a=e.hovermode,o=e.rotateLabels,s=e.bgColor,c=e.container,u=e.outerContainer,f=e.commonLabelOpts||{},h=e.fontFamily||_.HOVERFONT,p=e.fontSize||_.HOVERFONTSIZE,v=t[0],y=v.xa,x=v.ya,b=\"y\"===a?\"yLabel\":\"xLabel\",M=v[b],k=(String(M)||\"\").split(\" \")[0],A=u.node().getBoundingClientRect(),T=A.top,L=A.width,C=A.height,z=v.distance<=e.hoverdistance&&(\"x\"===a||\"y\"===a);for(n=0;n<t.length;n++){i=t[n].hoverinfo||t[n].trace.hoverinfo;var D=Array.isArray(i)?i:i.split(\"+\");if(-1===D.indexOf(\"all\")&&-1===D.indexOf(a)){z=!1;break}}var I=c.selectAll(\"g.axistext\").data(z?[0]:[]);I.enter().append(\"g\").classed(\"axistext\",!0),I.exit().remove(),I.each(function(){var e=l.select(this),n=e.selectAll(\"path\").data([0]),i=e.selectAll(\"text\").data([0]);n.enter().append(\"path\").style({\"stroke-width\":\"1px\"}),n.style({fill:f.bgcolor||g.defaultLine,stroke:f.bordercolor||g.background}),i.enter().append(\"text\").attr(\"data-notex\",1),i.text(M).call(m.font,f.font.family||h,f.font.size||p,f.font.color||g.background).call(d.positionText,0,0).call(d.convertToTspans,r),e.attr(\"transform\",\"\");var o=i.node().getBoundingClientRect();if(\"x\"===a){i.attr(\"text-anchor\",\"middle\").call(d.positionText,0,\"top\"===y.side?T-o.bottom-S-E:T-o.top+S+E);var s=\"top\"===y.side?\"-\":\"\";n.attr(\"d\",\"M0,0L\"+S+\",\"+s+S+\"H\"+(E+o.width/2)+\"v\"+s+(2*E+o.height)+\"H-\"+(E+o.width/2)+\"V\"+s+S+\"H-\"+S+\"Z\"),e.attr(\"transform\",\"translate(\"+(y._offset+(v.x0+v.x1)/2)+\",\"+(x._offset+(\"top\"===y.side?0:x._length))+\")\")}else{i.attr(\"text-anchor\",\"right\"===x.side?\"start\":\"end\").call(d.positionText,(\"right\"===x.side?1:-1)*(E+S),T-o.top-o.height/2);var c=\"right\"===x.side?\"\":\"-\";n.attr(\"d\",\"M0,0L\"+c+S+\",\"+S+\"V\"+(E+o.height/2)+\"h\"+c+(2*E+o.width)+\"V-\"+(E+o.height/2)+\"H\"+c+S+\"V-\"+S+\"Z\"),e.attr(\"transform\",\"translate(\"+(y._offset+(\"right\"===x.side?y._length:0))+\",\"+(x._offset+(v.y0+v.y1)/2)+\")\")}t=t.filter(function(t){return void 0!==t.zLabelVal||(t[b]||\"\").split(\" \")[0]===k})});var P=c.selectAll(\"g.hovertext\").data(t,function(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa,t.ya||\"\"].join(\",\")});return P.enter().append(\"g\").classed(\"hovertext\",!0).each(function(){var t=l.select(this);t.append(\"rect\").call(g.fill,g.addOpacity(s,.8)),t.append(\"text\").classed(\"name\",!0),t.append(\"path\").style(\"stroke-width\",\"1px\"),t.append(\"text\").classed(\"nums\",!0).call(m.font,h,p)}),P.exit().remove(),P.each(function(t){var e=l.select(this).attr(\"transform\",\"\"),n=\"\",i=\"\",c=g.opacity(t.color)?t.color:g.defaultLine,u=g.combine(c,s),f=t.borderColor||g.contrast(u);if(void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name){n=d.plainText(t.name||\"\");var v=Math.round(t.nameLength);v>-1&&n.length>v&&(n=v>3?n.substr(0,v-3)+\"...\":n.substr(0,v))}void 0!==t.extraText&&(i+=t.extraText),void 0!==t.zLabel?(void 0!==t.xLabel&&(i+=\"x: \"+t.xLabel+\"<br>\"),void 0!==t.yLabel&&(i+=\"y: \"+t.yLabel+\"<br>\"),i+=(i?\"z: \":\"\")+t.zLabel):z&&t[a+\"Label\"]===M?i=t[(\"x\"===a?\"y\":\"x\")+\"Label\"]||\"\":void 0===t.xLabel?void 0!==t.yLabel&&(i=t.yLabel):i=void 0===t.yLabel?t.xLabel:\"(\"+t.xLabel+\", \"+t.yLabel+\")\",t.text&&!Array.isArray(t.text)&&(i+=(i?\"<br>\":\"\")+t.text),\"\"===i&&(\"\"===n&&e.remove(),i=n);var y=e.select(\"text.nums\").call(m.font,t.fontFamily||h,t.fontSize||p,t.fontColor||f).text(i).attr(\"data-notex\",1).call(d.positionText,0,0).call(d.convertToTspans,r),x=e.select(\"text.name\"),b=0;n&&n!==i?(x.call(m.font,t.fontFamily||h,t.fontSize||p,u).text(n).attr(\"data-notex\",1).call(d.positionText,0,0).call(d.convertToTspans,r),b=x.node().getBoundingClientRect().width+2*E):(x.remove(),e.select(\"rect\").remove()),e.select(\"path\").style({fill:u,stroke:f});var _,k,A=y.node().getBoundingClientRect(),D=t.xa._offset+(t.x0+t.x1)/2,I=t.ya._offset+(t.y0+t.y1)/2,P=Math.abs(t.x1-t.x0),O=Math.abs(t.y1-t.y0),F=A.width+S+E+b;t.ty0=T-A.top,t.bx=A.width+2*E,t.by=A.height+2*E,t.anchor=\"start\",t.txwidth=A.width,t.tx2width=b,t.offset=0,o?(t.pos=D,_=I+O/2+F<=C,k=I-O/2-F>=0,\"top\"!==t.idealAlign&&_||!k?_?(I+=O/2,t.anchor=\"start\"):t.anchor=\"middle\":(I-=O/2,t.anchor=\"end\")):(t.pos=I,_=D+P/2+F<=L,k=D-P/2-F>=0,\"left\"!==t.idealAlign&&_||!k?_?(D+=P/2,t.anchor=\"start\"):t.anchor=\"middle\":(D-=P/2,t.anchor=\"end\")),y.attr(\"text-anchor\",t.anchor),b&&x.attr(\"text-anchor\",t.anchor),e.attr(\"transform\",\"translate(\"+D+\",\"+I+\")\"+(o?\"rotate(\"+w+\")\":\"\"))}),P}function a(t,e){t.each(function(t){var r=l.select(this);if(t.del)r.remove();else{var n=\"end\"===t.anchor?-1:1,i=r.select(\"text.nums\"),a={start:1,end:-1,middle:0}[t.anchor],o=a*(S+E),s=o+a*(t.txwidth+E),c=0,u=t.offset;\"middle\"===t.anchor&&(o-=t.tx2width/2,s-=t.tx2width/2),e&&(u*=-T,c=t.offset*A),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*S+c)+\",\"+(S+u)+\"v\"+(t.by/2-S)+\"h\"+n*t.bx+\"v-\"+t.by+\"H\"+(n*S+c)+\"V\"+(u-S)+\"Z\"),i.call(d.positionText,o+c,u+t.ty0-t.by/2+E),t.tx2width&&(r.select(\"text.name\").call(d.positionText,s+a*E+c,u+t.ty0-t.by/2+E),r.select(\"rect\").call(m.setRect,s+(a-1)*t.tx2width/2+c,u-t.by/2-1,t.tx2width,t.by+2))}})}function o(t,e){var r,n,i=e.container,a=e.fullLayout,o=e.event,s=!!t.hLinePoint,l=!!t.vLinePoint;if(i.selectAll(\".spikeline\").remove(),l||s){var c=g.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var f,h,d=t.hLinePoint;r=d&&d.xa;\"cursor\"===(n=d&&d.ya).spikesnap?(f=o.pointerX,h=o.pointerY):(f=r._offset+(d.x0+d.x1)/2,h=n._offset+(d.y0+d.y1)/2);var p,v,y=u.readability(d.color,c)<1.5?g.contrast(c):d.color,x=n.spikemode,b=n.spikethickness,_=n.spikecolor||y,w=n._boundingBox,M=(w.left+w.right)/2<f?w.right:w.left;-1===x.indexOf(\"toaxis\")&&-1===x.indexOf(\"across\")||(-1!==x.indexOf(\"toaxis\")&&(p=M,v=f),-1!==x.indexOf(\"across\")&&(p=n._counterSpan[0],v=n._counterSpan[1]),i.insert(\"line\",\":first-child\").attr({x1:p,x2:v,y1:h,y2:h,\"stroke-width\":b,stroke:_,\"stroke-dasharray\":m.dashStyle(n.spikedash,b)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),i.insert(\"line\",\":first-child\").attr({x1:p,x2:v,y1:h,y2:h,\"stroke-width\":b+2,stroke:c}).classed(\"spikeline\",!0).classed(\"crisp\",!0)),-1!==x.indexOf(\"marker\")&&i.insert(\"circle\",\":first-child\").attr({cx:M+(\"right\"!==n.side?b:-b),cy:h,r:b,fill:_}).classed(\"spikeline\",!0)}if(l){var k,A,T=t.vLinePoint;r=T&&T.xa,n=T&&T.ya;\"cursor\"===r.spikesnap?(k=o.pointerX,A=o.pointerY):(k=r._offset+(T.x0+T.x1)/2,A=n._offset+(T.y0+T.y1)/2);var S,E,L=u.readability(T.color,c)<1.5?g.contrast(c):T.color,C=r.spikemode,z=r.spikethickness,D=r.spikecolor||L,I=r._boundingBox,P=(I.top+I.bottom)/2<A?I.bottom:I.top;-1===C.indexOf(\"toaxis\")&&-1===C.indexOf(\"across\")||(-1!==C.indexOf(\"toaxis\")&&(S=P,E=A),-1!==C.indexOf(\"across\")&&(S=r._counterSpan[0],E=r._counterSpan[1]),i.insert(\"line\",\":first-child\").attr({x1:k,x2:k,y1:S,y2:E,\"stroke-width\":z,stroke:D,\"stroke-dasharray\":m.dashStyle(r.spikedash,z)}).classed(\"spikeline\",!0).classed(\"crisp\",!0),i.insert(\"line\",\":first-child\").attr({x1:k,x2:k,y1:S,y2:E,\"stroke-width\":z+2,stroke:c}).classed(\"spikeline\",!0).classed(\"crisp\",!0)),-1!==C.indexOf(\"marker\")&&i.insert(\"circle\",\":first-child\").attr({cx:k,cy:P-(\"top\"!==r.side?z:-z),r:z,fill:D}).classed(\"spikeline\",!0)}}}function s(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../lib\"),h=t(\"../../lib/events\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib/override_cursor\"),m=t(\"../drawing\"),g=t(\"../color\"),v=t(\"../dragelement\"),y=t(\"../../plots/cartesian/axes\"),x=t(\"../../registry\"),b=t(\"./helpers\"),_=t(\"./constants\"),w=_.YANGLE,M=Math.PI*w/180,k=1/Math.sin(M),A=Math.cos(M),T=Math.sin(M),S=_.HOVERARROWSIZE,E=_.HOVERTEXTPAD;r.hover=function(t,e,r,i){t=f.getGraphDiv(t),f.throttle(t._fullLayout._uid+_.HOVERID,_.HOVERMINTIME,function(){n(t,e,r,i)})},r.loneHover=function(t,e){var r={color:t.color||g.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,trace:{index:0,hoverinfo:\"\"},xa:{_offset:0},ya:{_offset:0},index:0},n=l.select(e.container),o=e.outerContainer?l.select(e.outerContainer):n,s={hovermode:\"closest\",rotateLabels:!1,bgColor:e.bgColor||g.background,container:n,outerContainer:o,hoverdistance:_.MAXDIST},c=i([r],s,e.gd);return a(c,s.rotateLabels),c.node()}},{\"../../lib\":743,\"../../lib/events\":731,\"../../lib/override_cursor\":754,\"../../lib/svg_text_utils\":766,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":655,\"./helpers\":657,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],659:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i){r(\"hoverlabel.bgcolor\",(i=i||{}).bgcolor),r(\"hoverlabel.bordercolor\",i.bordercolor),r(\"hoverlabel.namelength\",i.namelength),n.coerceFont(r,\"hoverlabel.font\",i.font)}},{\"../../lib\":743}],660:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../dragelement\"),o=t(\"./helpers\"),s=t(\"./layout_attributes\");e.exports={moduleType:\"component\",name:\"fx\",constants:t(\"./constants\"),schema:{layout:s},attributes:t(\"./attributes\"),layoutAttributes:s,supplyLayoutGlobalDefaults:t(\"./layout_global_defaults\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,\"hoverlabel.\"+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,\"hoverinfo\",function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)})},hover:t(\"./hover\").hover,unhover:a.unhover,loneHover:t(\"./hover\").loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll(\"g.hovertext\").remove(),e.selectAll(\".spikeline\").remove()},click:t(\"./click\")}},{\"../../lib\":743,\"../dragelement\":640,\"./attributes\":652,\"./calc\":653,\"./click\":654,\"./constants\":655,\"./defaults\":656,\"./helpers\":657,\"./hover\":658,\"./layout_attributes\":661,\"./layout_defaults\":662,\"./layout_global_defaults\":663,d3:128}],661:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../plots/font_attributes\")({editType:\"none\"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={dragmode:{valType:\"enumerated\",values:[\"zoom\",\"pan\",\"select\",\"lasso\",\"orbit\",\"turntable\"],dflt:\"zoom\",editType:\"modebar\"},hovermode:{valType:\"enumerated\",values:[\"x\",\"y\",\"closest\",!1],editType:\"modebar\"},hoverdistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},spikedistance:{valType:\"integer\",min:-1,dflt:20,editType:\"none\"},hoverlabel:{bgcolor:{valType:\"color\",editType:\"none\"},bordercolor:{valType:\"color\",editType:\"none\"},font:i,namelength:{valType:\"integer\",min:-1,dflt:15,editType:\"none\"},editType:\"none\"}}},{\"../../plots/font_attributes\":816,\"./constants\":655}],662:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a(\"dragmode\");var o;e._has(\"cartesian\")?(e._isHoriz=function(t){for(var e=!0,r=0;r<t.length;r++)if(\"h\"!==t[r].orientation){e=!1;break}return e}(r),o=e._isHoriz?\"y\":\"x\"):o=\"closest\";a(\"hovermode\",o)&&(a(\"hoverdistance\"),a(\"spikedistance\"));var s=e._has(\"mapbox\"),l=e._has(\"geo\"),c=e._basePlotModules.length;\"zoom\"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode=\"pan\")}},{\"../../lib\":743,\"./layout_attributes\":661}],663:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./hoverlabel_defaults\"),a=t(\"./layout_attributes\");e.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},{\"../../lib\":743,\"./hoverlabel_defaults\":659,\"./layout_attributes\":661}],664:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/constants\");e.exports={_isLinkedToArray:\"image\",visible:{valType:\"boolean\",dflt:!0,editType:\"arraydraw\"},source:{valType:\"string\",editType:\"arraydraw\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},sizex:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizey:{valType:\"number\",dflt:0,editType:\"arraydraw\"},sizing:{valType:\"enumerated\",values:[\"fill\",\"contain\",\"stretch\"],dflt:\"contain\",editType:\"arraydraw\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},x:{valType:\"any\",dflt:0,editType:\"arraydraw\"},y:{valType:\"any\",dflt:0,editType:\"arraydraw\"},xanchor:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"arraydraw\"},yanchor:{valType:\"enumerated\",values:[\"top\",\"middle\",\"bottom\"],dflt:\"top\",editType:\"arraydraw\"},xref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.x.toString()],dflt:\"paper\",editType:\"arraydraw\"},yref:{valType:\"enumerated\",values:[\"paper\",n.idRegex.y.toString()],dflt:\"paper\",editType:\"arraydraw\"},editType:\"arraydraw\"}},{\"../../plots/cartesian/constants\":794}],665:[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,c,u=t._fullLayout.images,f=e._id.charAt(0),h=0;h<u.length;h++)if(l=u[h],c=\"images[\"+h+\"].\",l[f+\"ref\"]===e._id){var d=l[f],p=l[\"size\"+f],m=null,g=null;if(o){m=i(d,e.range);var v=p/Math.pow(10,m)/2;g=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else g=(m=Math.pow(10,d))*(Math.pow(10,p/2)-Math.pow(10,-p/2));n(m)?n(g)||(g=null):(m=null,g=null),a(c+f,m),a(c+\"size\"+f,g)}}},{\"../../lib/to_log_range\":768,\"fast-isnumeric\":140}],666:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,s,r,n)}if(!n(\"visible\",!!n(\"source\")))return e;n(\"layer\"),n(\"xanchor\"),n(\"yanchor\"),n(\"sizex\"),n(\"sizey\"),n(\"sizing\"),n(\"opacity\");for(var o={_fullLayout:r},l=[\"x\",\"y\"],c=0;c<2;c++){var u=l[c],f=a.coerceRef(t,e,o,u,\"paper\");a.coercePosition(e,o,n,f,u,0)}return e}var i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../plots/array_container_defaults\"),s=t(\"./attributes\");e.exports=function(t,e){o(t,e,{name:\"images\",handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"../../plots/cartesian/axes\":789,\"./attributes\":664}],667:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../drawing\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../constants/xmlns_namespaces\");e.exports=function(t){function e(e){var r=n.select(this);if(!this.img||this.img.src!==e.source){r.attr(\"xmlns\",o.svg);var i=new Promise(function(t){function n(){r.remove(),t()}var i=new Image;this.img=i,i.setAttribute(\"crossOrigin\",\"anonymous\"),i.onerror=n,i.onload=function(){var e=document.createElement(\"canvas\");e.width=this.width,e.height=this.height;e.getContext(\"2d\").drawImage(this,0,0);var n=e.toDataURL(\"image/png\");r.attr(\"xlink:href\",n),t()},r.on(\"error\",n),i.src=e.source}.bind(this));t._promises.push(i)}}function r(e){var r=n.select(this),o=a.getFromId(t,e.xref),s=a.getFromId(t,e.yref),l=c._size,u=o?Math.abs(o.l2p(e.sizex)-o.l2p(0)):e.sizex*l.w,f=s?Math.abs(s.l2p(e.sizey)-s.l2p(0)):e.sizey*l.h,h=u*m.x[e.xanchor].offset,d=f*m.y[e.yanchor].offset,p=m.x[e.xanchor].sizing+m.y[e.yanchor].sizing,g=(o?o.r2p(e.x)+o._offset:e.x*l.w+l.l)+h,v=(s?s.r2p(e.y)+s._offset:l.h-e.y*l.h+l.t)+d;switch(e.sizing){case\"fill\":p+=\" slice\";break;case\"stretch\":p=\"none\"}r.attr({x:g,y:v,width:u,height:f,preserveAspectRatio:p,opacity:e.opacity});var y=(o?o._id:\"\")+(s?s._id:\"\");r.call(i.setClipUrl,y?\"clip\"+c._uid+y:null)}var s,l,c=t._fullLayout,u=[],f={},h=[];for(l=0;l<c.images.length;l++){var d=c.images[l];if(d.visible)if(\"below\"===d.layer&&\"paper\"!==d.xref&&\"paper\"!==d.yref){s=d.xref+d.yref;var p=c._plots[s];if(!p){h.push(d);continue}p.mainplot&&(s=p.mainplot.id),f[s]||(f[s]=[]),f[s].push(d)}else\"above\"===d.layer?u.push(d):h.push(d)}var m={x:{left:{sizing:\"xMin\",offset:0},center:{sizing:\"xMid\",offset:-.5},right:{sizing:\"xMax\",offset:-1}},y:{top:{sizing:\"YMin\",offset:0},middle:{sizing:\"YMid\",offset:-.5},bottom:{sizing:\"YMax\",offset:-1}}},g=c._imageLowerLayer.selectAll(\"image\").data(h),v=c._imageUpperLayer.selectAll(\"image\").data(u);g.enter().append(\"image\"),v.enter().append(\"image\"),g.exit().remove(),v.exit().remove(),g.each(function(t){e.bind(this)(t),r.bind(this)(t)}),v.each(function(t){e.bind(this)(t),r.bind(this)(t)});var y=Object.keys(c._plots);for(l=0;l<y.length;l++){s=y[l];var x=c._plots[s];if(x.imagelayer){var b=x.imagelayer.selectAll(\"image\").data(f[s]||[]);b.enter().append(\"image\"),b.exit().remove(),b.each(function(t){e.bind(this)(t),r.bind(this)(t)})}}}},{\"../../constants/xmlns_namespaces\":723,\"../../plots/cartesian/axes\":789,\"../drawing\":643,d3:128}],668:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"images\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"images\"),draw:t(\"./draw\"),convertCoords:t(\"./convert_coords\")}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":664,\"./convert_coords\":665,\"./defaults\":666,\"./draw\":667}],669:[function(t,e,r){\"use strict\";r.isRightAnchor=function(t){return\"right\"===t.xanchor||\"auto\"===t.xanchor&&t.x>=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}},{}],670:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",editType:\"legend\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"legend\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"legend\"},font:n({editType:\"legend\"}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"v\",editType:\"legend\"},traceorder:{valType:\"flaglist\",flags:[\"reversed\",\"grouped\"],extras:[\"normal\"],editType:\"legend\"},tracegroupgap:{valType:\"number\",min:0,dflt:10,editType:\"legend\"},x:{valType:\"number\",min:-2,max:3,dflt:1.02,editType:\"legend\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"legend\"},y:{valType:\"number\",min:-2,max:3,dflt:1,editType:\"legend\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"auto\",editType:\"legend\"},editType:\"legend\"}},{\"../../plots/font_attributes\":816,\"../color/attributes\":617}],671:[function(t,e,r){\"use strict\";e.exports={scrollBarWidth:4,scrollBarHeight:20,scrollBarColor:\"#808BA4\",scrollBarMargin:4}},{}],672:[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 c,u,f,h,d=t.legend||{},p=e.legend={},m=0,g=\"normal\",v=0;v<r.length;v++){var y=r[v];s.legendGetsTrace(y)&&(m++,n.traceIs(y,\"pie\")&&m++),(n.traceIs(y,\"bar\")&&\"stack\"===e.barmode||-1!==[\"tonextx\",\"tonexty\"].indexOf(y.fill))&&(g=s.isGrouped({traceorder:g})?\"grouped+reversed\":\"reversed\"),void 0!==y.legendgroup&&\"\"!==y.legendgroup&&(g=s.isReversed({traceorder:g})?\"reversed+grouped\":\"grouped\")}if(!1!==i.coerce(t,e,o,\"showlegend\",m>1)){if(l(\"bgcolor\",e.paper_bgcolor),l(\"bordercolor\"),l(\"borderwidth\"),i.coerceFont(l,\"font\",e.font),l(\"orientation\"),\"h\"===p.orientation){var x=t.xaxis;x&&x.rangeslider&&x.rangeslider.visible?(c=0,f=\"left\",u=1.1,h=\"bottom\"):(c=0,f=\"left\",u=-.1,h=\"top\")}l(\"traceorder\",g),s.isGrouped(e.legend)&&l(\"tracegroupgap\"),l(\"x\",c),l(\"xanchor\",f),l(\"y\",u),l(\"yanchor\",h),i.noneOrAll(d,p,[\"x\",\"y\"])}}},{\"../../lib\":743,\"../../plots/layout_attributes\":843,\"../../registry\":873,\"./attributes\":670,\"./helpers\":676}],673:[function(t,e,r){\"use strict\";function n(t,e){function r(r){m.convertToTspans(r,e,function(){!function(t,e){var r=t.data()[0][0];if(!r.trace.showlegend)return void t.remove();var n,i,a=t.select(\"g[class*=math-group]\"),o=a.node(),s=e._fullLayout.legend.font.size*x;if(o){var l=d.bBox(o);n=l.height,i=l.width,d.setTranslate(a,0,n/4)}else{var c=t.select(\".legendtext\"),u=m.lineCount(c),f=c.node();n=s*u,i=f?d.bBox(f).width:0;var h=s*(.3+(1-u)/2);m.positionText(c,40,h)}n=Math.max(n,16)+3,r.height=n,r.width=i}(t,e)})}var n=t.data()[0][0],i=e._fullLayout,a=n.trace,o=f.traceIs(a,\"pie\"),s=a.index,u=o?n.label:a.name,h=t.selectAll(\"text.legendtext\").data([0]);h.enter().append(\"text\").classed(\"legendtext\",!0),h.attr(\"text-anchor\",\"start\").classed(\"user-select-none\",!0).call(d.font,i.legend.font).text(u),e._context.edits.legendText&&!o?h.call(m.makeEditable,{gd:e}).call(r).on(\"edit\",function(t){this.text(t).call(r);var i=t;this.text()||(t=\" \");var a,o=n.trace._fullInput||{},u={};if(-1!==[\"ohlc\",\"candlestick\"].indexOf(o.type))u[(a=n.trace.transforms)[a.length-1].direction+\".name\"]=t;else if(f.hasTransform(o,\"groupby\")){var h=f.getTransformIndices(o,\"groupby\"),d=h[h.length-1],p=c.keyedContainer(o,\"transforms[\"+d+\"].styles\",\"target\",\"value.name\");\"\"===i?p.remove(n.trace._group):p.set(n.trace._group,t),u=p.constructUpdate()}else u.name=t;return l.restyle(e,u,s)}):h.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(p.fill,\"rgba(0,0,0,0)\"),i.on(\"mousedown\",function(){(r=(new Date).getTime())-e._legendMouseDownTime<k?n+=1:(n=1,e._legendMouseDownTime=r)}),i.on(\"mouseup\",function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>k&&(n=Math.max(n-1,1)),1===n?r._clickTimeout=setTimeout(function(){g(t,e,n)},k):2===n&&(r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0,g(t,e,n))}})}function a(t,e,r){var n=t._fullLayout,i=n.legend,a=i.borderwidth,o=w.isGrouped(i),l=0;if(i.width=0,i.height=0,w.isVertical(i))o&&e.each(function(t,e){d.setTranslate(this,0,e*i.tracegroupgap)}),r.each(function(t){var e=t[0],r=e.height,n=e.width;d.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),l=40;else if(o){for(var c=[i.width],u=e.data(),f=0,h=u.length;f<h;f++){var p=u[f].map(function(t){return t[0].width}),m=40+Math.max.apply(null,p);i.width+=i.tracegroupgap+m,c.push(i.width)}e.each(function(t,e){d.setTranslate(this,c[e],0)}),e.each(function(){var t=0;s.select(this).selectAll(\"g.traces\").each(function(e){var r=e[0].height;d.setTranslate(this,0,5+a+t+r/2),t+=r}),i.height=Math.max(i.height,t)}),i.height+=10+2*a,i.width+=2*a}else{var g,v=0,y=0,x=0,b=0,_=0,M=i.tracegroupgap||5;r.each(function(t){x=Math.max(40+t[0].width,x),_+=40+t[0].width+M}),g=n.width-(n.margin.r+n.margin.l)>a+_-M,r.each(function(t){var e=t[0],r=g?40+t[0].width:x;a+b+M+r>n.width-(n.margin.r+n.margin.l)&&(b=0,v+=y,i.height=i.height+y,y=0),d.setTranslate(this,a+b,5+a+e.height/2+v),i.width+=M+r,i.height=Math.max(i.height,e.height),b+=M+r,y=Math.max(e.height,y)}),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];s.select(this).select(\".legendtoggle\").call(d.setRect,0,-r.height/2,(t._context.edits.legendText?0:i.width)+l,r.height)})}function o(t){var e=t._fullLayout.legend,r=\"left\";M.isRightAnchor(e)?r=\"right\":M.isCenterAnchor(e)&&(r=\"center\");var n=\"top\";M.isBottomAnchor(e)?n=\"bottom\":M.isMiddleAnchor(e)&&(n=\"middle\"),u.autoMargin(t,\"legend\",{x:e.x,y:e.y,l:e.width*({right:1,center:.5}[r]||0),r:e.width*({left:1,center:.5}[r]||0),b:e.height*({top:1,middle:.5}[n]||0),t:e.height*({bottom:1,middle:.5}[n]||0)})}var s=t(\"d3\"),l=t(\"../../plotly\"),c=t(\"../../lib\"),u=t(\"../../plots/plots\"),f=t(\"../../registry\"),h=t(\"../dragelement\"),d=t(\"../drawing\"),p=t(\"../color\"),m=t(\"../../lib/svg_text_utils\"),g=t(\"./handle_click\"),v=t(\"./constants\"),y=t(\"../../constants/interactions\"),x=t(\"../../constants/alignment\").LINE_SPACING,b=t(\"./get_legend_data\"),_=t(\"./style\"),w=t(\"./helpers\"),M=t(\"./anchor_utils\"),k=y.DBLCLICKDELAY;e.exports=function(t){function e(t,e){E.attr(\"data-scroll\",e).call(d.setTranslate,0,e),L.call(d.setRect,N,t,v.scrollBarWidth,v.scrollBarHeight),T.select(\"rect\").attr({y:y.borderwidth-e})}var r=t._fullLayout,m=\"legend\"+r._uid;if(r._infolayer&&t.calcdata){t._legendMouseDownTime||(t._legendMouseDownTime=0);var y=r.legend,x=r.showlegend&&b(t.calcdata,y),w=r.hiddenlabels||[];if(!r.showlegend||!x.length)return r._infolayer.selectAll(\".legend\").remove(),r._topdefs.select(\"#\"+m).remove(),void u.autoMargin(t,\"legend\");var A=r._infolayer.selectAll(\"g.legend\").data([0]);A.enter().append(\"g\").attr({class:\"legend\",\"pointer-events\":\"all\"});var T=r._topdefs.selectAll(\"#\"+m).data([0]);T.enter().append(\"clipPath\").attr(\"id\",m).append(\"rect\");var S=A.selectAll(\"rect.bg\").data([0]);S.enter().append(\"rect\").attr({class:\"bg\",\"shape-rendering\":\"crispEdges\"}),S.call(p.stroke,y.bordercolor),S.call(p.fill,y.bgcolor),S.style(\"stroke-width\",y.borderwidth+\"px\");var E=A.selectAll(\"g.scrollbox\").data([0]);E.enter().append(\"g\").attr(\"class\",\"scrollbox\");var L=A.selectAll(\"rect.scrollbar\").data([0]);L.enter().append(\"rect\").attr({class:\"scrollbar\",rx:20,ry:2,width:0,height:0}).call(p.fill,\"#808BA4\");var C=E.selectAll(\"g.groups\").data(x);C.enter().append(\"g\").attr(\"class\",\"groups\"),C.exit().remove();var z=C.selectAll(\"g.traces\").data(c.identity);z.enter().append(\"g\").attr(\"class\",\"traces\"),z.exit().remove(),z.call(_,t).style(\"opacity\",function(t){var e=t[0].trace;return f.traceIs(e,\"pie\")?-1!==w.indexOf(t[0].label)?.5:1:\"legendonly\"===e.visible?.5:1}).each(function(){s.select(this).call(n,t).call(i,t)});var D=0!==A.enter().size();D&&(a(t,C,z),o(t));var I=r.width,P=r.height;a(t,C,z),y.height>P?function(t){var e=t._fullLayout.legend,r=\"left\";M.isRightAnchor(e)?r=\"right\":M.isCenterAnchor(e)&&(r=\"center\"),u.autoMargin(t,\"legend\",{x:e.x,y:.5,l:e.width*({right:1,center:.5}[r]||0),r:e.width*({left:1,center:.5}[r]||0),b:0,t:0})}(t):o(t);var O=r._size,F=O.l+O.w*y.x,R=O.t+O.h*(1-y.y);M.isRightAnchor(y)?F-=y.width:M.isCenterAnchor(y)&&(F-=y.width/2),M.isBottomAnchor(y)?R-=y.height:M.isMiddleAnchor(y)&&(R-=y.height/2);var N=y.width,j=O.w;N>j?(F=O.l,N=j):(F+N>I&&(F=I-N),F<0&&(F=0),N=Math.min(I-F,y.width));var B=y.height,U=O.h;B>U?(R=O.t,B=U):(R+B>P&&(R=P-B),R<0&&(R=0),B=Math.min(P-R,y.height)),d.setTranslate(A,F,R);var V,q,H=B-v.scrollBarHeight-2*v.scrollBarMargin,G=y.height-B;if(y.height<=B||t._context.staticPlot)S.attr({width:N-y.borderwidth,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),d.setTranslate(E,0,0),T.select(\"rect\").attr({width:N-2*y.borderwidth,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth}),E.call(d.setClipUrl,m);else{V=v.scrollBarMargin,q=E.attr(\"data-scroll\")||0,S.attr({width:N-2*y.borderwidth+v.scrollBarWidth+v.scrollBarMargin,height:B-y.borderwidth,x:y.borderwidth/2,y:y.borderwidth/2}),T.select(\"rect\").attr({width:N-2*y.borderwidth+v.scrollBarWidth+v.scrollBarMargin,height:B-2*y.borderwidth,x:y.borderwidth,y:y.borderwidth-q}),E.call(d.setClipUrl,m),D&&e(V,q),A.on(\"wheel\",null),A.on(\"wheel\",function(){q=c.constrain(E.attr(\"data-scroll\")-s.event.deltaY/H*G,-G,0),e(V=v.scrollBarMargin-q/G*H,q),0!==q&&q!==-G&&s.event.preventDefault()}),L.on(\".drag\",null),E.on(\".drag\",null);var Y=s.behavior.drag().on(\"drag\",function(){V=c.constrain(s.event.y-v.scrollBarHeight/2,v.scrollBarMargin,v.scrollBarMargin+H),q=-(V-v.scrollBarMargin)/H*G,e(V,q)});L.call(Y),E.call(Y)}if(t._context.edits.legendPosition){var W,X,Z,J;A.classed(\"cursor-move\",!0),h.init({element:A.node(),gd:t,prepFn:function(){var t=d.getTranslate(A);Z=t.x,J=t.y},moveFn:function(t,e){var r=Z+t,n=J+e;d.setTranslate(A,r,n),W=h.align(r,0,O.l,O.l+O.w,y.xanchor),X=h.align(n,0,O.t+O.h,O.t,y.yanchor)},doneFn:function(){void 0!==W&&void 0!==X&&l.relayout(t,{\"legend.x\":W,\"legend.y\":X})},clickFn:function(e,n){var i=r._infolayer.selectAll(\"g.traces\").filter(function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom});i.size()>0&&(1===e?A._clickTimeout=setTimeout(function(){g(i,t,e)},k):2===e&&(A._clickTimeout&&clearTimeout(A._clickTimeout),g(i,t,e)))}})}}}},{\"../../constants/alignment\":716,\"../../constants/interactions\":720,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/plots\":852,\"../../registry\":873,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./anchor_utils\":669,\"./constants\":671,\"./get_legend_data\":674,\"./handle_click\":675,\"./helpers\":676,\"./style\":678,d3:128}],674:[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),c=!0,s[t]=[[r]]):s[t].push([r]);else{var n=\"~~i\"+f;l.push(n),s[n]=[[r]],f++}}var a,o,s={},l=[],c=!1,u={},f=0;for(a=0;a<t.length;a++){var h=t[a],d=h[0],p=d.trace,m=p.legendgroup;if(i.legendGetsTrace(p)&&p.showlegend)if(n.traceIs(p,\"pie\"))for(u[m]||(u[m]={}),o=0;o<h.length;o++){var g=h[o].label;u[m][g]||(r(m,{label:g,color:h[o].color,i:h[o].i,trace:p}),u[m][g]=!0)}else r(m,d)}if(!l.length)return[];var v,y,x=l.length;if(c&&i.isGrouped(e))for(y=new Array(x),a=0;a<x;a++)v=s[l[a]],y[a]=i.isReversed(e)?v.reverse():v;else{for(y=[new Array(x)],a=0;a<x;a++)v=s[l[a]][0],y[0][i.isReversed(e)?x-a-1:a]=v;x=1}return e._lgroupsLength=x,y}},{\"../../registry\":873,\"./helpers\":676}],675:[function(t,e,r){\"use strict\";var n=t(\"../../plotly\"),i=t(\"../../lib\"),a=t(\"../../registry\"),o=!0;e.exports=function(t,e,r){function s(t,e,r){var n=b.indexOf(t),i=x[e];return i||(i=x[e]=[]),-1===b.indexOf(t)&&(b.push(t),n=b.length-1),i[n]=r,n}function l(t,e){var r=t._fullInput;if(a.hasTransform(r,\"groupby\")){var n=_[r.index];if(!n){var o=a.getTransformIndices(r,\"groupby\"),l=o[o.length-1];n=i.keyedContainer(r,\"transforms[\"+l+\"].styles\",\"target\",\"value.visible\"),_[r.index]=n}var c=n.get(t._group);void 0===c&&(c=!0),!1!==c&&n.set(t._group,e),w[r.index]=s(r.index,\"visible\",!1!==r.visible)}else{var u=!1!==r.visible&&e;s(r.index,\"visible\",u)}}if(!e._dragged&&!e._editing){var c,u,f,h,d,p=e._fullLayout.hiddenlabels?e._fullLayout.hiddenlabels.slice():[],m=t.data()[0][0],g=e._fullData,v=m.trace,y=v.legendgroup,x={},b=[],_=[],w=[];if(1===r&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,\"Double-click on legend to isolate one trace\"),\"long\"),o=!1):o=!1,a.traceIs(v,\"pie\")){var M=m.label,k=p.indexOf(M);1===r?-1===k?p.push(M):p.splice(k,1):2===r&&(p=[],e.calcdata[0].forEach(function(t){M!==t.label&&p.push(t.label)}),e._fullLayout.hiddenlabels&&e._fullLayout.hiddenlabels.length===p.length&&-1===k&&(p=[])),n.relayout(e,\"hiddenlabels\",p)}else{var A,T=y&&y.length,S=[];if(T)for(c=0;c<g.length;c++)(A=g[c]).visible&&A.legendgroup===y&&S.push(c);if(1===r){var E;switch(v.visible){case!0:E=\"legendonly\";break;case!1:E=!1;break;case\"legendonly\":E=!0}if(T)for(c=0;c<g.length;c++)!1!==g[c].visible&&g[c].legendgroup===y&&l(g[c],E);else l(v,E)}else if(2===r){var L,C,z=!0;for(c=0;c<g.length;c++)if(!(g[c]===v)&&!(L=T&&g[c].legendgroup===y)&&!0===g[c].visible&&!a.traceIs(g[c],\"notLegendIsolatable\")){z=!1;break}for(c=0;c<g.length;c++)if(!1!==g[c].visible&&!a.traceIs(g[c],\"notLegendIsolatable\"))switch(v.visible){case\"legendonly\":l(g[c],!0);break;case!0:C=!!z||\"legendonly\",L=g[c]===v||T&&g[c].legendgroup===y,l(g[c],!!L||C)}}for(c=0;c<_.length;c++)if(f=_[c]){var D=f.constructUpdate(),I=Object.keys(D);for(u=0;u<I.length;u++)h=I[u],(x[h]=x[h]||[])[w[c]]=D[h]}for(d=Object.keys(x),c=0;c<d.length;c++)for(h=d[c],u=0;u<b.length;u++)x[h].hasOwnProperty(u)||(x[h][u]=void 0);n.restyle(e,x,b)}}}},{\"../../lib\":743,\"../../plotly\":784,\"../../registry\":873}],676:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");r.legendGetsTrace=function(t){return t.visible&&n.traceIs(t,\"showLegend\")},r.isGrouped=function(t){return-1!==(t.traceorder||\"\").indexOf(\"grouped\")},r.isVertical=function(t){return\"h\"!==t.orientation},r.isReversed=function(t){return-1!==(t.traceorder||\"\").indexOf(\"reversed\")}},{\"../../registry\":873}],677:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"legend\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\"),style:t(\"./style\")}},{\"./attributes\":670,\"./defaults\":672,\"./draw\":673,\"./style\":678}],678:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../drawing\"),s=t(\"../color\"),l=t(\"../../traces/scatter/subtypes\"),c=t(\"../../traces/pie/style_one\");e.exports=function(t,e){t.each(function(t){var e=n.select(this).selectAll(\"g.layers\").data([0]);e.enter().append(\"g\").classed(\"layers\",!0),e.style(\"opacity\",t[0].trace.opacity);e.selectAll(\"g.legendfill\").data([t]).enter().append(\"g\").classed(\"legendfill\",!0);e.selectAll(\"g.legendlines\").data([t]).enter().append(\"g\").classed(\"legendlines\",!0);var r=e.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(function(t){var e=t[0].trace,r=e.marker||{},a=r.line||{},o=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbar\").data(i.traceIs(e,\"bar\")?[t]:[]);o.enter().append(\"path\").classed(\"legendbar\",!0).attr(\"d\",\"M6,6H-6V-6H6Z\").attr(\"transform\",\"translate(20,0)\"),o.exit().remove(),o.each(function(t){var e=n.select(this),i=t[0],o=(i.mlw+1||a.width+1)-1;e.style(\"stroke-width\",o+\"px\").call(s.fill,i.mc||r.color),o&&e.call(s.stroke,i.mlc||a.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendbox\").data(i.traceIs(e,\"box-violin\")&&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=n.select(this);r.style(\"stroke-width\",t+\"px\").call(s.fill,e.fillcolor),t&&r.call(s.stroke,e.line.color)})}).each(function(t){var e=t[0].trace,r=n.select(this).select(\"g.legendpoints\").selectAll(\"path.legendpie\").data(i.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(c,t[0],e)}).each(function(t){var e=t[0].trace,r=e.visible&&e.fill&&\"none\"!==e.fill,i=l.hasLines(e);e&&e._module&&\"contourcarpet\"===e._module.name&&(i=e.contours.showlines,r=\"fill\"===e.contours.coloring);var a=n.select(this).select(\".legendfill\").selectAll(\"path\").data(r?[t]:[]);a.enter().append(\"path\").classed(\"js-fill\",!0),a.exit().remove(),a.attr(\"d\",\"M5,0h30v6h-30z\").call(o.fillGroupStyle);var s=n.select(this).select(\".legendlines\").selectAll(\"path\").data(i?[t]:[]);s.enter().append(\"path\").classed(\"js-line\",!0).attr(\"d\",\"M5,0h30\"),s.exit().remove(),s.call(o.lineGroupStyle)}).each(function(t){function r(t,e,r){var n=a.nestedProperty(f,t).get(),i=Array.isArray(n)&&e?e(n):n;if(r){if(i<r[0])return r[0];if(i>r[1])return r[1]}return i}function i(t){return t[0]}var s,c,u=t[0],f=u.trace,h=l.hasMarkers(f),d=l.hasText(f),p=l.hasLines(f);if(h||d||p){var m={},g={};h&&(m.mc=r(\"marker.color\",i),m.mo=r(\"marker.opacity\",a.mean,[.2,1]),m.ms=r(\"marker.size\",a.mean,[2,16]),m.mlc=r(\"marker.line.color\",i),m.mlw=r(\"marker.line.width\",a.mean,[0,5]),g.marker={sizeref:1,sizemin:1,sizemode:\"diameter\"}),p&&(g.line={width:r(\"line.width\",i,[0,10])}),d&&(m.tx=\"Aa\",m.tp=r(\"textposition\",i),m.ts=10,m.tc=r(\"textfont.color\",i),m.tf=r(\"textfont.family\",i)),s=[a.minExtend(u,m)],c=a.minExtend(f,g)}var v=n.select(this).select(\"g.legendpoints\"),y=v.selectAll(\"path.scatterpts\").data(h?s:[]);y.enter().append(\"path\").classed(\"scatterpts\",!0).attr(\"transform\",\"translate(20,0)\"),y.exit().remove(),y.call(o.pointStyle,c,e),h&&(s[0].mrc=3);var x=v.selectAll(\"g.pointtext\").data(d?s:[]);x.enter().append(\"g\").classed(\"pointtext\",!0).append(\"text\").attr(\"transform\",\"translate(20,0)\"),x.exit().remove(),x.selectAll(\"text\").call(o.textPointStyle,c,e)})}},{\"../../lib\":743,\"../../registry\":873,\"../../traces/pie/style_one\":1052,\"../../traces/scatter/subtypes\":1088,\"../color\":618,\"../drawing\":643,d3:128}],679:[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={},c=h.list(t,null,!0),f=\"on\";if(\"zoom\"===a){var d,p=\"in\"===o?.5:2,m=(1+p)/2,g=(1-p)/2;for(n=0;n<c.length;n++)if(!(r=c[n]).fixedrange)if(d=r._name,\"auto\"===o)l[d+\".autorange\"]=!0;else if(\"reset\"===o){if(void 0===r._rangeInitial)l[d+\".autorange\"]=!0;else{var v=r._rangeInitial.slice();l[d+\".range[0]\"]=v[0],l[d+\".range[1]\"]=v[1]}void 0!==r._showSpikeInitial&&(l[d+\".showspikes\"]=r._showSpikeInitial,\"on\"!==f||r._showSpikeInitial||(f=\"off\"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[m*y[0]+g*y[1],m*y[1]+g*y[0]];l[d+\".range[0]\"]=r.l2r(x[0]),l[d+\".range[1]\"]=r.l2r(x[1])}s._cartesianSpikesEnabled=f}else{if(\"hovermode\"!==a||\"x\"!==o&&\"y\"!==o){if(\"hovermode\"===a&&\"closest\"===o){for(n=0;n<c.length;n++)r=c[n],\"on\"!==f||r.showspikes||(f=\"off\");s._cartesianSpikesEnabled=f}}else o=s._isHoriz?\"y\":\"x\",i.setAttribute(\"data-val\",o);l[a]=o}u.relayout(t,l)}function i(t,e){for(var r=e.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=t._fullLayout._subplots.gl3d,o={},s=n.split(\".\"),l=0;l<a.length;l++)o[a[l]+\".\"+s[1]]=i;u.relayout(t,o)}function a(t,e){for(var r=e.currentTarget.getAttribute(\"data-attr\"),n=t._fullLayout,i=n._subplots.gl3d,a={},o=0;o<i.length;o++){var s=i[o],l=s+\".camera\",c=n[s]._scene;\"resetDefault\"===r?a[l]=null:\"resetLastSave\"===r&&(a[l]=d.extendDeep({},c.cameraInitial))}u.relayout(t,a)}function o(t,e){var r=e.currentTarget,n=r._previousVal||!1,i=t.layout,a=t._fullLayout,o=a._subplots.gl3d,s=[\"xaxis\",\"yaxis\",\"zaxis\"],l=[\"showspikes\",\"spikesides\",\"spikethickness\",\"spikecolor\"],c={},f={},h={};if(n)h=d.extendDeep(i,n),r._previousVal=null;else{h={\"allaxes.showspikes\":!1};for(var p=0;p<o.length;p++){var m=o[p],g=a[m],v=c[m]={};v.hovermode=g.hovermode,h[m+\".hovermode\"]=!1;for(var y=0;y<3;y++){var x=s[y];f=v[x]={};for(var b=0;b<l.length;b++){var _=l[b];f[_]=g[x][_]}}}r._previousVal=d.extendDeep({},c)}u.relayout(t,h)}function s(t,e){for(var r=e.currentTarget,n=r.getAttribute(\"data-attr\"),i=r.getAttribute(\"data-val\")||!0,a=t._fullLayout,o=a._subplots.geo,s=0;s<o.length;s++){var l=o[s],f=a[l];if(\"zoom\"===n){var h=f.projection.scale,d=\"in\"===i?2*h:.5*h;u.relayout(t,l+\".projection.scale\",d)}else\"reset\"===n&&c(t,\"geo\")}}function l(t){var e,r=t._fullLayout;e=r._has(\"cartesian\")?r._isHoriz?\"y\":\"x\":\"closest\";var n=!t._fullLayout.hovermode&&e;u.relayout(t,\"hovermode\",n)}function c(t,e){for(var r=t._fullLayout,n=r._subplots[e],i={},a=0;a<n.length;a++)for(var o=n[a],s=r[o]._subplot.viewInitial,l=Object.keys(s),c=0;c<l.length;c++){var f=l[c];i[o+\".\"+f]=s[f]}u.relayout(t,i)}var u=t(\"../../plotly\"),f=t(\"../../plots/plots\"),h=t(\"../../plots/cartesian/axis_ids\"),d=t(\"../../lib\"),p=t(\"../../snapshot/download\"),m=t(\"../../../build/ploticon\"),g=d._,v=e.exports={};v.toImage={name:\"toImage\",title:function(t){return g(t,\"Download plot as a png\")},icon:m.camera,click:function(t){var e=\"png\";d.notifier(g(t,\"Taking snapshot - this may take a few seconds\"),\"long\"),d.isIE()&&(d.notifier(g(t,\"IE only supports svg. Changing format to svg.\"),\"long\"),e=\"svg\"),p(t,{format:e}).then(function(e){d.notifier(g(t,\"Snapshot succeeded\")+\" - \"+e,\"long\")}).catch(function(){d.notifier(g(t,\"Sorry, there was a problem downloading your snapshot!\"),\"long\")})}},v.sendDataToCloud={name:\"sendDataToCloud\",title:function(t){return g(t,\"Edit in Chart Studio\")},icon:m.disk,click:function(t){f.sendDataToCloud(t)}},v.zoom2d={name:\"zoom2d\",title:function(t){return g(t,\"Zoom\")},attr:\"dragmode\",val:\"zoom\",icon:m.zoombox,click:n},v.pan2d={name:\"pan2d\",title:function(t){return g(t,\"Pan\")},attr:\"dragmode\",val:\"pan\",icon:m.pan,click:n},v.select2d={name:\"select2d\",title:function(t){return g(t,\"Box Select\")},attr:\"dragmode\",val:\"select\",icon:m.selectbox,click:n},v.lasso2d={name:\"lasso2d\",title:function(t){return g(t,\"Lasso Select\")},attr:\"dragmode\",val:\"lasso\",icon:m.lasso,click:n},v.zoomIn2d={name:\"zoomIn2d\",title:function(t){return g(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:m.zoom_plus,click:n},v.zoomOut2d={name:\"zoomOut2d\",title:function(t){return g(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:m.zoom_minus,click:n},v.autoScale2d={name:\"autoScale2d\",title:function(t){return g(t,\"Autoscale\")},attr:\"zoom\",val:\"auto\",icon:m.autoscale,click:n},v.resetScale2d={name:\"resetScale2d\",title:function(t){return g(t,\"Reset axes\")},attr:\"zoom\",val:\"reset\",icon:m.home,click:n},v.hoverClosestCartesian={name:\"hoverClosestCartesian\",title:function(t){return g(t,\"Show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:m.tooltip_basic,gravity:\"ne\",click:n},v.hoverCompareCartesian={name:\"hoverCompareCartesian\",title:function(t){return g(t,\"Compare data on hover\")},attr:\"hovermode\",val:function(t){return t._fullLayout._isHoriz?\"y\":\"x\"},icon:m.tooltip_compare,gravity:\"ne\",click:n},v.zoom3d={name:\"zoom3d\",title:function(t){return g(t,\"Zoom\")},attr:\"scene.dragmode\",val:\"zoom\",icon:m.zoombox,click:i},v.pan3d={name:\"pan3d\",title:function(t){return g(t,\"Pan\")},attr:\"scene.dragmode\",val:\"pan\",icon:m.pan,click:i},v.orbitRotation={name:\"orbitRotation\",title:function(t){return g(t,\"Orbital rotation\")},attr:\"scene.dragmode\",val:\"orbit\",icon:m[\"3d_rotate\"],click:i},v.tableRotation={name:\"tableRotation\",title:function(t){return g(t,\"Turntable rotation\")},attr:\"scene.dragmode\",val:\"turntable\",icon:m[\"z-axis\"],click:i},v.resetCameraDefault3d={name:\"resetCameraDefault3d\",title:function(t){return g(t,\"Reset camera to default\")},attr:\"resetDefault\",icon:m.home,click:a},v.resetCameraLastSave3d={name:\"resetCameraLastSave3d\",title:function(t){return g(t,\"Reset camera to last save\")},attr:\"resetLastSave\",icon:m.movie,click:a},v.hoverClosest3d={name:\"hoverClosest3d\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:o},v.zoomInGeo={name:\"zoomInGeo\",title:function(t){return g(t,\"Zoom in\")},attr:\"zoom\",val:\"in\",icon:m.zoom_plus,click:s},v.zoomOutGeo={name:\"zoomOutGeo\",title:function(t){return g(t,\"Zoom out\")},attr:\"zoom\",val:\"out\",icon:m.zoom_minus,click:s},v.resetGeo={name:\"resetGeo\",title:function(t){return g(t,\"Reset\")},attr:\"reset\",val:null,icon:m.autoscale,click:s},v.hoverClosestGeo={name:\"hoverClosestGeo\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:l},v.hoverClosestGl2d={name:\"hoverClosestGl2d\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:l},v.hoverClosestPie={name:\"hoverClosestPie\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:\"closest\",icon:m.tooltip_basic,gravity:\"ne\",click:l},v.toggleHover={name:\"toggleHover\",title:function(t){return g(t,\"Toggle show closest data on hover\")},attr:\"hovermode\",val:null,toggle:!0,icon:m.tooltip_basic,gravity:\"ne\",click:function(t,e){l(t),o(t,e)}},v.resetViews={name:\"resetViews\",title:function(t){return g(t,\"Reset views\")},icon:m.home,click:function(t,e){var r=e.currentTarget;r.setAttribute(\"data-attr\",\"zoom\"),r.setAttribute(\"data-val\",\"reset\"),n(t,e),r.setAttribute(\"data-attr\",\"resetLastSave\"),a(t,e),c(t,\"geo\"),c(t,\"mapbox\")}},v.toggleSpikelines={name:\"toggleSpikelines\",title:function(t){return g(t,\"Toggle Spike Lines\")},icon:m.spikeline,attr:\"_cartesianSpikesEnabled\",val:\"on\",click:function(t){var e=t._fullLayout;e._cartesianSpikesEnabled=\"on\"===e._cartesianSpikesEnabled?\"off\":\"on\";var r=function(t){for(var e,r=t._fullLayout,n=h.list(t,null,!0),i={},a=0;a<n.length;a++)i[(e=n[a])._name+\".showspikes\"]=\"on\"===r._cartesianSpikesEnabled||e._showSpikeInitial;return i}(t);u.relayout(t,r)}},v.resetViewMapbox={name:\"resetViewMapbox\",title:function(t){return g(t,\"Reset view\")},attr:\"reset\",icon:m.home,click:function(t){c(t,\"mapbox\")}}},{\"../../../build/ploticon\":2,\"../../lib\":743,\"../../plotly\":784,\"../../plots/cartesian/axis_ids\":792,\"../../plots/plots\":852,\"../../snapshot/download\":875}],680:[function(t,e,r){\"use strict\";r.manage=t(\"./manage\")},{\"./manage\":681}],681:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];-1===e.indexOf(i)&&r.push(c[i])}x.push(r)}var l=t._fullLayout,u=t._fullData,f=l._has(\"cartesian\"),h=l._has(\"gl3d\"),d=l._has(\"geo\"),p=l._has(\"pie\"),m=l._has(\"gl2d\"),g=l._has(\"ternary\"),v=l._has(\"mapbox\"),y=l._has(\"polar\"),x=[];if(n([\"toImage\",\"sendDataToCloud\"]),(f||m||p||g)+d+h>1)return n([\"resetViews\",\"toggleHover\"]),i(x,r);h&&(n([\"zoom3d\",\"pan3d\",\"orbitRotation\",\"tableRotation\"]),n([\"resetCameraDefault3d\",\"resetCameraLastSave3d\"]),n([\"hoverClosest3d\"]));var b=function(t){for(var e=a.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(l),_=[];return((f||m)&&!b||g)&&(_=[\"zoom2d\",\"pan2d\"]),(v||d)&&(_=[\"pan2d\"]),y&&(_=[\"zoom2d\"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(s.traceIs(n,\"scatter-like\")?(o.hasMarkers(n)||o.hasText(n))&&(e=!0):s.traceIs(n,\"box-violin\")?\"all\"!==n.boxpoints&&\"all\"!==n.points||(e=!0):e=!0)}return e}(u)&&(_.push(\"select2d\"),_.push(\"lasso2d\")),_.length&&n(_),!f&&!m||b||g||n([\"zoomIn2d\",\"zoomOut2d\",\"autoScale2d\",\"resetScale2d\"]),f&&p?n([\"toggleHover\"]):m?n([\"hoverClosestGl2d\"]):f?n([\"toggleSpikelines\",\"hoverClosestCartesian\",\"hoverCompareCartesian\"]):p?n([\"hoverClosestPie\"]):v?n([\"resetViewMapbox\",\"toggleHover\"]):d&&(n([\"zoomInGeo\",\"zoomOutGeo\",\"resetGeo\"]),n([\"hoverClosestGeo\"])),i(x,r)}function i(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}var a=t(\"../../plots/cartesian/axis_ids\"),o=t(\"../../traces/scatter/subtypes\"),s=t(\"../../registry\"),l=t(\"./modebar\"),c=t(\"./buttons\");e.exports=function(t){var e=t._fullLayout,r=t._context,i=e._modeBar;if(r.displayModeBar){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error([\"*modeBarButtonsToRemove* configuration options\",\"must be an array.\"].join(\" \"));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error([\"*modeBarButtonsToAdd* configuration options\",\"must be an array.\"].join(\" \"));var a,o=r.modeBarButtons;a=Array.isArray(o)&&o.length?function(t){for(var e=0;e<t.length;e++)for(var r=t[e],n=0;n<r.length;n++){var i=r[n];if(\"string\"==typeof i){if(void 0===c[i])throw new Error([\"*modeBarButtons* configuration options\",\"invalid button name\"].join(\" \"));t[e][n]=c[i]}}return t}(o):n(t,r.modeBarButtonsToRemove,r.modeBarButtonsToAdd),i?i.update(t,a):e._modeBar=l(t,a)}else i&&(i.destroy(),delete e._modeBar)}},{\"../../plots/cartesian/axis_ids\":792,\"../../registry\":873,\"../../traces/scatter/subtypes\":1088,\"./buttons\":679,\"./modebar\":682}],682:[function(t,e,r){\"use strict\";function n(t){this.container=t.container,this.element=document.createElement(\"div\"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../../build/ploticon\"),s=n.prototype;s.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context;\"hover\"===r.displayModeBar?this.element.className=\"modebar modebar--hover\":this.element.className=\"modebar\";var n=!this.hasButtons(e),i=this.hasLogo!==r.displaylogo;(n||i)&&(this.removeAllButtons(),this.updateButtons(e),r.displaylogo&&(this.element.appendChild(this.getLogo()),this.hasLogo=!0)),this.updateActiveButton()},s.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var r=e.createGroup();t.forEach(function(t){var n=t.name;if(!n)throw new Error(\"must provide button 'name' in button config\");if(-1!==e.buttonsNames.indexOf(n))throw new Error(\"button name '\"+n+\"' is taken\");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)}),e.element.appendChild(r)})},s.createGroup=function(){var t=document.createElement(\"div\");return t.className=\"modebar-group\",t},s.createButton=function(t){var e=this,r=document.createElement(\"a\");r.setAttribute(\"rel\",\"tooltip\"),r.className=\"modebar-btn\";var n=t.title;void 0===n?n=t.name:\"function\"==typeof n&&(n=n(this.graphInfo)),(n||0===n)&&r.setAttribute(\"data-title\",n),void 0!==t.attr&&r.setAttribute(\"data-attr\",t.attr);var a=t.val;void 0!==a&&(\"function\"==typeof a&&(a=a(this.graphInfo)),r.setAttribute(\"data-val\",a));if(\"function\"!=typeof t.click)throw new Error(\"must provide button 'click' function in button config\");return r.addEventListener(\"click\",function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)}),r.setAttribute(\"data-toggle\",t.toggle||!1),t.toggle&&i.select(r).classed(\"active\",!0),r.appendChild(this.createIcon(t.icon||o.question,t.name)),r.setAttribute(\"data-gravity\",t.gravity||\"n\"),r},s.createIcon=function(t,e){var r=t.ascent-t.descent,n=\"http://www.w3.org/2000/svg\",i=document.createElementNS(n,\"svg\"),a=document.createElementNS(n,\"path\");i.setAttribute(\"height\",\"1em\"),i.setAttribute(\"width\",t.width/r+\"em\"),i.setAttribute(\"viewBox\",[0,0,t.width,r].join(\" \"));var o=\"toggleSpikelines\"===e?\"matrix(1.5 0 0 -1.5 0 \"+t.ascent+\")\":\"matrix(1 0 0 -1 0 \"+t.ascent+\")\";return a.setAttribute(\"d\",t.path),a.setAttribute(\"transform\",o),i.appendChild(a),i},s.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute(\"data-attr\"):null;this.buttonElements.forEach(function(t){var n=t.getAttribute(\"data-val\")||!0,o=t.getAttribute(\"data-attr\"),s=\"true\"===t.getAttribute(\"data-toggle\"),l=i.select(t);if(s)o===r&&l.classed(\"active\",!l.classed(\"active\"));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed(\"active\",c===n)}})},s.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},s.getLogo=function(){var t=this.createGroup(),e=document.createElement(\"a\");return e.href=\"https://plot.ly/\",e.target=\"_blank\",e.setAttribute(\"data-title\",a._(this.graphInfo,\"Produced with Plotly\")),e.className=\"modebar-btn plotlyjsicon modebar-btn--logo\",e.appendChild(this.createIcon(o.plotlylogo)),t.appendChild(e),t},s.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},s.destroy=function(){a.removeElement(this.container.querySelector(\".modebar\"))},e.exports=function(t,e){var r=t._fullLayout,a=new n({graphInfo:t,container:r._paperdiv.node(),buttons:e});return r._privateplot&&i.select(a.element).append(\"span\").classed(\"badge-private float--left\",!0).text(\"PRIVATE\"),a}},{\"../../../build/ploticon\":2,\"../../lib\":743,d3:128}],683:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"./button_attributes\");o=a(o,{_isLinkedToArray:\"button\"}),e.exports={visible:{valType:\"boolean\",editType:\"plot\"},buttons:o,x:{valType:\"number\",min:-2,max:3,editType:\"plot\"},xanchor:{valType:\"enumerated\",values:[\"auto\",\"left\",\"center\",\"right\"],dflt:\"left\",editType:\"plot\"},y:{valType:\"number\",min:-2,max:3,editType:\"plot\"},yanchor:{valType:\"enumerated\",values:[\"auto\",\"top\",\"middle\",\"bottom\"],dflt:\"bottom\",editType:\"plot\"},font:n({editType:\"plot\"}),bgcolor:{valType:\"color\",dflt:i.lightLine,editType:\"plot\"},activecolor:{valType:\"color\",editType:\"plot\"},bordercolor:{valType:\"color\",dflt:i.defaultLine,editType:\"plot\"},borderwidth:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},editType:\"plot\"}},{\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../color/attributes\":617,\"./button_attributes\":684}],684:[function(t,e,r){\"use strict\";e.exports={step:{valType:\"enumerated\",values:[\"month\",\"year\",\"day\",\"hour\",\"minute\",\"second\",\"all\"],dflt:\"month\",editType:\"plot\"},stepmode:{valType:\"enumerated\",values:[\"backward\",\"todate\"],dflt:\"backward\",editType:\"plot\"},count:{valType:\"number\",min:0,dflt:1,editType:\"plot\"},label:{valType:\"string\",editType:\"plot\"},editType:\"plot\"}},{}],685:[function(t,e,r){\"use strict\";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],686:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../color\"),a=t(\"./attributes\"),o=t(\"./button_attributes\"),s=t(\"./constants\");e.exports=function(t,e,r,l,c){function u(t,e){return n.coerce(f,h,a,t,e)}var f=t.rangeselector||{},h=e.rangeselector={};if(u(\"visible\",function(t,e,r){function i(t,e){return n.coerce(a,s,o,t,e)}for(var a,s,l=t.buttons||[],c=e.buttons=[],u=0;u<l.length;u++)if(a=l[u],s={},n.isPlainObject(a)){var f=i(\"step\");\"all\"!==f&&(!r||\"gregorian\"===r||\"month\"!==f&&\"year\"!==f?i(\"stepmode\"):s.stepmode=\"backward\",i(\"count\")),i(\"label\"),s._index=u,c.push(s)}return c}(f,h,c).length>0)){var d=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+s.yPad]}(e,r,l);u(\"x\",d[0]),u(\"y\",d[1]),n.noneOrAll(t,e,[\"x\",\"y\"]),u(\"xanchor\"),u(\"yanchor\"),n.coerceFont(u,\"font\",r.font);var p=u(\"bgcolor\");u(\"activecolor\",i.contrast(p,s.lightAmount,s.darkAmount)),u(\"bordercolor\"),u(\"borderwidth\")}}},{\"../../lib\":743,\"../color\":618,\"./attributes\":683,\"./button_attributes\":684,\"./constants\":685}],687:[function(t,e,r){\"use strict\";function n(t){return t._id}function i(t,e,r){var n=t.selectAll(\"rect\").data([0]);n.enter().append(\"rect\").classed(\"selector-rect\",!0),n.attr(\"shape-rendering\",\"crispEdges\"),n.attr({rx:m.rx,ry:m.ry}),n.call(c.stroke,e.bordercolor).call(c.fill,function(t,e){return e.isActive||e.isHovered?t.activecolor:t.bgcolor}(e,r)).style(\"stroke-width\",e.borderwidth+\"px\")}function a(t,e,r,n){var i=t.selectAll(\"text\").data([0]);i.enter().append(\"text\").classed(\"selector-text\",!0).classed(\"user-select-none\",!0),i.attr(\"text-anchor\",\"middle\"),i.call(u.font,e.font).text(function(t){return t.label?t.label:\"all\"===t.step?\"all\":t.count+t.step.charAt(0)}(r)).call(function(t){f.convertToTspans(t,n)})}var o=t(\"d3\"),s=t(\"../../plotly\"),l=t(\"../../plots/plots\"),c=t(\"../color\"),u=t(\"../drawing\"),f=t(\"../../lib/svg_text_utils\"),h=t(\"../../plots/cartesian/axis_ids\"),d=t(\"../legend/anchor_utils\"),p=t(\"../../constants/alignment\").LINE_SPACING,m=t(\"./constants\"),g=t(\"./get_update_object\");e.exports=function(t){var e=t._fullLayout._infolayer.selectAll(\".rangeselector\").data(function(t){for(var e=h.list(t,\"x\",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),n);e.enter().append(\"g\").classed(\"rangeselector\",!0),e.exit().remove(),e.style({cursor:\"pointer\",\"pointer-events\":\"all\"}),e.each(function(e){var r=o.select(this),n=e,c=n.rangeselector,h=r.selectAll(\"g.button\").data(c.buttons);h.enter().append(\"g\").classed(\"button\",!0),h.exit().remove(),h.each(function(e){var r=o.select(this),l=g(n,e);e.isActive=function(t,e,r){if(\"all\"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(n,e,l),r.call(i,c,e),r.call(a,c,e,t),r.on(\"click\",function(){t._dragged||s.relayout(t,l)}),r.on(\"mouseover\",function(){e.isHovered=!0,r.call(i,c,e)}),r.on(\"mouseout\",function(){e.isHovered=!1,r.call(i,c,e)})}),function(t,e,r,n){r.width=0,r.height=0;var i=r.borderwidth;e.each(function(){var t=o.select(this).select(\".selector-text\"),e=r.font.size*p,n=Math.max(e*f.lineCount(t),16)+3;r.height=Math.max(r.height,n)}),e.each(function(){var t=o.select(this),e=t.select(\".selector-rect\"),n=t.select(\".selector-text\"),a=n.node()&&u.bBox(n.node()).width,s=r.font.size*p,l=f.lineCount(n),c=Math.max(a+10,m.minButtonWidth);t.attr(\"transform\",\"translate(\"+(i+r.width)+\",\"+i+\")\"),e.attr({x:0,y:0,width:c,height:r.height}),f.positionText(n,c/2,r.height/2-(l-1)*s/2+3),r.width+=c+5}),e.selectAll(\"rect\").attr(\"height\",r.height);var a=t._fullLayout._size;r.lx=a.l+a.w*r.x,r.ly=a.t+a.h*(1-r.y);var s=\"left\";d.isRightAnchor(r)&&(r.lx-=r.width,s=\"right\"),d.isCenterAnchor(r)&&(r.lx-=r.width/2,s=\"center\");var c=\"top\";d.isBottomAnchor(r)&&(r.ly-=r.height,c=\"bottom\"),d.isMiddleAnchor(r)&&(r.ly-=r.height/2,c=\"middle\"),r.width=Math.ceil(r.width),r.height=Math.ceil(r.height),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),l.autoMargin(t,n+\"-range-selector\",{x:r.x,y:r.y,l:r.width*({right:1,center:.5}[s]||0),r:r.width*({left:1,center:.5}[s]||0),b:r.height*({top:1,middle:.5}[c]||0),t:r.height*({bottom:1,middle:.5}[c]||0)})}(t,h,c,n._name),r.attr(\"transform\",\"translate(\"+c.lx+\",\"+c.ly+\")\")})}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/cartesian/axis_ids\":792,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":685,\"./get_update_object\":688,d3:128}],688:[function(t,e,r){\"use strict\";var n=t(\"d3\");e.exports=function(t,e){var r=t._name,i={};if(\"all\"===e.step)i[r+\".autorange\"]=!0;else{var a=function(t,e){var r,i=t.range,a=new Date(t.r2l(i[1])),o=e.step,s=e.count;switch(e.stepmode){case\"backward\":r=t.l2r(+n.time[o].utc.offset(a,-s));break;case\"todate\":var l=n.time[o].utc.offset(a,-s);r=t.l2r(+n.time[o].utc.ceil(l))}return[r,i[1]]}(t,e);i[r+\".range[0]\"]=a[0],i[r+\".range[1]\"]=a[1]}return i}},{d3:128}],689:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"rangeselector\",schema:{subplots:{xaxis:{rangeselector:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":683,\"./defaults\":686,\"./draw\":687}],690:[function(t,e,r){\"use strict\";var n=t(\"../color/attributes\");e.exports={bgcolor:{valType:\"color\",dflt:n.background,editType:\"calc\"},bordercolor:{valType:\"color\",dflt:n.defaultLine,editType:\"calc\"},borderwidth:{valType:\"integer\",dflt:0,min:0,editType:\"calc\"},autorange:{valType:\"boolean\",dflt:!0,editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},thickness:{valType:\"number\",dflt:.15,min:0,max:1,editType:\"calc\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"}},{\"../color/attributes\":617}],691:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./constants\");e.exports=function(t){for(var e=n.list(t,\"x\",!0),r=0;r<e.length;r++){var a=e[r],o=a[i.name];o&&o.visible&&o.autorange&&a._min.length&&a._max.length&&(o._input.autorange=!0,o._input.range=o.range=n.getAutoRange(a))}}},{\"../../plots/cartesian/axes\":789,\"./constants\":692}],692:[function(t,e,r){\"use strict\";e.exports={name:\"rangeslider\",containerClassName:\"rangeslider-container\",bgClassName:\"rangeslider-bg\",rangePlotClassName:\"rangeslider-rangeplot\",maskMinClassName:\"rangeslider-mask-min\",maskMaxClassName:\"rangeslider-mask-max\",slideBoxClassName:\"rangeslider-slidebox\",grabberMinClassName:\"rangeslider-grabber-min\",grabAreaMinClassName:\"rangeslider-grabarea-min\",handleMinClassName:\"rangeslider-handle-min\",grabberMaxClassName:\"rangeslider-grabber-max\",grabAreaMaxClassName:\"rangeslider-grabarea-max\",handleMaxClassName:\"rangeslider-handle-max\",maskColor:\"rgba(0,0,0,0.4)\",slideBoxFill:\"transparent\",slideBoxCursor:\"ew-resize\",grabAreaFill:\"transparent\",grabAreaCursor:\"col-resize\",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],693:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){function a(t,e){return n.coerce(o,l,i,t,e)}if(t[r].rangeslider){n.isPlainObject(t[r].rangeslider)||(t[r].rangeslider={});var o=t[r].rangeslider,s=e[r],l=s.rangeslider={};if(a(\"visible\")){if(a(\"bgcolor\",e.plot_bgcolor),a(\"bordercolor\"),a(\"borderwidth\"),a(\"thickness\"),a(\"autorange\",!s.isValidRange(o.range)),a(\"range\"),l.range){var c=l.range,u=s.range;c[0]=s.l2r(Math.min(s.r2l(c[0]),s.r2l(u[0]))),c[1]=s.l2r(Math.max(s.r2l(c[1]),s.r2l(u[1])))}s.cleanRange(\"rangeslider.range\"),l._input=o}}}},{\"../../lib\":743,\"./attributes\":690}],694:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t.select(\"rect.\"+b.slideBoxClassName).node(),a=t.select(\"rect.\"+b.grabAreaMinClassName).node(),o=t.select(\"rect.\"+b.grabAreaMaxClassName).node();t.on(\"mousedown\",function(){function s(t){var s,l,c,y=+t.clientX-p;switch(h){case i:c=\"ew-resize\",s=g+y,l=v+y;break;case a:c=\"col-resize\",s=g+y,l=v;break;case o:c=\"col-resize\",s=g,l=v+y;break;default:c=\"ew-resize\",s=m,l=m+y}if(l<s){var _=l;l=s,s=_}n._pixelMin=s,n._pixelMax=l,x(u.select(b),c),function(t,e,r,n){function i(t){return r.l2r(d.constrain(t,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){f.relayout(e,r._name+\".range\",[a,o])})}(0,e,r,n)}function l(){b.removeEventListener(\"mousemove\",s),b.removeEventListener(\"mouseup\",l),d.removeElement(b)}var c=u.event,h=c.target,p=c.clientX,m=p-t.node().getBoundingClientRect().left,g=n.d2p(r._rl[0]),v=n.d2p(r._rl[1]),b=y.coverSlip();b.addEventListener(\"mousemove\",s),b.addEventListener(\"mouseup\",l)})}function i(t,e,r,n){var i=t.selectAll(\"rect.\"+b.bgClassName).data([0]);i.enter().append(\"rect\").classed(b.bgClassName,!0).attr({x:0,y:0,\"shape-rendering\":\"crispEdges\"});var a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=p.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:\"translate(\"+o+\",\"+o+\")\",fill:n.bgcolor,stroke:n.bordercolor,\"stroke-width\":s})}function a(t,e,r,n){var i=e._fullLayout._topdefs.selectAll(\"#\"+n._clipId).data([0]);i.enter().append(\"clipPath\").attr(\"id\",n._clipId).append(\"rect\").attr({x:0,y:0}),i.select(\"rect\").attr({width:n._width,height:n._height})}function o(t,e,r,n){var i=v.getSubplots(e,r),a=e.calcdata,o=t.selectAll(\"g.\"+b.rangePlotClassName).data(i,d.identity);o.enter().append(\"g\").attr(\"class\",function(t){return b.rangePlotClassName+\" \"+t}).call(p.setClipUrl,n._clipId),o.order(),o.exit().remove();var s;o.each(function(t,i){var o=u.select(this),l=0===i,c=v.getFromId(e,t,\"y\"),f=c._name,d={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:n.range.slice(),calendar:r.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};d.layout[f]={type:c.type,domain:[0,1],range:c.range.slice(),calendar:c.calendar},h.supplyDefaults(d);var p={id:t,plotgroup:o,xaxis:d._fullLayout.xaxis,yaxis:d._fullLayout[f]};l?s=p:(p.mainplot=\"xy\",p.mainplotinfo=s),g.rangePlot(e,p,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(a,t))})}function s(t,e,r,n){var i=t.selectAll(\"rect.\"+b.maskMinClassName).data([0]);i.enter().append(\"rect\").classed(b.maskMinClassName,!0).attr({x:0,y:0}).attr(\"shape-rendering\",\"crispEdges\"),i.attr(\"height\",n._height).call(m.fill,b.maskColor);var a=t.selectAll(\"rect.\"+b.maskMaxClassName).data([0]);a.enter().append(\"rect\").classed(b.maskMaxClassName,!0).attr(\"y\",0).attr(\"shape-rendering\",\"crispEdges\"),a.attr(\"height\",n._height).call(m.fill,b.maskColor)}function l(t,e,r,n){if(!e._context.staticPlot){var i=t.selectAll(\"rect.\"+b.slideBoxClassName).data([0]);i.enter().append(\"rect\").classed(b.slideBoxClassName,!0).attr(\"y\",0).attr(\"cursor\",b.slideBoxCursor).attr(\"shape-rendering\",\"crispEdges\"),i.attr({height:n._height,fill:b.slideBoxFill})}}function c(t,e,r,n){var i=t.selectAll(\"g.\"+b.grabberMinClassName).data([0]);i.enter().append(\"g\").classed(b.grabberMinClassName,!0);var a=t.selectAll(\"g.\"+b.grabberMaxClassName).data([0]);a.enter().append(\"g\").classed(b.grabberMaxClassName,!0);var o={x:0,width:b.handleWidth,rx:b.handleRadius,fill:m.background,stroke:m.defaultLine,\"stroke-width\":b.handleStrokeWidth,\"shape-rendering\":\"crispEdges\"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},l=i.selectAll(\"rect.\"+b.handleMinClassName).data([0]);l.enter().append(\"rect\").classed(b.handleMinClassName,!0).attr(o),l.attr(s);var c=a.selectAll(\"rect.\"+b.handleMaxClassName).data([0]);if(c.enter().append(\"rect\").classed(b.handleMaxClassName,!0).attr(o),c.attr(s),!e._context.staticPlot){var u={width:b.grabAreaWidth,x:0,y:0,fill:b.grabAreaFill,cursor:b.grabAreaCursor},f=i.selectAll(\"rect.\"+b.grabAreaMinClassName).data([0]);f.enter().append(\"rect\").classed(b.grabAreaMinClassName,!0).attr(u),f.attr(\"height\",n._height);var h=a.selectAll(\"rect.\"+b.grabAreaMaxClassName).data([0]);h.enter().append(\"rect\").classed(b.grabAreaMaxClassName,!0).attr(u),h.attr(\"height\",n._height)}}var u=t(\"d3\"),f=t(\"../../plotly\"),h=t(\"../../plots/plots\"),d=t(\"../../lib\"),p=t(\"../drawing\"),m=t(\"../color\"),g=t(\"../../plots/cartesian\"),v=t(\"../../plots/cartesian/axes\"),y=t(\"../dragelement\"),x=t(\"../../lib/setcursor\"),b=t(\"./constants\");e.exports=function(t){var e=t._fullLayout,r=function(t){var e=v.list({_fullLayout:t},\"x\",!0),r=b.name,n=[];if(t._has(\"gl2d\"))return n;for(var i=0;i<e.length;i++){var a=e[i];a[r]&&a[r].visible&&n.push(a)}return n}(e),f=e._infolayer.selectAll(\"g.\"+b.containerClassName).data(r,function(t){return t._name});f.enter().append(\"g\").classed(b.containerClassName,!0).attr(\"pointer-events\",\"all\"),f.exit().each(function(t){var r=u.select(this),n=t[b.name];r.remove(),e._topdefs.select(\"#\"+n._clipId).remove()}),f.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(b.name)&&h.autoMargin(t,i)}}(t),0!==r.length&&f.each(function(r){var f=u.select(this),p=r[b.name],m=e[v.id2name(r.anchor)],g=e.margin,y=e._size,x=r.domain,_=m.domain,w=(r._boundingBox||{}).height||0;p._id=b.name+r._id,p._clipId=p._id+\"-\"+e._uid,p._width=y.w*(x[1]-x[0]),p._height=(e.height-g.b-g.t)*p.thickness,p._offsetShift=Math.floor(p.borderwidth/2);var M=Math.round(g.l+y.w*x[0]),k=Math.round(g.t+y.h*(1-_[0])+w+p._offsetShift+b.extraPad);f.attr(\"transform\",\"translate(\"+M+\",\"+k+\")\");var A=r.r2l(p.range[0]),T=r.r2l(p.range[1]),S=T-A;p.p2d=function(t){return t/p._width*S+A},p.d2p=function(t){return(t-A)/S*p._width},p._rl=[A,T],f.call(i,t,r,p).call(a,t,r,p).call(o,t,r,p).call(s,t,r,p).call(l,t,r,p).call(c,t,r,p),n(f,t,r,p),function(t,e,r,n){function i(t){return d.constrain(t,0,n._width)}function a(t){return d.constrain(t,-o,n._width+o)}var o=b.handleWidth/2,s=i(n.d2p(r._rl[0])),l=i(n.d2p(r._rl[1]));t.select(\"rect.\"+b.slideBoxClassName).attr(\"x\",s).attr(\"width\",l-s),t.select(\"rect.\"+b.maskMinClassName).attr(\"width\",s),t.select(\"rect.\"+b.maskMaxClassName).attr(\"x\",l).attr(\"width\",n._width-l);var c=Math.round(a(s-o))-.5,u=Math.round(a(l-o))+.5;t.select(\"g.\"+b.grabberMinClassName).attr(\"transform\",\"translate(\"+c+\",0.5)\"),t.select(\"g.\"+b.grabberMaxClassName).attr(\"transform\",\"translate(\"+u+\",0.5)\")}(f,0,r,p),h.autoMargin(t,p._id,{x:x[0],y:_[0],l:0,r:0,t:0,b:p._height+g.b+w,pad:b.extraPad+2*p._offsetShift})})}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../plots/cartesian\":800,\"../../plots/cartesian/axes\":789,\"../../plots/plots\":852,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":692,d3:128}],695:[function(t,e,r){\"use strict\";e.exports={moduleType:\"component\",name:\"rangeslider\",schema:{subplots:{xaxis:{rangeslider:t(\"./attributes\")}}},layoutAttributes:t(\"./attributes\"),handleDefaults:t(\"./defaults\"),calcAutorange:t(\"./calc_autorange\"),draw:t(\"./draw\")}},{\"./attributes\":690,\"./calc_autorange\":691,\"./defaults\":693,\"./draw\":694}],696:[function(t,e,r){\"use strict\";var n=t(\"../annotations/attributes\"),i=t(\"../../traces/scatter/attributes\").line,a=t(\"../drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat;e.exports={_isLinkedToArray:\"shape\",visible:{valType:\"boolean\",dflt:!0,editType:\"calcIfAutorange\"},type:{valType:\"enumerated\",values:[\"circle\",\"rect\",\"path\",\"line\"],editType:\"calcIfAutorange\"},layer:{valType:\"enumerated\",values:[\"below\",\"above\"],dflt:\"above\",editType:\"arraydraw\"},xref:o({},n.xref,{}),x0:{valType:\"any\",editType:\"calcIfAutorange\"},x1:{valType:\"any\",editType:\"calcIfAutorange\"},yref:o({},n.yref,{}),y0:{valType:\"any\",editType:\"calcIfAutorange\"},y1:{valType:\"any\",editType:\"calcIfAutorange\"},path:{valType:\"string\",editType:\"calcIfAutorange\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"arraydraw\"},line:{color:o({},i.color,{editType:\"arraydraw\"}),width:o({},i.width,{editType:\"calcIfAutorange\"}),dash:o({},a,{editType:\"arraydraw\"}),editType:\"calcIfAutorange\"},fillcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"arraydraw\"},editType:\"arraydraw\"}},{\"../../lib/extend\":732,\"../../traces/scatter/attributes\":1066,\"../annotations/attributes\":601,\"../drawing/attributes\":642}],697:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=\"category\"===t.type?t.r2c:t.d2c;if(void 0!==e)return[a(e),a(r)];if(n){var l,c,u,f,h=1/0,d=-1/0,p=n.match(o.segmentRE);for(\"date\"===t.type&&(a=s.decodeDate(a)),l=0;l<p.length;l++)void 0!==(c=i[p[l].charAt(0)].drawn)&&(!(u=p[l].substr(1).match(o.paramRE))||u.length<c||((f=a(u[c]))<h&&(h=f),f>d&&(d=f)));return d>=h?[h,d]: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;s<r.length;s++){var l,c,u=r[s],f=u.line.width/2;\"paper\"!==u.xref&&(c=n(l=a.getFromId(t,u.xref),u.x0,u.x1,u.path,o.paramIsX))&&a.expand(l,c,{ppad:f}),\"paper\"!==u.yref&&(c=n(l=a.getFromId(t,u.yref),u.y0,u.y1,u.path,o.paramIsY))&&a.expand(l,c,{ppad:f})}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./constants\":698,\"./helpers\":701}],698:[function(t,e,r){\"use strict\";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],699:[function(t,e,r){\"use strict\";var n=t(\"../../plots/array_container_defaults\"),i=t(\"./shape_defaults\");e.exports=function(t,e){n(t,e,{name:\"shapes\",handleItemDefaults:i})}},{\"../../plots/array_container_defaults\":786,\"./shape_defaults\":703}],700:[function(t,e,r){\"use strict\";function n(t,e){function r(r){var n={\"data-index\":e,\"fill-rule\":\"evenodd\",d:i(t,s)},d=s.line.width?s.line.color:\"rgba(0,0,0,0)\",m=r.append(\"path\").attr(n).style(\"opacity\",s.opacity).call(c.stroke,d).call(c.fill,s.fillcolor).call(u.dashLine,s.line.dash,s.line.width),g=(s.xref+s.yref).replace(/paper/g,\"\");m.call(u.setClipUrl,g?\"clip\"+t._fullLayout._uid+g:null),t._context.edits.shapePosition&&function(t,e,r,n){function s(t){var r=G.right-G.left,n=G.bottom-G.top,i=t.clientX-G.left,a=t.clientY-G.top,o=r>V&&n>q&&!t.shiftKey?f.getCursor(i/r,1-a/n):\"move\";h(e,o),U=o.split(\"-\")[0]}var c,u,d,m,g,v,y,x,b,_,w,M,k,A,T,S,E,L,C,z,D,I,P,O,F,R,N,j,B,U,V=10,q=10,H={element:e.node(),gd:t,prepFn:function(o){O=l.getFromId(t,r.xref),F=l.getFromId(t,r.yref),R=p.getDataToPixel(t,O),N=p.getDataToPixel(t,F,!0),j=p.getPixelToData(t,O),B=p.getPixelToData(t,F,!0);var f=\"shapes[\"+n+\"]\";\"path\"===r.type?(I=r.path,P=f+\".path\"):(u=R(r.x0),d=N(r.y0),m=R(r.x1),g=N(r.y1),v=f+\".x0\",y=f+\".y0\",x=f+\".x1\",b=f+\".y1\");u<m?(M=u,S=f+\".x0\",z=\"x0\",k=m,E=f+\".x1\",D=\"x1\"):(M=m,S=f+\".x1\",z=\"x1\",k=u,E=f+\".x0\",D=\"x0\");d<g?(_=d,A=f+\".y0\",L=\"y0\",w=g,T=f+\".y1\",C=\"y1\"):(_=g,A=f+\".y1\",L=\"y1\",w=d,T=f+\".y0\",C=\"y0\");c={},s(o),H.moveFn=\"move\"===U?function(n,o){if(\"path\"===r.type){var s=function(t){return j(R(t)+n)};O&&\"date\"===O.type&&(s=p.encodeDate(s));var l=function(t){return B(N(t)+o)};F&&\"date\"===F.type&&(l=p.encodeDate(l)),r.path=a(I,s,l),c[P]=r.path}else c[v]=r.x0=j(u+n),c[y]=r.y0=B(d+o),c[x]=r.x1=j(m+n),c[b]=r.y1=B(g+o);e.attr(\"d\",i(t,r))}:function(n,o){if(\"path\"===r.type){var s=function(t){return j(R(t)+n)};O&&\"date\"===O.type&&(s=p.encodeDate(s));var l=function(t){return B(N(t)+o)};F&&\"date\"===F.type&&(l=p.encodeDate(l)),r.path=a(I,s,l),c[P]=r.path}else{var u=~U.indexOf(\"n\")?_+o:_,f=~U.indexOf(\"s\")?w+o:w,h=~U.indexOf(\"w\")?M+n:M,d=~U.indexOf(\"e\")?k+n:k;f-u>q&&(c[A]=r[L]=B(u),c[T]=r[C]=B(f)),d-h>V&&(c[S]=r[z]=j(h),c[E]=r[D]=j(d))}e.attr(\"d\",i(t,r))}},doneFn:function(){h(e),o.relayout(t,c)}},G=H.element.getBoundingClientRect();f.init(H),e.node().onmousemove=s}(t,m,s,e)}t._fullLayout._paperdiv.selectAll('.shapelayer [data-index=\"'+e+'\"]').remove();var n=(t.layout.shapes||[])[e],s=t._fullLayout.shapes[e];if(n&&!1!==s.visible)if(\"below\"!==s.layer)r(t._fullLayout._shapeUpperLayer);else if(\"paper\"===s.xref||\"paper\"===s.yref)r(t._fullLayout._shapeLowerLayer);else{var d=t._fullLayout._plots[s.xref+s.yref];if(d){r((d.mainplotinfo||d).shapelayer)}else r(t._fullLayout._shapeLowerLayer)}}function i(t,e){var r,n,i,a,o=e.type,c=l.getFromId(t,e.xref),u=l.getFromId(t,e.yref),f=t._fullLayout._size;if(c?(r=p.shapePositionToRange(c),n=function(t){return c._offset+c.r2p(r(t,!0))}):n=function(t){return f.l+f.w*t},u?(i=p.shapePositionToRange(u),a=function(t){return u._offset+u.r2p(i(t,!0))}):a=function(t){return f.t+f.h*(1-t)},\"path\"===o)return c&&\"date\"===c.type&&(n=p.decodeDate(n)),u&&\"date\"===u.type&&(a=p.decodeDate(a)),function(t,e,r){return t.replace(d.segmentRE,function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],l=d.numParams[i],c=t.substr(1).replace(d.paramRE,function(t){return a[n]?t=e(t):o[n]&&(t=r(t)),++n>l&&(t=\"X\"),t});return n>l&&(c=c.replace(/[\\s,]*X.*/,\"\"),s.log(\"Ignoring extra params in segment \"+t)),i+c})}(e.path,n,a);var h=n(e.x0),m=n(e.x1),g=a(e.y0),v=a(e.y1);if(\"line\"===o)return\"M\"+h+\",\"+g+\"L\"+m+\",\"+v;if(\"rect\"===o)return\"M\"+h+\",\"+g+\"H\"+m+\"V\"+v+\"H\"+h+\"Z\";var y=(h+m)/2,x=(g+v)/2,b=Math.abs(y-h),_=Math.abs(x-g),w=\"A\"+b+\",\"+_,M=y+b+\",\"+x;return\"M\"+M+w+\" 0 1,1 \"+(y+\",\"+(x-_))+w+\" 0 0,1 \"+M+\"Z\"}function a(t,e,r){return t.replace(d.segmentRE,function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,function(t){return n>=s?t:(a[n]?t=e(t):o[n]&&(t=r(t)),n++,t)})})}var o=t(\"../../plotly\"),s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../color\"),u=t(\"../drawing\"),f=t(\"../dragelement\"),h=t(\"../../lib/setcursor\"),d=t(\"./constants\"),p=t(\"./helpers\");e.exports={draw:function(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll(\"path\").remove(),e._shapeLowerLayer.selectAll(\"path\").remove(),e._shapeSubplotLayers.selectAll(\"path\").remove();for(var r=0;r<e.shapes.length;r++)e.shapes[r].visible&&n(t,r)},drawOne:n}},{\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../plots/cartesian/axes\":789,\"../color\":618,\"../dragelement\":640,\"../drawing\":643,\"./constants\":698,\"./helpers\":701}],701:[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}},{}],702:[function(t,e,r){\"use strict\";var n=t(\"./draw\");e.exports={moduleType:\"component\",name:\"shapes\",layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),includeBasePlot:t(\"../../plots/cartesian/include_components\")(\"shapes\"),calcAutorange:t(\"./calc_autorange\"),draw:n.draw,drawOne:n.drawOne}},{\"../../plots/cartesian/include_components\":799,\"./attributes\":696,\"./calc_autorange\":697,\"./defaults\":699,\"./draw\":700}],703:[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 c(r,i){return n.coerce(t,e,a,r,i)}s=s||{};if(!c(\"visible\",!(l=l||{}).itemIsNotPlainObject))return e;c(\"layer\"),c(\"opacity\"),c(\"fillcolor\"),c(\"line.color\"),c(\"line.width\"),c(\"line.dash\");for(var u=c(\"type\",t.path?\"path\":\"rect\"),f=[\"x\",\"y\"],h=0;h<2;h++){var d=f[h],p={_fullLayout:r},m=i.coerceRef(t,e,p,d,\"\",\"paper\");if(\"path\"!==u){var g,v,y;\"paper\"!==m?(g=i.getFromId(p,m),y=o.rangeToShapePosition(g),v=o.shapePositionToRange(g)):v=y=n.identity;var x=d+\"0\",b=d+\"1\",_=t[x],w=t[b];t[x]=v(t[x],!0),t[b]=v(t[b],!0),i.coercePosition(e,p,c,m,x,.25),i.coercePosition(e,p,c,m,b,.75),e[x]=y(e[x]),e[b]=y(e[b]),t[x]=_,t[b]=w}}return\"path\"===u?c(\"path\"):n.noneOrAll(t,e,[\"x0\",\"x1\",\"y0\",\"y1\"]),e}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"./attributes\":696,\"./helpers\":701}],704:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/pad_attributes\"),a=t(\"../../lib/extend\").extendDeepAll,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/animation_attributes\"),l=t(\"./constants\");e.exports=o({_isLinkedToArray:\"slider\",visible:{valType:\"boolean\",dflt:!0},active:{valType:\"number\",min:0,dflt:0},steps:{_isLinkedToArray:\"step\",method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\"},value:{valType:\"string\"},execute:{valType:\"boolean\",dflt:!0}},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:a({},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:n({})},font: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}},\"arraydraw\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/animation_attributes\":785,\"../../plots/font_attributes\":816,\"../../plots/pad_attributes\":851,\"./constants\":705}],705:[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,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}},{}],706:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,o,r,n)}if(n(\"visible\",function(t,e){function r(t,e){return i.coerce(n,a,l,t,e)}var n,a,o=t.steps||[],s=e.steps=[];for(var c=0;c<o.length;c++)n=o[c],a={},r(\"method\"),i.isPlainObject(n)&&(\"skip\"===a.method||Array.isArray(n.args))&&(r(\"args\"),r(\"label\",\"step-\"+c),r(\"value\",a.label),r(\"execute\"),s.push(a));return s}(t,e).length>0)){n(\"active\"),n(\"x\"),n(\"y\"),i.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\"),i.coerceFont(n,\"font\",r.font);n(\"currentvalue.visible\")&&(n(\"currentvalue.xanchor\"),n(\"currentvalue.prefix\"),n(\"currentvalue.suffix\"),n(\"currentvalue.offset\"),i.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\")}}var i=t(\"../../lib\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"./constants\").name,l=o.steps;e.exports=function(t,e){a(t,e,{name:s,handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"./attributes\":704,\"./constants\":705}],707:[function(t,e,r){\"use strict\";function n(t){return t._index}function i(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-M.currentValueInset-e.currentValueMaxWidth,i=\"left\";break;case\"center\":n=.5*e.inputAreaLength,i=\"middle\";break;default:n=M.currentValueInset,i=\"left\"}a.enter().append(\"text\").classed(M.labelClass,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":i,\"data-notex\":1});var o=e.currentvalue.prefix?e.currentvalue.prefix:\"\";if(\"string\"==typeof r)o+=r;else{o+=e.steps[e.active].label}e.currentvalue.suffix&&(o+=e.currentvalue.suffix),a.call(b.font,e.currentvalue.font).text(o).call(_.convertToTspans,e.gd);var s=_.lineCount(a),l=(e.currentValueMaxLines+1-s)*e.currentvalue.font.size*k;return _.positionText(a,n,l),a}}function a(t,e,r){var n=t.selectAll(\"rect.\"+M.gripRectClass).data([0]);n.enter().append(\"rect\").classed(M.gripRectClass,!0).call(u,e,t,r).style(\"pointer-events\",\"all\"),n.attr({width:M.gripWidth,height:M.gripHeight,rx:M.gripRadius,ry:M.gripRadius}).call(x.stroke,r.bordercolor).call(x.fill,r.bgcolor).style(\"stroke-width\",r.borderwidth+\"px\")}function o(t,e,r){var n=t.selectAll(\"text\").data([0]);return n.enter().append(\"text\").classed(M.labelClass,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":\"middle\",\"data-notex\":1}),n.call(b.font,r.font).text(e.step.label).call(_.convertToTspans,r.gd),n}function s(t,e){var r=t.selectAll(\"g.\"+M.labelsClass).data([0]);r.enter().append(\"g\").classed(M.labelsClass,!0);var n=r.selectAll(\"g.\"+M.labelGroupClass).data(e.labelSteps);n.enter().append(\"g\").classed(M.labelGroupClass,!0),n.exit().remove(),n.each(function(t){var r=v.select(this);r.call(o,t,e),b.setTranslate(r,d(e,t.fraction),M.tickOffset+e.ticklen+e.font.size*k+M.labelOffset+e.currentValueTotalHeight)})}function l(t,e,r,n,i){var a=Math.round(n*(r.steps.length-1));a!==r.active&&c(t,e,r,a,!0,i)}function c(t,e,r,n,a,o){var s=r.active;r._input.active=r.active=n;var l=r.steps[r.active];e.call(h,r,r.active/(r.steps.length-1),o),e.call(i,r),t.emit(\"plotly_sliderchange\",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame(function(){var r=e._nextMethod.step;r.method&&(r.execute&&y.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function u(t,e,r){function n(){return r.data()[0]}var i=r.node(),a=v.select(e);t.on(\"mousedown\",function(){var t=n();e.emit(\"plotly_sliderstart\",{slider:t});var o=r.select(\".\"+M.gripRectClass);v.event.stopPropagation(),v.event.preventDefault(),o.call(x.fill,t.activebgcolor);var s=p(t,v.mouse(i)[0]);l(e,r,t,s,!0),t._dragging=!0,a.on(\"mousemove\",function(){var t=n(),a=p(t,v.mouse(i)[0]);l(e,r,t,a,!1)}),a.on(\"mouseup\",function(){var t=n();t._dragging=!1,o.call(x.fill,t.bgcolor),a.on(\"mouseup\",null),a.on(\"mousemove\",null),e.emit(\"plotly_sliderend\",{slider:t,step:t.steps[t.active]})})})}function f(t,e){var r=t.selectAll(\"rect.\"+M.tickRectClass).data(e.steps);r.enter().append(\"rect\").classed(M.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=v.select(this);i.attr({height:n?e.ticklen:e.minorticklen}).call(x.fill,e.tickcolor),b.setTranslate(i,d(e,r/(e.steps.length-1))-.5*e.tickwidth,(n?M.tickOffset:M.minorTickOffset)+e.currentValueTotalHeight)})}function h(t,e,r,n){var i=t.select(\"rect.\"+M.gripRectClass),a=d(e,r);if(!e._invokingCommand){var o=i;n&&e.transition.duration>0&&(o=o.transition().duration(e.transition.duration).ease(e.transition.easing)),o.attr(\"transform\",\"translate(\"+(a-.5*M.gripWidth)+\",\"+e.currentValueTotalHeight+\")\")}}function d(t,e){return t.inputAreaStart+M.stepInset+(t.inputAreaLength-2*M.stepInset)*Math.min(1,Math.max(0,e))}function p(t,e){return Math.min(1,Math.max(0,(e-M.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*M.stepInset-2*t.inputAreaStart)))}function m(t,e,r){var n=t.selectAll(\"rect.\"+M.railTouchRectClass).data([0]);n.enter().append(\"rect\").classed(M.railTouchRectClass,!0).call(u,e,t,r).style(\"pointer-events\",\"all\"),n.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,M.tickOffset+r.ticklen+r.labelHeight)}).call(x.fill,r.bgcolor).attr(\"opacity\",0),b.setTranslate(n,0,r.currentValueTotalHeight)}function g(t,e){var r=t.selectAll(\"rect.\"+M.railRectClass).data([0]);r.enter().append(\"rect\").classed(M.railRectClass,!0);var n=e.inputAreaLength-2*M.railInset;r.attr({width:n,height:M.railWidth,rx:M.railRadius,ry:M.railRadius,\"shape-rendering\":\"crispEdges\"}).call(x.stroke,e.bordercolor).call(x.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\"),b.setTranslate(r,M.railInset,.5*(e.inputAreaWidth-M.railWidth)+e.currentValueTotalHeight)}var v=t(\"d3\"),y=t(\"../../plots/plots\"),x=t(\"../color\"),b=t(\"../drawing\"),_=t(\"../../lib/svg_text_utils\"),w=t(\"../legend/anchor_utils\"),M=t(\"./constants\"),k=t(\"../../constants/alignment\").LINE_SPACING;e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[M.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&a.steps.length&&(a.gd=e,n.push(a))}return n}(e,t),l=e._infolayer.selectAll(\"g.\"+M.containerClassName).data(r.length>0?[0]:[]);if(l.enter().append(\"g\").classed(M.containerClassName,!0).style(\"cursor\",\"ew-resize\"),l.exit().remove(),l.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(M.autoMarginIdRoot)&&y.autoMargin(t,i)}}(t),0!==r.length){var u=l.selectAll(\"g.\"+M.groupClassName).data(r,n);u.enter().append(\"g\").classed(M.groupClassName,!0),u.exit().each(function(e){v.select(this).remove(),e._commandObserver.remove(),delete e._commandObserver,y.autoMargin(t,M.autoMarginIdRoot+e._index)});for(var d=0;d<r.length;d++){var p=r[d];!function(t,e){var r=b.tester.selectAll(\"g.\"+M.labelGroupClass).data(e.steps);r.enter().append(\"g\").classed(M.labelGroupClass,!0);var n=0,a=0;r.each(function(t){var r=o(v.select(this),{step:t},e).node();if(r){var i=b.bBox(r);a=Math.max(a,i.height),n=Math.max(n,i.width)}}),r.remove(),e.inputAreaWidth=Math.max(M.railWidth,M.gripHeight);var s=t._fullLayout._size;e.lx=s.l+s.w*e.x,e.ly=s.t+s.h*(1-e.y),\"fraction\"===e.lenmode?e.outerLength=Math.round(s.w*e.len):e.outerLength=e.len,e.lenPad=Math.round(.5*M.gripWidth),e.inputAreaStart=0,e.inputAreaLength=Math.round(e.outerLength-e.pad.l-e.pad.r);var l=(e.inputAreaLength-2*M.stepInset)/(e.steps.length-1),c=n+M.labelPadding;if(e.labelStride=Math.max(1,Math.ceil(c/l)),e.labelHeight=a,e.currentValueMaxWidth=0,e.currentValueHeight=0,e.currentValueTotalHeight=0,e.currentValueMaxLines=1,e.currentvalue.visible){var u=b.tester.append(\"g\");r.each(function(t){var r=i(u,e,t.label),n=r.node()&&b.bBox(r.node())||{width:0,height:0},a=_.lineCount(r);e.currentValueMaxWidth=Math.max(e.currentValueMaxWidth,Math.ceil(n.width)),e.currentValueHeight=Math.max(e.currentValueHeight,Math.ceil(n.height)),e.currentValueMaxLines=Math.max(e.currentValueMaxLines,a)}),e.currentValueTotalHeight=e.currentValueHeight+e.currentvalue.offset,u.remove()}e.height=e.currentValueTotalHeight+M.tickOffset+e.ticklen+M.labelOffset+e.labelHeight+e.pad.t+e.pad.b;var f=\"left\";w.isRightAnchor(e)&&(e.lx-=e.outerLength,f=\"right\"),w.isCenterAnchor(e)&&(e.lx-=e.outerLength/2,f=\"center\");var h=\"top\";w.isBottomAnchor(e)&&(e.ly-=e.height,h=\"bottom\"),w.isMiddleAnchor(e)&&(e.ly-=e.height/2,h=\"middle\"),e.outerLength=Math.ceil(e.outerLength),e.height=Math.ceil(e.height),e.lx=Math.round(e.lx),e.ly=Math.round(e.ly),y.autoMargin(t,M.autoMarginIdRoot+e._index,{x:e.x,y:e.y,l:e.outerLength*({right:1,center:.5}[f]||0),r:e.outerLength*({left:1,center:.5}[f]||0),b:e.height*({top:1,middle:.5}[h]||0),t:e.height*({bottom:1,middle:.5}[h]||0)})}(t,p)}u.each(function(e){if(!(e.steps.length<2)){var r=v.select(this);!function(t){t.labelSteps=[];for(var e=t.steps.length,r=0;r<e;r+=t.labelStride)t.labelSteps.push({fraction:r/(e-1),step:t.steps[r]})}(e),y.manageCommandObserver(t,e,e.steps,function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||c(t,r,n,e.index,!1,!0))}),function(t,e,r){r.active>=r.steps.length&&(r.active=0),e.call(i,r).call(g,r).call(s,r).call(f,r).call(m,t,r).call(a,t,r),b.setTranslate(e,r.lx+r.pad.l,r.ly+r.pad.t),e.call(h,r,r.active/(r.steps.length-1),!1),e.call(i,r)}(t,v.select(this),e)}})}}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":705,d3:128}],708:[function(t,e,r){\"use strict\";var n=t(\"./constants\");e.exports={moduleType:\"component\",name:n.name,layoutAttributes:t(\"./attributes\"),supplyLayoutDefaults:t(\"./defaults\"),draw:t(\"./draw\")}},{\"./attributes\":704,\"./constants\":705,\"./defaults\":706,\"./draw\":707}],709:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../../plotly\"),o=t(\"../../plots/plots\"),s=t(\"../../lib\"),l=t(\"../drawing\"),c=t(\"../color\"),u=t(\"../../lib/svg_text_utils\"),f=t(\"../../constants/interactions\"),h=/ [XY][0-9]* /;(e.exports={}).draw=function(t,e,r){function d(t){s.syncOrAsync([p,m],t)}function p(e){var r;return M?(r=\"\",M.rotate&&(r+=\"rotate(\"+[M.rotate,w.x,w.y]+\")\"),M.offset&&(r+=\"translate(0, \"+M.offset+\")\")):r=null,e.attr(\"transform\",r),e.style({\"font-family\":S,\"font-size\":n.round(E,2)+\"px\",fill:c.rgb(L),opacity:C*c.opacity(L),\"font-weight\":o.fontWeight}).attr(w).call(u.convertToTspans,t),o.previousPromises(t)}function m(t){var e=n.select(t.node().parentNode);if(_&&_.selection&&_.side&&D){e.attr(\"transform\",null);var r=0,a={left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}[_.side],o=-1!==[\"left\",\"top\"].indexOf(_.side)?-1:1,c=i(_.pad)?_.pad:2,u=l.bBox(e.node()),f={left:0,top:0,right:A.width,bottom:A.height},h=_.maxShift||(f[_.side]-u[_.side])*(\"left\"===_.side||\"top\"===_.side?-1:1);if(h<0)r=h;else{var d=_.offsetLeft||0,p=_.offsetTop||0;u.left-=d,u.right-=d,u.top-=p,u.bottom-=p,_.selection.each(function(){var t=l.bBox(this);s.bBoxIntersect(u,t,c)&&(r=Math.max(r,o*(t[_.side]-u[a])+c))}),r=Math.min(h,r)}if(r>0||h<0){var m={left:[-r,0],right:[r,0],top:[0,-r],bottom:[0,r]}[_.side];e.attr(\"transform\",\"translate(\"+m+\")\")}}}var g,v=r.propContainer,y=r.propName,x=r.placeholder,b=r.traceIndex,_=r.avoid||{},w=r.attributes,M=r.transform,k=r.containerGroup,A=t._fullLayout,T=v.titlefont||{},S=T.family,E=T.size,L=T.color,C=1,z=!1,D=(v.title||\"\").trim();\"title\"===y?g=\"titleText\":-1!==y.indexOf(\"axis\")?g=\"axisTitleText\":y.indexOf(!0)&&(g=\"colorbarTitleText\");var I=t._context.edits[g];\"\"===D?C=0:D.replace(h,\" % \")===x.replace(h,\" % \")&&(C=.2,z=!0,I||(D=\"\"));var P=D||I;k||(k=A._infolayer.selectAll(\".g-\"+e).data([0])).enter().append(\"g\").classed(\"g-\"+e,!0);var O=k.selectAll(\"text\").data(P?[0]:[]);return O.enter().append(\"text\"),O.text(D).attr(\"class\",e),O.exit().remove(),P?(O.call(d),I&&(D?O.on(\".opacity\",null):(C=0,z=!0,O.text(x).on(\"mouseover.opacity\",function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style(\"opacity\",0)})),O.call(u.makeEditable,{gd:t}).on(\"edit\",function(e){void 0!==b?a.restyle(t,y,e,b):a.relayout(t,y,e)}).on(\"cancel\",function(){this.text(this.attr(\"data-unformatted\")).call(d)}).on(\"input\",function(t){this.text(t||\" \").call(u.positionText,w.x,w.y)})),O.classed(\"js-placeholder\",z),k):k}},{\"../../constants/interactions\":720,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,d3:128,\"fast-isnumeric\":140}],710:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../color/attributes\"),a=t(\"../../lib/extend\").extendFlat,o=t(\"../../plot_api/edit_types\").overrideAll,s=t(\"../../plots/pad_attributes\");e.exports=o({_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:{_isLinkedToArray:\"button\",method:{valType:\"enumerated\",values:[\"restyle\",\"relayout\",\"animate\",\"update\",\"skip\"],dflt:\"restyle\"},args:{valType:\"info_array\",freeLength:!0,items:[{valType:\"any\"},{valType:\"any\"},{valType:\"any\"}]},label:{valType:\"string\",dflt:\"\"},execute:{valType:\"boolean\",dflt:!0}},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({},s,{}),font:n({}),bgcolor:{valType:\"color\"},bordercolor:{valType:\"color\",dflt:i.borderLine},borderwidth:{valType:\"number\",min:0,dflt:1,editType:\"arraydraw\"}},\"arraydraw\",\"from-root\")},{\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/font_attributes\":816,\"../../plots/pad_attributes\":851,\"../color/attributes\":617}],711:[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,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:\"#F4FAFF\",hoverColor:\"#F4FAFF\",arrowSymbol:{left:\"\\u25c4\",right:\"\\u25ba\",up:\"\\u25b2\",down:\"\\u25bc\"}}},{}],712:[function(t,e,r){\"use strict\";function n(t,e,r){function n(r,n){return i.coerce(t,e,o,r,n)}n(\"visible\",function(t,e){function r(t,e){return i.coerce(n,a,l,t,e)}var n,a,o=t.buttons||[],s=e.buttons=[];for(var c=0;c<o.length;c++)n=o[c],a={},r(\"method\"),i.isPlainObject(n)&&(\"skip\"===a.method||Array.isArray(n.args))&&(r(\"args\"),r(\"label\"),r(\"execute\"),a._index=c,s.push(a));return s}(t,e).length>0)&&(n(\"active\"),n(\"direction\"),n(\"type\"),n(\"showactive\"),n(\"x\"),n(\"y\"),i.noneOrAll(t,e,[\"x\",\"y\"]),n(\"xanchor\"),n(\"yanchor\"),n(\"pad.t\"),n(\"pad.r\"),n(\"pad.b\"),n(\"pad.l\"),i.coerceFont(n,\"font\",r.font),n(\"bgcolor\",r.paper_bgcolor),n(\"bordercolor\"),n(\"borderwidth\"))}var i=t(\"../../lib\"),a=t(\"../../plots/array_container_defaults\"),o=t(\"./attributes\"),s=t(\"./constants\").name,l=o.buttons;e.exports=function(t,e){a(t,e,{name:s,handleItemDefaults:n})}},{\"../../lib\":743,\"../../plots/array_container_defaults\":786,\"./attributes\":710,\"./constants\":711}],713:[function(t,e,r){\"use strict\";function n(t){return t._index}function i(t,e){return+t.attr(M.menuIndexAttrName)===e._index}function a(t,e,r,n,i,a,l,c){e._input.active=e.active=l,\"buttons\"===e.type?s(t,n,null,null,e):\"dropdown\"===e.type&&(i.attr(M.menuIndexAttrName,\"-1\"),o(t,n,i,a,e),c||s(t,n,i,a,e))}function o(t,e,r,n,a){var o=e.selectAll(\"g.\"+M.headerClassName).data([0]);o.enter().append(\"g\").classed(M.headerClassName,!0).style(\"pointer-events\",\"all\");var c=a.active,u=a.buttons[c]||M.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},g={width:a.headerWidth,height:a.headerHeight};o.call(l,a,u,t).call(p,a,f,g);var v=e.selectAll(\"text.\"+M.headerArrowClassName).data([0]);v.enter().append(\"text\").classed(M.headerArrowClassName,!0).classed(\"user-select-none\",!0).attr(\"text-anchor\",\"end\").call(x.font,a.font).text(M.arrowSymbol[a.direction]),v.attr({x:a.headerWidth-M.arrowOffsetX+a.pad.l,y:a.headerHeight/2+M.textOffsetY+a.pad.t}),o.on(\"click\",function(){r.call(m),r.attr(M.menuIndexAttrName,i(r,a)?-1:String(a._index)),s(t,e,r,n,a)}),o.on(\"mouseover\",function(){o.call(h)}),o.on(\"mouseout\",function(){o.call(d,a)}),x.setTranslate(e,a.lx,a.ly)}function s(t,e,r,n,i){r||(r=e).attr(\"pointer-events\",\"all\");var o=function(t){return-1==+t.attr(M.menuIndexAttrName)}(r)&&\"buttons\"!==i.type?[]:i.buttons,s=\"dropdown\"===i.type?M.dropdownButtonClassName:M.buttonClassName,c=r.selectAll(\"g.\"+s).data(o),u=c.enter().append(\"g\").classed(s,!0),m=c.exit();\"dropdown\"===i.type?(u.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\"),m.transition().attr(\"opacity\",\"0\").remove()):m.remove();var y=0,x=0,b=-1!==[\"up\",\"down\"].indexOf(i.direction);\"dropdown\"===i.type&&(b?x=i.headerHeight+M.gapButtonHeader:y=i.headerWidth+M.gapButtonHeader),\"dropdown\"===i.type&&\"up\"===i.direction&&(x=-M.gapButtonHeader+M.gapButton-i.openHeight),\"dropdown\"===i.type&&\"left\"===i.direction&&(y=-M.gapButtonHeader+M.gapButton-i.openWidth);var _={x:i.lx+y+i.pad.l,y:i.ly+x+i.pad.t,yPad:M.gapButton,xPad:M.gapButton,index:0},w={l:_.x+i.borderwidth,t:_.y+i.borderwidth};c.each(function(o,s){var u=g.select(this);u.call(l,i,o,t).call(p,i,_),u.on(\"click\",function(){g.event.defaultPrevented||(a(t,i,0,e,r,n,s),o.execute&&v.executeAPICommand(t,o.method,o.args),t.emit(\"plotly_buttonclicked\",{menu:i,button:o,active:i.active}))}),u.on(\"mouseover\",function(){u.call(h)}),u.on(\"mouseout\",function(){u.call(d,i),c.call(f,i)})}),c.call(f,i),b?(w.w=Math.max(i.openWidth,i.headerWidth),w.h=_.y-w.t):(w.w=_.x-w.l,w.h=Math.max(i.openHeight,i.headerHeight)),w.direction=i.direction,n&&(c.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u=\"up\"===c||\"down\"===c,f=i.active;if(u)for(s=0,l=0;l<f;l++)s+=i.heights[l]+M.gapButton;else for(o=0,l=0;l<f;l++)o+=i.widths[l]+M.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\");n.vbar&&n.vbar.attr(\"opacity\",\"0\").transition().attr(\"opacity\",\"1\")}(0,0,0,n,i,w):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){e=!1,r||t.disable()});r&&t.vbar.transition().attr(\"opacity\",\"0\").each(\"end\",function(){r=!1,e||t.disable()})}(n))}function l(t,e,r,n){t.call(c,e).call(u,e,r,n)}function c(t,e){var r=t.selectAll(\"rect\").data([0]);r.enter().append(\"rect\").classed(M.itemRectClassName,!0).attr({rx:M.rx,ry:M.ry,\"shape-rendering\":\"crispEdges\"}),r.call(y.stroke,e.bordercolor).call(y.fill,e.bgcolor).style(\"stroke-width\",e.borderwidth+\"px\")}function u(t,e,r,n){var i=t.selectAll(\"text\").data([0]);i.enter().append(\"text\").classed(M.itemTextClassName,!0).classed(\"user-select-none\",!0).attr({\"text-anchor\":\"start\",\"data-notex\":1}),i.call(x.font,e.font).text(r.label).call(b.convertToTspans,n)}function f(t,e){var r=e.active;t.each(function(t,n){var i=g.select(this);n===r&&e.showactive&&i.select(\"rect.\"+M.itemRectClassName).call(y.fill,M.activeColor)})}function h(t){t.select(\"rect.\"+M.itemRectClassName).call(y.fill,M.hoverColor)}function d(t,e){t.select(\"rect.\"+M.itemRectClassName).call(y.fill,e.bgcolor)}function p(t,e,r,n){n=n||{};var i=t.select(\".\"+M.itemRectClassName),a=t.select(\".\"+M.itemTextClassName),o=e.borderwidth,s=r.index;x.setTranslate(t,o+r.x,o+r.y);var l=-1!==[\"up\",\"down\"].indexOf(e.direction),c=n.height||(l?e.heights[s]:e.height1);i.attr({x:0,y:0,width:n.width||(l?e.width1:e.widths[s]),height:c});var u=e.font.size*w,f=(b.lineCount(a)-1)*u/2;b.positionText(a,M.textOffsetX,c/2-f+M.textOffsetY),l?r.y+=e.heights[s]+r.yPad:r.x+=e.widths[s]+r.xPad,r.index++}function m(t){t.selectAll(\"g.\"+M.dropdownButtonClassName).remove()}var g=t(\"d3\"),v=t(\"../../plots/plots\"),y=t(\"../color\"),x=t(\"../drawing\"),b=t(\"../../lib/svg_text_utils\"),_=t(\"../legend/anchor_utils\"),w=t(\"../../constants/alignment\").LINE_SPACING,M=t(\"./constants\"),k=t(\"./scrollbox\");e.exports=function(t){var e=t._fullLayout,r=function(t){for(var e=t[M.name],r=[],n=0;n<e.length;n++){var i=e[n];i.visible&&r.push(i)}return r}(e),c=e._menulayer.selectAll(\"g.\"+M.containerClassName).data(r.length>0?[0]:[]);if(c.enter().append(\"g\").classed(M.containerClassName,!0).style(\"cursor\",\"pointer\"),c.exit().remove(),c.exit().size()&&function(t){for(var e=t._fullLayout._pushmargin||{},r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];-1!==i.indexOf(M.autoMarginIdRoot)&&v.autoMargin(t,i)}}(t),0!==r.length){var u=c.selectAll(\"g.\"+M.headerGroupClassName).data(r,n);u.enter().append(\"g\").classed(M.headerGroupClassName,!0);var f=c.selectAll(\"g.\"+M.dropdownButtonGroupClassName).data([0]);f.enter().append(\"g\").classed(M.dropdownButtonGroupClassName,!0).style(\"pointer-events\",\"all\");for(var h=0;h<r.length;h++){var d=r[h];!function(t,e){e.width1=0,e.height1=0,e.heights=[],e.widths=[],e.totalWidth=0,e.totalHeight=0,e.openWidth=0,e.openHeight=0,e.lx=0,e.ly=0;var r=x.tester.selectAll(\"g.\"+M.dropdownButtonClassName).data(e.buttons);r.enter().append(\"g\").classed(M.dropdownButtonClassName,!0);var n=-1!==[\"up\",\"down\"].indexOf(e.direction);r.each(function(r,i){var a=g.select(this);a.call(l,e,r,t);var o=a.select(\".\"+M.itemTextClassName),s=o.node()&&x.bBox(o.node()).width,c=Math.max(s+M.textPadX,M.minWidth),u=e.font.size*w,f=b.lineCount(o),h=Math.max(u*f,M.minHeight)+M.textOffsetY;h=Math.ceil(h),c=Math.ceil(c),e.widths[i]=c,e.heights[i]=h,e.height1=Math.max(e.height1,h),e.width1=Math.max(e.width1,c),n?(e.totalWidth=Math.max(e.totalWidth,c),e.openWidth=e.totalWidth,e.totalHeight+=h+M.gapButton,e.openHeight+=h+M.gapButton):(e.totalWidth+=c+M.gapButton,e.openWidth+=c+M.gapButton,e.totalHeight=Math.max(e.totalHeight,h),e.openHeight=e.totalHeight)}),n?e.totalHeight-=M.gapButton:e.totalWidth-=M.gapButton,e.headerWidth=e.width1+M.arrowPadX,e.headerHeight=e.height1,\"dropdown\"===e.type&&(n?(e.width1+=M.arrowPadX,e.totalHeight=e.height1):e.totalWidth=e.width1,e.totalWidth+=M.arrowPadX),r.remove();var i=e.totalWidth+e.pad.l+e.pad.r,a=e.totalHeight+e.pad.t+e.pad.b,o=t._fullLayout._size;e.lx=o.l+o.w*e.x,e.ly=o.t+o.h*(1-e.y);var s=\"left\";_.isRightAnchor(e)&&(e.lx-=i,s=\"right\"),_.isCenterAnchor(e)&&(e.lx-=i/2,s=\"center\");var c=\"top\";_.isBottomAnchor(e)&&(e.ly-=a,c=\"bottom\"),_.isMiddleAnchor(e)&&(e.ly-=a/2,c=\"middle\"),e.totalWidth=Math.ceil(e.totalWidth),e.totalHeight=Math.ceil(e.totalHeight),e.lx=Math.round(e.lx),e.ly=Math.round(e.ly),v.autoMargin(t,M.autoMarginIdRoot+e._index,{x:e.x,y:e.y,l:i*({right:1,center:.5}[s]||0),r:i*({left:1,center:.5}[s]||0),b:a*({top:1,middle:.5}[c]||0),t:a*({bottom:1,middle:.5}[c]||0)})}(t,d)}var p=\"updatemenus\"+e._uid,y=new k(t,f,p);u.enter().size()&&(f.node().parentNode.appendChild(f.node()),f.call(m).attr(M.menuIndexAttrName,\"-1\")),u.exit().each(function(e){g.select(this).remove(),f.call(m).attr(M.menuIndexAttrName,\"-1\"),v.autoMargin(t,M.autoMarginIdRoot+e._index)}),u.each(function(e){var r=g.select(this),n=\"dropdown\"===e.type?f:null;v.manageCommandObserver(t,e,e.buttons,function(i){a(t,e,e.buttons[i.index],r,n,y,i.index,!0)}),\"dropdown\"===e.type?(o(t,r,f,y,e),i(f,e)&&s(t,r,f,y,e)):s(t,r,null,null,e)})}}},{\"../../constants/alignment\":716,\"../../lib/svg_text_utils\":766,\"../../plots/plots\":852,\"../color\":618,\"../drawing\":643,\"../legend/anchor_utils\":669,\"./constants\":711,\"./scrollbox\":715,d3:128}],714:[function(t,e,r){arguments[4][708][0].apply(r,arguments)},{\"./attributes\":710,\"./constants\":711,\"./defaults\":712,\"./draw\":713,dup:708}],715:[function(t,e,r){\"use strict\";function n(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll(\"rect.scrollbox-bg\").data([0]),this.bg.exit().on(\".drag\",null).on(\"wheel\",null).remove(),this.bg.enter().append(\"rect\").classed(\"scrollbox-bg\",!0).style(\"pointer-events\",\"all\").attr({opacity:0,x:0,y:0,width:0,height:0})}e.exports=n;var i=t(\"d3\"),a=t(\"../color\"),o=t(\"../drawing\"),s=t(\"../../lib\");n.barWidth=2,n.barLength=20,n.barRadius=2,n.barPad=1,n.barColor=\"#808BA4\",n.prototype.enable=function(t,e,r){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=t;var u,f,h,d,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x=\"down\"===y,b=\"left\"===y,_=\"up\"===y,w=m,M=v;x||b||\"right\"===y||_||(this.position.direction=\"down\",x=!0);x||_?(f=(u=p)+w,x?(h=g,M=(d=Math.min(h+M,c))-h):M=(d=g+M)-(h=Math.max(d-M,0))):(d=(h=g)+M,b?w=(f=p+w)-(u=Math.max(f-w,0)):(u=p,w=(f=Math.min(u+w,l))-u)),this._box={l:u,t:h,w:w,h:M};var k=m>w,A=n.barLength+2*n.barPad,T=n.barWidth+2*n.barPad,S=p,E=g+v;E+T>c&&(E=c-T);var L=this.container.selectAll(\"rect.scrollbar-horizontal\").data(k?[0]:[]);L.exit().on(\".drag\",null).remove(),L.enter().append(\"rect\").classed(\"scrollbar-horizontal\",!0).call(a.fill,n.barColor),k?(this.hbar=L.attr({rx:n.barRadius,ry:n.barRadius,x:S,y:E,width:A,height:T}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>M,z=n.barWidth+2*n.barPad,D=n.barLength+2*n.barPad,I=p+m,P=g;I+z>l&&(I=l-z);var O=this.container.selectAll(\"rect.scrollbar-vertical\").data(C?[0]:[]);O.exit().on(\".drag\",null).remove(),O.enter().append(\"rect\").classed(\"scrollbar-vertical\",!0).call(a.fill,n.barColor),C?(this.vbar=O.attr({rx:n.barRadius,ry:n.barRadius,x:I,y:P,width:z,height:D}),this._vbarYMin=P+D/2,this._vbarTranslateMax=M-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,R=u-.5,N=C?f+z+.5:f+.5,j=h-.5,B=k?d+T+.5:d+.5,U=s._topdefs.selectAll(\"#\"+F).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append(\"clipPath\").attr(\"id\",F).append(\"rect\"),k||C?(this._clipRect=U.select(\"rect\").attr({x:Math.floor(R),y:Math.floor(j),width:Math.ceil(N)-Math.floor(R),height:Math.ceil(B)-Math.floor(j)}),this.container.call(o.setClipUrl,F),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||C){var V=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(V);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),C&&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\":743,\"../color\":618,\"../drawing\":643,d3:128}],716:[function(t,e,r){\"use strict\";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},LINE_SPACING:1.3,MID_SHIFT:.35,OPPOSITE_SIDE:{left:\"right\",right:\"left\",top:\"bottom\",bottom:\"top\"}}},{}],717:[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]}},{}],718:[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]}},{}],719:[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\"}},{}],720:[function(t,e,r){\"use strict\";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DBLCLICKDELAY:300,DESELECTDIM:.2}},{}],721:[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,MINUS_SIGN:\"\\u2212\"}},{}],722:[function(t,e,r){\"use strict\";e.exports={entityToUnicode:{mu:\"\\u03bc\",\"#956\":\"\\u03bc\",amp:\"&\",\"#28\":\"&\",lt:\"<\",\"#60\":\"<\",gt:\">\",\"#62\":\">\",nbsp:\"\\xa0\",\"#160\":\"\\xa0\",times:\"\\xd7\",\"#215\":\"\\xd7\",plusmn:\"\\xb1\",\"#177\":\"\\xb1\",deg:\"\\xb0\",\"#176\":\"\\xb0\"}}},{}],723:[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}},{}],724:[function(t,e,r){\"use strict\";var n=t(\"./plotly\");r.version=\"1.33.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/fx\"),t(\"./components/legend\"),t(\"./components/annotations\"),t(\"./components/annotations3d\"),t(\"./components/shapes\"),t(\"./components/images\"),t(\"./components/updatemenus\"),t(\"./components/sliders\"),t(\"./components/rangeslider\"),t(\"./components/rangeselector\")]),r.register([t(\"./locale-en\"),t(\"./locale-en-us\")]),r.Icons=t(\"../build/ploticon\"),r.Plots=n.Plots,r.Fx=t(\"./components/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\":609,\"./components/annotations3d\":614,\"./components/fx\":660,\"./components/images\":668,\"./components/legend\":677,\"./components/rangeselector\":689,\"./components/rangeslider\":695,\"./components/shapes\":702,\"./components/sliders\":708,\"./components/updatemenus\":714,\"./fonts/mathjax_config\":725,\"./lib/queue\":757,\"./locale-en\":771,\"./locale-en-us\":770,\"./plot_api/plot_schema\":778,\"./plot_api/register\":779,\"./plot_api/set_plot_config\":780,\"./plot_api/to_image\":782,\"./plot_api/validate\":783,\"./plotly\":784,\"./snapshot\":878,\"./snapshot/download\":875,\"./traces/scatter\":1078,d3:128,\"es6-promise\":137}],725:[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},{}],726:[function(t,e,r){\"use strict\";var n=Math.PI;r.deg2rad=function(t){return t/180*n},r.rad2deg=function(t){return t/n*180},r.wrap360=function(t){var e=t%360;return e<0?e+360:e},r.wrap180=function(t){return Math.abs(t)>180&&(t-=360*Math.round(t/360)),t}},{}],727:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../constants/numerical\").BADNUM,a=/^['\"%,$#\\s']+|[, ]|['\"%,$#\\s']+$/g;e.exports=function(t){return\"string\"==typeof t&&(t=t.replace(a,\"\")),n(t)?Number(t):i}},{\"../constants/numerical\":721,\"fast-isnumeric\":140}],728:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"tinycolor2\"),a=t(\"../plots/attributes\"),o=t(\"../components/colorscale/get_scale\"),s=(Object.keys(t(\"../components/colorscale/scales\")),t(\"./nested_property\")),l=t(\"./regex\").counter,c=t(\"../constants/interactions\").DESELECTDIM,u=t(\"./angles\").wrap180;r.valObjectMeta={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)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if(\"/\"===i.charAt(0)&&\"/\"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},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&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.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)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every(function(t){return i(t).isValid()})?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o(t,r))}},angle:{coerceFunction:function(t,e,r){\"auto\"===t?e.set(\"auto\"):n(t)?e.set(u(+t)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r){\"string\"==typeof t&&l(r).test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||\"string\"==typeof t&&!!l(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(\"string\"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split(\"+\"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join(\"+\")):e.set(r)}else e.set(t);else e.set(r)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,e,n,i){if(Array.isArray(t)){var a=i.items,o=[];n=Array.isArray(n)?n:[];for(var s=0;s<a.length;s++)r.coerce(t,o,a,\"[\"+s+\"]\",n[s]);e.set(o)}else e.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var n=e.items;if(!e.freeLength&&t.length!==n.length)return!1;for(var i=0;i<t.length;i++){if(!r.validate(t[i],e.items[i]))return!1}return!0}}},r.coerce=function(t,e,n,i,a){var o=s(n,i).get(),l=s(t,i),c=s(e,i),u=l.get();return void 0===a&&(a=o.dflt),o.arrayOk&&Array.isArray(u)?(c.set(u),u):(r.valObjectMeta[o.valType].coerceFunction(u,c,a,o),c.get())},r.coerce2=function(t,e,n,i,a){var o=s(t,i),l=r.coerce(t,e,n,i,a),c=o.get();return void 0!==c&&null!==c&&l},r.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+\".family\",r.family),n.size=t(e+\".size\",r.size),n.color=t(e+\".color\",r.color),n},r.coerceHoverinfo=function(t,e,n){var i,o=e._module.attributes,s=o.hoverinfo?{hoverinfo:o.hoverinfo}:a,l=s.hoverinfo;if(1===n._dataLength){var c=\"all\"===l.dflt?l.flags.slice():l.dflt.split(\"+\");c.splice(c.indexOf(\"name\"),1),i=c.join(\"+\")}return r.coerce(t,e,s,\"hoverinfo\",i)},r.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;Array.isArray(i)||t.selected||t.unselected||(r=i,n=c*i),e(\"selected.marker.opacity\",r),e(\"unselected.marker.opacity\",n)}},r.validate=function(t,e){var n=r.valObjectMeta[e.valType];if(e.arrayOk&&Array.isArray(t))return!0;if(n.validateFunction)return n.validateFunction(t,e);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,e),a!==i}},{\"../components/colorscale/get_scale\":631,\"../components/colorscale/scales\":637,\"../constants/interactions\":720,\"../plots/attributes\":787,\"./angles\":726,\"./nested_property\":751,\"./regex\":758,\"fast-isnumeric\":140,tinycolor2:546}],729:[function(t,e,r){\"use strict\";function n(t){return t&&x.componentsRegistry.calendars&&\"string\"==typeof t&&\"gregorian\"!==t}function i(t,e){return String(t+Math.pow(10,e)).substr(1)}function a(t,e,r,n,a){if((e||r||n||a)&&(t+=\" \"+i(e,2)+\":\"+i(r,2),(n||a)&&(t+=\":\"+i(n,2),a))){for(var o=4;a%10==0;)o-=1,a/=10;t+=\".\"+i(a,o)}return t}function o(t,e){var r=f(t+.05,p),n=i(Math.floor(r/m),2)+\":\"+i(f(Math.floor(r/g),60),2);if(\"M\"!==e){c(e)||(e=0);var a=(100+Math.min(f(t/v,60),C[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,\"\").replace(/[\\.]$/,\"\")),n+=\":\"+a}return n}function s(t){return t.formatDate(\"yyyy\")}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"./loggers\"),f=t(\"./mod\"),h=t(\"../constants/numerical\"),d=h.BADNUM,p=h.ONEDAY,m=h.ONEHOUR,g=h.ONEMIN,v=h.ONESEC,y=h.EPOCHJD,x=t(\"../registry\"),b=l.time.format.utc,_=/^\\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,w=/^\\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,M=(new Date).getFullYear()-70;r.dateTick0=function(t,e){return n(t)?e?x.getComponentMethod(\"calendars\",\"CANONICAL_SUNDAY\")[t]:x.getComponentMethod(\"calendars\",\"CANONICAL_TICK\")[t]:e?\"2000-01-02\":\"2000-01-01\"},r.dfltRange=function(t){return n(t)?x.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 k,A;r.dateTime2ms=function(t,e){if(r.isJSDate(t))return(t=Number(t)-t.getTimezoneOffset()*g)>=k&&t<=A?t:d;if(\"string\"!=typeof t&&\"number\"!=typeof t)return d;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?w:_);if(!s)return d;var l=s[1],c=s[3]||\"1\",u=Number(s[5]||1),f=Number(s[7]||0),h=Number(s[9]||0),b=Number(s[11]||0);if(i){if(2===l.length)return d;l=Number(l);var T;try{var S=x.getComponentMethod(\"calendars\",\"getCal\")(e);if(o){var E=\"i\"===c.charAt(c.length-1);c=parseInt(c,10),T=S.newDate(l,S.toMonthIndex(l,c,E),u)}else T=S.newDate(l,Number(c),u)}catch(t){return d}return T?(T.toJD()-y)*p+f*m+h*g+b*v:d}l=2===l.length?(Number(l)+2e3-M)%100+M:Number(l),c-=1;var L=new Date(Date.UTC(2e3,c,u,f,h));return L.setUTCFullYear(l),L.getUTCMonth()!==c?d:L.getUTCDate()!==u?d:L.getTime()+b*v},k=r.MIN_MS=r.dateTime2ms(\"-9999\"),A=r.MAX_MS=r.dateTime2ms(\"9999-12-31 23:59:59.9999\"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==d};var T=90*p,S=3*m,E=5*g;r.ms2DateTime=function(t,e,r){if(\"number\"!=typeof t||!(t>=k&&t<=A))return d;e||(e=0);var i,o,s,l,c,u,h=Math.floor(10*f(t+.05,1)),_=Math.round(t-h/10);if(n(r)){var w=Math.floor(_/p)+y,M=Math.floor(f(t,p));try{i=x.getComponentMethod(\"calendars\",\"getCal\")(r).fromJD(w).formatDate(\"yyyy-mm-dd\")}catch(t){i=b(\"G%Y-%m-%d\")(new Date(_))}if(\"-\"===i.charAt(0))for(;i.length<11;)i=\"-0\"+i.substr(1);else for(;i.length<10;)i=\"0\"+i;o=e<T?Math.floor(M/m):0,s=e<T?Math.floor(M%m/g):0,l=e<S?Math.floor(M%g/v):0,c=e<E?M%v*10+h:0}else u=new Date(_),i=b(\"%Y-%m-%d\")(u),o=e<T?u.getUTCHours():0,s=e<T?u.getUTCMinutes():0,l=e<S?u.getUTCSeconds():0,c=e<E?10*u.getUTCMilliseconds()+h:0;return a(i,o,s,l,c)},r.ms2DateTimeLocal=function(t){if(!(t>=k+p&&t<=A-p))return d;var e=Math.floor(10*f(t+.05,1)),r=new Date(Math.round(t-e/10));return a(l.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 u.error(\"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 u.error(\"unrecognized date\",t),e;return t};var L=/%\\d?f/g,C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,i,a){var l,c;if(a=n(a)&&a,e)return function(t,e,r,i){t=t.replace(L,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,\"\")||\"0\"});var a=new Date(Math.floor(e+.05));if(n(i))try{t=x.getComponentMethod(\"calendars\",\"worldCalFmt\")(t,e,i)}catch(t){return\"Invalid\"}return r(t)(a)}(e,t,i,a);if(a)try{var u=Math.floor((t+.05)/p)+y,f=x.getComponentMethod(\"calendars\",\"getCal\")(a).fromJD(u);\"y\"===r?c=s(f):\"m\"===r?c=function(t){return t.formatDate(\"M yyyy\")}(f):\"d\"===r?(l=s(f),c=function(t){return t.formatDate(\"M d\")}(f)):(l=function(t){return t.formatDate(\"M d, yyyy\")}(f),c=o(t,r))}catch(t){return\"Invalid\"}else{var h=new Date(Math.floor(t+.05));\"y\"===r?c=i(\"%Y\")(h):\"m\"===r?c=i(\"%b %Y\")(h):\"d\"===r?(l=i(\"%Y\")(h),c=i(\"%b %-d\")(h)):(l=i(\"%b %-d, %Y\")(h),c=o(t,r))}return c+(l?\"\\n\"+l:\"\")};var z=3*p;r.incrementMonth=function(t,e,r){r=n(r)&&r;var i=f(t,p);if(t=Math.round(t-i),r)try{var a=Math.round(t/p)+y,o=x.getComponentMethod(\"calendars\",\"getCal\")(r),s=o.fromJD(a);return e%12?o.add(s,e,\"m\"):o.add(s,e/12,\"y\"),(s.toJD()-y)*p+i}catch(e){u.error(\"invalid ms \"+t+\" in calendar \"+r)}var l=new Date(t+z);return l.setUTCMonth(l.getUTCMonth()+e)+i-z},r.findExactDates=function(t,e){for(var r,i,a=0,o=0,s=0,l=0,u=n(e)&&x.getComponentMethod(\"calendars\",\"getCal\")(e),f=0;f<t.length;f++)if(i=t[f],c(i)){if(!(i%p))if(u)try{1===(r=u.fromJD(i/p+y)).day()?1===r.month()?a++:o++:s++}catch(t){}else 1===(r=new Date(i)).getUTCDate()?0===r.getUTCMonth()?a++:o++:s++}else l++;s+=o+=a;var h=t.length-l;return{exactYears:a/h,exactMonths:o/h,exactDays:s/h}}},{\"../constants/numerical\":721,\"../registry\":873,\"./loggers\":748,\"./mod\":750,d3:128,\"fast-isnumeric\":140}],730:[function(t,e,r){\"use strict\";e.exports=function(t,e){return Array.isArray(t)||(t=[]),t.length=e,t}},{}],731:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){\"undefined\"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;\"undefined\"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o=a._events[e];if(!o)return n;\"function\"==typeof o&&(o=[o]);for(var s=o.pop(),l=0;l<o.length;l++)o[l](r);return i=s(r),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};e.exports=i},{events:138}],732:[function(t,e,r){\"use strict\";function n(t,e,r,o){var s,l,c,u,f,h,d=t[0],p=t.length;if(2===p&&a(d)&&a(t[1])&&0===d.length){if(function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&\"object\"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],d))return d;d.splice(0,d.length)}for(var m=1;m<p;m++){s=t[m];for(l in s)c=d[l],u=s[l],o&&a(u)?d[l]=u:e&&u&&(i(u)||(f=a(u)))?(f?(f=!1,h=c&&a(c)?c:[]):h=c&&i(c)?c:{},d[l]=n([h,u],e,r,o)):(void 0!==u||r)&&(d[l]=u)}return d}var i=t(\"./is_plain_object.js\"),a=Array.isArray;r.extendFlat=function(){return n(arguments,!1,!1,!1)},r.extendDeep=function(){return n(arguments,!0,!1,!1)},r.extendDeepAll=function(){return n(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return n(arguments,!0,!1,!0)}},{\"./is_plain_object.js\":745}],733:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},{}],734:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=function(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}(t)?function(t){return!0===t[0].trace.visible}:function(t){return!0===t.visible},r=[],n=0;n<t.length;n++){var i=t[n];e(i)&&r.push(i)}return r}},{}],735:[function(t,e,r){\"use strict\";var n=t(\"country-regex\"),i=t(\"../lib\"),a=Object.keys(n),o={\"ISO-3\":i.identity,\"USA-states\":i.identity,\"country names\":function(t){for(var e=0;e<a.length;e++){var r=a[e];if(new RegExp(n[r]).test(t.trim().toLowerCase()))return r}return i.log(\"Unrecognized country name: \"+t+\".\"),!1}};r.locationToFeature=function(t,e,r){if(!e||\"string\"!=typeof e)return!1;var n=function(t,e){return(0,o[t])(e)}(t,e);if(n){for(var a=0;a<r.length;a++){var s=r[a];if(s.id===n)return s}i.log([\"Location with id\",n,\"does not have a matching topojson feature at this resolution.\"].join(\" \"))}return!1}},{\"../lib\":743,\"country-regex\":113}],736:[function(t,e,r){\"use strict\";var n=t(\"../constants/numerical\").BADNUM;r.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:\"LineString\",coordinates:t[0]}:{type:\"MultiLineString\",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:\"Polygon\",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:\"MultiPolygon\",coordinates:e}},r.makeBlank=function(){return{type:\"Point\",coordinates:[]}}},{\"../constants/numerical\":721}],737:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,f=n-e,h=a-e,d=s-a,p=l*d-u*f;if(0===p)return null;var m=(c*d-u*h)/p,g=(c*f-l*h)/p;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+f*m}}function i(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}var a=t(\"./mod\");r.segmentsIntersect=n,r.segmentDistance=function(t,e,r,a,o,s,l,c){if(n(t,e,r,a,o,s,l,c))return 0;var u=r-t,f=a-e,h=l-o,d=c-s,p=u*u+f*f,m=h*h+d*d,g=Math.min(i(u,f,p,o-t,s-e),i(u,f,p,l-t,c-e),i(h,d,m,t-o,e-s),i(h,d,m,r-o,a-s));return Math.sqrt(g)};var o,s,l;r.getTextLocation=function(t,e,r,n){if(t===s&&n===l||(o={},s=t,l=n),o[r])return o[r];var i=t.getPointAtLength(a(r-n/2,e)),c=t.getPointAtLength(a(r+n/2,e)),u=Math.atan((c.y-i.y)/(c.x-i.x)),f=t.getPointAtLength(a(r,e)),h={x:(4*f.x+i.x+c.x)/6,y:(4*f.y+i.y+c.y)/6,theta:u};return o[r]=h,h},r.clearLocationCache=function(){s=null},r.getVisibleSegment=function(t,e,r){function n(e){var r=t.getPointAtLength(e);0===e?i=r:e===f&&(a=r);var n=r.x<o?o-r.x:r.x>s?r.x-s:0,u=r.y<l?l-r.y:r.y>c?r.y-c:0;return Math.sqrt(n*n+u*u)}for(var i,a,o=e.left,s=e.right,l=e.top,c=e.bottom,u=0,f=t.getTotalLength(),h=f,d=n(u);d;){if((u+=d+r)>h)return;d=n(u)}for(d=n(h);d;){if(h-=d+r,u>h)return;d=n(h)}return{min:u,max:h,len:h-u,total:f,isClosed:0===u&&h===f&&Math.abs(i.x-a.x)<.1&&Math.abs(i.y-a.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,d=s;f<c;){if(i=(h+d)/2,a=t.getPointAtLength(i),o=a[r]-e,Math.abs(o)<l)return a;u*o>0?d=i:h=i,f++}return a}},{\"./mod\":750}],738:[function(t,e,r){\"use strict\";e.exports=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}},{}],739:[function(t,e,r){\"use strict\";function n(t,e){var r=t;return r[3]*=e,r}function i(t){if(o(t))return u;var e=s(t);return e.length?e:u}function a(t){return o(t)?t:f}var o=t(\"fast-isnumeric\"),s=t(\"color-normalize\"),l=t(\"../components/colorscale\"),c=t(\"../components/color/attributes\").defaultLine,u=s(c),f=1;e.exports=function(t,e,r){var o,c,h,d,p,m=t.color,g=Array.isArray(m),v=Array.isArray(e),y=[];if(o=void 0!==t.colorscale?l.makeColorScaleFunc(l.extractScale(t.colorscale,t.cmin,t.cmax)):i,c=g?function(t,e){return void 0===t[e]?u:s(o(t[e]))}:i,h=v?function(t,e){return void 0===t[e]?f:a(t[e])}:a,g||v)for(var x=0;x<r;x++)d=c(m,x),p=h(e,x),y[x]=n(d,p);else y=n(s(m),e);return y}},{\"../components/color/attributes\":617,\"../components/colorscale\":633,\"color-normalize\":99,\"fast-isnumeric\":140}],740:[function(t,e,r){\"use strict\";function n(t){return[t]}var i=t(\"./identity\");e.exports={keyFun:function(t){return t.key},repeat:n,descend:i,wrap:n,unwrap:function(t){return t[0]}}},{\"./identity\":742}],741:[function(t,e,r){\"use strict\";var n=t(\"superscript-text\"),i=t(\"../constants/string_mappings\");e.exports=function(t){return\"\"+function(t){for(var e=i.entityToUnicode,r=0;(r=t.indexOf(\"&\",r))>=0;){var n=t.indexOf(\";\",r);if(n<r)r+=1;else{var a=e[t.slice(r+1,n)];t=a?t.slice(0,r)+a+t.slice(n+1):t.slice(0,r)+t.slice(n+1)}}return t}(function(t){return t.replace(/\\<.*\\>/g,\"\")}(function(t){for(var e=0;(e=t.indexOf(\"<sup>\",e))>=0;){var r=t.indexOf(\"</sup>\",e);if(r<e)break;t=t.slice(0,e)+n(t.slice(e+5,r))+t.slice(r+6)}return t}(function(t){return t.replace(/\\<br\\>/g,\"\\n\")}(t))))}},{\"../constants/string_mappings\":722,\"superscript-text\":539}],742:[function(t,e,r){\"use strict\";e.exports=function(t){return t}},{}],743:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=t(\"../constants/numerical\"),o=a.FP_SAFE,s=a.BADNUM,l=e.exports={};l.nestedProperty=t(\"./nested_property\"),l.keyedContainer=t(\"./keyed_container\"),l.relativeAttr=t(\"./relative_attr\"),l.isPlainObject=t(\"./is_plain_object\"),l.isArray=t(\"./is_array\"),l.mod=t(\"./mod\"),l.toLogRange=t(\"./to_log_range\"),l.relinkPrivateKeys=t(\"./relink_private\"),l.ensureArray=t(\"./ensure_array\");var c=t(\"./coerce\");l.valObjectMeta=c.valObjectMeta,l.coerce=c.coerce,l.coerce2=c.coerce2,l.coerceFont=c.coerceFont,l.coerceHoverinfo=c.coerceHoverinfo,l.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,l.validate=c.validate;var u=t(\"./dates\");l.dateTime2ms=u.dateTime2ms,l.isDateTime=u.isDateTime,l.ms2DateTime=u.ms2DateTime,l.ms2DateTimeLocal=u.ms2DateTimeLocal,l.cleanDate=u.cleanDate,l.isJSDate=u.isJSDate,l.formatDate=u.formatDate,l.incrementMonth=u.incrementMonth,l.dateTick0=u.dateTick0,l.dfltRange=u.dfltRange,l.findExactDates=u.findExactDates,l.MIN_MS=u.MIN_MS,l.MAX_MS=u.MAX_MS;var f=t(\"./search\");l.findBin=f.findBin,l.sorterAsc=f.sorterAsc,l.sorterDes=f.sorterDes,l.distinctVals=f.distinctVals,l.roundUp=f.roundUp;var h=t(\"./stats\");l.aggNums=h.aggNums,l.len=h.len,l.mean=h.mean,l.variance=h.variance,l.stdev=h.stdev,l.interp=h.interp;var d=t(\"./matrix\");l.init2dArray=d.init2dArray,l.transposeRagged=d.transposeRagged,l.dot=d.dot,l.translationMatrix=d.translationMatrix,l.rotationMatrix=d.rotationMatrix,l.rotationXYMatrix=d.rotationXYMatrix,l.apply2DTransform=d.apply2DTransform,l.apply2DTransform2=d.apply2DTransform2;var p=t(\"./angles\");l.deg2rad=p.deg2rad,l.rad2deg=p.rad2deg,l.wrap360=p.wrap360,l.wrap180=p.wrap180;var m=t(\"./geometry2d\");l.segmentsIntersect=m.segmentsIntersect,l.segmentDistance=m.segmentDistance,l.getTextLocation=m.getTextLocation,l.clearLocationCache=m.clearLocationCache,l.getVisibleSegment=m.getVisibleSegment,l.findPointOnPath=m.findPointOnPath;var g=t(\"./extend\");l.extendFlat=g.extendFlat,l.extendDeep=g.extendDeep,l.extendDeepAll=g.extendDeepAll,l.extendDeepNoArrays=g.extendDeepNoArrays;var v=t(\"./loggers\");l.log=v.log,l.warn=v.warn,l.error=v.error;var y=t(\"./regex\");l.counterRegex=y.counter;var x=t(\"./throttle\");l.throttle=x.throttle,l.throttleDone=x.done,l.clearThrottle=x.clear,l.getGraphDiv=t(\"./get_graph_div\"),l._=t(\"./localize\"),l.notifier=t(\"./notifier\"),l.filterUnique=t(\"./filter_unique\"),l.filterVisible=t(\"./filter_visible\"),l.pushUnique=t(\"./push_unique\"),l.cleanNumber=t(\"./clean_number\"),l.ensureNumber=function(t){return i(t)?(t=Number(t))<-o||t>o?s:i(t)?Number(t):s:s},l.noop=t(\"./noop\"),l.identity=t(\"./identity\"),l.swapAttrs=function(t,e,r,n){r||(r=\"x\"),n||(n=\"y\");for(var i=0;i<e.length;i++){var a=e[i],o=l.nestedProperty(t,a.replace(\"?\",r)),s=l.nestedProperty(t,a.replace(\"?\",n)),c=o.get();o.set(s.get()),s.set(c)}},l.pauseEvent=function(t){return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1},l.raiseToTop=function(t){t.parentNode.appendChild(t)},l.cancelTransition=function(t){return t.transition().duration(0)},l.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},l.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},l.simpleMap=function(t,e,r,n){for(var i=t.length,a=new Array(i),o=0;o<i;o++)a[o]=e(t[o],r,n);return a},l.randstr=function t(e,r,n){if(n||(n=16),void 0===r&&(r=24),r<=0)return\"0\";var i,a,o=Math.log(Math.pow(2,r))/Math.log(n),s=\"\";for(i=2;o===1/0;i*=2)o=Math.log(Math.pow(2,r/i))/Math.log(n)*i;var l=o-Math.floor(o);for(i=0;i<Math.floor(o);i++)s=Math.floor(Math.random()*n).toString(n)+s;l&&(a=Math.pow(n,l),s=Math.floor(Math.random()*a).toString(n)+s);var c=parseInt(s,n);return e&&e.indexOf(s)>-1||c!==1/0&&c>=Math.pow(2,r)?t(e,r,n):s},l.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},l.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,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},l.syncOrAsync=function(t,e,r){function n(){return l.syncOrAsync(t,e,r)}for(var i,a;t.length;)if(a=t.splice(0,1)[0],(i=a(e))&&i.then)return i.then(n).then(void 0,l.promiseError);return r&&r(e)},l.stripTrailingSlash=function(t){return\"/\"===t.substr(-1)?t.substr(0,t.length-1):t},l.noneOrAll=function(t,e,r){if(t){var n,i,a=!1,o=!0;for(n=0;n<r.length;n++)void 0!==(i=t[r[n]])&&null!==i?a=!0:o=!1;if(a&&!o)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},l.mergeArray=function(t,e,r){if(Array.isArray(t))for(var n=Math.min(t.length,e.length),i=0;i<n;i++)e[i][r]=t[i]},l.fillArray=function(t,e,r,n){if(n=n||l.identity,Array.isArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},l.castOption=function(t,e,r,n){n=n||l.identity;var i=l.nestedProperty(t,r).get();return Array.isArray(i)?n(Array.isArray(e)&&Array.isArray(i[e[0]])?i[e[0]][e[1]]:i[e]):i},l.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=l.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},l.tagSelected=function(t,e,r){function n(t){return i(t)&&t>=0&&t%1==0}function a(e){return void 0!==e&&e<t.length}var o,s=e.selectedpoints,l=e._indexToPoints;if(l){o={};for(var c in l)for(var u=l[c],f=0;f<u.length;f++)o[u[f]]=c}for(var h=0;h<s.length;h++){var d=s[h];if(n(d)){var p=o?o[d]:d,m=r?r[p]:p;a(m)&&(t[m].selected=1)}}},l.getTargetArray=function(t,e){var r=e.target;if(\"string\"==typeof r&&r){var n=l.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},l.minExtend=function(t,e){var r={};\"object\"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],\"_\"!==i.charAt(0)&&\"function\"!=typeof a&&(\"module\"===i?r[i]=a:Array.isArray(a)?r[i]=a.slice(0,3):r[i]=a&&\"object\"==typeof a?l.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)\"object\"==typeof(a=e[i=o[n]])&&i in r&&\"object\"==typeof r[i]||(r[i]=a);return r},l.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},l.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},l.isPlotDiv=function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed(\"js-plotly-plot\")},l.removeElement=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)},l.addStyleRule=function(t,e){if(!l.styleSheet){var r=document.createElement(\"style\");r.appendChild(document.createTextNode(\"\")),document.head.appendChild(r),l.styleSheet=r.sheet}var n=l.styleSheet;n.insertRule?n.insertRule(t+\"{\"+e+\"}\",0):n.addRule?n.addRule(t,e,0):l.warn(\"addStyleRule failed\")},l.isIE=function(){return void 0!==window.navigator.msSaveBlob},l.isD3Selection=function(t){return t&&\"function\"==typeof t.classed},l.objectFromPath=function(t,e){for(var r,n=t.split(\".\"),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\\[([0-9]+)\\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var b=/^([^\\[\\.]+)\\.(.+)?/,_=/^([^\\.]+)\\[([0-9]+)\\](\\.)?(.+)?/;l.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if(\"object\"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(b))?(i=t[r],n=e[1],delete t[r],t[n]=l.extendDeepNoArrays(t[n]||{},l.objectFromPath(r,l.expandObjectPaths(i))[n])):(e=r.match(_))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],\".\"===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(i)))):t[n][a]=l.expandObjectPaths(i)):t[r]=l.expandObjectPaths(t[r]));return t},l.numSeparate=function(t,e,r){if(r||(r=!1),\"string\"!=typeof e||0===e.length)throw new Error(\"Separator string required for formatting!\");\"number\"==typeof t&&(t=String(t));var n=/(\\d+)(\\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split(\".\"),s=o[0],l=o.length>1?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};var w=/%{([^\\s%{}]*)}/g,M=/^\\w*$/;l.templateString=function(t,e){var r={};return t.replace(w,function(t,n){return M.test(n)?e[n]||\"\":(r[n]=r[n]||l.nestedProperty(e,n).get,r[n]()||\"\")})};l.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n},l.eventListenerOptionsSupported=function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e),window.removeEventListener(\"test\",null,e)}catch(e){t=!1}return t}},{\"../constants/numerical\":721,\"./angles\":726,\"./clean_number\":727,\"./coerce\":728,\"./dates\":729,\"./ensure_array\":730,\"./extend\":732,\"./filter_unique\":733,\"./filter_visible\":734,\"./geometry2d\":737,\"./get_graph_div\":738,\"./identity\":742,\"./is_array\":744,\"./is_plain_object\":745,\"./keyed_container\":746,\"./localize\":747,\"./loggers\":748,\"./matrix\":749,\"./mod\":750,\"./nested_property\":751,\"./noop\":752,\"./notifier\":753,\"./push_unique\":756,\"./regex\":758,\"./relative_attr\":759,\"./relink_private\":760,\"./search\":761,\"./stats\":764,\"./throttle\":767,\"./to_log_range\":768,d3:128,\"fast-isnumeric\":140}],744:[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)}},{}],745:[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}},{}],746:[function(t,e,r){\"use strict\";var n=t(\"./nested_property\"),i=/^\\w*$/;e.exports=function(t,e,r,a){r=r||\"name\",a=a||\"value\";var o,s,l={};s=e&&e.length?n(t,e).get():t,e=e||\"\",s=s||[];var c={};for(o=0;o<s.length;o++)c[s[o][r]]=o;var u=i.test(a),f={set:function(t,e){var i=null===e?4:0,o=c[t];void 0===o?(i|=3,o=s.length,c[t]=o):e!==(u?s[o][a]:n(s[o],a).get())&&(i|=2);var h=s[o]=s[o]||{};return h[r]=t,u?h[a]=e:n(h,a).set(e),null!==e&&(i&=-5),l[o]=l[o]|i,f},get:function(t){var e=c[t];return void 0===e?void 0:u?s[e][a]:n(s[e],a).get()},rename:function(t,e){var n=c[t];return void 0===n?f:(l[n]=1|l[n],c[e]=n,delete c[t],s[n][r]=e,f)},remove:function(t){var e=c[t];if(void 0===e)return f;var i=s[e];if(Object.keys(i).length>2)return l[e]=2|l[e],f.set(t,null);if(u){for(o=e;o<s.length;o++)l[o]=3|l[o];for(o=e;o<s.length;o++)c[s[o][r]]--;s.splice(e,1),delete c[t]}else n(i,a).set(null),l[e]=6|l[e];return f},constructUpdate:function(){for(var t,i,o={},c=Object.keys(l),f=0;f<c.length;f++)i=c[f],t=e+\"[\"+i+\"]\",s[i]?(1&l[i]&&(o[t+\".\"+r]=s[i][r]),2&l[i]&&(o[t+\".\"+a]=u?4&l[i]?null:s[i][a]:4&l[i]?null:n(s[i],a).get())):o[t]=null;return o}};return f}},{\"./nested_property\":751}],747:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split(\"-\")[0];if(c===r)break;r=c}return e}},{\"../registry\":873}],748:[function(t,e,r){\"use strict\";function n(t,e){if(t.apply)t.apply(t,e);else for(var r=0;r<e.length;r++)t(e[r])}var i=t(\"../plot_api/plot_config\"),a=e.exports={};a.log=function(){if(i.logging>1){for(var t=[\"LOG:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.trace||console.log,t)}},a.warn=function(){if(i.logging>0){for(var t=[\"WARN:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.trace||console.log,t)}},a.error=function(){if(i.logging>0){for(var t=[\"ERROR:\"],e=0;e<arguments.length;e++)t.push(arguments[e]);n(console.error,t)}}},{\"../plot_api/plot_config\":777}],749:[function(t,e,r){\"use strict\";r.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},r.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},r.dot=function(t,e){if(!t.length||!e.length||t.length!==e.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=r.dot(t[i],e);else if(e[0].length){var o=r.transposeRagged(e);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=r.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*e[i];return n},r.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},r.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},r.rotationXYMatrix=function(t,e,n){return r.dot(r.dot(r.translationMatrix(e,n),r.rotationMatrix(t)),r.translationMatrix(-e,-n))},r.apply2DTransform=function(t){return function(){var e=arguments;3===e.length&&(e=e[0]);var n=1===arguments.length?e[0]:[e[0],e[1]];return r.dot(t,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(t){var e=r.apply2DTransform(t);return function(t){return e(t.slice(0,2)).concat(e(t.slice(2,4)))}}},{}],750:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=t%e;return r<0?r+e:r}},{}],751:[function(t,e,r){\"use strict\";function n(t,e){return function(){var r,i,a,o,s,l=t;for(o=0;o<e.length-1;o++){if(-1===(r=e[o])){for(i=!0,a=[],s=0;s<l.length;s++)a[s]=n(l[s],e.slice(o+1))(),a[s]!==a[0]&&(i=!1);return i?a[0]:a}if(\"number\"==typeof r&&!c(l))return;if(\"object\"!=typeof(l=l[r])||null===l)return}if(\"object\"==typeof l&&null!==l&&null!==(a=l[e[o]]))return a}}function i(t,e){if(!function(t){return void 0===t||null===t||\"object\"==typeof t&&(c(t)?!t.length:!Object.keys(t).length)}(t)||u(t)&&\"]\"===e.charAt(e.length-1)||e.match(d)&&void 0!==t)return!1;if(!c(t))return!0;if(e.match(h))return!0;var r=f(e);return r&&\"\"===r.index}function a(t,e,r){return function(n){var l,u,f=t,h=\"\",d=[[t,h]],p=i(n,r);for(u=0;u<e.length-1;u++){if(\"number\"==typeof(l=e[u])&&!c(f))throw\"array index but container is not an array\";if(-1===l){if(p=!function(t,e,r,n){var o,l=c(r),u=!0,f=r,h=n.replace(\"-1\",0),d=!l&&i(r,h),p=e[0];for(o=0;o<t.length;o++)h=n.replace(\"-1\",o),l&&(f=r[o%r.length],d=i(f,h)),d&&(u=!1),s(t,o,p,d)&&a(t[o],e,n.replace(\"-1\",o))(f);return u}(f,e.slice(u+1),n,r))break;return}if(!s(f,l,e[u+1],p))break;if(\"object\"!=typeof(f=f[l])||null===f)throw\"container is not an object\";h=o(h,l),d.push([f,h])}p?(u===e.length-1&&delete f[e[u]],function(t){var e,r,n,a,s,l;for(e=t.length-1;e>=0;e--){if(n=t[e][0],a=t[e][1],l=!1,c(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}}(d)):f[e[u]]=n}}function o(t,e){var r=e;return l(e)?r=\"[\"+e+\"]\":t&&(r=\".\"+e),t+r}function s(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]=\"number\"==typeof r?[]:{}}return!0}var l=t(\"fast-isnumeric\"),c=t(\"./is_array\"),u=t(\"./is_plain_object\"),f=t(\"../plot_api/container_array_match\");e.exports=function(t,e){if(l(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,c=e.split(\".\");s<c.length;){if(r=String(c[s]).match(/^([^\\[\\]]*)((\\[\\-?[0-9]*\\])+)$/)){if(r[1])c[s]=r[1];else{if(0!==s)throw\"bad property string\";c.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split(\"][\"),o=0;o<i.length;o++)s++,c.splice(s,0,Number(i[o]))}s++}return\"object\"!=typeof t?function(t,e,r){return{set:function(){throw\"bad container\"},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:a(t,c,e),get:n(t,c),astr:e,parts:c,obj:t}};var h=/(^|\\.)((domain|range)(\\.[xy])?|args|parallels)$/,d=/(^|\\.)args\\[/},{\"../plot_api/container_array_match\":772,\"./is_array\":744,\"./is_plain_object\":745,\"fast-isnumeric\":140}],752:[function(t,e,r){\"use strict\";e.exports=function(){}},{}],753:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"fast-isnumeric\"),a=[];e.exports=function(t,e){function r(t){t.duration(700).style(\"opacity\",0).each(\"end\",function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()})}if(-1===a.indexOf(t)){a.push(t);var o=1e3;i(e)?o=e:\"long\"===e&&(o=3e3);var s=n.select(\"body\").selectAll(\".plotly-notifier\").data([0]);s.enter().append(\"div\").classed(\"plotly-notifier\",!0);s.selectAll(\".notifier-note\").data(a).enter().append(\"div\").classed(\"notifier-note\",!0).style(\"opacity\",0).each(function(t){var e=n.select(this);e.append(\"button\").classed(\"notifier-close\",!0).html(\"×\").on(\"click\",function(){e.transition().call(r)});for(var i=e.append(\"p\"),a=t.split(/<br\\s*\\/?>/g),s=0;s<a.length;s++)s&&i.append(\"br\"),i.append(\"span\").text(a[s]);e.transition().duration(700).style(\"opacity\",1).transition().delay(o).call(r)})}}},{d3:128,\"fast-isnumeric\":140}],754:[function(t,e,r){\"use strict\";var n=t(\"./setcursor\"),i=\"data-savedcursor\";e.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr(\"class\")||\"\").split(\" \"),o=0;o<a.length;o++){var s=a[o];0===s.indexOf(\"cursor-\")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,\"!!\")}n(t,e)}else r&&(t.attr(i,null),\"!!\"===r?n(t):n(t,r))}},{\"./setcursor\":762}],755:[function(t,e,r){\"use strict\";var n=t(\"./matrix\").dot,i=t(\"../constants/numerical\").BADNUM,a=e.exports={};a.tester=function(t){if(Array.isArray(t[0][0]))return a.multitester(t);var e,r=t.slice(),n=r[0][0],o=n,s=r[0][1],l=s;for(r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),o=Math.max(o,r[e][0]),s=Math.min(s,r[e][1]),l=Math.max(l,r[e][1]);var c,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,c=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,c=function(t){return t[1]===r[0][1]}));var f=!0,h=r[0];for(e=1;e<r.length;e++)if(h[0]!==r[e][0]||h[1]!==r[e][1]){f=!1;break}return{xmin:n,xmax:o,ymin:s,ymax:l,pts:r,contains:u?function(t,e){var r=t[0],a=t[1];return!(r===i||r<n||r>o||a===i||a<s||a>l||e&&c(t))}:function(t,e){var a=t[0],c=t[1];if(a===i||a<n||a>o||c===i||c<s||c>l)return!1;var u,f,h,d,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;u<m;u++)if(f=g,h=v,g=r[u][0],v=r[u][1],d=Math.min(f,g),!(a<d||a>Math.max(f,g)||c>Math.max(h,v)))if(c<Math.min(h,v))a!==d&&y++;else{if(p=g===f?c:h+(a-f)*(v-h)/(g-f),c===p)return 1!==u||!e;c<=p&&a!==d&&y++}return y%2==1},isRect:u,degenerate:f}},a.multitester=function(t){for(var e=[],r=t[0][0][0],n=r,i=t[0][0][1],o=i,s=0;s<t.length;s++){var l=a.tester(t[s]);l.subtract=t[s].subtract,e.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),i=Math.min(i,l.ymin),o=Math.max(o,l.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:o,pts:[],contains:function(t,r){for(var n=!1,i=0;i<e.length;i++)e[i].contains(t,r)&&(n=!1===e[i].subtract);return n},isRect:!1,degenerate:!1}};var o=a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),f=Math.sqrt(u),h=[-c[1]/f,c[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,h))>i)return!0;return!1};a.filter=function(t,e){function r(r){t.push(r);var s=n.length,l=i;n.splice(a+1);for(var c=l+1;c<t.length;c++)(c===t.length-1||o(t,l,c+1,e))&&(n.push(t[c]),n.length<s-2&&(i=c,a=n.length-1),l=c)}var n=[t[0]],i=0,a=0;if(t.length>1){r(t.pop())}return{addPt:r,raw:t,filtered:n}}},{\"../constants/numerical\":721,\"./matrix\":749}],756:[function(t,e,r){\"use strict\";e.exports=function(t,e){if(e instanceof RegExp){var r,n=e.toString();for(r=0;r<t.length;r++)if(t[r]instanceof RegExp&&t[r].toString()===n)return t;t.push(e)}else e&&-1===t.indexOf(e)&&t.push(e);return t}},{}],757:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_config\"),a={};a.add=function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},a.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},a.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},a.undo=function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else 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<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},a.redo=function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.redo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},a.plotDo=function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:\"object\"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)},e.exports=a},{\"../lib\":743,\"../plot_api/plot_config\":777}],758:[function(t,e,r){\"use strict\";r.counter=function(t,e,r){return new RegExp(\"^\"+t+\"([2-9]|[1-9][0-9]+)?\"+(e||\"\")+(r?\"\":\"$\"))}},{}],759:[function(t,e,r){\"use strict\";var n=/^(.*)(\\.[^\\.\\[\\]]+|\\[\\d\\])$/,i=/^[^\\.\\[\\]]+$/;e.exports=function(t,e){for(;e;){var r=t.match(n);if(r)t=r[1];else{if(!t.match(i))throw new Error(\"bad relativeAttr call:\"+[t,e]);t=\"\"}if(\"^\"!==e.charAt(0))break;e=e.slice(1)}return t&&\"[\"!==e.charAt(0)?t+\".\"+e:t+e}},{}],760:[function(t,e,r){\"use strict\";var n=t(\"./is_array\"),i=t(\"./is_plain_object\");e.exports=function t(e,r){for(var a=Object.keys(r||{}),o=0;o<a.length;o++){var s=a[o],l=r[s],c=e[s];if(\"_\"===s.charAt(0)||\"function\"==typeof l){if(s in e)continue;e[s]=l}else if(n(l)&&n(c)&&i(l[0]))for(var u=0;u<l.length;u++)i(l[u])&&i(c[u])&&t(c[u],l[u]);else i(l)&&i(c)&&(t(c,l),Object.keys(c).length||delete e[s])}}},{\"./is_array\":744,\"./is_plain_object\":745}],761:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"./loggers\");r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,s=0,l=e.length,c=0,u=l>1?(e[l-1]-e[0])/(l-1):1;for(o=u>=0?r?function(t,e){return t<e}:function(t,e){return t<=e}:r?function(t,e){return t>=e}:function(t,e){return t>e},t+=1e-9*u*(r?-1:1)*(u>=0?1:-1);s<l&&c++<100;)o(e[a=Math.floor((s+l)/2)],t)?s=a+1:l=a;return c>90&&i.log(\"Long binary search...\"),s-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;s<n;s++)e[s+1]>e[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,c=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=c((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]}},{\"./loggers\":748,\"fast-isnumeric\":140}],762:[function(t,e,r){\"use strict\";e.exports=function(t,e){(t.attr(\"class\")||\"\").split(\" \").forEach(function(e){0===e.indexOf(\"cursor-\")&&t.classed(e,!1)}),e&&t.classed(\"cursor-\"+e,!0)}},{}],763:[function(t,e,r){\"use strict\";var n=t(\"../components/color\"),i=function(){};e.exports=function(t){for(var e in t)\"function\"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement(\"div\");return r.textContent=\"Webgl is not supported by your browser - visit http://get.webgl.org for more info\",r.style.cursor=\"pointer\",r.style.fontSize=\"24px\",r.style.color=n.defaults[0],t.container.appendChild(r),t.container.style.background=\"#FFFFFF\",t.container.onclick=function(){window.open(\"http://get.webgl.org\")},!1}},{\"../components/color\":618}],764:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");r.aggNums=function(t,e,i,a){var o,s;if(a||(a=i.length),n(e)||(e=!1),Array.isArray(i[0])){for(s=new Array(a),o=0;o<a;o++)s[o]=r.aggNums(t,e,i[o]);i=s}for(o=0;o<a;o++)n(e)?n(i[o])&&(e=t(+e,+i[o])):e=i[o];return e},r.len=function(t){return r.aggNums(function(t){return t+1},0,t)},r.mean=function(t,e){return e||(e=r.len(t)),r.aggNums(function(t,e){return t+e},0,t)/e},r.variance=function(t,e,i){return e||(e=r.len(t)),n(i)||(i=r.mean(t,e)),r.aggNums(function(t,e){return t+Math.pow(e-i,2)},0,t)/e},r.stdev=function(t,e,n){return Math.sqrt(r.variance(t,e,n))},r.interp=function(t,e){if(!n(e))throw\"n should be a finite number\";if((e=e*t.length-.5)<0)return t[0];if(e>t.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\":140}],765:[function(t,e,r){\"use strict\";var n=t(\"color-normalize\");e.exports=function(t){return t?n(t):[0,0,0,1]}},{\"color-normalize\":99}],766:[function(t,e,r){\"use strict\";function n(t,e){return t.node().getBoundingClientRect()[e]}function i(t,e,r){var n=\"math-output-\"+c.randstr([],64),i=l.select(\"body\").append(\"div\").attr({id:n}).style({visibility:\"hidden\",position:\"absolute\"}).style({\"font-size\":e.fontSize+\"px\"}).text(function(t){return t.replace(p,\"\\\\lt \").replace(m,\"\\\\gt \")}(t));MathJax.Hub.Queue([\"Typeset\",MathJax.Hub,i.node()],function(){var e=l.select(\"body\").select(\"#MathJax_SVG_glyphs\");if(i.select(\".MathJax_SVG\").empty()||!i.select(\"svg\").node())c.log(\"There was an error in the tex syntax.\",t),r();else{var n=i.select(\"svg\").node().getBoundingClientRect();r(i.select(\".MathJax_SVG\"),e,n)}i.remove()})}function a(t,e){if(!t)return null;var r=t.match(e);return r&&(r[3]||r[4])}function o(t,e){function r(){p++;var e=document.createElementNS(u.svg,\"tspan\");l.select(e).attr({class:\"line\",dy:p*h+\"em\"}),t.appendChild(e),s=e;var r=d;if(d=[{node:e}],r.length>1)for(var i=1;i<r.length;i++)n(r[i])}function n(t){var e,r=t.type,n={};if(\"a\"===r){e=\"a\";var a=t.target,o=t.href,c=t.popup;o&&(n={\"xlink:xlink:show\":\"_blank\"===a||\"_\"!==a.charAt(0)?\"new\":\"replace\",target:a,\"xlink:xlink:href\":o},c&&(n.onclick='window.open(this.href.baseVal,this.target.baseVal,\"'+c+'\");return false;'))}else e=\"tspan\";t.style&&(n.style=t.style);var f=document.createElementNS(u.svg,e);if(\"sup\"===r||\"sub\"===r){i(s,x),s.appendChild(f);var h=document.createElementNS(u.svg,\"tspan\");i(h,x),l.select(h).attr(\"dy\",y[r]),n.dy=v[r],s.appendChild(f),s.appendChild(h)}else s.appendChild(f);l.select(f).attr(n),s=t.node=f,d.push(t)}function i(t,e){t.appendChild(document.createTextNode(e))}function o(t){if(1!==d.length){var r=d.pop();t!==r.type&&c.log(\"Start tag <\"+r.type+\"> doesnt match end tag <\"+t+\">. Pretending it did match.\",e),s=d[d.length-1].node}else c.log(\"Ignoring unexpected end tag </\"+t+\">.\",e)}e=function(t){return function(t,e){if(!t)return\"\";for(var r=0;r<e.length;r++){var n=e[r];t=t.replace(n.regExp,n.sub)}return t}(t,w)}(e).replace(M,\" \");var s,f=!1,d=[],p=-1;T.test(e)?r():(s=t,d=[{node:t}]);for(var m=e.split(k),_=0;_<m.length;_++){var D=m[_],I=D.match(A),P=I&&I[2].toLowerCase(),O=g[P];if(\"br\"===P)r();else if(void 0===O)i(s,D);else if(I[1])o(P);else{var F=I[4],R={type:P},N=a(F,S);if(N?(N=N.replace(z,\"$1 fill:\"),O&&(N+=\";\"+O)):O&&(N=O),N&&(R.style=N),\"a\"===P){f=!0;var j=a(F,E);if(j){var B=document.createElement(\"a\");B.href=j,-1!==b.indexOf(B.protocol)&&(R.href=encodeURI(j),R.target=a(F,L)||\"_blank\",R.popup=a(F,C))}}n(R)}}return f}function s(t,e,r){var n,i,a,o=r.horizontalAlign,s=r.verticalAlign||\"top\",l=t.node().getBoundingClientRect(),c=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()-c.top+\"px\",left:a()-c.left+\"px\",\"z-index\":1e3}),this}}var l=t(\"d3\"),c=t(\"../lib\"),u=t(\"../constants/xmlns_namespaces\"),f=t(\"../constants/string_mappings\"),h=t(\"../constants/alignment\").LINE_SPACING,d=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,a){function s(){f.empty()||(h=t.attr(\"class\")+\"-math\",f.select(\"svg.\"+h).remove()),t.text(\"\").style(\"white-space\",\"pre\");o(t.node(),c)&&t.style(\"pointer-events\",\"all\"),r.positionText(t),a&&a.call(t)}var c=t.text(),u=!t.attr(\"data-notex\")&&\"undefined\"!=typeof MathJax&&c.match(d),f=l.select(t.node().parentNode);if(!f.empty()){var h=t.attr(\"class\")?t.attr(\"class\").split(\" \")[0]:\"text\";return h+=\"-math\",f.selectAll(\"svg.\"+h).remove(),f.selectAll(\"g.\"+h+\"-group\").remove(),t.style(\"display\",null).attr({\"data-unformatted\":c,\"data-math\":\"N\"}),u?(e&&e._promises||[]).push(new Promise(function(e){t.style(\"display\",\"none\");var r=parseInt(t.node().style.fontSize,10);i(u[2],{fontSize:r},function(i,o,l){f.selectAll(\"svg.\"+h).remove(),f.selectAll(\"g.\"+h+\"-group\").remove();var u=i&&i.select(\"svg\");if(!u||!u.node())return s(),void e();var d=f.append(\"g\").classed(h+\"-group\",!0).attr({\"pointer-events\":\"none\",\"data-unformatted\":c,\"data-math\":\"Y\"});d.node().appendChild(u.node()),o&&o.node()&&u.node().insertBefore(o.node().cloneNode(!0),u.node().firstChild),u.attr({class:h,height:l.height,preserveAspectRatio:\"xMinYMin meet\"}).style({overflow:\"visible\",\"pointer-events\":\"none\"});var p=t.node().style.fill||\"black\";u.select(\"g\").attr({fill:p,stroke:p});var m=n(u,\"width\"),g=n(u,\"height\"),v=+t.attr(\"x\")-m*{start:0,middle:.5,end:1}[t.attr(\"text-anchor\")||\"start\"],y=-(r||n(t,\"height\"))/4;\"y\"===h[0]?(d.attr({transform:\"rotate(\"+[-90,+t.attr(\"x\"),+t.attr(\"y\")]+\") translate(\"+[-m/2,y-g/2]+\")\"}),u.attr({x:+t.attr(\"x\"),y:+t.attr(\"y\")})):\"l\"===h[0]?u.attr({x:t.attr(\"x\"),y:y-g/2}):\"a\"===h[0]?u.attr({x:0,y:y}):u.attr({x:v,y:+t.attr(\"y\")+y-g/2}),a&&a.call(t,d),e(d)})})):s(),t}};var p=/(<|<|<)/g,m=/(>|>|>)/g,g={sup:\"font-size:70%\",sub:\"font-size:70%\",b:\"font-weight:bold\",i:\"font-style:italic\",a:\"cursor:pointer\",span:\"\",em:\"font-style:italic;font-weight:bold\"},v={sub:\"0.3em\",sup:\"-0.6em\"},y={sub:\"-0.21em\",sup:\"0.42em\"},x=\"\\u200b\",b=[\"http:\",\"https:\",\"mailto:\",\"\",void 0,\":\"],_=new RegExp(\"</?(\"+Object.keys(g).join(\"|\")+\")( [^>]*)?/?>\",\"g\"),w=Object.keys(f.entityToUnicode).map(function(t){return{regExp:new RegExp(\"&\"+t+\";\",\"g\"),sub:f.entityToUnicode[t]}}),M=/(\\r\\n?|\\n)/g,k=/(<[^<>]*>)/,A=/<(\\/?)([^ >]*)(\\s+(.*))?>/i,T=/<br(\\s+.*)?>/i,S=/(^|[\\s\"'])style\\s*=\\s*(\"([^\"]*);?\"|'([^']*);?')/i,E=/(^|[\\s\"'])href\\s*=\\s*(\"([^\"]*)\"|'([^']*)')/i,L=/(^|[\\s\"'])target\\s*=\\s*(\"([^\"\\s]*)\"|'([^'\\s]*)')/i,C=/(^|[\\s\"'])popup\\s*=\\s*(\"([\\w=,]*)\"|'([\\w=,]*)')/i,z=/(^|;)\\s*color:/;r.plainText=function(t){return(t||\"\").replace(_,\" \")},r.lineCount=function(t){return t.selectAll(\"tspan.line\").size()||1},r.positionText=function(t,e,r){return t.each(function(){function t(t,e){return void 0===e?null===(e=n.attr(t))&&(n.attr(t,0),e=0):n.attr(t,e),e}var n=l.select(this),i=t(\"x\",e),a=t(\"y\",r);\"text\"===this.nodeName&&n.selectAll(\"tspan.line\").attr({x:i,y:a})})},r.makeEditable=function(t,e){function r(){!function(){var r=l.select(i).select(\".svg-container\"),a=r.append(\"div\"),c=t.node().style,u=parseFloat(c.fontSize||12);a.classed(\"plugin-editable editable\",!0).style({position:\"absolute\",\"font-family\":c.fontFamily||\"Arial\",\"font-size\":u,color:e.fill||c.fill||\"black\",opacity:1,\"background-color\":e.background||\"transparent\",outline:\"#ffffff33 1px solid\",margin:[-u/8+1,0,0,-1].join(\"px \")+\"px\",padding:\"0\",\"box-sizing\":\"border-box\"}).attr({contenteditable:!0}).text(e.text||t.attr(\"data-unformatted\")).call(s(t,r,e)).on(\"blur\",function(){i._editing=!1,t.text(this.textContent).style({opacity:1});var e,r=l.select(this).attr(\"class\");(e=r?\".\"+r.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&l.select(t.node().parentNode).select(e).style({opacity:0});var n=this.textContent;l.select(this).transition().duration(0).remove(),l.select(document).on(\"mouseup\",null),o.edit.call(t,n)}).on(\"focus\",function(){var t=this;i._editing=!0,l.select(document).on(\"mouseup\",function(){if(l.event.target===t)return!1;document.activeElement===a.node()&&a.node().blur()})}).on(\"keyup\",function(){27===l.event.which?(i._editing=!1,t.style({opacity:1}),l.select(this).style({opacity:0}).on(\"blur\",function(){return!1}).transition().remove(),o.cancel.call(t,this.textContent)):(o.input.call(t,this.textContent),l.select(this).call(s(t,r,e)))}).on(\"keydown\",function(){13===l.event.which&&this.blur()}).call(n)}(),t.style({opacity:0});var r,a=c.attr(\"class\");(r=a?\".\"+a.split(\" \")[0]+\"-math-group\":\"[class*=-math-group]\")&&l.select(t.node().parentNode).select(r).style({opacity:0})}function n(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}var i=e.gd,a=e.delegate,o=l.dispatch(\"edit\",\"input\",\"cancel\"),c=a||t;if(t.style({\"pointer-events\":a?\"none\":\"all\"}),1!==t.size())throw new Error(\"boo\");return e.immediate?r():c.on(\"click\",r),l.rebind(t,o,\"on\")}},{\"../constants/alignment\":716,\"../constants/string_mappings\":722,\"../constants/xmlns_namespaces\":723,\"../lib\":743,d3:128}],767:[function(t,e,r){\"use strict\";function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}var i={};r.throttle=function(t,e,r){function a(){r(),o.ts=Date.now(),o.onDone&&(o.onDone(),o.onDone=null)}var o=i[t],s=Date.now();if(!o){for(var l in i)i[l].ts<s-6e4&&delete i[l];o=i[t]={ts:0,timer:null}}n(o),s>o.ts+e?a():o.timer=setTimeout(function(){a(),o.timer=null},e)},r.done=function(t){var e=i[t];return e&&e.timer?new Promise(function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}}):Promise.resolve()},r.clear=function(t){if(t)n(i[t]),delete i[t];else for(var e in i)r.clear(e)}},{}],768:[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\":140}],769:[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\":818,\"topojson-client\":549}],770:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en-US\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colorscale title\"},format:{date:\"%m/%d/%Y\"}}},{}],771:[function(t,e,r){\"use strict\";e.exports={moduleType:\"locale\",name:\"en\",dictionary:{\"Click to enter Colorscale title\":\"Click to enter Colourscale title\"},format:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],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\"],periods:[\"AM\",\"PM\"],dateTime:\"%a %b %e %X %Y\",date:\"%d/%m/%Y\",time:\"%H:%M:%S\",decimal:\".\",thousands:\",\",grouping:[3],currency:[\"$\",\"\"]}}},{}],772:[function(t,e,r){\"use strict\";var n=t(\"../registry\");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split(\"[\")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\\[(0|[1-9][0-9]*)\\](\\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||\"\"}:{array:e,index:\"\",property:\"\"}}},{\"../registry\":873}],773:[function(t,e,r){\"use strict\";function n(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function i(t,e,r){var n=s({},t);for(var i in n){var o=n[i];l(o)&&(n[i]=a(o,e,r,i))}return\"from-root\"===r&&(n.editType=e),n}function a(t,e,r,n){if(t.valType){var o=s({},t);if(o.editType=e,Array.isArray(t.items)){o.items=new Array(t.items.length);for(var l=0;l<t.items.length;l++)o.items[l]=a(t.items[l],e,\"from-root\")}return o}return i(t,e,\"_\"===n.charAt(0)?\"nested\":\"from-root\")}var o=t(\"../lib\"),s=o.extendFlat,l=o.isPlainObject,c={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"calcIfAutorange\",\"clearAxisTypes\",\"plot\",\"style\",\"colorbars\"]},u={valType:\"flaglist\",extras:[\"none\"],flags:[\"calc\",\"calcIfAutorange\",\"plot\",\"legend\",\"ticks\",\"layoutstyle\",\"modebar\",\"camera\",\"arraydraw\"]},f=c.flags.slice().concat([\"clearCalc\",\"fullReplot\"]),h=u.flags.slice().concat(\"layoutReplot\");e.exports={traces:c,layout:u,traceFlags:function(){return n(f)},layoutFlags:function(){return n(h)},update:function(t,e){var r=e.editType;if(r&&\"none\"!==r)for(var n=r.split(\"+\"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:i}},{\"../lib\":743}],774:[function(t,e,r){\"use strict\";function n(t,e){var r=t[e],n=e.charAt(0);r&&\"paper\"!==r&&(t[e]=d(r,n))}function i(t){var e=\"middle\",r=\"center\";return-1!==t.indexOf(\"top\")?e=\"top\":-1!==t.indexOf(\"bottom\")&&(e=\"bottom\"),-1!==t.indexOf(\"left\")?r=\"left\":-1!==t.indexOf(\"right\")&&(r=\"right\"),e+\" \"+r}function a(t,e){return e in t&&\"object\"==typeof t[e]&&0===Object.keys(t[e]).length}function o(t){var e=t.search(g);if(e>0)return t.substr(0,e)}var s=t(\"fast-isnumeric\"),l=t(\"gl-mat4/fromQuat\"),c=t(\"../registry\"),u=t(\"../lib\"),f=t(\"../plots/plots\"),h=t(\"../plots/cartesian/axis_ids\"),d=h.cleanId,p=h.getFromTrace,m=t(\"../components/color\");r.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&u.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),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var i=(f.subplotsRegistry.cartesian||{}).attrRegex,o=(f.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(t);for(e=0;e<s.length;e++){var c=s[e];if(i&&i.test(c)){var h=t[c];h.anchor&&\"free\"!==h.anchor&&(h.anchor=d(h.anchor)),h.overlaying&&(h.overlaying=d(h.overlaying)),h.type||(h.isdate?h.type=\"date\":h.islog?h.type=\"log\":!1===h.isdate&&!1===h.islog&&(h.type=\"linear\")),\"withzero\"!==h.autorange&&\"tozero\"!==h.autorange||(h.autorange=!0,h.rangemode=\"tozero\"),delete h.islog,delete h.isdate,delete h.categories,a(h,\"domain\")&&delete h.domain,void 0!==h.autotick&&(void 0===h.tickmode&&(h.tickmode=h.autotick?\"auto\":\"linear\"),delete h.autotick)}else if(o&&o.test(c)){var p=t[c],g=p.cameraposition;if(Array.isArray(g)&&4===g[0].length){var v=g[0],y=g[1],x=g[2],b=l([],v),_=[];for(r=0;r<3;++r)_[r]=y[r]+x*b[2+4*r];p.camera={eye:{x:_[0],y:_[1],z:_[2]},center:{x:y[0],y:y[1],z:y[2]},up:{x:b[1],y:b[5],z:b[9]}},delete p.cameraposition}}}var w=Array.isArray(t.annotations)?t.annotations.length:0;for(e=0;e<w;e++){var M=t.annotations[e];u.isPlainObject(M)&&(M.ref&&(\"paper\"===M.ref?(M.xref=\"paper\",M.yref=\"paper\"):\"data\"===M.ref&&(M.xref=\"x\",M.yref=\"y\"),delete M.ref),n(M,\"xref\"),n(M,\"yref\"))}var k=Array.isArray(t.shapes)?t.shapes.length:0;for(e=0;e<k;e++){var A=t.shapes[e];u.isPlainObject(A)&&(n(A,\"xref\"),n(A,\"yref\"))}var T=t.legend;return T&&(T.x>3?(T.x=1.02,T.xanchor=\"left\"):T.x<-2&&(T.x=-.02,T.xanchor=\"right\"),T.y>3?(T.y=1.02,T.yanchor=\"bottom\"):T.y<-2&&(T.y=-.02,T.yanchor=\"top\")),\"rotate\"===t.dragmode&&(t.dragmode=\"orbit\"),m.clean(t),t},r.cleanData=function(t,e){for(var n=[],o=t.concat(Array.isArray(e)?e:[]).filter(function(t){return\"uid\"in t}).map(function(t){return t.uid}),s=0;s<t.length;s++){var l,h=t[s];if(!(\"uid\"in h)||-1!==n.indexOf(h.uid)){var p;for(l=0;l<100&&(p=u.randstr(o),-1!==n.indexOf(p));l++);h.uid=u.randstr(o),o.push(h.uid)}if(n.push(h.uid),\"histogramy\"===h.type&&\"xbins\"in h&&!(\"ybins\"in h)&&(h.ybins=h.xbins,delete h.xbins),h.error_y&&\"opacity\"in h.error_y){var g=m.defaults,v=h.error_y.color||(c.traceIs(h,\"bar\")?m.defaultLine:g[s%g.length]);h.error_y.color=m.addOpacity(m.rgb(v),m.opacity(v)*h.error_y.opacity),delete h.error_y.opacity}if(\"bardir\"in h&&(\"h\"!==h.bardir||!c.traceIs(h,\"bar\")&&\"histogram\"!==h.type.substr(0,9)||(h.orientation=\"h\",r.swapXYData(h)),delete h.bardir),\"histogramy\"===h.type&&r.swapXYData(h),\"histogramx\"!==h.type&&\"histogramy\"!==h.type||(h.type=\"histogram\"),\"scl\"in h&&(h.colorscale=h.scl,delete h.scl),\"reversescl\"in h&&(h.reversescale=h.reversescl,delete h.reversescl),h.xaxis&&(h.xaxis=d(h.xaxis,\"x\")),h.yaxis&&(h.yaxis=d(h.yaxis,\"y\")),c.traceIs(h,\"gl3d\")&&h.scene&&(h.scene=f.subplotsRegistry.gl3d.cleanId(h.scene)),c.traceIs(h,\"pie\")||c.traceIs(h,\"bar\")||(Array.isArray(h.textposition)?h.textposition=h.textposition.map(i):h.textposition&&(h.textposition=i(h.textposition))),c.traceIs(h,\"2dMap\")&&(\"YIGnBu\"===h.colorscale&&(h.colorscale=\"YlGnBu\"),\"YIOrRd\"===h.colorscale&&(h.colorscale=\"YlOrRd\")),c.traceIs(h,\"markerColorscale\")&&h.marker){var y=h.marker;\"YIGnBu\"===y.colorscale&&(y.colorscale=\"YlGnBu\"),\"YIOrRd\"===y.colorscale&&(y.colorscale=\"YlOrRd\")}if(\"surface\"===h.type&&u.isPlainObject(h.contours)){var x=[\"x\",\"y\",\"z\"];for(l=0;l<x.length;l++){var b=h.contours[x[l]];u.isPlainObject(b)&&(b.highlightColor&&(b.highlightcolor=b.highlightColor,delete b.highlightColor),b.highlightWidth&&(b.highlightwidth=b.highlightWidth,delete b.highlightWidth))}}if(Array.isArray(h.transforms)){var _=h.transforms;for(l=0;l<_.length;l++){var w=_[l];if(u.isPlainObject(w))switch(w.type){case\"filter\":w.filtersrc&&(w.target=w.filtersrc,delete w.filtersrc),w.calendar&&(w.valuecalendar||(w.valuecalendar=w.calendar),delete w.calendar);break;case\"groupby\":if(w.styles=w.styles||w.style,w.styles&&!Array.isArray(w.styles)){var M=w.styles,k=Object.keys(M);w.styles=[];for(var A=0;A<k.length;A++)w.styles.push({target:k[A],value:M[k[A]]})}}}}a(h,\"line\")&&delete h.line,\"marker\"in h&&(a(h.marker,\"line\")&&delete h.marker.line,a(h,\"marker\")&&delete h.marker),m.clean(h)}},r.swapXYData=function(t){var e;if(u.swapAttrs(t,[\"?\",\"?0\",\"d?\",\"?bins\",\"nbins?\",\"autobin?\",\"?src\",\"error_?\"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n=\"copy_ystyle\"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);u.swapAttrs(t,[\"error_?.copy_ystyle\"]),n&&u.swapAttrs(t,[\"error_?.color\",\"error_?.thickness\",\"error_?.width\"])}if(\"string\"==typeof t.hoverinfo){var i=t.hoverinfo.split(\"+\");for(e=0;e<i.length;e++)\"x\"===i[e]?i[e]=\"y\":\"y\"===i[e]&&(i[e]=\"x\");t.hoverinfo=i.join(\"+\")}},r.coerceTraceIndices=function(t,e){return s(e)?[e]:Array.isArray(e)&&e.length?e:t.data.map(function(t,e){return e})},r.manageArrayContainers=function(t,e,r){var n=t.obj,i=t.parts,a=i.length,o=i[a-1],l=s(o);if(l&&null===e){var c=i.slice(0,a-1).join(\".\");u.nestedProperty(n,c).get().splice(o,1)}else l&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var g=/(\\.[^\\[\\]\\.]+|\\[[^\\[\\]\\.]+\\])$/;r.hasParent=function(t,e){for(var r=o(e);r;){if(r in t)return!0;r=o(r)}return!1};var v=[\"x\",\"y\",\"z\"];r.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var o=p(t,i,v[a]);if(o&&\"log\"!==o.type){var s=o._name,l=o._id.substr(1);if(\"scene\"===l.substr(0,5)){if(void 0!==r[l])continue;s=l+\".\"+s}var c=s+\".type\";void 0===r[s]&&void 0===r[c]&&u.nestedProperty(t.layout,c).set(null)}}}},{\"../components/color\":618,\"../lib\":743,\"../plots/cartesian/axis_ids\":792,\"../plots/plots\":852,\"../registry\":873,\"fast-isnumeric\":140,\"gl-mat4/fromQuat\":183}],775:[function(t,e,r){\"use strict\";var n=t(\"../lib/nested_property\"),i=t(\"../lib/is_plain_object\"),a=t(\"../lib/noop\"),o=t(\"../lib/loggers\"),s=t(\"../lib/search\").sorterAsc,l=t(\"../registry\");r.containerArrayMatch=t(\"./container_array_match\");var c=r.isAddVal=function(t){return\"add\"===t||i(t)},u=r.isRemoveVal=function(t){return null===t||\"remove\"===t};r.applyContainerArrayChanges=function(t,e,r,i){var f=e.astr,h=l.getComponentMethod(f,\"supplyLayoutDefaults\"),d=l.getComponentMethod(f,\"draw\"),p=l.getComponentMethod(f,\"drawOne\"),m=i.replot||i.recalc||h===a||d===a,g=t.layout,v=t._fullLayout;if(r[\"\"]){Object.keys(r).length>1&&o.warn(\"Full array edits are incompatible with other edits\",f);var y=r[\"\"][\"\"];if(u(y))e.set(null);else{if(!Array.isArray(y))return o.warn(\"Unrecognized full array edit value\",f,y),!0;e.set(y)}return!m&&(h(g,v),d(t),!0)}var x,b,_,w,M,k,A,T=Object.keys(r).map(Number).sort(s),S=e.get(),E=S||[],L=n(v,f).get(),C=[],z=-1,D=E.length;for(x=0;x<T.length;x++)if(_=T[x],w=r[_],M=Object.keys(w),k=w[\"\"],A=c(k),_<0||_>E.length-(A?0:1))o.warn(\"index out of range\",f,_);else if(void 0!==k)M.length>1&&o.warn(\"Insertion & removal are incompatible with edits to the same index.\",f,_),u(k)?C.push(_):A?(\"add\"===k&&(k={}),E.splice(_,0,k),L&&L.splice(_,0,{})):o.warn(\"Unrecognized full object edit value\",f,_,k),-1===z&&(z=_);else for(b=0;b<M.length;b++)n(E[_],M[b]).set(w[M[b]]);for(x=C.length-1;x>=0;x--)E.splice(C[x],1),L&&L.splice(C[x],1);if(E.length?S||e.set(E):e.set(null),m)return!1;if(h(g,v),p!==a){var I;if(-1===z)I=T;else{for(D=Math.max(E.length,D),I=[],x=0;x<T.length&&!((_=T[x])>=z);x++)I.push(_);for(x=z;x<D;x++)I.push(x)}for(x=0;x<I.length;x++)p(t,I[x])}else d(t);return!0}},{\"../lib/is_plain_object\":745,\"../lib/loggers\":748,\"../lib/nested_property\":751,\"../lib/noop\":752,\"../lib/search\":761,\"../registry\":873,\"./container_array_match\":772}],776:[function(t,e,r){\"use strict\";function n(t,e){try{t._fullLayout._paper.style(\"background\",e)}catch(t){v.error(t)}}function i(t,e){n(t,T.combine(e,\"white\"))}function a(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function o(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error(\"all values in \"+r+\" must be integers\");if(i>=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 s(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]),o(t,e,\"currentIndices\"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&o(t,r,\"newIndices\"),void 0!==r&&e.length!==r.length)throw new Error(\"current and new indices must be of equal length.\")}function l(t,e,r,n,i,s){!function(t,e,r,n){var i=v.isPlainObject(n);if(!Array.isArray(t.data))throw new Error(\"gd.data must be an array\");if(!v.isPlainObject(e))throw new Error(\"update must be a key:value object\");if(void 0===r)throw new Error(\"indices must be an integer or array of integers\");o(t,r,\"indices\");for(var a in e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error(\"attribute \"+a+\" must be an array of length equal to indices array length\");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error(\"when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object\")}}(t,e,r,n);for(var l,c,u,f=function(t,e,r,n){var i,o,s,l,c,u=v.isPlainObject(n),f=[];Array.isArray(r)||(r=[r]),r=a(r,t.data.length-1);for(var h in e)for(var d=0;d<r.length;d++){if(i=t.data[r[d]],s=v.nestedProperty(i,h),o=s.get(),l=e[h][d],!Array.isArray(l))throw new Error(\"attribute: \"+h+\" index: \"+d+\" must be an array\");if(!Array.isArray(o))throw new Error(\"cannot extend missing or non-array attribute: \"+h);c=u?n[h][d]:n,p(c)||(c=-1),f.push({prop:s,target:o,insert:l,maxp:Math.floor(c)})}return f}(t,e,r,n),h=[],d={},m={},g=0;g<f.length;g++)c=f[g].prop,u=f[g].maxp,l=i(f[g].target,f[g].insert),u>=0&&u<l.length&&(h=s(l,u)),u=f[g].target.length,c.set(l),Array.isArray(d[c.astr])||(d[c.astr]=[]),Array.isArray(m[c.astr])||(m[c.astr]=[]),d[c.astr].push(h),m[c.astr].push(u);return{update:d,maxPoints:m}}function c(t){return void 0===t?null:t}function u(t,e,r){function n(){return r.map(function(){})}function i(t){var e=g.Axes.id2name(t);-1===u.indexOf(e)&&u.push(e)}function a(t){return\"LAYOUT\"+t+\".autorange\"}function o(t){return\"LAYOUT\"+t+\".range\"}function s(i,a,o){if(Array.isArray(i))i.forEach(function(t){s(t,a,o)});else if(!(i in e||z.hasParent(e,i))){var l;l=\"LAYOUT\"===i.substr(0,6)?v.nestedProperty(t.layout,i.replace(\"LAYOUT\",\"\")):v.nestedProperty(d[r[o]],i),i in y||(y[i]=n()),void 0===y[i][o]&&(y[i][o]=c(l.get())),void 0!==a&&l.set(a)}}var l,u,f=t._fullLayout,h=t._fullData,d=t.data,p=I.traceFlags(),m={},y={},x={};for(var M in e){if(z.hasParent(e,M))throw new Error(\"cannot set \"+M+\"and a parent attribute simultaneously\");var k,A,T,S,E,L,C=e[M];if(m[M]=C,\"LAYOUT\"!==M.substr(0,6)){for(y[M]=n(),l=0;l<r.length;l++)if(k=d[r[l]],A=h[r[l]],T=v.nestedProperty(k,M),S=T.get(),void 0!==(E=Array.isArray(C)?C[l%C.length]:C)){if((L=_.getTraceValObject(A,T.parts))&&L.impliedEdits&&null!==E)for(var D in L.impliedEdits)s(v.relativeAttr(M,D),L.impliedEdits[D],l);else if(\"colorbar.thicknessmode\"===M&&T.get()!==E&&-1!==[\"fraction\",\"pixels\"].indexOf(E)&&A.colorbar){var P=-1!==[\"top\",\"bottom\"].indexOf(A.colorbar.orient)?f.height-f.margin.t-f.margin.b:f.width-f.margin.l-f.margin.r;s(\"colorbar.thickness\",A.colorbar.thickness*(\"fraction\"===E?1/P:P),l)}else if(\"colorbar.lenmode\"===M&&T.get()!==E&&-1!==[\"fraction\",\"pixels\"].indexOf(E)&&A.colorbar){var O=-1!==[\"top\",\"bottom\"].indexOf(A.colorbar.orient)?f.width-f.margin.l-f.margin.r:f.height-f.margin.t-f.margin.b;s(\"colorbar.len\",A.colorbar.len*(\"fraction\"===E?1/O:O),l)}else\"colorbar.tick0\"!==M&&\"colorbar.dtick\"!==M||s(\"colorbar.tickmode\",\"linear\",l);if(\"type\"===M&&\"pie\"===E!=(\"pie\"===S)){var F=\"x\",R=\"y\";\"bar\"!==E&&\"bar\"!==S||\"h\"!==k.orientation||(F=\"y\",R=\"x\"),v.swapAttrs(k,[\"?\",\"?src\"],\"labels\",F),v.swapAttrs(k,[\"d?\",\"?0\"],\"label\",F),v.swapAttrs(k,[\"?\",\"?src\"],\"values\",R),\"pie\"===S?(v.nestedProperty(k,\"marker.color\").set(v.nestedProperty(k,\"marker.colors\").get()),f._pielayer.selectAll(\"g.trace\").remove()):b.traceIs(k,\"cartesian\")&&(v.nestedProperty(k,\"marker.colors\").set(v.nestedProperty(k,\"marker.color\").get()),x[k.xaxis||\"x\"]=!0,x[k.yaxis||\"y\"]=!0)}y[M][l]=c(S);if(-1!==[\"swapxy\",\"swapxyaxes\",\"orientation\",\"orientationaxes\"].indexOf(M)){if(\"orientation\"===M){T.set(E);var N=k.x&&!k.y?\"h\":\"v\";if((T.get()||N)===A.orientation)continue}else\"orientationaxes\"===M&&(k.orientation={v:\"h\",h:\"v\"}[A.orientation]);z.swapXYData(k),p.calc=p.clearAxisTypes=!0}else-1!==w.dataArrayContainers.indexOf(T.parts[0])?(z.manageArrayContainers(T,E,y),p.calc=!0):(L?L.arrayOk&&(Array.isArray(E)||Array.isArray(S))?p.calc=!0:I.update(p,L):p.calc=!0,T.set(E))}if(-1!==[\"swapxyaxes\",\"orientationaxes\"].indexOf(M)&&g.Axes.swap(t,r),\"orientationaxes\"===M){var j=v.nestedProperty(t.layout,\"hovermode\");\"x\"===j.get()?j.set(\"y\"):\"y\"===j.get()&&j.set(\"x\")}if(-1!==[\"orientation\",\"type\"].indexOf(M)){for(u=[],l=0;l<r.length;l++){var B=d[r[l]];b.traceIs(B,\"cartesian\")&&(i(B.xaxis||\"x\"),i(B.yaxis||\"y\"),\"type\"===M&&s([\"autobinx\",\"autobiny\"],!0,l))}s(u.map(a),!0,0),s(u.map(o),[0,1],0)}}else T=v.nestedProperty(t.layout,M.replace(\"LAYOUT\",\"\")),y[M]=[c(T.get())],T.set(Array.isArray(C)?C[0]:C),p.calc=!0}var U=!1,V=g.Axes.list(t);for(l=0;l<V.length;l++)if(V[l].autorange){U=!0;break}var q=Object.keys(x);t:for(l=0;l<q.length;l++){for(var H=q[l],G=H.charAt(0),Y=G+\"axis\",W=0;W<d.length;W++)if(b.traceIs(d[W],\"cartesian\")&&(d[W][Y]||G)===H)continue t;s(\"LAYOUT\"+g.Axes.id2name(H),null,0)}return(p.calc||p.calcIfAutorange&&U)&&(p.clearCalc=!0),(p.calc||p.plot||p.calcIfAutorange)&&(p.fullReplot=!0),{flags:p,undoit:y,redoit:m,traces:r,eventData:v.extendDeepNoArrays([],[m,r])}}function f(t,e){function r(t,n){if(Array.isArray(t))t.forEach(function(t){r(t,n)});else if(!(t in e||z.hasParent(e,t))){var i=v.nestedProperty(l,t);t in A||(A[t]=c(i.get())),void 0!==n&&i.set(n)}}function n(e,r){if(!v.isPlainObject(e))return!1;var n=e[r+\"ref\"]||r,i=g.Axes.getFromId(t,n);return i||n.charAt(0)!==r||(i=g.Axes.getFromId(t,r)),(i||{}).autorange}function i(t){var e=N.name2id(t.split(\".\")[0]);return T[e]=1,e}var a,o,s,l=t.layout,u=t._fullLayout,f=Object.keys(e),h=g.Axes.list(t),d={};for(o=0;o<f.length;o++)if(0===f[o].indexOf(\"allaxes\")){for(s=0;s<h.length;s++){var p=h[s]._id.substr(1),m=-1!==p.indexOf(\"scene\")?p+\".\":\"\",y=f[o].replace(\"allaxes\",m+h[s]._name);e[y]||(e[y]=e[f[o]])}delete e[f[o]]}var x,M=I.layoutFlags(),k={},A={},T={};for(var S in e){if(z.hasParent(e,S))throw new Error(\"cannot set \"+S+\"and a parent attribute simultaneously\");var E=v.nestedProperty(l,S),L=e[S],D=E.parts.length,O=\"string\"==typeof E.parts[D-1]?D-1:D-2,F=E.parts[O],R=E.parts[O-1]+\".\"+F,j=E.parts.slice(0,O).join(\".\"),B=v.nestedProperty(t.layout,j).get(),U=v.nestedProperty(u,j).get(),V=E.get();if(void 0!==L){k[S]=L,A[S]=\"reverse\"===F?L:c(V);var q=_.getLayoutValObject(u,E.parts);if(q&&q.impliedEdits&&null!==L)for(var H in q.impliedEdits)r(v.relativeAttr(S,H),q.impliedEdits[H]);if(-1!==[\"width\",\"height\"].indexOf(S)&&null===L)u[S]=t._initialAutoSize[S];else if(R.match(/^[xyz]axis[0-9]*\\.range(\\[[0|1]\\])?$/))i(R),v.nestedProperty(u,j+\"._inputRange\").set(null);else if(R.match(/^[xyz]axis[0-9]*\\.autorange$/)){i(R),v.nestedProperty(u,j+\"._inputRange\").set(null);var G=v.nestedProperty(u,j).get();G._inputDomain&&(G._input.domain=G._inputDomain.slice())}else R.match(/^[xyz]axis[0-9]*\\.domain(\\[[0|1]\\])?$/)&&v.nestedProperty(u,j+\"._inputDomain\").set(null);if(\"type\"===F){var Y=B,W=\"linear\"===U.type&&\"log\"===L,X=\"log\"===U.type&&\"linear\"===L;if(W||X){if(Y&&Y.range)if(U.autorange)W&&(Y.range=Y.range[1]>Y.range[0]?[1,2]:[2,1]);else{var Z=Y.range[0],J=Y.range[1];W?(Z<=0&&J<=0&&r(j+\".autorange\",!0),Z<=0?Z=J/1e6:J<=0&&(J=Z/1e6),r(j+\".range[0]\",Math.log(Z)/Math.LN10),r(j+\".range[1]\",Math.log(J)/Math.LN10)):(r(j+\".range[0]\",Math.pow(10,Z)),r(j+\".range[1]\",Math.pow(10,J)))}else r(j+\".autorange\",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[E.parts[0]]&&\"radialaxis\"===E.parts[1]&&delete u[E.parts[0]]._subplot.viewInitial[\"radialaxis.range\"],b.getComponentMethod(\"annotations\",\"convertCoords\")(t,U,L,r),b.getComponentMethod(\"images\",\"convertCoords\")(t,U,L,r)}else r(j+\".autorange\",!0),r(j+\".range\",null);v.nestedProperty(u,j+\"._inputRange\").set(null)}else if(F.match(P.AX_NAME_PATTERN)){var K=v.nestedProperty(u,S).get(),Q=(L||{}).type;Q&&\"-\"!==Q||(Q=\"linear\"),b.getComponentMethod(\"annotations\",\"convertCoords\")(t,K,Q,r),b.getComponentMethod(\"images\",\"convertCoords\")(t,K,Q,r)}var $=C.containerArrayMatch(S);if($){a=$.array,o=$.index;var tt=$.property,et=(v.nestedProperty(l,a)||[])[o]||{},rt=et,nt=q||{editType:\"calc\"},it=-1!==nt.editType.indexOf(\"calcIfAutorange\");\"\"===o?(it?M.calc=!0:I.update(M,nt),it=!1):\"\"===tt&&(rt=L,C.isAddVal(L)?A[S]=null:C.isRemoveVal(L)?(A[S]=et,rt=et):v.warn(\"unrecognized full object value\",e)),it&&(n(rt,\"x\")||n(rt,\"y\"))?M.calc=!0:I.update(M,nt),d[a]||(d[a]={});var at=d[a][o];at||(at=d[a][o]={}),at[tt]=L,delete e[S]}else\"reverse\"===F?(B.range?B.range.reverse():(r(j+\".autorange\",!0),B.range=[1,0]),U.autorange?M.calc=!0:M.plot=!0):((!u._has(\"gl2d\")&&!u._has(\"regl\")||\"dragmode\"!==S||\"lasso\"!==L&&\"select\"!==L||\"lasso\"===V||\"select\"===V)&&q?I.update(M,q):M.calc=!0,E.set(L))}}for(a in d){C.applyContainerArrayChanges(t,v.nestedProperty(l,a),d[a],M)||(M.plot=!0)}var ot=u._axisConstraintGroups||[];for(x in T)for(o=0;o<ot.length;o++){var st=ot[o];if(st[x]){M.calc=!0;for(var lt in st)T[lt]||(N.getFromId(t,lt)._constraintShrinkable=!0)}}var ct=u.width,ut=u.height;t.layout.autosize&&w.plotAutoSize(t,t.layout,u);return(e.height||e.width||u.width!==ct||u.height!==ut)&&(M.calc=!0),(M.plot||M.calc)&&(M.layoutReplot=!0),{flags:M,undoit:A,redoit:k,eventData:v.extendDeep({},k)}}function h(t){var e=d.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([{}]),r._glcontainer.enter().append(\"div\").classed(\"gl-container\",!0),r._glcanvas=null,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=[];d.selectAll(\"defs\").each(function(){this.id&&n.push(this.id.split(\"-\")[1])}),r._uid=v.randstr(n)}r._paperdiv.selectAll(\".main-svg\").attr(E.svgAttrs),r._defs=r._paper.append(\"defs\").attr(\"id\",\"defs-\"+r._uid),r._clips=r._defs.append(\"g\").classed(\"clips\",!0),r._topdefs=r._toppaper.append(\"defs\").attr(\"id\",\"topdefs-\"+r._uid),r._topclips=r._topdefs.append(\"g\").classed(\"clips\",!0),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._polarlayer=r._paper.append(\"g\").classed(\"polarlayer\",!0),r._ternarylayer=r._paper.append(\"g\").classed(\"ternarylayer\",!0),r._geolayer=r._paper.append(\"g\").classed(\"geolayer\",!0),r._pielayer=r._paper.append(\"g\").classed(\"pielayer\",!0),r._glimages=r._paper.append(\"g\").classed(\"glimages\",!0);var a=r._toppaper.append(\"g\").classed(\"layer-above\",!0);r._imageUpperLayer=a.append(\"g\").classed(\"imagelayer\",!0),r._shapeUpperLayer=a.append(\"g\").classed(\"shapelayer\",!0),r._infolayer=r._toppaper.append(\"g\").classed(\"infolayer\",!0),r._menulayer=r._toppaper.append(\"g\").classed(\"menulayer\",!0),r._zoomlayer=r._toppaper.append(\"g\").classed(\"zoomlayer\",!0),r._hoverlayer=r._toppaper.append(\"g\").classed(\"hoverlayer\",!0),t.emit(\"plotly_framework\")}var d=t(\"d3\"),p=t(\"fast-isnumeric\"),m=t(\"has-hover\"),g=t(\"../plotly\"),v=t(\"../lib\"),y=t(\"../lib/events\"),x=t(\"../lib/queue\"),b=t(\"../registry\"),_=t(\"./plot_schema\"),w=t(\"../plots/plots\"),M=t(\"../plots/polar/legacy\"),k=t(\"../plots/cartesian/graph_interact\"),A=t(\"../components/drawing\"),T=t(\"../components/color\"),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(\"./edit_types\"),P=t(\"../plots/cartesian/constants\"),O=t(\"../plots/cartesian/constraints\"),F=O.enforce,R=O.clean,N=t(\"../plots/cartesian/axis_ids\");g.plot=function(t,e,r,a){function o(){var e,r,n,i=t.calcdata;for(b.getComponentMethod(\"legend\",\"draw\")(t),b.getComponentMethod(\"rangeselector\",\"draw\")(t),b.getComponentMethod(\"sliders\",\"draw\")(t),b.getComponentMethod(\"updatemenus\",\"draw\")(t),e=0;e<i.length;e++)!0===(n=(r=i[e])[0].trace).visible&&n._module.colorbar?n._module.colorbar(t,r):w.autoMargin(t,\"cb\"+n.uid);return w.doAutoMargin(t),w.previousPromises(t)}function s(){if(!t._transitioning){for(var e=g.Axes.list(t,\"\",!0),r=0;r<e.length;r++){var n=e[r];R(t,n),g.Axes.doAutoRange(n)}F(t),u&&g.Axes.saveRangeInitial(t)}}var l;if(t=v.getGraphDiv(t),y.init(t),v.isPlainObject(e)){var c=e;e=c.data,r=c.layout,a=c.config,l=c.frames}if(!1===y.triggerHandler(t,\"plotly_beforeplot\",[e,r,a]))return Promise.reject();e||r||v.isPlotDiv(t)||v.warn(\"Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.\",t),function(t,e){t._context||(t._context=v.extendDeep({},g.defaultConfig));var r,a,o,s=t._context;if(e){for(a=Object.keys(e),r=0;r<a.length;r++)\"editable\"!==(o=a[r])&&\"edits\"!==o&&o in s&&(\"setBackground\"===o&&\"opaque\"===e[o]?s[o]=i:s[o]=e[o]);e.plot3dPixelRatio&&!s.plotGlPixelRatio&&(s.plotGlPixelRatio=s.plot3dPixelRatio);var l=e.editable;if(void 0!==l)for(s.editable=l,a=Object.keys(s.edits),r=0;r<a.length;r++)s.edits[a[r]]=l;if(e.edits)for(a=Object.keys(e.edits),r=0;r<a.length;r++)(o=a[r])in s.edits&&(s.edits[o]=e.edits[o])}s.staticPlot&&(s.editable=!1,s.edits={},s.autosizable=!1,s.scrollZoom=!1,s.doubleClick=!1,s.showTips=!1,s.showLink=!1,s.displayModeBar=!1),\"hover\"!==s.displayModeBar||m||(s.displayModeBar=!0),\"transparent\"!==s.setBackground&&\"function\"==typeof s.setBackground||(s.setBackground=n)}(t,a),r||(r={}),d.select(t).classed(\"js-plotly-plot\",!0),A.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var u=0===(t.data||[]).length&&Array.isArray(e);if(Array.isArray(e)&&(z.cleanData(e,t.data),u?t.data=e:t.data.push.apply(t.data,e),t.empty=!1),t.layout&&!u||(t.layout=z.cleanLayout(r)),t._dragging&&!t._transitioning)return t._replotPending=!0,Promise.reject();t._replotPending=!1,w.supplyDefaults(t);var f=t._fullLayout;if(!f._has(\"polar\")&&e&&e[0]&&e[0].r)return v.log(\"Legacy polar charts are deprecated!\"),function(t,e,r){var n=d.select(t).selectAll(\".plot-container\").data([0]);n.enter().insert(\"div\",\":first-child\").classed(\"plot-container plotly\",!0);var i=n.selectAll(\".svg-container\").data([0]);i.enter().append(\"div\").classed(\"svg-container\",!0).style(\"position\",\"relative\"),i.html(\"\"),e&&(t.data=e),r&&(t.layout=r),M.manager.fillLayout(t),i.style({width:t._fullLayout.width+\"px\",height:t._fullLayout.height+\"px\"}),t.framework=M.manager.framework(t),t.framework({data:t.data,layout:t.layout},i.node()),t.framework.setUndoPoint();var a=t.framework.svg(),o=1,s=t._fullLayout.title;\"\"!==s&&s||(o=0);var l=function(){this.call(L.convertToTspans,t)},c=a.select(\".title-group text\").call(l);if(t._context.edits.titleText){var u=v._(t,\"Click to enter Plot title\");s&&s!==u||(o=.2,c.attr({\"data-unformatted\":u}).text(u).style({opacity:o}).on(\"mouseover.opacity\",function(){d.select(this).transition().duration(100).style(\"opacity\",1)}).on(\"mouseout.opacity\",function(){d.select(this).transition().duration(1e3).style(\"opacity\",0)}));var f=function(){this.call(L.makeEditable,{gd:t}).on(\"edit\",function(e){t.framework({layout:{title:e}}),this.text(e).call(l),this.call(f)}).on(\"cancel\",function(){var t=this.attr(\"data-unformatted\");this.text(t).call(l)})};c.call(f)}return t._context.setBackground(t,t._fullLayout.paper_bgcolor),w.addLinks(t),Promise.resolve()}(t,e,r);f._replotting=!0,u&&h(t),t.framework!==h&&(t.framework=h,h(t)),A.initGradients(t),u&&g.Axes.saveShowSpikeInitial(t);var p=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;p&&w.doCalcdata(t);for(var x=0;x<t.calcdata.length;x++)t.calcdata[x][0].trace=t._fullData[x];var _=JSON.stringify(f._size),T=[w.previousPromises,function(){if(l)return g.addFrames(t,l)},function(){for(var e=f._basePlotModules,r=0;r<e.length;r++)e[r].drawFramework&&e[r].drawFramework(t);return!f._glcanvas&&f._has(\"gl\")&&(f._glcanvas=f._glcontainer.selectAll(\".gl-canvas\").data([{key:\"contextLayer\",context:!0,pick:!1},{key:\"focusLayer\",context:!1,pick:!1},{key:\"pickLayer\",context:!1,pick:!0}],function(t){return t.key}),f._glcanvas.enter().append(\"canvas\").attr(\"class\",function(t){return\"gl-canvas gl-canvas-\"+t.key.replace(\"Layer\",\"\")}).style({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"visible\",\"pointer-events\":\"none\"})),f._glcanvas&&f._glcanvas.attr(\"width\",f.width).attr(\"height\",f.height),v.syncOrAsync([D.layoutStyles],t)},o,function(){if(JSON.stringify(f._size)!==_)return v.syncOrAsync([o,D.layoutStyles],t)},function(){if(p){var e,r,n,i=f._subplots.cartesian,a=f._modules,o=[];for(n=0;n<a.length;n++)v.pushUnique(o,a[n].setPositions);if(o.length)for(r=0;r<i.length;r++)for(e=f._plots[i[r]],n=0;n<o.length;n++)o[n](t,e);return S.calc(t),v.syncOrAsync([b.getComponentMethod(\"shapes\",\"calcAutorange\"),b.getComponentMethod(\"annotations\",\"calcAutorange\"),s,b.getComponentMethod(\"rangeslider\",\"calcAutorange\")],t)}F(t)},D.layoutStyles,function(){return g.Axes.doTicks(t,\"redraw\")},function(){var e,r=t.calcdata,n=f._infolayer.selectAll(\"g.rangeslider-container\");for(e=0;e<r.length;e++){var i=r[e][0].trace,a=!0===i.visible,o=i.uid;if(!a||!b.traceIs(i,\"2dMap\")){var s=\".hm\"+o+\",.contour\"+o+\",#clip\"+o;f._paper.selectAll(s).remove(),n.selectAll(s).remove()}a&&i._module.colorbar||f._infolayer.selectAll(\".cb\"+o).remove()}var l=f._basePlotModules;for(e=0;e<l.length;e++)l[e].plot(t);var c=f._paper.selectAll(\".layer-subplot\");return f._shapeSubplotLayers=c.selectAll(\".shapelayer\"),w.style(t),b.getComponentMethod(\"shapes\",\"draw\")(t),b.getComponentMethod(\"annotations\",\"draw\")(t),w.addLinks(t),f._replotting=!1,w.previousPromises(t)},function(){b.getComponentMethod(\"shapes\",\"draw\")(t),b.getComponentMethod(\"images\",\"draw\")(t),b.getComponentMethod(\"annotations\",\"draw\")(t),b.getComponentMethod(\"legend\",\"draw\")(t),b.getComponentMethod(\"rangeslider\",\"draw\")(t),b.getComponentMethod(\"rangeselector\",\"draw\")(t),b.getComponentMethod(\"sliders\",\"draw\")(t),b.getComponentMethod(\"updatemenus\",\"draw\")(t)},k,w.rehover,w.previousPromises],E=v.syncOrAsync(T,t);return E&&E.then||(E=Promise.resolve()),E.then(function(){return t.emit(\"plotly_afterplot\"),t})},g.redraw=function(t){if(t=v.getGraphDiv(t),!v.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);return z.cleanData(t.data,t.data),z.cleanLayout(t.layout),t.calcdata=void 0,g.plot(t).then(function(){return t.emit(\"plotly_redraw\"),t})},g.newPlot=function(t,e,r,n){return t=v.getGraphDiv(t),w.cleanPlot([],{},t._fullData||{},t._fullLayout||{}),w.purge(t),g.plot(t,e,r,n)},g.extendTraces=function t(e,r,n,i){var a=l(e=v.getGraphDiv(e),r,n,i,function(t,e){return t.concat(e)},function(t,e){return t.splice(0,t.length-e)}),o=g.redraw(e),s=[e,a.update,n,a.maxPoints];return x.add(e,g.prependTraces,s,t,arguments),o},g.prependTraces=function t(e,r,n,i){var a=l(e=v.getGraphDiv(e),r,n,i,function(t,e){return e.concat(t)},function(t,e){return t.splice(e,t.length)}),o=g.redraw(e),s=[e,a.update,n,a.maxPoints];return x.add(e,g.extendTraces,s,t,arguments),o},g.addTraces=function t(e,r,n){e=v.getGraphDiv(e);var i,a,o=[],l=g.deleteTraces,c=t,u=[e,o],f=[e,r];for(function(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<e.length;n++)if(\"object\"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error(\"all values in traces array must be non-array objects\");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error(\"if indices is specified, traces.length must equal indices.length\")}(e,r,n),Array.isArray(r)||(r=[r]),r=r.map(function(t){return v.extendFlat({},t)}),z.cleanData(r,e.data),i=0;i<r.length;i++)e.data.push(r[i]);for(i=0;i<r.length;i++)o.push(-r.length+i);if(void 0===n)return a=g.redraw(e),x.add(e,l,u,c,f),a;Array.isArray(n)||(n=[n]);try{s(e,o,n)}catch(t){throw e.data.splice(e.data.length-r.length,r.length),t}return x.startSequence(e),x.add(e,l,u,c,f),a=g.moveTraces(e,o,n),x.stopSequence(e),a},g.deleteTraces=function t(e,r){e=v.getGraphDiv(e);var n,i,s=[],l=g.addTraces,c=t,u=[e,s,r],f=[e,r];if(void 0===r)throw new Error(\"indices must be an integer or array of integers.\");for(Array.isArray(r)||(r=[r]),o(e,r,\"indices\"),(r=a(r,e.data.length-1)).sort(v.sorterDes),n=0;n<r.length;n+=1)i=e.data.splice(r[n],1)[0],s.push(i);var h=g.redraw(e);return x.add(e,l,u,c,f),h},g.moveTraces=function t(e,r,n){var i,o=[],l=[],c=t,u=t,f=[e=v.getGraphDiv(e),n,r],h=[e,r,n];if(s(e,r,n),r=Array.isArray(r)?r:[r],void 0===n)for(n=[],i=0;i<r.length;i++)n.push(-r.length+i);for(n=Array.isArray(n)?n:[n],r=a(r,e.data.length-1),n=a(n,e.data.length-1),i=0;i<e.data.length;i++)-1===r.indexOf(i)&&o.push(e.data[i]);for(i=0;i<r.length;i++)l.push({newIndex:n[i],trace:e.data[r[i]]});for(l.sort(function(t,e){return t.newIndex-e.newIndex}),i=0;i<l.length;i+=1)o.splice(l[i].newIndex,0,l[i].trace);e.data=o;var d=g.redraw(e);return x.add(e,c,f,u,h),d},g.restyle=function t(e,r,n,i){e=v.getGraphDiv(e),z.clearPromiseQueue(e);var a={};if(\"string\"==typeof r)a[r]=n;else{if(!v.isPlainObject(r))return v.warn(\"Restyle fail.\",r,n,i),Promise.reject();a=v.extendFlat({},r),void 0===i&&(i=n)}Object.keys(a).length&&(e.changed=!0);var o=z.coerceTraceIndices(e,i),s=u(e,a,o),l=s.flags;l.clearCalc&&(e.calcdata=void 0),l.clearAxisTypes&&z.clearAxisTypes(e,o,{});var c=[];l.fullReplot?c.push(g.plot):(c.push(w.previousPromises),w.supplyDefaults(e),l.style&&c.push(D.doTraceStyle),l.colorbars&&c.push(D.doColorBars)),c.push(w.rehover),x.add(e,t,[e,s.undoit,s.traces],t,[e,s.redoit,s.traces]);var f=v.syncOrAsync(c,e);return f&&f.then||(f=Promise.resolve()),f.then(function(){return e.emit(\"plotly_restyle\",s.eventData),e})},g.relayout=function t(e,r,n){if(e=v.getGraphDiv(e),z.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var i={};if(\"string\"==typeof r)i[r]=n;else{if(!v.isPlainObject(r))return v.warn(\"Relayout fail.\",r,n),Promise.reject();i=v.extendFlat({},r)}Object.keys(i).length&&(e.changed=!0);var a=f(e,i),o=a.flags;o.calc&&(e.calcdata=void 0);var s=[w.previousPromises];o.layoutReplot?s.push(D.layoutReplot):Object.keys(i).length&&(w.supplyDefaults(e),o.legend&&s.push(D.doLegend),o.layoutstyle&&s.push(D.layoutStyles),o.ticks&&s.push(D.doTicksRelayout),o.modebar&&s.push(D.doModeBar),o.camera&&s.push(D.doCamera)),s.push(w.rehover),x.add(e,t,[e,a.undoit],t,[e,a.redoit]);var l=v.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then(function(){return e.emit(\"plotly_relayout\",a.eventData),e})},g.update=function t(e,r,n,i){if(e=v.getGraphDiv(e),z.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);v.isPlainObject(r)||(r={}),v.isPlainObject(n)||(n={}),Object.keys(r).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var a=z.coerceTraceIndices(e,i),o=u(e,v.extendFlat({},r),a),s=o.flags,l=f(e,v.extendFlat({},n)),c=l.flags;(s.clearCalc||c.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&z.clearAxisTypes(e,a,n);var h=[];if(s.fullReplot&&c.layoutReplot){var d=e.data,p=e.layout;e.data=void 0,e.layout=void 0,h.push(function(){return g.plot(e,d,p)})}else s.fullReplot?h.push(g.plot):c.layoutReplot?h.push(D.layoutReplot):(h.push(w.previousPromises),w.supplyDefaults(e),s.style&&h.push(D.doTraceStyle),s.colorbars&&h.push(D.doColorBars),c.legend&&h.push(D.doLegend),c.layoutstyle&&h.push(D.layoutStyles),c.ticks&&h.push(D.doTicksRelayout),c.modebar&&h.push(D.doModeBar),c.camera&&h.push(D.doCamera));h.push(w.rehover),x.add(e,t,[e,o.undoit,l.undoit,o.traces],t,[e,o.redoit,l.redoit,o.traces]);var m=v.syncOrAsync(h,e);return m&&m.then||(m=Promise.resolve(e)),m.then(function(){return e.emit(\"plotly_update\",{data:o.eventData,layout:l.eventData}),e})},g.animate=function(t,e,r){function n(t){return Array.isArray(s)?t>=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=v.getGraphDiv(t),!v.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=[]);var s=(r=w.supplyAnimationDefaults(r)).transition,l=r.frame;return void 0===o._frameWaitingCnt&&(o._frameWaitingCnt=0),new Promise(function(l,c){function u(e){if(0!==e.length){for(var s=0;s<e.length;s++){var u;u=\"byname\"===e[s].type?w.computeFrame(t,e[s].name):e[s].data;var f=i(s),h=n(s);h.duration=Math.min(h.duration,f.duration);var d={frame:u,name:e[s].name,frameOpts:f,transitionOpts:h};s===e.length-1&&(d.onComplete=a(l,2),d.onInterrupt=c),o._frameQueue.push(d)}\"immediate\"===r.mode&&(o._lastFrameAt=-1/0),o._animationRaf||function(){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&&function(){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,w.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 t.emit(\"plotly_animated\"),window.cancelAnimationFrame(o._animationRaf),o._animationRaf=null}()};e()}()}}function f(t){return Array.isArray(s)?p>=s.length?t.transitionOpts=s[p]:t.transitionOpts=s[0]:t.transitionOpts=s,p++,t}var h,d,p=0,m=[],g=void 0===e||null===e,y=Array.isArray(e);if(!g&&!y&&v.isPlainObject(e))m.push({type:\"object\",data:f(v.extendFlat({},e))});else if(g||-1!==[\"string\",\"number\"].indexOf(typeof e))for(h=0;h<o._frames.length;h++)(d=o._frames[h])&&(g||String(d.group)===String(e))&&m.push({type:\"byname\",name:String(d.name),data:f({name:d.name})});else if(y)for(h=0;h<e.length;h++){var x=e[h];-1!==[\"number\",\"string\"].indexOf(typeof x)?(x=String(x),m.push({type:\"byname\",name:x,data:f({name:x})})):v.isPlainObject(x)&&m.push({type:\"object\",data:f(v.extendFlat({},x))})}for(h=0;h<m.length;h++)if(\"byname\"===(d=m[h]).type&&!o._frameHash[d.data.name])return v.warn('animate failure: frame not found: \"'+d.data.name+'\"'),void c();-1!==[\"next\",\"immediate\"].indexOf(r.mode)&&function(){if(0!==o._frameQueue.length){for(;o._frameQueue.length;){var e=o._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit(\"plotly_animationinterrupted\",[])}}(),\"reverse\"===r.direction&&m.reverse();var b=t._fullLayout._currentFrame;if(b&&r.fromcurrent){var _=-1;for(h=0;h<m.length;h++)if(\"byname\"===(d=m[h]).type&&d.name===b){_=h;break}if(_>0&&_<m.length-1){var M=[];for(h=0;h<m.length;h++)d=m[h],(\"byname\"!==m[h].type||h>_)&&M.push(d);m=M}}m.length>0?u(m):(t.emit(\"plotly_animated\"),l())})},g.addFrames=function(t,e,r){t=v.getGraphDiv(t);var n=0;if(null===e||void 0===e)return Promise.resolve();if(!v.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 adding frames. For more details, see https://plot.ly/javascript/animations/\");var i,a,o,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error(\"addFrames failure: frameList must be an Array of frame definitions\"+e);var u=l.length+2*e.length,f=[];for(i=e.length-1;i>=0;i--)if(v.isPlainObject(e[i])){var h=(c[e[i].name]||{}).name,d=e[i].name;h&&d&&\"number\"==typeof d&&c[h]&&(n++,v.warn('addFrames: overwriting frame \"'+c[h].name+'\" with a frame whose name of type \"number\" also equates to \"'+h+'\". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),n>5&&v.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:w.supplyFrameDefaults(e[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:u+i})}f.sort(function(t,e){return t.index>e.index?-1:t.index<e.index?1:0});var p=[],m=[],g=l.length;for(i=f.length-1;i>=0;i--){if(\"number\"==typeof(a=f[i].frame).name&&v.warn(\"Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings\"),!a.name)for(;c[a.name=\"frame \"+t._transitionData._counter++];);if(c[a.name]){for(o=0;o<l.length&&(l[o]||{}).name!==a.name;o++);p.push({type:\"replace\",index:o,value:a}),m.unshift({type:\"replace\",index:o,value:l[o]})}else s=Math.max(0,Math.min(f[i].index,g)),p.push({type:\"insert\",index:s,value:a}),m.unshift({type:\"delete\",index:s}),g++}var y=w.modifyFrames,b=w.modifyFrames,_=[t,m],M=[t,p];return x&&x.add(t,y,_,b,M),w.modifyFrames(t,p)},g.deleteFrames=function(t,e){if(t=v.getGraphDiv(t),!v.isPlotDiv(t))throw new Error(\"This element is not a Plotly plot: \"+t);var r,n,i=t._transitionData._frames,a=[],o=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice(0)).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:\"delete\",index:n}),o.unshift({type:\"insert\",index:n,value:i[n]});var s=w.modifyFrames,l=w.modifyFrames,c=[t,o],u=[t,a];return x&&x.add(t,s,c,l,u),w.modifyFrames(t,a)},g.purge=function(t){var e=(t=v.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return w.cleanPlot([],{},r,e),w.purge(t),y.purge(t),e._container&&e._container.remove(),delete t._context,t}},{\"../components/color\":618,\"../components/drawing\":643,\"../components/errorbars\":649,\"../constants/xmlns_namespaces\":723,\"../lib\":743,\"../lib/events\":731,\"../lib/queue\":757,\"../lib/svg_text_utils\":766,\"../plotly\":784,\"../plots/cartesian/axis_ids\":792,\"../plots/cartesian/constants\":794,\"../plots/cartesian/constraints\":796,\"../plots/cartesian/graph_interact\":798,\"../plots/plots\":852,\"../plots/polar/legacy\":860,\"../registry\":873,\"./edit_types\":773,\"./helpers\":774,\"./manage_arrays\":775,\"./plot_schema\":778,\"./subroutines\":781,d3:128,\"fast-isnumeric\":140,\"has-hover\":276}],777:[function(t,e,r){\"use strict\";e.exports={staticPlot:!1,editable:!1,edits:{annotationPosition:!1,annotationTail:!1,annotationText:!1,axisTitleText:!1,colorbarPosition:!1,colorbarTitleText:!1,legendPosition:!1,legendText:!1,shapePosition:!1,titleText:!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:\"transparent\",topojsonURL:\"https://cdn.plot.ly/\",mapboxAccessToken:null,logging:1,globalTransforms:[],locale:\"en-US\",locales:{}}},{}],778:[function(t,e,r){\"use strict\";function n(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(i(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!u.isPlainObject(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(r++,!i(e[r]))return!1}else if(\"info_array\"===t.valType){var a=e[++r];if(!i(a)||a>=t.items.length)return!1;t=t.items[a]}}return t}function i(t){return t===Math.round(t)&&t>=0}function a(){var t,e,r={};x(r,h);for(t in c.subplotsRegistry)if((e=c.subplotsRegistry[t]).layoutAttributes)if(\"cartesian\"===e.name)s(r,e,\"xaxis\"),s(r,e,\"yaxis\");else{s(r,e,\"subplot\"===e.attr?e.name:e.attr)}r=function(t){return y(t,{radialaxis:g.radialaxis,angularaxis:g.angularaxis}),y(t,g.layout),t}(r);for(t in c.componentsRegistry){var n=(e=c.componentsRegistry[t]).schema;if(n&&(n.subplots||n.layout)){var i=n.subplots;if(i&&i.xaxis&&!i.yaxis)for(var a in i.xaxis)delete r.yaxis[a]}else e.layoutAttributes&&l(r,e.layoutAttributes,e.name)}return{layoutAttributes:o(r)}}function o(t){return function(t){r.crawl(t,function(t,e,n){r.isValObject(t)?\"data_array\"===t.valType?(t.role=\"data\",n[e+\"src\"]={valType:\"string\",editType:\"none\"}):!0===t.arrayOk&&(n[e+\"src\"]={valType:\"string\",editType:\"none\"}):u.isPlainObject(t)&&(t.role=\"object\")})}(t),function(t){r.crawl(t,function(t,e,r){if(!t)return;var n=t[_];if(!n)return;delete t[_],r[e]={items:{}},r[e].items[n]=t,r[e].role=\"object\"})}(t),t}function s(t,e,r){var n=u.nestedProperty(t,r),i=x({},e.layoutAttributes);i[b]=!0,n.set(i)}function l(t,e,r){var n=u.nestedProperty(t,r);n.set(x(n.get()||{},e))}var c=t(\"../registry\"),u=t(\"../lib\"),f=t(\"../plots/attributes\"),h=t(\"../plots/layout_attributes\"),d=t(\"../plots/frame_attributes\"),p=t(\"../plots/animation_attributes\"),m=t(\"../plots/polar/legacy/area_attributes\"),g=t(\"../plots/polar/legacy/axis_attributes\"),v=t(\"./edit_types\"),y=u.extendFlat,x=u.extendDeepAll,b=\"_isSubplotObj\",_=\"_isLinkedToArray\",w=[b,_,\"_arrayAttrRegexps\",\"_deprecated\"];r.IS_SUBPLOT_OBJ=b,r.IS_LINKED_TO_ARRAY=_,r.DEPRECATED=\"_deprecated\",r.UNDERSCORE_ATTRS=w,r.get=function(){var t={};c.allTypes.concat(\"area\").forEach(function(e){t[e]=function(t){var e,r;\"area\"===t?(e={attributes:m},r={}):r=(e=c.modules[t]._module).basePlotModule;var n={};n.type=null,x(n,f),x(n,e.attributes),r.attributes&&x(n,r.attributes),n.type=t;var i={meta:e.meta||{},attributes:o(n)};if(e.layoutAttributes){var a={};x(a,e.layoutAttributes),i.layoutAttributes=o(a)}return i}(e)});var e={};return Object.keys(c.transformsRegistry).forEach(function(t){e[t]=function(t){var e=c.transformsRegistry[t],r=x({},e.attributes);return Object.keys(c.componentsRegistry).forEach(function(e){var n=c.componentsRegistry[e];n.schema&&n.schema.transforms&&n.schema.transforms[t]&&Object.keys(n.schema.transforms[t]).forEach(function(e){l(r,n.schema.transforms[t][e],e)})}),{attributes:o(r)}}(t)}),{defs:{valObjects:u.valObjectMeta,metaKeys:w.concat([\"description\",\"role\",\"editType\",\"impliedEdits\"]),editType:{traces:v.traces,layout:v.layout},impliedEdits:{}},traces:t,layout:a(),transforms:e,frames:function(){var t={frames:u.extendDeepAll({},d)};return o(t),t.frames}(),animation:o(p)}},r.crawl=function(t,e,n,i){var a=n||0;i=i||\"\",Object.keys(t).forEach(function(n){var o=t[n];if(-1===w.indexOf(n)){var s=(i?i+\".\":\"\")+n;e(o,n,t,a,s),r.isValObject(o)||u.isPlainObject(o)&&\"impliedEdits\"!==n&&r.crawl(o,e,a+1,s)}})},r.isValObject=function(t){return t&&void 0!==t.valType},r.findArrayAttributes=function(t){function e(e,r,a,o){i=i.slice(0,o).concat([r]);if(e&&(\"data_array\"===e.valType||!0===e.arrayOk)&&!(\"colorbar\"===i[o-1]&&(\"ticktext\"===r||\"tickvals\"===r))){var s=function(t){return t.join(\".\")}(i),l=u.nestedProperty(t,s).get();Array.isArray(l)&&n.push(s)}}var n=[],i=[];if(r.crawl(f,e),t._module&&t._module.attributes&&r.crawl(t._module.attributes,e),t.transforms)for(var a=t.transforms,o=0;o<a.length;o++){var s=a[o]._module;s&&(i=[\"transforms[\"+o+\"]\"],r.crawl(s.attributes,e,1))}return t._fullInput&&t._fullInput._module&&t._fullInput._module.attributes&&(r.crawl(t._fullInput._module.attributes,e),n=u.filterUnique(n)),n},r.getTraceValObject=function(t,e){var r,a,o=e[0],s=1;if(\"transforms\"===o){if(!Array.isArray(t.transforms))return!1;var l=e[1];if(!i(l)||l>=t.transforms.length)return!1;a=(r=(c.transformsRegistry[t.transforms[l].type]||{}).attributes)&&r[e[2]],s=3}else if(\"area\"===t.type)a=m[o];else{var u=t._module;if(u||(u=(c.modules[t.type||f.type.dflt]||{})._module),!u)return!1;if(r=u.attributes,!(a=r&&r[o])){var h=u.basePlotModule;h&&h.attributes&&(a=h.attributes[o])}a||(a=f[o])}return n(a,e,s)},r.getLayoutValObject=function(t,e){return n(function(t,e){var r,n,i,a,o=t._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if((i=o[r]).attrRegex&&i.attrRegex.test(e)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!s&&i.layoutAttributes&&(s=i.layoutAttributes)}var l=i.baseLayoutAttrOverrides;if(l&&e in l)return l[e]}if(s)return s}var u=t._modules;if(u)for(r=0;r<u.length;r++)if((a=u[r].layoutAttributes)&&e in a)return a[e];for(n in c.componentsRegistry)if(!(i=c.componentsRegistry[n]).schema&&e===i.name)return i.layoutAttributes;return e in h?h[e]:\"radialaxis\"===e||\"angularaxis\"===e?g[e]:g.layout[e]||!1}(t,e[0]),e,1)}},{\"../lib\":743,\"../plots/animation_attributes\":785,\"../plots/attributes\":787,\"../plots/frame_attributes\":817,\"../plots/layout_attributes\":843,\"../plots/polar/legacy/area_attributes\":858,\"../plots/polar/legacy/axis_attributes\":859,\"../registry\":873,\"./edit_types\":773}],779:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"../lib\");e.exports=function(t){if(!t)throw new Error(\"No argument passed to Plotly.register.\");t&&!Array.isArray(t)&&(t=[t]);for(var e=0;e<t.length;e++){var r=t[e];if(!r)throw new Error(\"Invalid module was attempted to be registered!\");switch(r.moduleType){case\"trace\":!function(t){n.register(t,t.name,t.categories,t.meta),n.subplotsRegistry[t.basePlotModule.name]||n.registerSubplot(t.basePlotModule)}(r);break;case\"transform\":!function(t){if(\"string\"!=typeof t.name)throw new Error(\"Transform module *name* must be a string.\");var e=\"Transform module \"+t.name,r=\"function\"==typeof t.transform,a=\"function\"==typeof t.calcTransform;if(!r&&!a)throw new Error(e+\" is missing a *transform* or *calcTransform* method.\");r&&a&&i.log([e+\" has both a *transform* and *calcTransform* methods.\",\"Please note that all *transform* methods are executed\",\"before all *calcTransform* methods.\"].join(\" \")),i.isPlainObject(t.attributes)||i.log(e+\" registered without an *attributes* object.\"),\"function\"!=typeof t.supplyDefaults&&i.log(e+\" registered without a *supplyDefaults* method.\"),n.registerTransform(t)}(r);break;case\"component\":!function(t){if(\"string\"!=typeof t.name)throw new Error(\"Component module *name* must be a string.\");n.registerComponent(t)}(r);break;case\"locale\":n.registerLocale(r);break;default:throw new Error(\"Invalid module was attempted to be registered!\")}}}},{\"../lib\":743,\"../registry\":873}],780:[function(t,e,r){\"use strict\";var n=t(\"../plotly\"),i=t(\"../lib\");e.exports=function(t){return i.extendFlat(n.defaultConfig,t)}},{\"../lib\":743,\"../plotly\":784}],781:[function(t,e,r){\"use strict\";function n(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||\"all\"===t.mirror||\"allticks\"===t.mirror)}function i(t,e,r){if(!r.showline||!r._lw)return!1;if(\"all\"===r.mirror||\"allticks\"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=v.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function a(t,e,r,n){if(i(t,e,r))return r._lw;for(var a=0;a<n.length;a++){var o=n[a];if(o._mainAxis===r._mainAxis&&i(t,e,o))return o._lw}return 0}var o=t(\"d3\"),s=t(\"../plotly\"),l=t(\"../registry\"),c=t(\"../plots/plots\"),u=t(\"../lib\"),f=t(\"../components/color\"),h=t(\"../components/drawing\"),d=t(\"../components/titles\"),p=t(\"../components/modebar\"),m=t(\"../plots/cartesian/graph_interact\"),g=t(\"../plots/cartesian/constants\"),v=t(\"../constants/alignment\");r.layoutStyles=function(t){return u.syncOrAsync([c.doAutoMargin,r.lsInner],t)},r.lsInner=function(t){function e(t,e,r){var n=t._lw/2;return\"x\"===t._id.charAt(0)?e?\"top\"===r?e._offset-u-n:e._offset+e._length+u+n:c.t+c.h*(1-(t.position||0))+n%1:e?\"right\"===r?e._offset+e._length+u+n:e._offset-u-n:c.l+c.w*(t.position||0)+n%1}var i,l=t._fullLayout,c=l._size,u=c.p,d=s.Axes.list(t),m=l._has(\"cartesian\");for(i=0;i<d.length;i++){var y=d[i];y.setScale();var x=y._anchorAxis;y._linepositions={},y._lw=h.crispRound(t,y.linewidth,1),y._mainLinePosition=e(y,x,y.side),y._mainMirrorPosition=y.mirror&&x?e(y,x,v.OPPOSITE_SIDE[y.side]):null}l._paperdiv.style({width:l.width+\"px\",height:l.height+\"px\"}).selectAll(\".main-svg\").call(h.setSize,l.width,l.height),t._context.setBackground(t,l.paper_bgcolor);var b=l._paper.selectAll(\"g.subplot\"),_=[],w=[];b.each(function(t){var e=l._plots[t];if(e.mainplot)return e.bg&&e.bg.remove(),void(e.bg=void 0);var r=e.xaxis.domain,n=e.yaxis.domain,i=[];!function(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}(r,n,w)?(_.push(t),w.push([r,n])):i=[0];var a=e.plotgroup.selectAll(\".bg\").data(i);a.enter().append(\"rect\").classed(\"bg\",!0),a.exit().remove(),a.each(function(){e.bg=a;var t=e.plotgroup.node();t.insertBefore(this,t.childNodes[0])})});var M=l._bgLayer.selectAll(\".bg\").data(_);return M.enter().append(\"rect\").classed(\"bg\",!0),M.exit().remove(),M.each(function(t){l._plots[t].bg=o.select(this)}),b.each(function(t){function r(t){return\"M\"+k+\",\"+t+\"H\"+A}function o(t){return\"M\"+y._offset+\",\"+t+\"h\"+y._length}function s(t){return\"M\"+t+\",\"+z+\"V\"+C}function c(t){return\"M\"+t+\",\"+x._offset+\"v\"+x._length}function p(e,r,n){if(!e.showline||t!==e._mainSubplot)return\"\";if(!e._anchorAxis)return n(e._mainLinePosition);var i=r(e._mainLinePosition);return e.mirror&&(i+=r(e._mainMirrorPosition)),i}var v=l._plots[t],y=v.xaxis,x=v.yaxis;v.bg&&m&&v.bg.call(h.setRect,y._offset-u,x._offset-u,y._length+2*u,x._length+2*u).call(f.fill,l.plot_bgcolor).style(\"stroke-width\",0),v.clipId=\"clip\"+l._uid+t+\"plot\";var b=l._clips.selectAll(\"#\"+v.clipId).data([0]);b.enter().append(\"clipPath\").attr({class:\"plotclip\",id:v.clipId}).append(\"rect\"),b.selectAll(\"rect\").attr({width:y._length,height:x._length}),h.setTranslate(v.plot,y._offset,x._offset);var _,w;for(v._hasClipOnAxisFalse?(_=null,w=v.clipId):(_=v.clipId,w=null),h.setClipUrl(v.plot,_),i=0;i<g.traceLayerClasses.length;i++){var M=g.traceLayerClasses[i];\"scatterlayer\"!==M&&v.plot.selectAll(\"g.\"+M).call(h.setClipUrl,w)}if(v.layerClipId=w,m){var k,A,T,S,E,L,C,z,D,I,P,O,F;if(n(y,t)){E=a(y,\"left\",x,d),k=y._offset-(E?u+E:0),L=a(y,\"right\",x,d),A=y._offset+y._length+(L?u+L:0),T=e(y,x,\"bottom\"),S=e(y,x,\"top\"),(F=!y._anchorAxis||t!==y._mainSubplot)&&y.ticks&&\"allticks\"===y.mirror&&(y._linepositions[t]=[T,S]);var R=p(y,r,o);F&&y.showline&&(\"all\"===y.mirror||\"allticks\"===y.mirror)&&(R+=r(T)+r(S)),v.xlines.attr(\"d\",R||\"M0,0\").style(\"stroke-width\",y._lw+\"px\").call(f.stroke,y.showline?y.linecolor:\"rgba(0,0,0,0)\")}if(n(x,t)){P=a(x,\"bottom\",y,d),C=x._offset+x._length+(P?u:0),O=a(x,\"top\",y,d),z=x._offset-(O?u:0),D=e(x,y,\"left\"),I=e(x,y,\"right\"),(F=!x._anchorAxis||t!==y._mainSubplot)&&x.ticks&&\"allticks\"===x.mirror&&(x._linepositions[t]=[D,I]);var N=p(x,s,c);F&&x.showline&&(\"all\"===x.mirror||\"allticks\"===x.mirror)&&(N+=s(D)+s(I)),v.ylines.attr(\"d\",N||\"M0,0\").style(\"stroke-width\",x._lw+\"px\").call(f.stroke,x.showline?x.linecolor:\"rgba(0,0,0,0)\")}}}),s.Axes.makeClipPaths(t),r.drawMainTitle(t),p.manage(t),t._promises.length&&Promise.all(t._promises)},r.drawMainTitle=function(t){var e=t._fullLayout;d.draw(t,\"gtitle\",{propContainer:e,propName:\"title\",placeholder:e._dfltTitle.plot,attributes:{x:e.width/2,y:e._size.t/2,\"text-anchor\":\"middle\"}})},r.doTraceStyle=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e],n=(((r[0]||{}).trace||{})._module||{}).arraysToCalcdata;n&&n(r,r[0].trace)}return c.style(t),l.getComponentMethod(\"legend\",\"draw\")(t),c.previousPromises(t)},r.doColorBars=function(t){for(var e=0;e<t.calcdata.length;e++){var r=t.calcdata[e][0];if((r.t||{}).cb){var n=r.trace,i=r.t.cb;l.traceIs(n,\"contour\")&&i.line({width:!1!==n.contours.showlines?n.line.width:0,dash:n.line.dash,color:\"line\"===n.contours.coloring?i._opts.line.color:n.line.color}),l.traceIs(n,\"markerColorscale\")?i.options(n.marker.colorbar)():i.options(n.colorbar)()}}return c.previousPromises(t)},r.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,s.plot(t,\"\",e)},r.doLegend=function(t){return l.getComponentMethod(\"legend\",\"draw\")(t),c.previousPromises(t)},r.doTicksRelayout=function(t){return s.Axes.doTicks(t,\"redraw\"),r.drawMainTitle(t),c.previousPromises(t)},r.doModeBar=function(t){var e=t._fullLayout;p.manage(t),m(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(e)}return c.previousPromises(t)},r.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setCamera(i.camera)}}},{\"../components/color\":618,\"../components/drawing\":643,\"../components/modebar\":680,\"../components/titles\":709,\"../constants/alignment\":716,\"../lib\":743,\"../plotly\":784,\"../plots/cartesian/constants\":794,\"../plots/cartesian/graph_interact\":798,\"../plots/plots\":852,\"../registry\":873,d3:128}],782:[function(t,e,r){\"use strict\";var n=t(\"../plotly\"),i=t(\"../lib\"),a=t(\"../snapshot/helpers\"),o=t(\"../snapshot/tosvg\"),s=t(\"../snapshot/svgtoimg\"),l={format:{valType:\"enumerated\",values:[\"png\",\"jpeg\",\"webp\",\"svg\"],dflt:\"png\"},width:{valType:\"number\",min:1},height:{valType:\"number\",min:1},scale:{valType:\"number\",min:0,dflt:1},setBackground:{valType:\"any\",dflt:!1},imageDataOnly:{valType:\"boolean\",dflt:!1}},c=/^data:image\\/\\w+;base64,/;e.exports=function(t,e){function r(t){return!(t in e)||i.validate(e[t],l[t])}function u(t,r){return i.coerce(e,g,l,t,r)}function f(){return new Promise(function(t){setTimeout(t,a.getDelay(M._fullLayout))})}function h(){return new Promise(function(t,e){var r=o(M,v,b),a=M._fullLayout.width,l=M._fullLayout.height;if(n.purge(M),document.body.removeChild(M),\"svg\"===v)return t(w?r:\"data:image/svg+xml,\"+encodeURIComponent(r));var c=document.createElement(\"canvas\");c.id=i.randstr(),s({format:v,width:a,height:l,scale:b,canvas:c,svg:r,promise:!0}).then(t).catch(e)})}e=e||{};var d,p,m;if(i.isPlainObject(t)?(d=t.data||[],p=t.layout||{},m=t.config||{}):(t=i.getGraphDiv(t),d=i.extendDeep([],t.data),p=i.extendDeep({},t.layout),m=t._context),!r(\"width\")||!r(\"height\"))throw new Error(\"Height and width should be pixel values.\");if(!r(\"format\"))throw new Error(\"Image format is not jpeg, png, svg or webp.\");var g={},v=u(\"format\"),y=u(\"width\"),x=u(\"height\"),b=u(\"scale\"),_=u(\"setBackground\"),w=u(\"imageDataOnly\"),M=document.createElement(\"div\");M.style.position=\"absolute\",M.style.left=\"-5000px\",document.body.appendChild(M);var k=i.extendFlat({},p);y&&(k.width=y),x&&(k.height=x);var A=i.extendFlat({},m,{staticPlot:!0,setBackground:_}),T=a.getRedrawFunc(M);return new Promise(function(t,e){n.plot(M,d,k,A).then(T).then(f).then(h).then(function(e){t(function(t){return w?t.replace(c,\"\"):t}(e))}).catch(function(t){e(t)})})}},{\"../lib\":743,\"../plotly\":784,\"../snapshot/helpers\":877,\"../snapshot/svgtoimg\":879,\"../snapshot/tosvg\":881}],783:[function(t,e,r){\"use strict\";function n(t,e,r,i,l,c){c=c||[];for(var u=Object.keys(t),d=0;d<u.length;d++){var p=u[d];if(\"transforms\"!==p){var m=c.slice();m.push(p);var g=t[p],v=e[p],y=function(t,e){var r=o(e);return t[r.keyMinusId]}(r,p),x=\"info_array\"===(y||{}).valType,b=\"colorscale\"===(y||{}).valType;if(function(t,e){var r=o(e),n=r.keyMinusId,i=r.id;if(n in t&&t[n]._isSubplotObj&&i)return!0;return e in t}(r,p))if(f(g)&&f(v))n(g,v,y,i,l,m);else if(y.items&&!x&&h(g)){var _,w,M=y.items,k=M[Object.keys(M)[0]],A=[];for(_=0;_<v.length;_++){var T=v[_]._index||_;(w=m.slice()).push(T),f(g[T])&&f(v[_])&&(A.push(T),n(g[T],v[_],k,i,l,w))}for(_=0;_<g.length;_++)(w=m.slice()).push(_),f(g[_])?-1===A.indexOf(_)&&i.push(a(\"unused\",l,w)):i.push(a(\"object\",l,w,g[_]))}else!f(g)&&f(v)?i.push(a(\"object\",l,m,g)):h(g)||!h(v)||x||b?p in e?s.validate(g,y)?\"enumerated\"===y.valType&&(y.coerceNumber&&g!==+v||g!==v)&&i.push(a(\"dynamic\",l,m,g,v)):i.push(a(\"value\",l,m,g)):i.push(a(\"unused\",l,m,g)):i.push(a(\"array\",l,m,g));else i.push(a(\"schema\",l,m))}}return i}function i(t){return h(t)?\"In data trace \"+t[1]+\", \":\"In \"+t+\", \"}function a(t,e,r,n,i){r=r||\"\";var a,o;h(e)?(a=e[0],o=e[1]):(a=e,o=null);var l=function(t){if(!h(t))return String(t);for(var e=\"\",r=0;r<t.length;r++){var n=t[r];\"number\"==typeof n?e=e.substr(0,e.length-1)+\"[\"+n+\"]\":e+=n,r<t.length-1&&(e+=\".\")}return e}(r),c=d[t](e,l,n,i);return s.log(c),{code:t,container:a,trace:o,path:r,astr:l,msg:c}}function o(t){var e=t.match(p);return{keyMinusId:e&&e[1],id:e&&e[2]}}var s=t(\"../lib\"),l=t(\"../plots/plots\"),c=t(\"./plot_schema\"),u=t(\"./plot_config\"),f=s.isPlainObject,h=Array.isArray;e.exports=function(t,e){var r,i,o=c.get(),d=[],p={_context:s.extendFlat({},u)};h(t)?(p.data=s.extendDeep([],t),r=t):(p.data=[],r=[],d.push(a(\"array\",\"data\"))),f(e)?(p.layout=s.extendDeep({},e),i=e):(p.layout={},i={},arguments.length>1&&d.push(a(\"object\",\"layout\"))),l.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v<g;v++){var y=r[v],x=[\"data\",v];if(f(y)){var b=m[v],_=b.type,w=o.traces[_].attributes;w.type={valType:\"enumerated\",values:[_]},!1===b.visible&&!1!==y.visible&&d.push(a(\"invisible\",x)),n(y,b,w,d,x);var M=y.transforms,k=b.transforms;if(M){h(M)||d.push(a(\"array\",x,[\"transforms\"])),x.push(\"transforms\");for(var A=0;A<M.length;A++){var T=[\"transforms\",A],S=M[A].type;if(f(M[A])){var E=o.transforms[S]?o.transforms[S].attributes:{};E.type={valType:\"enumerated\",values:Object.keys(o.transforms)},n(M[A],k[A],E,d,x,T)}else d.push(a(\"object\",x,T))}}}else d.push(a(\"object\",x))}return n(i,p._fullLayout,function(t,e){for(var r=0;r<e.length;r++){var n=e[r].type,i=t.traces[n].layoutAttributes;i&&s.extendFlat(t.layout.layoutAttributes,i)}return t.layout.layoutAttributes}(o,m),d,\"layout\"),0===d.length?void 0:d};var d={object:function(t,e){return(\"layout\"===t&&\"\"===e?\"The layout argument\":\"data\"===t[0]&&\"\"===e?\"Trace \"+t[1]+\" in the data argument\":i(t)+\"key \"+e)+\" must be linked to an object container\"},array:function(t,e){return(\"data\"===t?\"The data argument\":i(t)+\"key \"+e)+\" must be linked to an array container\"},schema:function(t,e){return i(t)+\"key \"+e+\" is not part of the schema\"},unused:function(t,e,r){var n=f(r)?\"container\":\"key\";return i(t)+n+\" \"+e+\" did not get coerced\"},dynamic:function(t,e,r,n){return[i(t)+\"key\",e,\"(set to '\"+r+\"')\",\"got reset to\",\"'\"+n+\"'\",\"during defaults.\"].join(\" \")},invisible:function(t){return\"Trace \"+t[1]+\" got defaulted to be not visible\"},value:function(t,e,r){return[i(t)+\"key \"+e,\"is set to an invalid value (\"+r+\")\"].join(\" \")}},p=s.counterRegex(\"([a-z]+)\")},{\"../lib\":743,\"../plots/plots\":852,\"./plot_config\":777,\"./plot_schema\":778}],784:[function(t,e,r){\"use strict\";r.defaultConfig=t(\"./plot_api/plot_config\"),r.Plots=t(\"./plots/plots\"),r.Axes=t(\"./plots/cartesian/axes\"),r.ModeBar=t(\"./components/modebar\"),t(\"./plot_api/plot_api\")},{\"./components/modebar\":680,\"./plot_api/plot_api\":776,\"./plot_api/plot_config\":777,\"./plots/cartesian/axes\":789,\"./plots/plots\":852}],785:[function(t,e,r){\"use strict\";e.exports={mode:{valType:\"enumerated\",dflt:\"afterall\",values:[\"immediate\",\"next\",\"afterall\"]},direction:{valType:\"enumerated\",values:[\"forward\",\"reverse\"],dflt:\"forward\"},fromcurrent:{valType:\"boolean\",dflt:!1},frame:{duration:{valType:\"number\",min:0,dflt:500},redraw:{valType:\"boolean\",dflt:!0}},transition:{duration:{valType:\"number\",min:0,dflt:500},easing:{valType:\"enumerated\",dflt:\"cubic-in-out\",values:[\"linear\",\"quad\",\"cubic\",\"sin\",\"exp\",\"circle\",\"elastic\",\"back\",\"bounce\",\"linear-in\",\"quad-in\",\"cubic-in\",\"sin-in\",\"exp-in\",\"circle-in\",\"elastic-in\",\"back-in\",\"bounce-in\",\"linear-out\",\"quad-out\",\"cubic-out\",\"sin-out\",\"exp-out\",\"circle-out\",\"elastic-out\",\"back-out\",\"bounce-out\",\"linear-in-out\",\"quad-in-out\",\"cubic-in-out\",\"sin-in-out\",\"exp-in-out\",\"circle-in-out\",\"elastic-in-out\",\"back-in-out\",\"bounce-in-out\"]}}}},{}],786:[function(t,e,r){\"use strict\";var n=t(\"../lib\");e.exports=function(t,e,r){var i,a=r.name,o=e[a],s=n.isArray(t[a])?t[a]:[],l=e[a]=[];for(i=0;i<s.length;i++){var c=s[i],u={},f={};n.isPlainObject(c)||(f.itemIsNotPlainObject=!0,c={}),r.handleItemDefaults(c,u,e,r,f),u._input=c,u._index=i,l.push(u)}if(n.isArray(o)){var h=Math.min(o.length,l.length);for(i=0;i<h;i++)n.relinkPrivateKeys(l[i],o[i])}}},{\"../lib\":743}],787:[function(t,e,r){\"use strict\";var n=t(\"../components/fx/attributes\");e.exports={type:{valType:\"enumerated\",values:[],dflt:\"scatter\",editType:\"calc+clearAxisTypes\"},visible:{valType:\"enumerated\",values:[!0,!1,\"legendonly\"],dflt:!0,editType:\"calc\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},legendgroup:{valType:\"string\",dflt:\"\",editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,editType:\"style\"},name:{valType:\"string\",editType:\"style\"},uid:{valType:\"string\",dflt:\"\",editType:\"calc\"},ids:{valType:\"data_array\",editType:\"calc\"},customdata:{valType:\"data_array\",editType:\"calc\"},selectedpoints:{valType:\"any\",editType:\"calc\"},hoverinfo:{valType:\"flaglist\",flags:[\"x\",\"y\",\"z\",\"text\",\"name\"],extras:[\"all\",\"none\",\"skip\"],arrayOk:!0,dflt:\"all\",editType:\"none\"},hoverlabel:n.hoverlabel,stream:{token:{valType:\"string\",noBlank:!0,strict:!0,editType:\"calc\"},maxpoints:{valType:\"number\",min:0,max:1e4,dflt:500,editType:\"calc\"},editType:\"calc\"}}},{\"../components/fx/attributes\":652}],788:[function(t,e,r){\"use strict\";e.exports={xaxis:{valType:\"subplotid\",dflt:\"x\",editType:\"calc+clearAxisTypes\"},yaxis:{valType:\"subplotid\",dflt:\"y\",editType:\"calc+clearAxisTypes\"}}},{}],789:[function(t,e,r){\"use strict\";function n(t){return+t}function i(t){return String(t)}function a(t,e,r){return e*v.roundUp(t/e,r)}function o(t){var e=t.dtick;if(t._tickexponent=0,m(e)||\"string\"==typeof e||(e=1),\"category\"===t.type&&(t._tickround=null),\"date\"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,\"\"),i=n.length;if(\"M\"===String(e).charAt(0))i>10||\"01-01\"!==n.substr(5)?t._tickround=\"d\":t._tickround=+e.substr(1)%12==0?\"y\":\"m\";else if(e>=T&&i<=10||e>=15*T)t._tickround=\"d\";else if(e>=E&&i<=16||e>=S)t._tickround=\"M\";else if(e>=L&&i<=19||e>=E)t._tickround=\"S\";else{var a=t.l2r(r+e).replace(/^-/,\"\").length;t._tickround=Math.max(i,a)-20}}else if(m(e)||\"L\"===e.charAt(0)){var o=t.range.map(t.r2d||Number);m(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&&(c(t.exponentformat)&&!u(l)?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function s(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 l(t,e,r,n,i){if(\"radians\"!==t.thetaunit||r)e.text=f(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text=\"0\";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}function r(t,n){return e(n,0)?t:r(n,t%n)}var n=function(t){var r=1;for(;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),i=t*n,a=Math.abs(r(i,n));return[Math.round(i/a),Math.round(n/a)]}(a);if(o[1]>=100)e.text=f(v.deg2rad(e.x),t,i,n);else{var s=e.x<0;1===o[1]?1===o[0]?e.text=\"\\u03c0\":e.text=o[0]+\"\\u03c0\":e.text=[\"<sup>\",o[0],\"</sup>\",\"\\u2044\",\"<sub>\",o[1],\"</sub>\",\"\\u03c0\"].join(\"\"),s&&(e.text=C+e.text)}}}}function c(t){return\"SI\"===t||\"B\"===t}function u(t){return t>14||t<-15}function f(t,e,r,n){var i=t<0,a=e._tickround,s=r||e.exponentformat||\"B\",l=e._tickexponent,f=I.getTickFormat(e),h=e.separatethousands;if(n){var d={exponentformat:e.exponentformat,dtick:\"none\"===e.showexponent?e.dtick:m(t)?Math.abs(t)||1:1,range:\"none\"===e.showexponent?e.range.map(e.r2d):[0,t||1]};o(d),a=(Number(d._tickround)||0)+4,l=d._tickexponent,e.hoverformat&&(f=e.hoverformat)}if(f)return e._numFormat(f)(t).replace(/-/g,C);var p=Math.pow(10,-a)/2;if(\"none\"===s&&(l=0),(t=Math.abs(t))<p)t=\"0\",i=!1;else{if(t+=p,l&&(t*=Math.pow(10,-l),a+=l),0===a)t=String(Math.floor(t));else if(a<0){t=(t=String(Math.round(t))).substr(0,t.length+a);for(var g=a;g<0;g++)t+=\"0\"}else{var y=(t=String(t)).indexOf(\".\")+1;y&&(t=t.substr(0,y+a).replace(/\\.?0+$/,\"\"))}t=v.numSeparate(t,e._separators,h)}if(l&&\"hide\"!==s){c(s)&&u(l)&&(s=\"power\");var x;x=l<0?C+-l:\"power\"!==s?\"+\"+l:String(l),\"e\"===s?t+=\"e\"+x:\"E\"===s?t+=\"E\"+x:\"power\"===s?t+=\"\\xd710<sup>\"+x+\"</sup>\":\"B\"===s&&9===l?t+=\"B\":c(s)&&(t+=H[l/3+5])}return i?C+t:t}function h(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function d(t,e,r){var n,i,a=[],o=[],s=t.layout;for(n=0;n<e.length;n++)a.push(I.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(I.getFromId(t,r[n]));var l=Object.keys(a[0]),c=[\"anchor\",\"domain\",\"overlaying\",\"position\",\"side\",\"tickangle\"],u=[\"linear\",\"log\"];for(n=0;n<l.length;n++){var f=l[n],h=a[0][f],d=o[0][f],p=!0,m=!1,g=!1;if(\"_\"!==f.charAt(0)&&\"function\"!=typeof h&&-1===c.indexOf(f)){for(i=1;i<a.length&&p;i++){var y=a[i][f];\"type\"===f&&-1!==u.indexOf(h)&&-1!==u.indexOf(y)&&h!==y?m=!0:y!==h&&(p=!1)}for(i=1;i<o.length&&p;i++){var x=o[i][f];\"type\"===f&&-1!==u.indexOf(d)&&-1!==u.indexOf(x)&&d!==x?g=!0:o[i][f]!==d&&(p=!1)}p&&(m&&(s[a[0]._name].type=\"linear\"),g&&(s[o[0]._name].type=\"linear\"),function(t,e,r,n,i){var a,o=v.nestedProperty,s=o(t[r[0]._name],e).get(),l=o(t[n[0]._name],e).get();\"title\"===e&&(s===i.x&&(s=i.y),l===i.y&&(l=i.x));for(a=0;a<r.length;a++)o(t,r[a]._name+\".\"+e).set(l);for(a=0;a<n.length;a++)o(t,n[a]._name+\".\"+e).set(s)}(s,f,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var b=t._fullLayout.annotations[n];-1!==e.indexOf(b.xref)&&-1!==r.indexOf(b.yref)&&v.swapAttrs(s.annotations[n],[\"?\"])}}var p=t(\"d3\"),m=t(\"fast-isnumeric\"),g=t(\"../../registry\"),v=t(\"../../lib\"),y=t(\"../../lib/svg_text_utils\"),x=t(\"../../components/titles\"),b=t(\"../../components/color\"),_=t(\"../../components/drawing\"),w=t(\"../../constants/numerical\"),M=w.FP_SAFE,k=w.ONEAVGYEAR,A=w.ONEAVGMONTH,T=w.ONEDAY,S=w.ONEHOUR,E=w.ONEMIN,L=w.ONESEC,C=w.MINUS_SIGN,z=w.BADNUM,D=t(\"../../constants/alignment\").MID_SHIFT,I=e.exports={};I.setConvert=t(\"./set_convert\");var P=t(\"./axis_autotype\"),O=t(\"./axis_ids\");I.id2name=O.id2name,I.cleanId=O.cleanId,I.list=O.list,I.listIds=O.listIds,I.getFromId=O.getFromId,I.getFromTrace=O.getFromTrace,I.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+\"axis\"],l=n+\"ref\",c={};return i||(i=s[0]||a),a||(a=i),c[l]={valType:\"enumerated\",values:s.concat(a?[a]:[]),dflt:i},v.coerce(t,e,c,l)},I.coercePosition=function(t,e,r,n,i,a){var o,s;if(\"paper\"===n||\"pixel\"===n)o=v.ensureNumber,s=r(i,a);else{var l=I.getFromId(e,n);s=r(i,a=l.fraction2r(a)),o=l.cleanPos}t[i]=o(s)},I.cleanPosition=function(t,e,r){return(\"paper\"===r||\"pixel\"===r?v.ensureNumber:I.getFromId(e,r).cleanPos)(t)};var F=I.getDataConversions=function(t,e,r,a){var o,s=\"x\"===r||\"y\"===r||\"z\"===r?r:a;if(Array.isArray(s)){if(o={type:P(a),_categories:[]},I.setConvert(o),\"category\"===o.type)for(var l=0;l<a.length;l++)o.d2c(a[l])}else o=I.getFromTrace(t,e,s);return o?{d2c:o.d2c,c2d:o.c2d}:\"ids\"===s?{d2c:i,c2d:i}:{d2c:n,c2d:n}};I.getDataToCoordFunc=function(t,e,r,n){return F(t,e,r,n).d2c},I.counterLetter=function(t){var e=t.charAt(0);return\"x\"===e?\"y\":\"y\"===e?\"x\":void 0},I.minDtick=function(t,e,r,n){-1===[\"log\",\"category\"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},I.getAutoRange=function(t){var e,r=[],n=t._min[0].val,i=t._max[0].val;for(e=1;e<t._min.length&&n===i;e++)n=Math.min(n,t._min[e].val);for(e=1;e<t._max.length&&n===i;e++)i=Math.max(i,t._max[e].val);var a,o,s,l,c,u,f,h=0,d=!1;if(t.range){var p=v.simpleMap(t.range,t.r2l);d=p[1]<p[0]}for(\"reversed\"===t.autorange&&(d=!0,t.autorange=!0),e=0;e<t._min.length;e++)for(o=t._min[e],a=0;a<t._max.length;a++)f=(s=t._max[a]).val-o.val,u=t._length-o.pad-s.pad,f>0&&u>0&&f/u>h&&(l=o,c=s,h=f/u);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 h&&(\"linear\"!==t.type&&\"-\"!==t.type||(\"tozero\"===t.rangemode?(l.val>=0&&(l={val:0,pad:0}),c.val<=0&&(c={val:0,pad:0})):\"nonnegative\"===t.rangemode&&(l.val-h*l.pad<0&&(l={val:0,pad:0}),c.val<0&&(c={val:1,pad:0})),h=(c.val-l.val)/(t._length-l.pad-c.pad)),r=[l.val-h*l.pad,c.val+h*c.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(),v.simpleMap(r,t.l2r||Number)},I.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=I.getAutoRange(t),t._r=t.range.slice(),t._rl=v.simpleMap(t._r,t.r2l);var r=t._input;r.range=t.range.slice(),r.autorange=t.autorange}},I.saveRangeInitial=function(t,e){for(var r=I.list(t,\"\",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},I.saveShowSpikeInitial=function(t,e){for(var r=I.list(t,\"\",!0),n=!1,i=\"on\",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),\"on\"!==i||o.showspikes||(i=\"off\")}return t._fullLayout._cartesianSpikesEnabled=i,n},I.expand=function(t,e,r){function n(t){if(Array.isArray(t))return function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}function i(r){function n(t){return m(t)&&Math.abs(t)<M}if(l=e[r],m(l)){if(f=_(r)+x,h=w(r)+x,p=l-A(r),g=l+k(r),\"log\"===t.type&&p<g/10&&(p=g/10),c=t.c2l(p),u=t.c2l(g),b&&(c=Math.min(0,c),u=Math.max(0,u)),n(c)){for(d=!0,o=0;o<t._min.length&&d;o++)(s=t._min[o]).val<=c&&s.pad>=h?d=!1:s.val>=c&&s.pad<=h&&(t._min.splice(o,1),o--);d&&t._min.push({val:c,pad:b&&0===c?0:h})}if(n(u)){for(d=!0,o=0;o<t._max.length&&d;o++)(s=t._max[o]).val>=u&&s.pad>=f?d=!1:s.val<=u&&s.pad<=f&&(t._max.splice(o,1),o--);d&&t._max.push({val:u,pad:b&&0===u?0:f})}}}if((t.autorange||!!v.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,c,u,f,h,d,p,g,y=e.length,x=r.padded?.05*t._length:0,b=r.tozero&&(\"linear\"===t.type||\"-\"===t.type);x&&\"domain\"===t.constrain&&t._inputDomain&&(x*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0]));var _=n((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=n((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),k=n(r.vpadplus||r.vpad),A=n(r.vpadminus||r.vpad);for(a=0;a<6;a++)i(a);for(a=y-1;a>5;a--)i(a)}},I.autoBin=function(t,e,r,n,i){var a=v.aggNums(Math.min,null,t),o=v.aggNums(Math.max,null,t);if(i||(i=e.calendar),\"category\"===e.type)return{start:a-.5,end:o+.5,size:1,_count:o-a+1};var s;if(r)s=(o-a)/r;else{var l=v.distinctVals(t),c=Math.pow(10,Math.floor(Math.log(l.minDiff)/Math.LN10)),u=c*v.roundUp(l.minDiff/c,[.9,1.9,4.9,9.9],!0);s=Math.max(u,2*v.stdev(t)/Math.pow(t.length,n?.25:.4)),m(s)||(s=1)}var f;f=\"log\"===e.type?{type:\"linear\",range:[a,o]}:{type:e.type,range:v.simpleMap([a,o],e.c2r,0,i),calendar:i},I.setConvert(f),I.autoTicks(f,s);var h,d,p=I.tickIncrement(I.tickFirst(f),f.dtick,\"reverse\",i);if(\"number\"==typeof f.dtick)h=(p=function(t,e,r,n,i){function a(e){return(1+100*(e-t)/r.dtick)%100<2}for(var o=0,s=0,l=0,c=0,u=0;u<e.length;u++)e[u]%1==0?l++:m(e[u])||c++,a(e[u])&&o++,a(e[u]+r.dtick/2)&&s++;var f=e.length-c;if(l===f&&\"date\"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*f&&(o>.3*f||a(n)||a(i))){var h=r.dtick/2;t+=t+h<n?h:-h}return t}(p,t,f,a,o))+(d=1+Math.floor((o-p)/f.dtick))*f.dtick;else for(\"M\"===f.dtick.charAt(0)&&(p=function(t,e,r,n,i){var a=v.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=I.tickIncrement(t,\"M6\",\"reverse\")+1.5*T:a.exactMonths>.8?t=I.tickIncrement(t,\"M1\",\"reverse\")+15.5*T:t-=T/2;var s=I.tickIncrement(t,r);if(s<=n)return s}return t}(p,t,f.dtick,a,i)),h=p,d=0;h<=o;)h=I.tickIncrement(h,f.dtick,!1,i),d++;return{start:e.c2r(p,0,i),end:e.c2r(h,0,i),size:f.dtick,_count:d}},I.calcTicks=function(t){var e=v.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=v.constrain(t._length/r,4,9)+1),\"radialaxis\"===t._name&&(n*=2)),\"array\"===t.tickmode&&(n*=100),I.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),o(t),\"array\"===t.tickmode)return function(t){var e,r,n=t.tickvals,i=t.ticktext,a=new Array(n.length),o=v.simpleMap(t.range,t.r2l),l=1.0001*o[0]-1e-4*o[1],c=1.0001*o[1]-1e-4*o[0],u=Math.min(l,c),f=Math.max(l,c),h=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;r<n.length;r++)(e=d(n[r]))>u&&e<f&&(void 0===i[r]?a[h]=I.tickText(t,e):a[h]=s(t,e,String(i[r])),h++);return h<n.length&&a.splice(h,n.length-h),a}(t);t._tmin=I.tickFirst(t);var i=e[1]<e[0],a=[],l=1.0001*e[1]-1e-4*e[0];\"category\"===t.type&&(l=i?Math.max(-.5,l):Math.min(t._categories.length-.5,l));for(var c=null,u=Math.max(1e3,t._length||0),f=t._tmin;(i?f>=l:f<=l)&&!(a.length>u||f===c);f=I.tickIncrement(f,t.dtick,i,t.calendar))c=f,a.push(f);\"angular\"===t._id&&360===Math.abs(e[1]-e[0])&&a.pop(),t._tmax=a[a.length-1],t._prevDateHead=\"\",t._inCalcTicks=!0;for(var h=new Array(a.length),d=0;d<a.length;d++)h[d]=I.tickText(t,a[d]);return t._inCalcTicks=!1,h};var R=[2,5,10],N=[1,2,3,6,12],j=[1,2,5,10,15,30],B=[1,2,3,7,14],U=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],V=[-.301,0,.301,.699,1],q=[15,30,45,90,180];I.autoTicks=function(t,e){function r(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}var n;if(\"date\"===t.type){t.tick0=v.dateTick0(t.calendar);var i=2*e;i>k?(e/=k,n=r(10),t.dtick=\"M\"+12*a(e,n,R)):i>A?(e/=A,t.dtick=\"M\"+a(e,1,N)):i>T?(t.dtick=a(e,T,B),t.tick0=v.dateTick0(t.calendar,!0)):i>S?t.dtick=a(e,S,N):i>E?t.dtick=a(e,E,j):i>L?t.dtick=a(e,L,j):(n=r(10),t.dtick=a(e,n,R))}else if(\"log\"===t.type){t.tick0=0;var o=v.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(o[1]-o[0])<1){var s=1.5*Math.abs((o[1]-o[0])/e);e=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/s,n=r(10),t.dtick=\"L\"+a(e,n,R)}else t.dtick=e>.3?\"D2\":\"D1\"}else\"category\"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):\"angular\"===t._id?(t.tick0=0,n=1,t.dtick=a(e,n,q)):(t.tick0=0,n=r(10),t.dtick=a(e,n,R));if(0===t.dtick&&(t.dtick=1),!m(t.dtick)&&\"string\"!=typeof t.dtick){var l=t.dtick;throw t.dtick=1,\"ax.dtick error: \"+String(l)}},I.tickIncrement=function(t,e,r,n){var i=r?-1:1;if(m(e))return t+i*e;var a=e.charAt(0),o=i*Number(e.substr(1));if(\"M\"===a)return v.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,c=v.roundUp(v.mod(l,1),s,r);return Math.floor(l)+Math.log(p.round(Math.pow(10,c),1))/Math.LN10}throw\"unrecognized dtick \"+String(e)},I.tickFirst=function(t){var e=t.r2l||Number,r=v.simpleMap(t.range,e),n=r[1]<r[0],i=n?Math.floor:Math.ceil,a=1.0001*r[0]-1e-4*r[1],o=t.dtick,s=e(t.tick0);if(m(o)){var l=i((a-s)/o)*o+s;return\"category\"===t.type&&(l=v.constrain(l,0,t._categories.length-1)),l}var c=o.charAt(0),u=Number(o.substr(1));if(\"M\"===c){for(var f,h,d,g=0,y=s;g<10;){if(((f=I.tickIncrement(y,o,n,t.calendar))-a)*(y-a)<=0)return n?Math.min(y,f):Math.max(y,f);h=(a-(y+f)/2)/(f-y),d=c+(Math.abs(Math.round(h))||1)*u,y=I.tickIncrement(y,d,h<0?!n:n,t.calendar),g++}return v.error(\"tickFirst did not converge\",t),y}if(\"L\"===c)return Math.log(i((Math.pow(10,a)-s)/u)*u+s)/Math.LN10;if(\"D\"===c){var x=\"D2\"===o?V:U,b=v.roundUp(v.mod(a,1),x,n);return Math.floor(a)+Math.log(p.round(Math.pow(10,b),1))/Math.LN10}throw\"unrecognized dtick \"+String(o)},I.tickText=function(t,e,r){function n(n){var i;return void 0===n||(r?\"none\"===n:(i={first:t._tmin,last:t._tmax}[n],\"all\"!==n&&e!==i))}var i,a,o=s(t,e),h=\"array\"===t.tickmode,d=r||h,p=\"category\"===t.type?t.d2l_noadd:t.d2l;if(h&&Array.isArray(t.ticktext)){var g=v.simpleMap(t.range,t.r2l),y=Math.abs(g[1]-g[0])/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-p(t.tickvals[a]))<y);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}return i=r?\"never\":\"none\"!==t.exponentformat&&n(t.showexponent)?\"hide\":\"\",\"date\"===t.type?function(t,e,r,n){var i=t._tickround,a=r&&t.hoverformat||I.getTickFormat(t);n&&(i=m(i)?4:{y:\"m\",m:\"d\",d:\"M\",M:\"S\",S:4}[i]);var o,s=v.formatDate(e.x,a,i,t._dateFormat,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+=\"<br>\"+o,t._prevDateHead=o)),e.text=s}(t,o,r,d):\"log\"===t.type?function(t,e,r,n,i){var a=t.dtick,o=e.x,s=t.tickformat;if(\"never\"===i&&(i=\"\"),!n||\"string\"==typeof a&&\"L\"===a.charAt(0)||(a=\"L3\"),s||\"string\"==typeof a&&\"L\"===a.charAt(0))e.text=f(Math.pow(10,o),t,i,n);else if(m(a)||\"D\"===a.charAt(0)&&v.mod(o+.01,1)<.1){var l=Math.round(o);-1!==[\"e\",\"E\",\"power\"].indexOf(t.exponentformat)||c(t.exponentformat)&&u(l)?(e.text=0===l?1:1===l?\"10\":l>1?\"10<sup>\"+l+\"</sup>\":\"10<sup>\"+C+-l+\"</sup>\",e.fontSize*=1.25):(e.text=f(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,v.mod(o,1)))),e.fontSize*=.75}if(\"D1\"===t.dtick){var h=String(e.text).charAt(0);\"0\"!==h&&\"1\"!==h||(\"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)))}}(t,o,0,d,i):\"category\"===t.type?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=\"\"),e.text=String(r)}(t,o):\"angular\"===t._id?l(t,o,r,d,i):function(t,e,r,n,i){\"never\"===i?i=\"\":\"all\"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i=\"hide\"),e.text=f(e.x,t,i,n)}(t,o,0,d,i),t.tickprefix&&!n(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!n(t.showticksuffix)&&(o.text+=t.ticksuffix),o},I.hoverLabelText=function(t,e,r){if(r!==z&&r!==e)return I.hoverLabelText(t,e)+\" - \"+I.hoverLabelText(t,r);var n=\"log\"===t.type&&e<=0,i=I.tickText(t,t.c2l(n?-e:e),\"hover\").text;return n?0===e?\"0\":C+i:i};var H=[\"f\",\"p\",\"n\",\"\\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\"];I.getTickFormat=function(t){function e(t){return\"string\"!=typeof t?t:Number(t.replace(\"M\",\"\"))*A}function r(t,e){var r=[\"L\",\"D\"];if(typeof t==typeof e){if(\"number\"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,\"\"))-Number(e.replace(/(L|D)/g,\"\")):n-i}return\"number\"==typeof t?1:-1}function n(t,e,r){var n=r||function(t){return t},i=e[0],a=e[1];return(!i&&\"number\"!=typeof i||n(i)<=n(t))&&(!a&&\"number\"!=typeof a||n(a)>=n(t))}function i(t,e){var n=null===e[0],i=null===e[1],a=r(t,e[0])>=0,o=r(t,e[1])<=0;return(n||a)&&(i||o)}var a,o;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case\"date\":case\"linear\":for(a=0;a<t.tickformatstops.length;a++)if(n(t.dtick,t.tickformatstops[a].dtickrange,e)){o=t.tickformatstops[a];break}break;case\"log\":for(a=0;a<t.tickformatstops.length;a++)if(i(t.dtick,t.tickformatstops[a].dtickrange)){o=t.tickformatstops[a];break}}return o?o.value:t.tickformat},I.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?I.findSubplotsWithAxis(n,e):n;return i.sort(function(t,e){var r=t.substr(1).split(\"y\"),n=e.substr(1).split(\"y\");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]}),i},I.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(\"x\"===e._id.charAt(0)?\"^\"+e._id+\"y\":e._id+\"$\"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},I.makeClipPaths=function(t){var e,r,n=t._fullLayout,i={_offset:0,_length:n.width,_id:\"\"},a={_offset:0,_length:n.height,_id:\"\"},o=I.list(t,\"x\",!0),s=I.list(t,\"y\",!0),l=[];for(e=0;e<o.length;e++)for(l.push({x:o[e],y:a}),r=0;r<s.length;r++)0===e&&l.push({x:i,y:s[r]}),l.push({x:o[e],y:s[r]});var c=n._clips.selectAll(\".axesclip\").data(l,function(t){return t.x._id+t.y._id});c.enter().append(\"clipPath\").classed(\"axesclip\",!0).attr(\"id\",function(t){return\"clip\"+n._uid+t.x._id+t.y._id}).append(\"rect\"),c.exit().remove(),c.each(function(t){p.select(this).select(\"rect\").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})})},I.doTicks=function(t,e,r){function n(t){var e=c.l2p(t.x);return e>1&&e<c._length-1}function i(t,e){var r=t.selectAll(\"path.\"+L).data(\"inside\"===c.ticks?H:S,E);e&&c.ticks?(r.enter().append(\"path\").classed(L,1).classed(\"ticks\",1).classed(\"crisp\",1).call(b.stroke,c.tickcolor).style(\"stroke-width\",B+\"px\").attr(\"d\",e),r.attr(\"transform\",d),r.exit().remove()):r.remove()}function a(r,n){function i(t,e){t.each(function(t){var r=h(e,t),n=p.select(this),i=n.select(\".text-math-group\"),a=d(t)+(m(e)&&0!=+e?\" rotate(\"+e+\",\"+l(t)+\",\"+(f(t)-t.fontSize/2)+\")\":\"\");if(i.empty())n.select(\"text\").attr({transform:a,\"text-anchor\":r});else{var o=_.bBox(i.node()).width*{end:-.5,start:.5}[r];i.attr(\"transform\",a+(o?\"translate(\"+o+\",0)\":\"\"))}})}function a(){function e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[1])}if(c.showticklabels){var n=t.getBoundingClientRect(),i=r.node().getBoundingClientRect();c._boundingBox={width:i.width,height:i.height,left:i.left-n.left,right:i.right-n.left,top:i.top-n.top,bottom:i.bottom-n.top}}else{var a,o=u._size;\"x\"===A?(a=\"free\"===c.anchor?o.t+o.h*(1-c.position):o.t+o.h*(1-c._anchorAxis.domain[{bottom:0,top:1}[c.side]]),c._boundingBox={top:a,bottom:a,left:c._offset,right:c._offset+c._length,width:c._length,height:0}):(a=\"free\"===c.anchor?o.l+o.w*c.position:o.l+o.w*c._anchorAxis.domain[{left:0,right:1}[c.side]],c._boundingBox={left:a,right:a,bottom:c._offset+c._length,top:c._offset,height:c._length,width:0})}if(M){var s=c._counterSpan=[1/0,-1/0];for(k=0;k<M.length;k++){var l=u._plots[M[k]][\"x\"===A?\"yaxis\":\"xaxis\"];e(s,[l._offset,l._offset+l._length])}\"free\"===c.anchor&&e(s,\"x\"===A?[c._boundingBox.bottom,c._boundingBox.top]:[c._boundingBox.right,c._boundingBox.left])}}var s=r.selectAll(\"g.\"+L).data(S,E);if(!m(n))return s.remove(),void o();if(!c.showticklabels)return s.remove(),o(),void a();var l,f,h,g,x;\"x\"===A?(l=function(t){return t.dx+R*x},g=n+(F+P)*(x=\"bottom\"===V?1:-1),f=function(t){return t.dy+g+t.fontSize*(\"bottom\"===V?1:-.2)},h=function(t){return m(t)&&0!==t&&180!==t?t*x<0?\"end\":\"start\":\"middle\"}):\"y\"===A?(x=\"right\"===V?1:-1,f=function(t){return t.dy+t.fontSize*D-R*x},l=function(t){return t.dx+n+(F+P+(90===Math.abs(c.tickangle)?t.fontSize/2:0))*x},h=function(t){return m(t)&&90===Math.abs(t)?\"middle\":\"right\"===V?\"start\":\"end\"}):\"angular\"===e&&(c._labelShift=R,c._labelStandoff=F,c._pad=P,l=c._labelx,f=c._labely,h=c._labelanchor);var b=0,w=0,T=[];s.enter().append(\"g\").classed(L,1).append(\"text\").attr(\"text-anchor\",\"middle\").each(function(e){var r=p.select(this),n=t._promises.length;r.call(y.positionText,l(e),f(e)).call(_.font,e.font,e.fontSize,e.fontColor).text(e.text).call(y.convertToTspans,t),(n=t._promises[n])?T.push(t._promises.pop().then(function(){i(r,c.tickangle)})):i(r,c.tickangle)}),s.exit().remove(),s.each(function(t){b=Math.max(b,t.fontSize)}),\"angular\"===e&&s.each(function(t){p.select(this).select(\"text\").call(y.positionText,l(t),f(t))}),i(s,c._lastangle||c.tickangle);var C=v.syncOrAsync([function(){return T.length&&Promise.all(T)},function(){if(i(s,c.tickangle),\"x\"===A&&!m(c.tickangle)&&(\"log\"!==c.type||\"D\"!==String(c.dtick).charAt(0))){var t=[];for(s.each(function(e){var r=p.select(this),n=r.select(\".text-math-group\"),i=c.l2p(e.x);n.empty()&&(n=r.select(\"text\"));var a=_.bBox(n.node());t.push({top:0,bottom:10,height:10,left:i-a.width/2,right:i+a.width/2+2,width:a.width+2})}),k=0;k<t.length-1;k++)if(v.bBoxIntersect(t[k],t[k+1])){w=30;break}w&&(Math.abs((S[S.length-1].x-S[0].x)*c._m)/(S.length-1)<2.5*b&&(w=90),i(s,w)),c._lastangle=w}return o(),e+\" done\"},a]);return C&&C.then&&t._promises.push(C),C}function o(){if(!r){var n,i,a,o,s=O.getFromId(t,e),l=p.select(t).selectAll(\"g.\"+e+\"tick\"),c={selection:l,side:s.side},f=e.charAt(0),h=t._fullLayout._size,d=s.titlefont.size;if(l.size()){var m=_.getTranslate(l.node().parentNode);c.offsetLeft=m.x,c.offsetTop=m.y}var g=10+1.5*d+(s.linewidth?s.linewidth-1:0);\"x\"===f?(i=\"free\"===s.anchor?{_offset:h.t+(1-(s.position||0))*h.h,_length:0}:O.getFromId(t,s.anchor),a=s._offset+s._length/2,o=\"top\"===s.side?-g-d*(s.showticklabels?1:0):i._length+g+d*(s.showticklabels?1.5:.5),o+=i._offset,s.rangeslider&&s.rangeslider.visible&&s._boundingBox&&(o+=(u.height-u.margin.b-u.margin.t)*s.rangeslider.thickness+s._boundingBox.height),c.side||(c.side=\"bottom\")):(i=\"free\"===s.anchor?{_offset:h.l+(s.position||0)*h.w,_length:0}:O.getFromId(t,s.anchor),o=s._offset+s._length/2,a=\"right\"===s.side?i._length+g+d*(s.showticklabels?1:.5):-g-d*(s.showticklabels?.5:0),a+=i._offset,n={rotate:\"-90\",offset:0},c.side||(c.side=\"left\")),x.draw(t,e+\"title\",{propContainer:s,propName:s._name+\".title\",placeholder:u._dfltTitle[f],avoid:c,transform:n,attributes:{x:a,y:o,\"text-anchor\":\"middle\"}})}}function s(t,e){return!0===t.visible&&t.xaxis+t.yaxis===e&&(!(!g.traceIs(t,\"bar\")||t.orientation!=={x:\"h\",y:\"v\"}[A])||t.fill&&t.fill.charAt(t.fill.length-1)===A)}function l(r,i,a){var o=r.gridlayer.selectAll(\".\"+e),l=r.zerolinelayer,u=r[\"hidegrid\"+A]?[]:H,f=c._gridpath||(\"x\"===A?\"M0,\"+i._offset+\"v\":\"M\"+i._offset+\",0h\")+i._length,h=o.selectAll(\"path.\"+C).data(!1===c.showgrid?[]:u,E);if(h.enter().append(\"path\").classed(C,1).classed(\"crisp\",1).attr(\"d\",f).each(function(t){c.zeroline&&(\"linear\"===c.type||\"-\"===c.type)&&Math.abs(t.x)<c.dtick/100&&p.select(this).remove()}),h.attr(\"transform\",d).call(b.stroke,c.gridcolor||\"#ddd\").style(\"stroke-width\",N+\"px\"),\"function\"==typeof f&&h.attr(\"d\",f),h.exit().remove(),l){for(var m=!1,g=0;g<t._fullData.length;g++)if(s(t._fullData[g],a)){m=!0;break}var y=v.simpleMap(c.range,c.r2l),x=y[0]*y[1]<=0&&c.zeroline&&(\"linear\"===c.type||\"-\"===c.type)&&u.length&&(m||n({x:0})||!c.showline),_=l.selectAll(\"path.\"+z).data(x?[{x:0,id:e}]:[]);_.enter().append(\"path\").classed(z,1).classed(\"zl\",1).classed(\"crisp\",1).attr(\"d\",f).each(function(){l.selectAll(\"path\").sort(function(t,e){return O.idSort(t.id,e.id)})}),_.attr(\"transform\",d).call(b.stroke,c.zerolinecolor||b.defaultLine).style(\"stroke-width\",j+\"px\"),_.exit().remove()}}var c,u=t._fullLayout,f=!1;if(\"object\"==typeof e)e=(c=e)._id,f=!0;else if(c=I.getFromId(t,e),\"redraw\"===e&&u._paper.selectAll(\"g.subplot\").each(function(t){var e=u._plots[t],r=e.xaxis,n=e.yaxis;e.xaxislayer.selectAll(\".\"+r._id+\"tick\").remove(),e.yaxislayer.selectAll(\".\"+n._id+\"tick\").remove(),e.gridlayer.selectAll(\"path\").remove(),e.zerolinelayer.selectAll(\"path\").remove(),u._infolayer.select(\".g-\"+r._id+\"title\").remove(),u._infolayer.select(\".g-\"+n._id+\"title\").remove()}),!e||\"redraw\"===e)return v.syncOrAsync(I.list(t,\"\",!0).map(function(r){return function(){if(r._id){var n=I.doTicks(t,r._id);return\"redraw\"===e&&(r._r=r.range.slice(),r._rl=v.simpleMap(r._r,r.r2l)),n}}}));c.tickformat||(-1===[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"].indexOf(c.exponentformat)&&(c.exponentformat=\"e\"),-1===[\"all\",\"first\",\"last\",\"none\"].indexOf(c.showexponent)&&(c.showexponent=\"all\")),c.setScale();var h,d,w,M,k,A=e.charAt(0),T=I.counterLetter(e),S=I.calcTicks(c),E=function(t){return[t.text,t.x,c.mirror,t.font,t.fontSize,t.fontColor].join(\"_\")},L=e+\"tick\",C=e+\"grid\",z=e+\"zl\",P=(c.linewidth||1)/2,F=\"outside\"===c.ticks?c.ticklen:0,R=0,N=_.crispRound(t,c.gridwidth,1),j=_.crispRound(t,c.zerolinewidth,N),B=_.crispRound(t,c.tickwidth,1);if(c._counterangle&&\"outside\"===c.ticks){var U=c._counterangle*Math.PI/180;F=c.ticklen*Math.cos(U)+1,R=c.ticklen*Math.sin(U)}if(c.showticklabels&&(\"outside\"===c.ticks||c.showline)&&(F+=.2*c.tickfont.size),\"x\"===A)h=[\"bottom\",\"top\"],d=c._transfn||function(t){return\"translate(\"+(c._offset+c.l2p(t.x))+\",0)\"},w=function(t,e){if(c._counterangle){var r=c._counterangle*Math.PI/180;return\"M0,\"+t+\"l\"+Math.sin(r)*e+\",\"+Math.cos(r)*e}return\"M0,\"+t+\"v\"+e};else if(\"y\"===A)h=[\"left\",\"right\"],d=c._transfn||function(t){return\"translate(0,\"+(c._offset+c.l2p(t.x))+\")\"},w=function(t,e){if(c._counterangle){var r=c._counterangle*Math.PI/180;return\"M\"+t+\",0l\"+Math.cos(r)*e+\",\"+-Math.sin(r)*e}return\"M\"+t+\",0h\"+e};else{if(\"angular\"!==e)return void v.warn(\"Unrecognized doTicks axis:\",e);h=[\"left\",\"right\"],d=c._transfn,w=function(t,e){return\"M\"+t+\",0h\"+e}}var V=c.side||h[0],q=[-1,1,V===h[1]?1:-1];if(\"inside\"!==c.ticks==(\"x\"===A)&&(q=q.map(function(t){return-t})),c.visible){c._tickFilter&&(S=S.filter(c._tickFilter));var H=S.filter(n);if(\"angular\"===c._id&&(H=S),f){if(i(c._axislayer,w(c._pos+P*q[2],q[2]*c.ticklen)),c._counteraxis){l({gridlayer:c._gridlayer,zerolinelayer:c._zerolinelayer},c._counteraxis)}return a(c._axislayer,c._pos)}if(u._has(\"cartesian\")){var G={};(M=I.getSubplots(t,c)).map(function(t){var e=u._plots[t],r=e[T+\"axis\"],n=r._mainAxis._id;G[n]||(G[n]=1,l(e,r,t))});var Y=c._mainSubplot,W=u._plots[Y],X=[];if(c.ticks){var Z=q[2],J=w(c._mainLinePosition+P*Z,Z*c.ticklen);c._anchorAxis&&c.mirror&&!0!==c.mirror&&(J+=w(c._mainMirrorPosition-P*Z,-Z*c.ticklen)),i(W[A+\"axislayer\"],J),X=Object.keys(c._linepositions)}X.map(function(t){function e(t){var e=q[t];return w(n[t]+P*e,e*c.ticklen)}var r=u._plots[t][A+\"axislayer\"],n=c._linepositions[t]||[];i(r,e(0)+e(1))});return a(W[A+\"axislayer\"],c._mainLinePosition)}}},I.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],h(c.x,l.x),h(c.y,l.y);h(c.x,[o]),h(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)d(t,r[n].x,r[n].y)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/titles\":709,\"../../constants/alignment\":716,\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../registry\":873,\"./axis_autotype\":790,\"./axis_ids\":792,\"./set_convert\":808,d3:128,\"fast-isnumeric\":140}],790:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){return function(t,e){for(var r,a=0,o=0,s=Math.max(1,(t.length-1)/1e3),l=0;l<t.length;l+=s)r=t[Math.round(l)],i.isDateTime(r,e)&&(a+=1),n(r)&&(o+=1);return a>2*o}(t,e)?\"date\":function(t){for(var e,r=Math.max(1,(t.length-1)/1e3),n=0,o=0,s=0;s<t.length;s+=r)e=t[Math.round(s)],i.cleanNumber(e)!==a?n++:\"string\"==typeof e&&\"\"!==e&&\"None\"!==e&&o++;return o>2*n}(t)?\"category\":function(t){if(!t)return!1;for(var e=0;e<t.length;e++)if(n(t[e]))return!0;return!1}(t)?\"linear\":\"-\"}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],791:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"./layout_attributes\"),o=t(\"./tick_value_defaults\"),s=t(\"./tick_mark_defaults\"),l=t(\"./tick_label_defaults\"),c=t(\"./category_order_defaults\"),u=t(\"./line_grid_defaults\"),f=t(\"./set_convert\"),h=t(\"./ordered_categories\");e.exports=function(t,e,r,d,p){var m=d.letter,g=d.font||{},v=r(\"visible\",!d.cheateronly),y=e.type;if(\"date\"===y){n.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",d.calendar)}f(e,p);if(r(\"autorange\",!e.isValidRange(t.range))&&r(\"rangemode\"),r(\"range\"),e.cleanRange(),c(t,e,r),e._initialCategories=\"category\"===y?h(m,e.categoryorder,e.categoryarray,d.data):[],!v)return e;var x=r(\"color\"),b=x===t.color?x:g.color;return r(\"title\",p._dfltTitle[m]),i.coerceFont(r,\"titlefont\",{family:g.family,size:Math.round(1.2*g.size),color:b}),o(t,e,r,y),l(t,e,r,y,d),s(t,e,r,d),u(t,e,r,{dfltColor:x,bgColor:d.bgColor,showGrid:d.showGrid,attributes:a}),(e.showline||e.ticks)&&r(\"mirror\"),e}},{\"../../lib\":743,\"../../registry\":873,\"./category_order_defaults\":793,\"./layout_attributes\":801,\"./line_grid_defaults\":803,\"./ordered_categories\":804,\"./set_convert\":808,\"./tick_label_defaults\":809,\"./tick_mark_defaults\":810,\"./tick_value_defaults\":811}],792:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"./constants\");r.id2name=function(t){if(\"string\"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.substr(1);return\"1\"===e&&(e=\"\"),t.charAt(0)+\"axis\"+e}},r.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),t.charAt(0)+e}},r.cleanId=function(t,e){if(t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)){var r=t.substr(1).replace(/^0+/,\"\");return\"1\"===r&&(r=\"\"),t.charAt(0)+r}},r.list=function(t,e,n){var i=t._fullLayout;if(!i)return[];var a,o=r.listIds(t,e),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+\"axis\"+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a<c.length;a++){var u=i[c[a]];e?s.push(u[e+\"axis\"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+\"axis\"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(t,e,n){var i=t._fullLayout;return\"x\"===n?e=e.replace(/y[0-9]*/,\"\"):\"y\"===n&&(e=e.replace(/x[0-9]*/,\"\")),i[r.id2name(e)]},r.getFromTrace=function(t,e,i){var a=t._fullLayout,o=null;if(n.traceIs(e,\"gl3d\")){var s=e.scene;\"scene\"===s.substr(0,5)&&(o=a[s][i+\"axis\"])}else o=r.getFromId(t,e[i+\"axis\"]||i);return o},r.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)}},{\"../../registry\":873,\"./constants\":794}],793:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(\"category\"===e.type){var n,i=t.categoryarray,a=Array.isArray(i)&&i.length>0;a&&(n=\"array\");var o=r(\"categoryorder\",n);\"array\"===o&&r(\"categoryarray\"),a||\"array\"!==o||(e.categoryorder=\"trace\")}}},{}],794:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").counterRegex;e.exports={idRegex:{x:n(\"x\"),y:n(\"y\")},attrRegex:n(\"[xy]axis\"),xAxisMatch:n(\"xaxis\"),yAxisMatch:n(\"yaxis\"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:\"-select\",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:[\"imagelayer\",\"maplayer\",\"barlayer\",\"carpetlayer\",\"violinlayer\",\"boxlayer\",\"scatterlayer\"],layerValue2layerClass:{\"above traces\":\"above\",\"below traces\":\"below\"}}},{\"../../lib\":743}],795:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./axis_ids\").id2name;e.exports=function(t,e,r,a,o){var s=o._axisConstraintGroups,l=e._id,c=l.charAt(0);if(!e.fixedrange&&(r(\"constrain\"),n.coerce(t,e,{constraintoward:{valType:\"enumerated\",values:\"x\"===c?[\"left\",\"center\",\"right\"]:[\"bottom\",\"middle\",\"top\"],dflt:\"x\"===c?\"center\":\"middle\"}},\"constraintoward\"),t.scaleanchor)){var u=function(t,e,r,n){var a,o,s,l,c=n[i(e)].type,u=[];for(o=0;o<r.length;o++)(s=r[o])!==e&&((l=n[i(s)]).type!==c||l.fixedrange||u.push(s));for(a=0;a<t.length;a++)if(t[a][e]){var f=t[a],h=[];for(o=0;o<u.length;o++)f[s=u[o]]||h.push(s);return{linkableAxes:h,thisGroup:f}}return{linkableAxes:u,thisGroup:null}}(s,l,a,o),f=n.coerce(t,e,{scaleanchor:{valType:\"enumerated\",values:u.linkableAxes}},\"scaleanchor\");if(f){var h=r(\"scaleratio\");h||(h=e.scaleratio=1),function(t,e,r,n,i){var a,o,s,l,c;null===e?((e={})[r]=1,c=t.length,t.push(e)):c=t.indexOf(e);var u=Object.keys(e);for(a=0;a<t.length;a++)if(s=t[a],a!==c&&s[n]){var f=s[n];for(o=0;o<u.length;o++)s[l=u[o]]=f*i*e[l];return void t.splice(c,1)}if(1!==i)for(o=0;o<u.length;o++)e[u[o]]*=i;e[n]=1}(s,u.thisGroup,l,f,h)}else-1!==a.indexOf(t.scaleanchor)&&n.warn(\"ignored \"+e._name+'.scaleanchor: \"'+t.scaleanchor+'\" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the targetaxis has fixed range.')}}},{\"../../lib\":743,\"./axis_ids\":792}],796:[function(t,e,r){\"use strict\";function n(t,e){var r=t._inputDomain,n=s[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e]}var i=t(\"./axis_ids\").id2name,a=t(\"./scale_zoom\"),o=t(\"../../constants/numerical\").ALMOST_EQUAL,s=t(\"../../constants/alignment\").FROM_BL;r.enforce=function(t){var e,r,s,l,c,u,f,h=t._fullLayout,d=h._axisConstraintGroups||[];for(e=0;e<d.length;e++){var p=d[e],m=Object.keys(p),g=1/0,v=0,y=1/0,x={},b={},_=!1;for(r=0;r<m.length;r++)b[s=m[r]]=l=h[i(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),x[s]=c=Math.abs(l._m)/p[s],g=Math.min(g,c),\"domain\"!==l.constrain&&l._constraintShrinkable||(y=Math.min(y,c)),delete l._constraintShrinkable,v=Math.max(v,c),\"domain\"===l.constrain&&(_=!0);if(!(g>o*v)||_)for(r=0;r<m.length;r++)if(s=m[r],c=x[s],l=b[s],u=l.constrain,c!==y||\"domain\"===u)if(f=c/y,\"range\"===u)a(l,f);else{var w=l._inputDomain,M=(l.domain[1]-l.domain[0])/(w[1]-w[0]),k=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((f/=M)*k<1){l.domain=l._input.domain=w.slice(),a(l,f);continue}if(k<1&&(l.range=l._input.range=l._inputRange.slice(),f*=k),l.autorange&&l._min.length&&l._max.length){var A=l.r2l(l.range[0]),T=l.r2l(l.range[1]),S=(A+T)/2,E=S,L=S,C=Math.abs(T-S),z=S-C*f*1.0001,D=S+C*f*1.0001;n(l,f),l.setScale();var I,P,O=Math.abs(l._m);for(P=0;P<l._min.length;P++)(I=l._min[P].val-l._min[P].pad/O)>z&&I<E&&(E=I);for(P=0;P<l._max.length;P++)(I=l._max[P].val+l._max[P].pad/O)<D&&I>L&&(L=I);f/=(L-E)/(2*C),E=l.l2r(E),L=l.l2r(L),l.range=l._input.range=A<T?[E,L]:[L,E]}n(l,f)}}},r.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&\"domain\"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},{\"../../constants/alignment\":716,\"../../constants/numerical\":721,\"./axis_ids\":792,\"./scale_zoom\":806}],797:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i=t.draglayer.selectAll(\".\"+r).data([0]);return i.enter().append(e).classed(\"drag\",!0).classed(r,!0).style({fill:\"transparent\",\"stroke-width\":0}).attr(\"data-subplot\",t.id),i.call(S,n),i.node()}function i(t,e,r,i,a,o,s){var l=n(t,\"rect\",e,r);return y.select(l).call(A.setRect,i,a,o,s),l}function a(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return\"\"}function o(t,e,r,n,i){var a,s,l,c;for(a=0;a<t.length;a++)(s=t[a]).fixedrange||(l=s._rl[0],c=s._rl[1]-l,s.range=[s.l2r(l+c*e),s.l2r(l+c*r)],n[s._name+\".range[0]\"]=s.range[0],n[s._name+\".range[1]\"]=s.range[1]);if(i&&i.length){var u=(e+(1-r))/2;o(i,u,1-u,n)}}function s(t,e){for(var r=0;r<t.length;r++){var n=t[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)])}}function l(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 c(t,e,r){return t.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:k.background,stroke:k.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"transform\",\"translate(\"+e+\", \"+r+\")\").attr(\"d\",\"M0,0Z\")}function u(t){t.selectAll(\".select-outline\").remove()}function f(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\"),h(t,e,i,a)}function h(t,e,r,n){r||(t.transition().style(\"fill\",n>.2?\"rgba(0,0,0,0.4)\":\"rgba(255,255,255,0.3)\").duration(200),e.transition().style(\"opacity\",1).duration(200))}function d(t){y.select(t).selectAll(\".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners\").remove()}function p(t){j&&t.data&&t._context.showTips&&(w.notifier(w._(t,\"Double-click to zoom back out\"),\"long\"),j=!1)}function m(t){return\"lasso\"===t||\"select\"===t}function g(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 v(t,e){if(N){var r=void 0!==t.onwheel?\"wheel\":\"mousewheel\";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel&&(t.onmousewheel=e)}var y=t(\"d3\"),x=t(\"tinycolor2\"),b=t(\"../../plotly\"),_=t(\"../../registry\"),w=t(\"../../lib\"),M=t(\"../../lib/svg_text_utils\"),k=t(\"../../components/color\"),A=t(\"../../components/drawing\"),T=t(\"../../components/fx\"),S=t(\"../../lib/setcursor\"),E=t(\"../../components/dragelement\"),L=t(\"../../constants/alignment\").FROM_TL,C=t(\"../plots\"),z=t(\"./axes\").doTicks,D=t(\"./axis_ids\").getFromId,I=t(\"./select\"),P=t(\"./scale_zoom\"),O=t(\"./constants\"),F=O.MINDRAG,R=O.MINZOOM,N=w.eventListenerOptionsSupported(),j=!0;e.exports={makeDragBox:function(t,e,r,n,h,k,S,N){function j(){X=[e.xaxis],Z=[e.yaxis];var r=X[0],n=Z[0];Q=r._length,$=n._length;var i=ot._axisConstraintGroups,o=[r._id],s=[n._id];W=[e].concat(S&&N?e.overlays:[]);for(var l=1;l<W.length;l++){var c=W[l].xaxis,u=W[l].yaxis;-1===X.indexOf(c)&&(X.push(c),o.push(c._id)),-1===Z.indexOf(u)&&(Z.push(u),s.push(u._id))}tt=a(X,N),et=a(Z,S),rt=function(t,e){return t?\"nsew\"===t?\"pan\"===e?\"move\":\"crosshair\":t.toLowerCase()+\"-resize\":\"pointer\"}(et+tt,ot.dragmode),J=r._offset,K=n._offset;var f=function(t,e,r){var n,i,a,o,s,l,c=!1,u={},f={};for(n=0;n<t.length;n++){for(o=t[n],i=0;i<e.length;i++)if(o[e[i]]){for(s in o)-1===(\"x\"===s.charAt(0)?e:r).indexOf(s)&&(u[s]=1);for(a=0;a<r.length;a++)o[r[a]]&&(c=!0)}for(i=0;i<r.length;i++)if(o[r[i]])for(l in o)-1===(\"x\"===l.charAt(0)?e:r).indexOf(l)&&(f[l]=1)}return c&&(w.extendFlat(u,f),f={}),{x:u,y:f,xy:c}}(i,o,s);nt=f.xy,it=[];for(var h in f.x)it.push(D(t,h));at=[];for(var d in f.y)at.push(D(t,d))}function B(e,r){function n(){xt=\"\",mt.r=mt.l,mt.t=mt.b,_t.attr(\"d\",\"M0,0Z\")}if(t._transitioningWithDuration)return!1;var i=Math.max(0,Math.min(Q,e+dt)),a=Math.max(0,Math.min($,r+pt)),o=Math.abs(i-dt),s=Math.abs(a-pt);mt.l=Math.min(dt,i),mt.r=Math.max(dt,i),mt.t=Math.min(pt,a),mt.b=Math.max(pt,a),nt?o>R||s>R?(xt=\"xy\",o/Q>s/$?(s=o*$/Q,pt>a?mt.t=pt-s:mt.b=pt+s):(o=s*Q/$,dt>i?mt.l=dt-o:mt.r=dt+o),_t.attr(\"d\",g(mt))):n():!et||s<Math.min(Math.max(.6*o,F),R)?o<F?n():(mt.t=0,mt.b=$,xt=\"x\",_t.attr(\"d\",function(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\"}(mt,pt))):!tt||o<Math.min(.6*s,R)?(mt.l=0,mt.r=Q,xt=\"y\",_t.attr(\"d\",function(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\"}(mt,dt))):(xt=\"xy\",_t.attr(\"d\",g(mt))),mt.w=mt.r-mt.l,mt.h=mt.b-mt.t,f(bt,_t,mt,vt,yt,gt),yt=!0}function U(){if(Math.min(mt.h,mt.w)<2*F)return d(t);\"xy\"!==xt&&\"x\"!==xt||o(X,mt.l/Q,mt.r/Q,wt,it),\"xy\"!==xt&&\"y\"!==xt||o(Z,($-mt.b)/$,($-mt.t)/$,wt,at),d(t),G(),p(t)}function V(e){function r(t,e,r){if(!t.fixedrange){var n=w.simpleMap(t.range,t.r2l),i=n[0]+(n[1]-n[0])*e;t.range=n.map(function(e){return t.l2r(i+(e-i)*r)})}}if(t._context.scrollZoom||ot._enablescrollzoom){if(t._transitioningWithDuration)return w.pauseEvent(e);var n=t.querySelector(\".plotly\");if(j(),!(n.scrollHeight-n.clientHeight>10||n.scrollWidth-n.clientWidth>10)){clearTimeout(kt);var i=-e.deltaY;if(isFinite(i)||(i=e.wheelDelta/10),isFinite(i)){var a,o=Math.exp(-Math.min(Math.max(i,-20),20)/200),s=Tt.draglayer.select(\".nsewdrag\").node().getBoundingClientRect(),l=(e.clientX-s.left)/s.width,c=(s.bottom-e.clientY)/s.height;if(N||nt){for(N||(l=.5),a=0;a<X.length;a++)r(X[a],l,o);Mt[2]*=o,Mt[0]+=Mt[2]*l*(1/o-1)}if(S||nt){for(S||(c=.5),a=0;a<Z.length;a++)r(Z[a],c,o);Mt[3]*=o,Mt[1]+=Mt[3]*(1-c)*(1/o-1)}return Y(Mt),H(S,N),kt=setTimeout(function(){Mt=[0,0,Q,$],G()},At),w.pauseEvent(e)}w.log(\"Did not find wheel motion attributes: \",e)}}}function q(e,r){function n(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/function(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}if(!t._transitioningWithDuration){if(j(),\"ew\"===tt||\"ns\"===et)return tt&&s(X,e),et&&s(Z,r),Y([tt?-e:0,et?-r:0,Q,$]),void H(et,tt);if(nt&&tt&&et){var i=\"w\"===tt==(\"n\"===et)?1:-1,a=(e/Q+i*r/$)/2;e=a*Q,r=i*a*$}\"w\"===tt?e=n(X,0,e):\"e\"===tt?e=n(X,1,-e):tt||(e=0),\"n\"===et?r=n(Z,1,r):\"s\"===et?r=n(Z,0,-r):et||(r=0);var o=\"w\"===tt?e:0,l=\"n\"===et?r:0;if(nt){var c;if(!tt&&1===et.length){for(c=0;c<X.length;c++)X[c].range=X[c]._r.slice(),P(X[c],1-r/$);o=(e=r*Q/$)/2}if(!et&&1===tt.length){for(c=0;c<Z.length;c++)Z[c].range=Z[c]._r.slice(),P(Z[c],1-e/Q);l=(r=e*$/Q)/2}}Y([o,l,Q-e,$-r]),H(et,tt)}}function H(e,r){function n(t){for(a=0;a<t.length;a++)t[a].fixedrange||o.push(t[a]._id)}function i(n,i,s){for(a=0;a<n.length;a++){var l=n[a];if((r&&-1!==o.indexOf(l.xref)||e&&-1!==o.indexOf(l.yref))&&(i(t,a),s))return}}var a,o=[];for((r||nt)&&(n(X),n(it)),(e||nt)&&(n(Z),n(at)),wt={},a=0;a<o.length;a++){var s=o[a];z(t,s,!0);var l=D(t,s);wt[l._name+\".range[0]\"]=l.range[0],wt[l._name+\".range[1]\"]=l.range[1]}i(ot.annotations||[],_.getComponentMethod(\"annotations\",\"drawOne\")),i(ot.shapes||[],_.getComponentMethod(\"shapes\",\"drawOne\")),i(ot.images||[],_.getComponentMethod(\"images\",\"draw\"),!0)}function G(){Y([0,0,Q,$]),w.syncOrAsync([C.previousPromises,function(){b.relayout(t,wt)}],t)}function Y(t){function e(t){return t.fixedrange?0:d&&-1!==it.indexOf(t)?f:p&&-1!==(nt?it:at).indexOf(t)?h:0}function r(t,e){return e?(t.range=t._r.slice(),P(t,e),n(t,e)):0}function n(t,e){return t._length*(1-e)*L[t.constraintoward||\"middle\"]}var i,a,o,s,l,c=ot._plots,u=Object.keys(c),f=t[2]/X[0]._length,h=t[3]/Z[0]._length,d=N||nt,p=S||nt;for(ot._glcanvas&&ot._glcanvas.size()&&ot._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0})}),i=0;i<u.length;i++){var m=c[u[i]],g=m.xaxis,v=m.yaxis,y=d&&!g.fixedrange&&-1!==X.indexOf(g),x=p&&!v.fixedrange&&-1!==Z.indexOf(v);if(m._scene&&m._scene.update){var b=w.simpleMap(g.range,g.r2l),_=w.simpleMap(v.range,v.r2l);m._scene.update({range:[b[0],_[0],b[1],_[1]]})}if(y?(a=f,s=N?t[0]:n(g,a)):s=r(g,a=e(g)),x?(o=h,l=S?t[1]:n(v,o)):l=r(v,o=e(v)),a||o){a||(a=1),o||(o=1);var M=g._offset-s/a,k=v._offset-l/o;ot._defs.select(\"#\"+m.clipId+\"> rect\").call(A.setTranslate,s,l).call(A.setScale,a,o);var T=m.plot.selectAll(\".scatterlayer .trace, .boxlayer .trace, .violinlayer .trace\");m.plot.call(A.setTranslate,M,k).call(A.setScale,1/a,1/o),T.selectAll(\".point\").call(A.setPointGroupScale,a,o),T.selectAll(\".textpoint\").call(A.setTextPointsScale,a,o),T.call(A.hideOutsideRangePoints,m)}}}var W,X,Z,J,K,Q,$,tt,et,rt,nt,it,at,ot=t._fullLayout,st=t._fullLayout._zoomlayer,lt=S+N===\"nsew\",ct=1===(S+N).length;j();var ut=i(e,S+N+\"drag\",rt,r,n,h,k),ft=!et&&!tt;if(ft&&!lt)return ut.onmousedown=null,ut.style.pointerEvents=\"none\",ut;var ht={element:ut,gd:t,plotinfo:e,prepFn:function(e,r,n){var i=t._fullLayout.dragmode;ft||(lt?e.shiftKey?\"pan\"===i?i=\"zoom\":m(i)||(i=\"pan\"):e.ctrlKey&&(i=\"pan\"):i=\"pan\"),ht.minDrag=\"lasso\"===i?1:void 0,m(i)?(ht.xaxes=X,ht.yaxes=Z,I(e,r,n,ht,i)):ft?u(st):\"zoom\"===i?(ht.moveFn=B,ht.doneFn=U,ht.minDrag=1,function(e,r,n){var i=ut.getBoundingClientRect();dt=r-i.left,pt=n-i.top,mt={l:dt,r:dt,w:0,t:pt,b:pt,h:0},gt=t._hmpixcount?t._hmlumcount/t._hmpixcount:x(t._fullLayout.plot_bgcolor).getLuminance(),yt=!1,xt=\"xy\",bt=l(st,gt,J,K,vt=\"M0,0H\"+Q+\"V\"+$+\"H0V0\"),_t=c(st,J,K),u(st)}(0,r,n)):\"pan\"===i&&(ht.moveFn=q,ht.doneFn=G,u(st))},clickFn:function(r,n){if(d(t),2!==r||ct||function(){if(!t._transitioningWithDuration){var e,r,n,i=t._context.doubleClick,a=(tt?X:[]).concat(et?Z:[]),o={};if(\"reset+autosize\"===i)for(i=\"autosize\",r=0;r<a.length;r++)if((e=a[r])._rangeInitial&&(e.range[0]!==e._rangeInitial[0]||e.range[1]!==e._rangeInitial[1])||!e._rangeInitial&&!e.autorange){i=\"reset\";break}if(\"autosize\"===i)for(r=0;r<a.length;r++)(e=a[r]).fixedrange||(o[e._name+\".autorange\"]=!0);else if(\"reset\"===i)for((tt||nt)&&(a=a.concat(it)),et&&!nt&&(a=a.concat(at)),nt&&(tt?et||(a=a.concat(Z)):a=a.concat(X)),r=0;r<a.length;r++)(e=a[r])._rangeInitial?(n=e._rangeInitial,o[e._name+\".range[0]\"]=n[0],o[e._name+\".range[1]\"]=n[1]):o[e._name+\".autorange\"]=!0;t.emit(\"plotly_doubleclick\",null),b.relayout(t,o)}}(),lt)T.click(t,n,e.id);else if(1===r&&ct){var i=S?Z[0]:X[0],a=\"s\"===S||\"w\"===N?0:1,o=i._name+\".range[\"+a+\"]\",s=function(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,y.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,y.format(\".\"+String(r)+\"g\")(n))}(i,a),l=\"left\",c=\"middle\";if(i.fixedrange)return;S?(c=\"n\"===S?\"top\":\"bottom\",\"right\"===i.side&&(l=\"right\")):\"e\"===N&&(l=\"right\"),t._context.showAxisRangeEntryBoxes&&y.select(ut).call(M.makeEditable,{gd:t,immediate:!0,background:ot.paper_bgcolor,text:String(s),fill:i.tickfont?i.tickfont.color:\"#444\",horizontalAlign:l,verticalAlign:c}).on(\"edit\",function(e){var r=i.d2r(e);void 0!==r&&b.relayout(t,o,r)})}}};E.init(ht);var dt,pt,mt,gt,vt,yt,xt,bt,_t,wt={},Mt=[0,0,Q,$],kt=null,At=O.REDRAWDELAY,Tt=e.mainplot?ot._plots[e.mainplot]:e;return S.length*N.length!=1&&v(ut,V),ut},makeDragger:n,makeRectDragger:i,makeZoombox:l,makeCorners:c,updateZoombox:f,xyCorners:g,transitionZoombox:h,removeZoombox:d,clearSelect:u,showDoubleClickNotifier:p,attachWheelEventHandler:v}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/setcursor\":762,\"../../lib/svg_text_utils\":766,\"../../plotly\":784,\"../../registry\":873,\"../plots\":852,\"./axes\":789,\"./axis_ids\":792,\"./constants\":794,\"./scale_zoom\":806,\"./select\":807,d3:128,tinycolor2:546}],798:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../components/dragelement\"),a=t(\"./constants\"),o=t(\"./dragbox\").makeDragBox;e.exports=function(t){var e=t._fullLayout;if((e._has(\"cartesian\")||e._has(\"gl2d\"))&&!t._context.staticPlot){Object.keys(e._plots||{}).sort(function(t,r){if((e._plots[t].mainplot&&!0)===(e._plots[r].mainplot&&!0)){var n=t.split(\"y\"),i=r.split(\"y\");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return e._plots[t].mainplot?1:-1}).forEach(function(r){var s=e._plots[r],l=s.xaxis,c=s.yaxis,u=a.DRAGGERSIZE;if(!s.mainplot){var f=o(t,s,l._offset,c._offset,l._length,c._length,\"ns\",\"ew\");f.onmousemove=function(e){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===r&&n.hover(t,e,r)},n.hover(t,e,r),t._fullLayout._lasthover=f,t._fullLayout._hoversubplot=r},f.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,i.unhover(t,e))},t._context.showAxisDragHandles&&(o(t,s,l._offset-u,c._offset-u,u,u,\"n\",\"w\"),o(t,s,l._offset+l._length,c._offset-u,u,u,\"n\",\"e\"),o(t,s,l._offset-u,c._offset+c._length,u,u,\"s\",\"w\"),o(t,s,l._offset+l._length,c._offset+c._length,u,u,\"s\",\"e\"))}if(t._context.showAxisDragHandles){if(r===l._mainSubplot){var h=l._mainLinePosition;\"top\"===l.side&&(h-=u),o(t,s,l._offset+.1*l._length,h,.8*l._length,u,\"\",\"ew\"),o(t,s,l._offset,h,.1*l._length,u,\"\",\"w\"),o(t,s,l._offset+.9*l._length,h,.1*l._length,u,\"\",\"e\")}if(r===c._mainSubplot){var d=c._mainLinePosition;\"right\"!==c.side&&(d-=u),o(t,s,d,c._offset+.1*c._length,u,.8*c._length,\"ns\",\"\"),o(t,s,d,c._offset+.9*c._length,u,.1*c._length,\"s\",\"\"),o(t,s,d,c._offset,u,.1*c._length,\"n\",\"\")}}});var r=e._hoverlayer.node();r.onmousemove=function(r){r.target=e._lasthover,n.hover(t,r,e._hoversubplot)},r.onclick=function(r){r.target=e._lasthover,n.click(t,r)},r.onmousedown=function(t){e._lasthover.onmousedown(t)}}}},{\"../../components/dragelement\":640,\"../../components/fx\":660,\"./constants\":794,\"./dragbox\":797}],799:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\");e.exports=function(t){return function(e,r){var a=e[t];if(Array.isArray(a))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,f=l.cartesian,h=r._has(\"cartesian\")||r._has(\"gl2d\"),d=0;d<a.length;d++){var p=a[d];if(i.isPlainObject(p)){var m=p.xref,g=p.yref,v=s.x.test(m),y=s.y.test(g);if(v||y){h||i.pushUnique(r._basePlotModules,o);var x=!1;v&&-1===c.indexOf(m)&&(c.push(m),x=!0),y&&-1===u.indexOf(g)&&(u.push(g),x=!0),x&&v&&y&&f.push(m+g)}}}}}},{\"../../lib\":743,\"../../registry\":873}],800:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){var a=t._fullLayout._modules;e.plot&&e.plot.selectAll(\"g:not(.scatterlayer)\").selectAll(\"g.trace\").remove();for(var o=0;o<a.length;o++){var s=a[o];if(\"cartesian\"===s.basePlotModule.name){var l=u(r,s);s.plot&&s.plot(t,e,l,n,i)}}}function i(t){var e=t.plotgroup,r=t.id,n=h.layerValue2layerClass[t.xaxis.layer],i=h.layerValue2layerClass[t.yaxis.layer];if(t.mainplot){var a=t.mainplotinfo,s=a.plotgroup,l=r+\"-x\",c=r+\"-y\";t.gridlayer=a.gridlayer,t.zerolinelayer=a.zerolinelayer,o(a.overlinesBelow,\"path\",l),o(a.overlinesBelow,\"path\",c),o(a.overaxesBelow,\"g\",l),o(a.overaxesBelow,\"g\",c),t.plot=o(a.overplot,\"g\",r),o(a.overlinesAbove,\"path\",l),o(a.overlinesAbove,\"path\",c),o(a.overaxesAbove,\"g\",l),o(a.overaxesAbove,\"g\",c),t.xlines=s.select(\".overlines-\"+n).select(\".\"+l),t.ylines=s.select(\".overlines-\"+i).select(\".\"+c),t.xaxislayer=s.select(\".overaxes-\"+n).select(\".\"+l),t.yaxislayer=s.select(\".overaxes-\"+i).select(\".\"+c)}else{var u=o(e,\"g\",\"layer-subplot\");t.shapelayer=o(u,\"g\",\"shapelayer\"),t.imagelayer=o(u,\"g\",\"imagelayer\"),t.gridlayer=o(e,\"g\",\"gridlayer\"),t.zerolinelayer=o(e,\"g\",\"zerolinelayer\"),o(e,\"path\",\"xlines-below\"),o(e,\"path\",\"ylines-below\"),t.overlinesBelow=o(e,\"g\",\"overlines-below\"),o(e,\"g\",\"xaxislayer-below\"),o(e,\"g\",\"yaxislayer-below\"),t.overaxesBelow=o(e,\"g\",\"overaxes-below\"),t.plot=o(e,\"g\",\"plot\"),t.overplot=o(e,\"g\",\"overplot\"),o(e,\"path\",\"xlines-above\"),o(e,\"path\",\"ylines-above\"),t.overlinesAbove=o(e,\"g\",\"overlines-above\"),o(e,\"g\",\"xaxislayer-above\"),o(e,\"g\",\"yaxislayer-above\"),t.overaxesAbove=o(e,\"g\",\"overaxes-above\"),t.xlines=e.select(\".xlines-\"+n),t.ylines=e.select(\".ylines-\"+i),t.xaxislayer=e.select(\".xaxislayer-\"+n),t.yaxislayer=e.select(\".yaxislayer-\"+i)}o(t.gridlayer,\"g\",t.xaxis._id,t.xaxis._id),o(t.gridlayer,\"g\",t.yaxis._id,t.yaxis._id),t.gridlayer.selectAll(\"g\").sort(f.idSort);for(var d=0;d<h.traceLayerClasses.length;d++)o(t.plot,\"g\",h.traceLayerClasses[d]);t.xlines.style(\"fill\",\"none\").classed(\"crisp\",!0),t.ylines.style(\"fill\",\"none\").classed(\"crisp\",!0)}function a(t,e){if(t){var r={};t.each(function(t){var n=s.select(this),i=\"clip\"+e._uid+t+\"plot\";n.remove(),e._draggers.selectAll(\"g.\"+t).remove(),e._defs.select(\"#\"+i).remove(),r[t]=!0});for(var n=e._plots,i=Object.keys(n),a=0;a<i.length;a++)for(var o=n[i[a]].overlays||[],l=0;l<o.length;l++){var c=o[l];r[c.id]&&c.plot.selectAll(\".trace\").remove()}}}function o(t,e,r,n){var i=t.selectAll(\".\"+r).data([n||0]);return i.enter().append(e).classed(r,!0),i}var s=t(\"d3\"),l=t(\"../../lib\"),c=t(\"../plots\"),u=t(\"../get_data\").getModuleCalcData,f=t(\"./axis_ids\"),h=t(\"./constants\"),d=t(\"../../constants/xmlns_namespaces\");r.name=\"cartesian\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=h.idRegex,r.attrRegex=h.attrRegex,r.attributes=t(\"./attributes\"),r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.transitionAxes=t(\"./transition_axes\"),r.finalizeSubplots=function(t,e){var r,n,i,a=e._subplots,o=a.xaxis,s=a.yaxis,c=a.cartesian,u=c.concat(a.gl2d||[]),d={},p={};for(r=0;r<u.length;r++){var m=u[r].split(\"y\");d[m[0]]=1,p[\"y\"+m[1]]=1}for(r=0;r<o.length;r++)d[n=o[r]]||(i=(t[f.id2name(n)]||{}).anchor,h.idRegex.y.test(i)||(i=\"y\"),c.push(n+i),u.push(n+i),p[i]||(p[i]=1,l.pushUnique(s,i)));for(r=0;r<s.length;r++)p[i=s[r]]||(n=(t[f.id2name(i)]||{}).anchor,h.idRegex.x.test(n)||(n=\"x\"),c.push(n+i),u.push(n+i),d[n]||(d[n]=1,l.pushUnique(o,n)));if(!u.length){var g=Object.keys(t);for(n=\"\",i=\"\",r=0;r<g.length;r++){var v=g[r];if(h.attrRegex.test(v)){\"x\"===v.charAt(0)?(!n||+v.substr(5)<+n.substr(5))&&(n=v):(!i||+v.substr(5)<+i.substr(5))&&(i=v)}}n=n?f.name2id(n):\"x\",i=i?f.name2id(i):\"y\",o.push(n),s.push(i),c.push(n+i)}},r.plot=function(t,e,r,i){var a,o=t._fullLayout,s=o._subplots.cartesian,l=t.calcdata;if(!Array.isArray(e))for(e=[],a=0;a<l.length;a++)e.push(a);for(o._glcanvas&&o._glcanvas.size()&&o._glcanvas.each(function(t){t.regl&&t.regl.clear({color:!0})}),a=0;a<s.length;a++){for(var c,u=s[a],f=o._plots[u],h=[],d=0;d<l.length;d++){var p=l[d],m=p[0].trace;m.xaxis+m.yaxis===u&&((-1!==e.indexOf(m.index)||m.carpet)&&(c&&c[0].trace.xaxis+c[0].trace.yaxis===u&&-1!==[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(m.fill)&&-1===h.indexOf(c)&&h.push(c),h.push(p)),c=p)}n(t,f,h,r,i)}},r.clean=function(t,e,r,n){var i,o,s,l,c,u,f,h,d=n._modules||[],p=e._modules||[];for(c=0;c<d.length;c++){\"scatter\"===d[c].name&&(i=!0);break}for(c=0;c<p.length;c++)if(\"scatter\"===p[c].name){o=!0;break}for(c=0;c<d.length;c++){\"scattergl\"===d[c].name&&(s=!0);break}for(c=0;c<p.length;c++)if(\"scattergl\"===p[c].name){l=!0;break}if(i&&!o){for(u=n._plots,f=Object.keys(u||{}),c=0;c<f.length;c++)(h=u[f[c]]).plot&&h.plot.select(\"g.scatterlayer\").selectAll(\"g.trace\").remove();n._infolayer.selectAll(\"g.rangeslider-container\").select(\"g.scatterlayer\").selectAll(\"g.trace\").remove()}if(s&&!l)for(u=n._plots,f=Object.keys(u||{}),c=0;c<f.length;c++)(h=u[f[c]])._scene&&h._scene.destroy();var m=n._subplots||{},g=e._subplots||{xaxis:[],yaxis:[]};if(m.xaxis&&m.yaxis){var v=m.xaxis.concat(m.yaxis),y=g.xaxis.concat(g.yaxis);for(c=0;c<v.length;c++)-1===y.indexOf(v[c])&&n._infolayer.selectAll(\".g-\"+v[c]+\"title\").remove()}var x=n._has&&n._has(\"cartesian\"),b=e._has&&e._has(\"cartesian\");x&&!b&&(a(n._cartesianlayer.selectAll(\".subplot\"),n),n._defs.selectAll(\".axesclip\").remove())},r.drawFramework=function(t){var e=t._fullLayout,r=function(t){for(var e=t._fullLayout,r=Object.keys(e._plots),n=[],i=[],a=0;a<r.length;a++){var o=r[a],s=e._plots[o],l=s.xaxis,c=s.yaxis,u=l._mainAxis,f=c._mainAxis,h=u._id+f._id;h!==o&&-1!==r.indexOf(h)?(s.mainplot=h,s.mainplotinfo=e._plots[h],i.push(o)):n.push(o)}return n=n.concat(i)}(t),n=e._cartesianlayer.selectAll(\".subplot\").data(r,l.identity);n.enter().append(\"g\").attr(\"class\",function(t){return\"subplot \"+t}),n.order(),n.exit().call(a,e),n.each(function(t){var r=e._plots[t];if(r.plotgroup=s.select(this),r.overlays=[],i(r),r.mainplot){e._plots[r.mainplot].overlays.push(r)}r.draglayer=o(e._draggers,\"g\",t)})},r.rangePlot=function(t,e,r){i(e),n(t,e,r),c.style(t)},r.toSVG=function(t){var e=t._fullLayout._glimages,r=s.select(t).selectAll(\".svg-container\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each(function(){var t=this.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:d.svg,\"xlink:href\":t,preserveAspectRatio:\"none\",x:0,y:0,width:this.width,height:this.height})})}},{\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../get_data\":826,\"../plots\":852,\"./attributes\":788,\"./axis_ids\":792,\"./constants\":794,\"./layout_attributes\":801,\"./layout_defaults\":802,\"./transition_axes\":812,d3:128}],801:[function(t,e,r){\"use strict\";var n=t(\"../font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../components/drawing/attributes\").dash,o=t(\"../../lib/extend\").extendFlat,s=t(\"./constants\");e.exports={visible:{valType:\"boolean\",editType:\"plot\"},color:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},title:{valType:\"string\",editType:\"ticks\"},titlefont:n({editType:\"ticks\"}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"log\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\",impliedEdits:{\"range[0]\":void 0,\"range[1]\":void 0}},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}},{valType:\"any\",editType:\"plot\",impliedEdits:{\"^autorange\":!1}}],editType:\"plot\",impliedEdits:{autorange:!1}},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},scaleanchor:{valType:\"enumerated\",values:[s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"calc\"},scaleratio:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},constrain:{valType:\"enumerated\",values:[\"range\",\"domain\"],dflt:\"range\",editType:\"calc\"},constraintoward:{valType:\"enumerated\",values:[\"left\",\"center\",\"right\",\"top\",\"middle\",\"bottom\"],editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"auto\",\"linear\",\"array\"],editType:\"ticks\",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"ticks\"},tick0:{valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},dtick:{valType:\"any\",editType:\"ticks\",impliedEdits:{tickmode:\"linear\"}},tickvals:{valType:\"data_array\",editType:\"ticks\"},ticktext:{valType:\"data_array\",editType:\"ticks\"},ticks:{valType:\"enumerated\",values:[\"outside\",\"inside\",\"\"],editType:\"ticks\"},mirror:{valType:\"enumerated\",values:[!0,\"ticks\",!1,\"all\",\"allticks\"],dflt:!1,editType:\"ticks+layoutstyle\"},ticklen:{valType:\"number\",min:0,dflt:5,editType:\"ticks\"},tickwidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks\"},tickcolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},showticklabels:{valType:\"boolean\",dflt:!0,editType:\"ticks\"},showspikes:{valType:\"boolean\",dflt:!1,editType:\"modebar\"},spikecolor:{valType:\"color\",dflt:null,editType:\"none\"},spikethickness:{valType:\"number\",dflt:3,editType:\"none\"},spikedash:o({},a,{dflt:\"dash\",editType:\"none\"}),spikemode:{valType:\"flaglist\",flags:[\"toaxis\",\"across\",\"marker\"],dflt:\"toaxis\",editType:\"none\"},spikesnap:{valType:\"enumerated\",values:[\"data\",\"cursor\"],dflt:\"data\",editType:\"none\"},tickfont:n({editType:\"ticks\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"ticks\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"ticks\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"ticks\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"ticks\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"ticks\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"ticks\"},tickformatstops:{_isLinkedToArray:\"tickformatstop\",dtickrange:{valType:\"info_array\",items:[{valType:\"any\",editType:\"ticks\"},{valType:\"any\",editType:\"ticks\"}],editType:\"ticks\"},value:{valType:\"string\",dflt:\"\",editType:\"ticks\"},editType:\"ticks\"},hoverformat:{valType:\"string\",dflt:\"\",editType:\"none\"},showline:{valType:\"boolean\",dflt:!1,editType:\"layoutstyle\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"layoutstyle\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks+layoutstyle\"},showgrid:{valType:\"boolean\",editType:\"ticks\"},gridcolor:{valType:\"color\",dflt:i.lightLine,editType:\"ticks\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"ticks\"},zeroline:{valType:\"boolean\",editType:\"ticks\"},zerolinecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"ticks\"},zerolinewidth:{valType:\"number\",dflt:1,editType:\"ticks\"},anchor:{valType:\"enumerated\",values:[\"free\",s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"plot\"},side:{valType:\"enumerated\",values:[\"top\",\"bottom\",\"left\",\"right\"],editType:\"plot\"},overlaying:{valType:\"enumerated\",values:[\"free\",s.idRegex.x.toString(),s.idRegex.y.toString()],editType:\"calc\"},layer:{valType:\"enumerated\",values:[\"above traces\",\"below traces\"],dflt:\"above traces\",editType:\"plot\"},domain:{valType:\"info_array\",items:[{valType:\"number\",min:0,max:1,editType:\"calc\"},{valType:\"number\",min:0,max:1,editType:\"calc\"}],dflt:[0,1],editType:\"calc\"},position:{valType:\"number\",min:0,max:1,dflt:0,editType:\"plot\"},categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\",_deprecated:{autotick:{valType:\"boolean\",editType:\"ticks\"}}}},{\"../../components/color/attributes\":617,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../font_attributes\":816,\"./constants\":794}],802:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../layout_attributes\"),s=t(\"./layout_attributes\"),l=t(\"./type_defaults\"),c=t(\"./axis_defaults\"),u=t(\"./constraint_defaults\"),f=t(\"./position_defaults\"),h=t(\"./axis_ids\");e.exports=function(t,e,r){function d(t,e){return i.coerce(P,O,s,t,e)}function p(t,e){return i.coerce2(P,O,s,t,e)}function m(t){return\"x\"===t?S:T}function g(e,r){for(var n=\"x\"===e?E:L,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(h.name2id(o))}return i}var v,y={},x={},b={},_={};for(v=0;v<r.length;v++){var w=r[v];if(n.traceIs(w,\"cartesian\")||n.traceIs(w,\"gl2d\")){var M=h.id2name(w.xaxis),k=h.id2name(w.yaxis);if(n.traceIs(w,\"carpet\")&&(\"carpet\"!==w.type||w._cheater)||M&&(x[M]=1),\"carpet\"===w.type&&w._cheater&&M&&(y[M]=1),n.traceIs(w,\"2dMap\")&&(b[M]=!0,b[k]=!0),n.traceIs(w,\"oriented\")){_[\"h\"===w.orientation?k:M]=!0}}}var A=e._subplots,T=A.xaxis,S=A.yaxis,E=i.simpleMap(T,h.id2name),L=i.simpleMap(S,h.id2name),C=E.concat(L),z=a.background;T.length&&S.length&&(z=i.coerce(t,e,o,\"plot_bgcolor\"));var D,I,P,O,F=a.combine(z,e.paper_bgcolor),R={x:m(\"x\"),y:m(\"y\")};for(v=0;v<C.length;v++){D=C[v],i.isPlainObject(t[D])||(t[D]={}),P=t[D],O=e[D]={},l(P,O,d,r,D);var N=g(I=D.charAt(0),D),j={letter:I,font:e.font,outerTicks:b[D],showGrid:!_[D],data:r,bgColor:F,calendar:e.calendar,cheateronly:\"x\"===I&&y[D]&&!x[D]};c(P,O,d,j,e);var B=p(\"spikecolor\"),U=p(\"spikethickness\"),V=p(\"spikedash\"),q=p(\"spikemode\"),H=p(\"spikesnap\");d(\"showspikes\",!!(B||U||V||q||H))||(delete O.spikecolor,delete O.spikethickness,delete O.spikedash,delete O.spikemode,delete O.spikesnap);var G={letter:I,counterAxes:R[I],overlayableAxes:N};f(P,O,d,G),O._input=P}var Y=n.getComponentMethod(\"rangeslider\",\"handleDefaults\"),W=n.getComponentMethod(\"rangeselector\",\"handleDefaults\");for(v=0;v<E.length;v++)D=E[v],P=t[D],O=e[D],Y(t,e,D),\"date\"===O.type&&W(P,O,e,L,O.calendar),d(\"fixedrange\");for(v=0;v<L.length;v++){D=L[v],P=t[D],O=e[D];var X=e[h.id2name(O.anchor)];d(\"fixedrange\",X&&X.rangeslider&&X.rangeslider.visible)}e._axisConstraintGroups=[];var Z=R.x.concat(R.y);for(v=0;v<C.length;v++)I=(D=C[v]).charAt(0),P=t[D],O=e[D],u(P,O,d,Z,e)}},{\"../../components/color\":618,\"../../lib\":743,\"../../registry\":873,\"../layout_attributes\":843,\"./axis_defaults\":791,\"./axis_ids\":792,\"./constraint_defaults\":795,\"./layout_attributes\":801,\"./position_defaults\":805,\"./type_defaults\":813}],803:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../components/color/attributes\").lightFraction,a=t(\"../../lib\");e.exports=function(t,e,r,o){function s(r,n){return a.coerce2(t,e,o.attributes,r,n)}var l=(o=o||{}).dfltColor,c=s(\"linecolor\",l),u=s(\"linewidth\");r(\"showline\",o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var f=s(\"gridcolor\",n(l,o.bgColor,o.blend||i).toRgbString()),h=s(\"gridwidth\");if(r(\"showgrid\",o.showGrid||!!f||!!h)||(delete e.gridcolor,delete e.gridwidth),!o.noZeroLine){var d=s(\"zerolinecolor\",l),p=s(\"zerolinewidth\");r(\"zeroline\",o.showGrid||!!d||!!p)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},{\"../../components/color/attributes\":617,\"../../lib\":743,tinycolor2:546}],804:[function(t,e,r){\"use strict\";function n(t,e,r){var n,a,o,s,l,c=[],u=r.map(function(e){return e[t]}),f=i.bisector(e).left;for(n=0;n<u.length;n++)for(o=u[n],a=0;a<o.length;a++)null!==(s=o[a])&&void 0!==s&&((l=f(c,s))<c.length&&c[l]===s||c.splice(l,0,s));return c}var i=t(\"d3\");e.exports=function(t,e,r,a){switch(e){case\"array\":return Array.isArray(r)?r.slice():[];case\"category ascending\":return n(t,i.ascending,a);case\"category descending\":return n(t,i.descending,a);case\"trace\":default:return[]}}},{d3:128}],805:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\");e.exports=function(t,e,r,a){var o=a.counterAxes||[],s=a.overlayableAxes||[],l=a.letter;\"free\"===i.coerce(t,e,{anchor:{valType:\"enumerated\",values:[\"free\"].concat(o),dflt:n(t.position)?\"free\":o[0]||\"free\"}},\"anchor\")&&r(\"position\"),i.coerce(t,e,{side:{valType:\"enumerated\",values:\"x\"===l?[\"bottom\",\"top\"]:[\"left\",\"right\"],dflt:\"x\"===l?\"bottom\":\"left\"}},\"side\");var c=!1;if(s.length&&(c=i.coerce(t,e,{overlaying:{valType:\"enumerated\",values:[!1].concat(s),dflt:!1}},\"overlaying\")),!c){var u=r(\"domain\");u[0]>u[1]-.01&&(e.domain=[0,1]),i.noneOrAll(t.domain,e.domain,[0,1])}return r(\"layer\"),e}},{\"../../lib\":743,\"fast-isnumeric\":140}],806:[function(t,e,r){\"use strict\";var n=t(\"../../constants/alignment\").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||\"center\"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)]}},{\"../../constants/alignment\":716}],807:[function(t,e,r){\"use strict\";function n(t){return t._id}function i(t,e,r){var n,i,a;if(r){var o=r.points||[];for(n=0;n<e.length;n++)(a=e[n].cd[0].trace).selectedpoints=[],a._input.selectedpoints=[];for(n=0;n<o.length;n++){var s=o[n],l=s.data,c=s.fullData;s.pointIndices?([].push.apply(l.selectedpoints,s.pointIndices),[].push.apply(c.selectedpoints,s.pointIndices)):(l.selectedpoints.push(s.pointIndex),c.selectedpoints.push(s.pointIndex))}}else for(n=0;n<e.length;n++)delete(a=e[n].cd[0].trace).selectedpoints,delete a._input.selectedpoints,e[n].cd[0].t&&e[n].cd[0].t.scene&&e[n].cd[0].t.scene.clearSelect();for(n=0;n<e.length;n++)(i=e[n]).style&&i.style(t,i.cd)}var a=t(\"polybooljs\"),o=t(\"../../lib/polygon\"),s=t(\"../../lib/throttle\"),l=t(\"../../components/color\"),c=t(\"../../components/fx/helpers\").makeEventData,u=t(\"../../components/fx\"),f=t(\"./axes\"),h=t(\"./constants\"),d=o.filter,p=o.tester,m=o.multitester,g=h.MINSELECT;e.exports=function(t,e,r,o,v){function y(t){var e=\"y\"===t._id.charAt(0)?1:0;return function(r){return t.p2d(r[e])}}function x(t,e){return t-e}var b,_,w,M,k=o.gd,A=k._fullLayout,T=A._zoomlayer,S=o.element.getBoundingClientRect(),E=o.plotinfo,L=E.xaxis._offset,C=E.yaxis._offset,z=e-S.left,D=r-S.top,I=z,P=D,O=\"M\"+z+\",\"+D,F=o.xaxes[0]._length,R=o.yaxes[0]._length,N=o.xaxes.map(n),j=o.yaxes.map(n),B=o.xaxes.concat(o.yaxes),U=t.altKey;(t.shiftKey||t.altKey)&&E.selection&&E.selection.polygons&&!o.polygons?(o.polygons=E.selection.polygons,o.mergedPolygons=E.selection.mergedPolygons):(!t.shiftKey&&!t.altKey||(t.shiftKey||t.altKey)&&!E.selection)&&(E.selection={},E.selection.polygons=o.polygons=[],E.selection.mergedPolygons=o.mergedPolygons=[]),\"lasso\"===v&&(b=d([[z,D]],h.BENDPX));var V=T.selectAll(\"path.select-outline-\"+E.id).data([1,2]);V.enter().append(\"path\").attr(\"class\",function(t){return\"select-outline select-outline-\"+t+\" select-outline-\"+E.id}).attr(\"transform\",\"translate(\"+L+\", \"+C+\")\").attr(\"d\",O+\"Z\");var q,H,G,Y,W,X=T.append(\"path\").attr(\"class\",\"zoombox-corners\").style({fill:l.background,stroke:l.defaultLine,\"stroke-width\":1}).attr(\"transform\",\"translate(\"+L+\", \"+C+\")\").attr(\"d\",\"M0,0Z\"),Z=[],J=A._uid+h.SELECTID,K=[];for(q=0;q<k.calcdata.length;q++)if(H=k.calcdata[q],!0===(G=H[0].trace).visible&&G._module&&G._module.selectPoints)if(o.subplot)G.subplot!==o.subplot&&G.geo!==o.subplot||Z.push({selectPoints:G._module.selectPoints,style:G._module.style,cd:H,xaxis:o.xaxes[0],yaxis:o.yaxes[0]});else{if(-1===N.indexOf(G.xaxis))continue;if(-1===j.indexOf(G.yaxis))continue;Z.push({selectPoints:G._module.selectPoints,style:G._module.style,cd:H,xaxis:f.getFromId(k,G.xaxis),yaxis:f.getFromId(k,G.yaxis)})}var Q;Q=E.fillRangeItems?E.fillRangeItems:\"select\"===v?function(t,e){var r=t.range={};for(q=0;q<B.length;q++){var n=B[q],i=n._id.charAt(0);r[n._id]=[n.p2d(e[i+\"min\"]),n.p2d(e[i+\"max\"])].sort(x)}}:function(t,e,r){var n=t.lassoPoints={};for(q=0;q<B.length;q++){var i=B[q];n[i._id]=r.filtered.map(y(i))}},o.moveFn=function(t,e){I=Math.max(0,Math.min(F,t+z)),P=Math.max(0,Math.min(R,e+D));var r=Math.abs(I-z),n=Math.abs(P-D);\"select\"===v?n<Math.min(.6*r,g)?((M=[[z,0],[z,R],[I,R],[I,0]]).xmin=Math.min(z,I),M.xmax=Math.max(z,I),M.ymin=Math.min(0,R),M.ymax=Math.max(0,R),X.attr(\"d\",\"M\"+M.xmin+\",\"+(D-g)+\"h-4v\"+2*g+\"h4ZM\"+(M.xmax-1)+\",\"+(D-g)+\"h4v\"+2*g+\"h-4Z\")):r<Math.min(.6*n,g)?((M=[[0,D],[0,P],[F,P],[F,D]]).xmin=Math.min(0,F),M.xmax=Math.max(0,F),M.ymin=Math.min(D,P),M.ymax=Math.max(D,P),X.attr(\"d\",\"M\"+(z-g)+\",\"+M.ymin+\"v-4h\"+2*g+\"v4ZM\"+(z-g)+\",\"+(M.ymax-1)+\"v4h\"+2*g+\"v-4Z\")):((M=[[z,D],[z,P],[I,P],[I,D]]).xmin=Math.min(z,I),M.xmax=Math.max(z,I),M.ymin=Math.min(D,P),M.ymax=Math.max(D,P),X.attr(\"d\",\"M0,0Z\")):\"lasso\"===v&&(b.addPt([I,P]),M=b.filtered),o.polygons&&o.polygons.length?(w=function(t,e,r){return r?a.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions:a.union({regions:t,inverted:!1},{regions:[e],inverted:!1}).regions}(o.mergedPolygons,M,U),M.subtract=U,_=m(o.polygons.concat([M]))):(w=[M],_=p(M));var l=[];for(q=0;q<w.length;q++){var u=w[q];l.push(u.join(\"L\")+\"L\"+u[0])}V.attr(\"d\",\"M\"+l.join(\"M\")+\"Z\"),s.throttle(J,h.SELECTDELAY,function(){K=[];var t,e,r=[];for(q=0;q<Z.length;q++)if(Y=Z[q],e=Y.selectPoints(Y,_),r.push(e),t=function(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=c(t[i],n,r);return t}(e,Y),K.length)for(var n=0;n<t.length;n++)K.push(t[n]);else K=t;i(k,Z,W={points:K}),Q(W,M,b),o.gd.emit(\"plotly_selecting\",W)})},o.clickFn=function(t,e){X.remove(),s.done(J).then(function(){if(s.clear(J),2===t){for(V.remove(),q=0;q<Z.length;q++)(Y=Z[q]).selectPoints(Y,!1);i(k,Z),k.emit(\"plotly_deselect\",null)}else k.emit(\"plotly_selected\",void 0);u.click(k,e)})},o.doneFn=function(){X.remove(),s.done(J).then(function(){s.clear(J),o.gd.emit(\"plotly_selected\",W),M&&o.polygons&&(M.subtract=U,o.polygons.push(M),o.mergedPolygons.length=0,[].push.apply(o.mergedPolygons,w))})}}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../components/fx/helpers\":657,\"../../lib/polygon\":755,\"../../lib/throttle\":767,\"./axes\":789,\"./constants\":794,polybooljs:479}],808:[function(t,e,r){\"use strict\";function n(t){return Math.pow(10,t)}var i=t(\"d3\"),a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=o.cleanNumber,l=o.ms2DateTime,c=o.dateTime2ms,u=o.ensureNumber,f=t(\"../../constants/numerical\"),h=f.FP_SAFE,d=f.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*M*Math.abs(n-i))}return d}function f(e,r,n){var i=c(e,n||t.calendar);if(i===d){if(!a(e))return d;i=c(new Date(+e))}return i}function g(e,r,n){return l(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 x(e){if(t._categoriesMap){var r=t._categoriesMap[e];if(void 0!==r)return r}if(a(e))return+e}function b(e){return a(e)?i.round(t._b+t._m*e,2):d}function _(e){return(e-t._b)/t._m}e=e||{};var w=(t._id||\"x\").charAt(0),M=10;t.c2l=\"log\"===t.type?r:u,t.l2c=\"log\"===t.type?n:u,t.l2p=b,t.p2l=_,t.c2p=\"log\"===t.type?function(t,e){return b(r(t,e))}:b,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=s,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(s(e))},t.p2d=t.p2r=_,t.cleanPos=u):\"log\"===t.type?(t.d2r=t.d2l=function(t,e){return r(s(t),e)},t.r2d=t.r2c=function(t){return n(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=u,t.c2r=r,t.l2d=n,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return n(_(t))},t.r2p=function(e){return t.l2p(s(e))},t.p2r=_,t.cleanPos=u):\"date\"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=f,t.c2d=t.c2r=t.l2d=t.l2r=g,t.d2p=t.r2p=function(e,r,n){return t.l2p(f(e,0,n))},t.p2d=t.p2r=function(t,e,r){return g(_(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,d,t.calendar)}):\"category\"===t.type&&(t.d2c=t.d2l=y,t.r2d=t.c2d=t.l2d=v,t.d2r=t.d2l_noadd=x,t.r2c=function(e){var r=x(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=x,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return v(_(t))},t.r2p=t.d2p,t.p2r=_,t.cleanPos=function(t){return\"string\"==typeof t&&\"\"!==t?t:u(t)}),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,r){r||(r={}),e||(e=\"range\");var n,i,s=o.nestedProperty(t,e).get();if(i=\"date\"===t.type?o.dfltRange(t.calendar):\"y\"===w?p.DFLTRANGEY:r.dfltRange||p.DFLTRANGEX,i=i.slice(),s&&2===s.length)for(\"date\"===t.type&&(s[0]=o.cleanDate(s[0],d,t.calendar),s[1]=o.cleanDate(s[1],d,t.calendar)),n=0;n<2;n++)if(\"date\"===t.type){if(!o.isDateTime(s[n],t.calendar)){t[e]=i;break}if(t.r2l(s[0])===t.r2l(s[1])){var l=o.constrain(t.r2l(s[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);s[0]=t.l2r(l-1e3),s[1]=t.l2r(l+1e3);break}}else{if(!a(s[n])){if(!a(s[1-n])){t[e]=i;break}s[n]=s[1-n]*(n?10:.1)}if(s[n]<-h?s[n]=-h:s[n]>h&&(s[n]=h),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t._categories||(t._categories=[]),t._categoriesMap||(t._categoriesMap={}),t.overlaying){var i=m.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?\"_r\":\"range\",o=t.calendar;t.cleanRange(a);var s=t.r2l(t[a][0],o),l=t.r2l(t[a][1],o);if(\"y\"===w?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(s-l),t._b=-t._m*l):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(l-s),t._b=-t._m*s),!isFinite(t._m)||!isFinite(t._b))throw e._replotting=!1,new Error(\"Something went wrong with 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;a<n.length;a++)i[a]=t.d2c(n[a],0,o);else{var s=r+\"0\"in e?t.d2c(e[r+\"0\"],0,o):0,l=e[\"d\"+r]?Number(e[\"d\"+r]):1;for(n=e[{x:\"y\",y:\"x\"}[r]],i=new Array(n.length),a=0;a<n.length;a++)i[a]=s+a*l}return i},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&a(t.r2l(e[0]))&&a(t.r2l(e[1]))},t.isPtWithinRange=function(e,r){var n=t.c2l(e[w],null,r);return n>=t.r2l(t.range[0])&&n<=t.r2l(t.range[1])},t._min=[],t._max=[];var k=e._d3locale;\"date\"===t.type&&(t._dateFormat=k?k.timeFormat.utc:i.time.format.utc),t._separators=e.separators,t._numFormat=k?k.numberFormat:i.format,delete t._minDtick,delete t._forceTick0}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./axis_ids\":792,\"./constants\":794,d3:128,\"fast-isnumeric\":140}],809:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r,a,o){var s=function(t){var e=[\"showexponent\",\"showtickprefix\",\"showticksuffix\"].filter(function(e){return void 0!==t[e]});if(e.every(function(r){return t[r]===t[e[0]]})||1===e.length)return t[e[0]]}(t);r(\"tickprefix\")&&r(\"showtickprefix\",s);r(\"ticksuffix\",o.tickSuffixDflt)&&r(\"showticksuffix\",s);if(r(\"showticklabels\")){var l=o.font||{},c=e.color===t.color?e.color:l.color;if(n.coerceFont(r,\"tickfont\",{family:l.family,size:l.size,color:c}),r(\"tickangle\"),\"category\"!==a){var u=r(\"tickformat\");!function(t,e){function r(t,e){return n.coerce(s,l,i.tickformatstops,t,e)}var a=t.tickformatstops,o=e.tickformatstops=[];if(Array.isArray(a))for(var s,l,c=0;c<a.length;c++)s=a[c],l={},r(\"dtickrange\"),r(\"value\"),o.push(l)}(t,e),u||\"date\"===a||(r(\"showexponent\",s),r(\"exponentformat\"),r(\"separatethousands\"))}}\"category\"===a||o.noHover||r(\"hoverformat\")}},{\"../../lib\":743,\"./layout_attributes\":801}],810:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\");e.exports=function(t,e,r,a){var o=n.coerce2(t,e,i,\"ticklen\"),s=n.coerce2(t,e,i,\"tickwidth\"),l=n.coerce2(t,e,i,\"tickcolor\",e.color);r(\"ticks\",a.outerTicks||o||s||l?\"outside\":\"\")||(delete e.ticklen,delete e.tickwidth,delete e.tickcolor)}},{\"../../lib\":743,\"./layout_attributes\":801}],811:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").ONEDAY;e.exports=function(t,e,r,o){var s=\"auto\";\"array\"!==t.tickmode||\"log\"!==o&&\"date\"!==o||(t.tickmode=\"auto\"),Array.isArray(t.tickvals)?s=\"array\":t.dtick&&(s=\"linear\");var l=r(\"tickmode\",s);if(\"auto\"===l)r(\"nticks\");else if(\"linear\"===l){var c=\"date\"===o?a:1,u=r(\"dtick\",c);if(n(u))e.dtick=u>0?Number(u):c;else if(\"string\"!=typeof u)e.dtick=c;else{var f=u.charAt(0),h=u.substr(1);((h=n(h)?Number(h):0)<=0||!(\"date\"===o&&\"M\"===f&&h===Math.round(h)||\"log\"===o&&\"L\"===f||\"log\"===o&&\"D\"===f&&(1===h||2===h)))&&(e.dtick=c)}var d=\"date\"===o?i.dateTick0(e.calendar):0,p=r(\"tick0\",d);\"date\"===o?e.tick0=i.cleanDate(p,d):n(p)&&\"D1\"!==u&&\"D2\"!==u?e.tick0=Number(p):e.tick0=d}else{void 0===r(\"tickvals\")?e.tickmode=\"auto\":r(\"ticktext\")}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],812:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plotly\"),a=t(\"../../registry\"),o=t(\"../../components/drawing\"),s=t(\"./axes\"),l=t(\"./constants\").attrRegex;e.exports=function(t,e,r,c){function u(t){var e=t.xaxis,r=t.yaxis;d._defs.select(\"#\"+t.clipId+\"> rect\").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(\".scatterlayer .trace\");n.selectAll(\".point\").call(o.setPointGroupScale,1,1),n.selectAll(\".textpoint\").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function f(e,r){var n,i,l,c=m[e.xaxis._id],u=m[e.yaxis._id],f=[];if(c){i=(n=t._fullLayout[c.axisName])._r,l=c.to,f[0]=(i[0]*(1-r)+r*l[0]-i[0])/(i[1]-i[0])*e.xaxis._length;var h=i[1]-i[0],p=l[1]-l[0];n.range[0]=i[0]*(1-r)+r*l[0],n.range[1]=i[1]*(1-r)+r*l[1],f[2]=e.xaxis._length*(1-r+r*p/h)}else f[0]=0,f[2]=e.xaxis._length;if(u){i=(n=t._fullLayout[u.axisName])._r,l=u.to,f[1]=(i[1]*(1-r)+r*l[1]-i[1])/(i[0]-i[1])*e.yaxis._length;var g=i[1]-i[0],v=l[1]-l[0];n.range[0]=i[0]*(1-r)+r*l[0],n.range[1]=i[1]*(1-r)+r*l[1],f[3]=e.yaxis._length*(1-r+r*v/g)}else f[1]=0,f[3]=e.yaxis._length;!function(e,r){function n(e,r,n){for(i=0;i<e.length;i++){var a=e[i];if(-1===o.indexOf(a.xref)&&-1===o.indexOf(a.yref)||r(t,i),n)return}}var i,o=[];for(o=[e._id,r._id],i=0;i<o.length;i++)s.doTicks(t,o[i],!0);n(d.annotations||[],a.getComponentMethod(\"annotations\",\"drawOne\")),n(d.shapes||[],a.getComponentMethod(\"shapes\",\"drawOne\")),n(d.images||[],a.getComponentMethod(\"images\",\"draw\"),!0)}(e.xaxis,e.yaxis);var y=e.xaxis,x=e.yaxis,b=!!c,_=!!u,w=b?y._length/f[2]:1,M=_?x._length/f[3]:1,k=b?f[0]:0,A=_?f[1]:0,T=b?f[0]/f[2]*y._length:0,S=_?f[1]/f[3]*x._length:0,E=y._offset-T,L=x._offset-S;d._defs.select(\"#\"+e.clipId+\"> rect\").call(o.setTranslate,k,A).call(o.setScale,1/w,1/M),e.plot.call(o.setTranslate,E,L).call(o.setScale,w,M).selectAll(\".points\").selectAll(\".point\").call(o.setPointGroupScale,1/w,1/M),e.plot.selectAll(\".points\").selectAll(\".textpoint\").call(o.setTextPointsScale,1/w,1/M)}function h(){b=Date.now();for(var e=Math.min(1,(b-x)/r.duration),n=w(e),a=0;a<v.length;a++)f(v[a],n);b-x>r.duration?(!function(){for(var e={},r=0;r<g.length;r++){var n=t._fullLayout[m[g[r]].axisName],a=m[g[r]].to;e[n._name+\".range[0]\"]=a[0],e[n._name+\".range[1]\"]=a[1],n.range=a.slice()}y&&y(),i.relayout(t,e).then(function(){for(var t=0;t<v.length;t++)u(v[t])})}(),_=window.cancelAnimationFrame(h)):_=window.requestAnimationFrame(h)}var d=t._fullLayout,p=[],m=function(t){var e,r,n,i,a={};for(e in t)if((r=e.split(\".\"))[0].match(l)){var o=e.charAt(0),s=r[0];if(n=d[s],i={},Array.isArray(t[e])?i.to=t[e].slice(0):Array.isArray(t[e].range)&&(i.to=t[e].range.slice(0)),!i.to)continue;i.axisName=s,i.length=n._length,p.push(o),a[o]=i}return a}(e),g=Object.keys(m),v=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 c=l.xaxis._id,u=l.yaxis._id,f=l.xaxis.range,h=l.yaxis.range;l.xaxis._r=l.xaxis.range.slice(),l.yaxis._r=l.yaxis.range.slice(),i=r[c]?r[c].to:f,a=r[u]?r[u].to:h,f[0]===i[0]&&f[1]===i[1]&&h[0]===a[0]&&h[1]===a[1]||-1===e.indexOf(c)&&-1===e.indexOf(u)||s.push(l)}}return s}(d,g,m);if(!v.length)return function(){function e(e,r,n){for(var i=0;i<e.length;i++)if(r(t,i),n)return}e(d.annotations||[],a.getComponentMethod(\"annotations\",\"drawOne\")),e(d.shapes||[],a.getComponentMethod(\"shapes\",\"drawOne\")),e(d.images||[],a.getComponentMethod(\"images\",\"draw\"),!0)}(),!1;var y;c&&(y=c());var x,b,_,w=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,function(){for(var e={},r=0;r<g.length;r++){var n=t._fullLayout[g[r]+\"axis\"];e[n._name+\".range[0]\"]=n.range[0],e[n._name+\".range[1]\"]=n.range[1],n.range=n._r.slice()}return i.relayout(t,e).then(function(){for(var t=0;t<v.length;t++)u(v[t])})}()}),x=Date.now(),_=window.requestAnimationFrame(h),Promise.resolve()}},{\"../../components/drawing\":643,\"../../plotly\":784,\"../../registry\":873,\"./axes\":789,\"./constants\":794,d3:128}],813:[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 l=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if((i[r+\"axis\"]||r)===e){if(a(i,r))return i;if((i[r]||[]).length||i[r+\"0\"])return i}}}(e,r,n);if(l)if(\"histogram\"!==l.type||n!=={v:\"y\",h:\"x\"}[l.orientation||\"v\"]){var c=n+\"calendar\",u=l[c];if(a(l,n)){for(var f,h=i(l),d=[],p=0;p<e.length;p++)f=e[p],o.traceIs(f,\"box-violin\")&&(f[n+\"axis\"]||n)===r&&(void 0!==f[h]?d.push(f[h][0]):void 0!==f.name?d.push(f.name):d.push(\"text\"),f[c]!==u&&(u=void 0));t.type=s(d,u)}else t.type=s(l[n]||[l[n+\"0\"]],u)}else t.type=\"linear\"}}function i(t){return{v:\"x\",h:\"y\"}[t.orientation||\"v\"]}function a(t,e){var r=i(t),n=o.traceIs(t,\"box-violin\"),a=o.traceIs(t._fullInput||{},\"candlestick\");return n&&!a&&e===r&&void 0===t[r]&&void 0===t[r+\"0\"]}var o=t(\"../../registry\"),s=t(\"./axis_autotype\"),l=t(\"./axis_ids\").name2id;e.exports=function(t,e,r,i,a){a&&(e._name=a,e._id=l(a));\"-\"===r(\"type\")&&(n(e,i),\"-\"===e.type?e.type=\"linear\":t.type=e.type)}},{\"../../registry\":873,\"./axis_autotype\":790,\"./axis_ids\":792}],814:[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=l.nestedProperty(n,e.prop).get(),(a=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&a[e.prop]!==i&&(o=!0),a[e.prop]=i,{changed:o,value:i}}function i(t,e){var r=[],n=e[0],i={};if(\"string\"==typeof n)i[n]=e[1];else{if(!l.isPlainObject(n))return r;i=n}return o(i,function(t,e,n){r.push({type:\"layout\",prop:t,value:n})},\"\",0),r}function a(t,e){var r,n,i,a,s=[];if(n=e[0],i=e[1],r=e[2],a={},\"string\"==typeof n)a[n]=i;else{if(!l.isPlainObject(n))return s;a=n,void 0===r&&(r=i)}return void 0===r&&(r=null),o(a,function(e,n,i){var a;if(Array.isArray(i)){var o=Math.min(i.length,t.data.length);r&&(o=Math.min(o,r.length)),a=[];for(var l=0;l<o;l++)a[l]=r?r[l]:l}else a=r?r.slice(0):null;if(null===a)Array.isArray(i)&&(i=i[0]);else if(Array.isArray(a)){if(!Array.isArray(i)){var c=i;i=[];for(var u=0;u<a.length;u++)i[u]=c}i.length=Math.min(a.length,i.length)}s.push({type:\"data\",prop:e,traces:a,value:i})},\"\",0),s}function o(t,e,r,n){Object.keys(t).forEach(function(i){var a=t[i];if(\"_\"!==i[0]){var s=r+(n>0?\".\":\"\")+i;l.isPlainObject(a)?o(a,e,s,n+1):e(s,i,a)}})}var s=t(\"../plotly\"),l=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 c=r.hasSimpleAPICommandBindings(t,i,o.lookupTable);if(e&&e._commandObserver){if(c)return o;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,o}if(c){n(t,c,o.cache),o.check=function(){if(s){var e=n(t,c,o.cache);return e.changed&&a&&void 0!==o.lookupTable[e.value]&&(o.disable(),Promise.resolve(a({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:o.lookupTable[e.value]})).then(o.enable,o.enable)),e.changed}};for(var u=[\"plotly_relayout\",\"plotly_redraw\",\"plotly_restyle\",\"plotly_update\",\"plotly_animatingframe\",\"plotly_afterplot\"],f=0;f<u.length;f++)t._internalOn(u[f],o.check);o.remove=function(){for(var e=0;e<u.length;e++)t._removeInternalListener(u[e],o.check)}}else l.log(\"Unable to automatically bind plot updates to API command\"),o.lookupTable={},o.remove=function(){};return o.disable=function(){s=!1},o.enable=function(){s=!0},e&&(e._commandObserver=o),o},r.hasSimpleAPICommandBindings=function(t,e,n){var i,a,o=e.length;for(i=0;i<o;i++){var s,l=e[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=r.computeAPICommandBindings(t,c,u);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var d=(s=f[0]).value;if(Array.isArray(d)){if(1!==d.length)return!1;d=d[0]}n&&(n[d]=i)}return a},r.executeAPICommand=function(t,e,r){if(\"skip\"===e)return Promise.resolve();var n=s[e],i=[t];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)i.push(r[a]);return n.apply(null,i).catch(function(t){return l.warn(\"API call to Plotly.\"+e+\" rejected.\",t),Promise.reject(t)})},r.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case\"restyle\":n=a(t,r);break;case\"relayout\":n=i(0,r);break;case\"update\":n=a(t,[r[0],r[2]]).concat(i(0,[r[1]]));break;case\"animate\":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==[\"string\",\"number\"].indexOf(typeof e[0][0])?[{type:\"layout\",prop:\"_currentFrame\",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{\"../lib\":743,\"../plotly\":784}],815:[function(t,e,r){\"use strict\";var n=t(\"../lib/extend\").extendFlat;e.exports=function(t,e){t=t||{},e=e||{};var r={valType:\"info_array\",editType:t.editType,items:[{valType:\"number\",min:0,max:1},{valType:\"number\",min:0,max:1}],dflt:[0,1]};t.name&&t.name,t.trace,e.description&&e.description;return{x:n({},r,{}),y:n({},r,{}),editType:t.editType}}},{\"../lib/extend\":732}],816:[function(t,e,r){\"use strict\";e.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:\"string\",noBlank:!0,strict:!0,editType:e},size:{valType:\"number\",min:1,editType:e},color:{valType:\"color\",editType:r},editType:e};return t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],817:[function(t,e,r){\"use strict\";e.exports={_isLinkedToArray:\"frames_entry\",group:{valType:\"string\"},name:{valType:\"string\"},traces:{valType:\"any\"},baseframe:{valType:\"string\"},data:{valType:\"any\"},layout:{valType:\"any\"}}},{}],818:[function(t,e,r){\"use strict\";r.projNames={equirectangular:\"equirectangular\",mercator:\"mercator\",orthographic:\"orthographic\",\"natural earth\":\"naturalEarth\",kavrayskiy7:\"kavrayskiy7\",miller:\"miller\",robinson:\"robinson\",eckert4:\"eckert4\",\"azimuthal equal area\":\"azimuthalEqualArea\",\"azimuthal equidistant\":\"azimuthalEquidistant\",\"conic equal area\":\"conicEqualArea\",\"conic conformal\":\"conicConformal\",\"conic equidistant\":\"conicEquidistant\",gnomonic:\"gnomonic\",stereographic:\"stereographic\",mollweide:\"mollweide\",hammer:\"hammer\",\"transverse mercator\":\"transverseMercator\",\"albers usa\":\"albersUsa\",\"winkel tripel\":\"winkel3\",aitoff:\"aitoff\",sinusoidal:\"sinusoidal\"},r.axesNames=[\"lonaxis\",\"lataxis\"],r.lonaxisSpan={orthographic:180,\"azimuthal equal area\":360,\"azimuthal equidistant\":360,\"conic conformal\":180,gnomonic:160,stereographic:180,\"transverse mercator\":180,\"*\":360},r.lataxisSpan={\"conic conformal\":150,stereographic:179.5,\"*\":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:\"equirectangular\",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:\"albers usa\"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:\"conic conformal\",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:\"mercator\",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:\"mercator\",projRotate:[0,0,0]},\"north america\":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:\"conic conformal\",projRotate:[-100,0,0],projParallels:[29.5,45.5]},\"south america\":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:\"mercator\",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor=\"#F0DC82\",r.waterColor=\"#3399FF\",r.locationmodeToLayer={\"ISO-3\":\"countries\",\"USA-states\":\"subunits\",\"country names\":\"countries\"},r.sphereSVG={type:\"Sphere\"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=[\"bg\",\"ocean\",\"land\",\"lakes\",\"subunits\",\"countries\",\"coastlines\",\"rivers\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"frontplot\"],r.layersForChoropleth=[\"bg\",\"ocean\",\"land\",\"subunits\",\"countries\",\"coastlines\",\"lataxis\",\"lonaxis\",\"frame\",\"backplot\",\"rivers\",\"lakes\",\"frontplot\"],r.layerNameToAdjective={ocean:\"ocean\",land:\"land\",lakes:\"lake\",subunits:\"subunit\",countries:\"country\",coastlines:\"coastline\",rivers:\"river\",frame:\"frame\"}},{}],819:[function(t,e,r){\"use strict\";function n(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var i=t(\"d3\"),a=t(\"../../plotly\"),o=t(\"../../lib\"),s=t(\"../../components/color\"),l=t(\"../../components/drawing\"),c=t(\"../../components/fx\"),u=t(\"../plots\"),f=t(\"../cartesian/axes\"),h=t(\"../../components/dragelement\"),d=t(\"../cartesian/select\"),p=t(\"./zoom\"),m=t(\"./constants\"),g=t(\"../../lib/topojson_utils\"),v=t(\"topojson-client\").feature;t(\"./projections\")(i);var y=n.prototype;e.exports=function(t){return new n(t)},y.plot=function(t,e,r){var n=this,i=e[this.id],a=g.getTopojsonName(i);null===n.topojson||a!==n.topojsonName?(n.topojsonName=a,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then(function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(t,e)})):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(t,e))):n.update(t,e)},y.fetchTopojson=function(){var t=g.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise(function(e,r){i.json(t,function(n,i){if(n)return r(404===n.status?new Error([\"plotly.js could not find topojson file at\",t,\".\",\"Make sure the *topojsonURL* plot config option\",\"is set properly.\"].join(\" \")):new Error([\"unexpected error while fetching topojson file at\",t].join(\" \")));e(i)})})},y.update=function(t,e){var r=e[this.id];if(!this.updateProjection(e,r)){this.hasChoropleth=!1;for(var n=0;n<t.length;n++)if(\"choropleth\"===t[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial||this.saveViewInitial(r),this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),u.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var i=this.layers.frontplot.select(\".scatterlayer\");this.dataPoints.point=i.selectAll(\".point\"),this.dataPoints.text=i.selectAll(\"text\"),this.dataPaths.line=i.selectAll(\".js-line\");var a=this.layers.backplot.select(\".choroplethlayer\");this.dataPaths.choropleth=a.selectAll(\"path\"),this.render()}},y.updateProjection=function(t,e){var r=t._size,n=e.domain,s=e.projection,l=s.rotation||{},c=e.center||{},u=this.projection=function(t){for(var e=t.projection.type,r=i.geo[m.projNames[e]](),n=t._isClipped?m.lonaxisSpan[e]/2:null,a=[\"center\",\"rotate\",\"parallels\",\"clipExtent\"],o=function(t){return t?r:[]},s=0;s<a.length;s++){var l=a[s];\"function\"!=typeof r[l]&&(r[l]=o)}return r.isLonLatOverEdges=function(t){if(null===r(t))return!0;if(n){var e=r.rotate();return i.geo.distance(t,[-e[0],-e[1]])>n*Math.PI/180}return!1},r.getPath=function(){return i.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(m.precision),n&&r.clipAngle(n-m.clipPad),r}(e);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var f=[[r.l+r.w*n.x[0],r.t+r.h*(1-n.y[1])],[r.l+r.w*n.x[1],r.t+r.h*(1-n.y[0])]],h=e.lonaxis,d=e.lataxis,p=function(t,e){var r=m.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:\"Polygon\",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}(h.range,d.range);u.fitExtent(f,p);var g=this.bounds=u.getBounds(p),v=this.fitScale=u.scale(),y=u.translate();if(!isFinite(g[0][0])||!isFinite(g[0][1])||!isFinite(g[1][0])||!isFinite(g[1][1])||isNaN(y[0])||isNaN(y[0])){for(var x=this.graphDiv,b=[\"projection.rotation\",\"center\",\"lonaxis.range\",\"lataxis.range\"],_=\"Invalid geo settings, relayout'ing to default view.\",w={},M=0;M<b.length;M++)w[this.id+\".\"+b[M]]=null;return this.viewInitial=null,o.warn(_),x._promises.push(a.relayout(x,w)),_}var k=this.midPt=[(g[0][0]+g[1][0])/2,(g[0][1]+g[1][1])/2];if(u.scale(s.scale*v).translate([y[0]+(k[0]-y[0]),y[1]+(k[1]-y[1])]).clipExtent(g),e._isAlbersUsa){var A=u([c.lon,c.lat]),T=u.translate();u.translate([T[0]-(A[0]-T[0]),T[1]-(A[1]-T[1])])}},y.updateBaseLayers=function(t,e){function r(t){return\"lonaxis\"===t||\"lataxis\"===t}function n(t){return Boolean(m.lineLayers[t])}function a(t){return Boolean(m.fillLayers[t])}var o=this,c=o.topojson,u=o.layers,f=o.basePaths,h=(this.hasChoropleth?m.layersForChoropleth:m.layers).filter(function(t){return n(t)||a(t)?e[\"show\"+t]:!r(t)||e[t].showgrid}),d=o.framework.selectAll(\".layer\").data(h,String);d.exit().each(function(t){delete u[t],delete f[t],i.select(this).remove()}),d.enter().append(\"g\").attr(\"class\",function(t){return\"layer \"+t}).each(function(t){var e=u[t]=i.select(this);\"bg\"===t?o.bgRect=e.append(\"rect\").style(\"pointer-events\",\"all\"):r(t)?f[t]=e.append(\"path\").style(\"fill\",\"none\"):\"backplot\"===t?e.append(\"g\").classed(\"choroplethlayer\",!0):\"frontplot\"===t?e.append(\"g\").classed(\"scatterlayer\",!0):n(t)?f[t]=e.append(\"path\").style(\"fill\",\"none\").style(\"stroke-miterlimit\",2):a(t)&&(f[t]=e.append(\"path\").style(\"stroke\",\"none\"))}),d.order(),d.each(function(t){var o=f[t],u=m.layerNameToAdjective[t];\"frame\"===t?o.datum(m.sphereSVG):n(t)||a(t)?o.datum(v(c,c.objects[t])):r(t)&&o.datum(function(t,e){var r=e[t].dtick,n=m.scopeDefaults[e.scope],a=n.lonaxisRange,o=n.lataxisRange,s=\"lonaxis\"===t?[r]:[0,r];return i.geo.graticule().extent([[a[0],o[0]],[a[1],o[1]]]).step(s)}(t,e)).call(s.stroke,e[t].gridcolor).call(l.dashLine,\"\",e[t].gridwidth),n(t)?o.call(s.stroke,e[u+\"color\"]).call(l.dashLine,\"\",e[u+\"width\"]):a(t)&&o.call(s.fill,e[u+\"color\"])})},y.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,c=r[1][1]-a+n;l.setRect(this.clipRect,i,a,o,c),this.bgRect.call(l.setRect,i,a,o,c).call(s.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=c},y.updateFx=function(t,e){function r(){var t=o.viewInitial,e={};for(var r in t)e[o.id+\".\"+r]=t[r];a.relayout(s,e),s.emit(\"plotly_doubleclick\",null)}function n(t){return o.projection.invert([t[0]+o.xaxis._offset,t[1]+o.yaxis._offset])}var o=this,s=o.graphDiv,l=o.bgRect,u=t.dragmode;if(!o.isStatic){if(\"pan\"===u)l.node().onmousedown=null,l.call(p(o,e)),l.on(\"dblclick.zoom\",r);else if(\"select\"===u||\"lasso\"===u){l.on(\".zoom\",null);var f;\"select\"===u?f=function(t,e){(t.range={})[o.id]=[n([e.xmin,e.ymin]),n([e.xmax,e.ymax])]}:\"lasso\"===u&&(f=function(t,e,r){(t.lassoPoints={})[o.id]=r.filtered.map(n)});var m={element:o.bgRect.node(),gd:s,plotinfo:{xaxis:o.xaxis,yaxis:o.yaxis,fillRangeItems:f},xaxes:[o.xaxis],yaxes:[o.yaxis],subplot:o.id,clickFn:function(e){2===e&&t._zoomlayer.selectAll(\".select-outline\").remove()}};m.prepFn=function(t,e,r){d(t,e,r,m,u)},h.init(m)}l.on(\"mousemove\",function(){var t=o.projection.invert(i.mouse(this));if(!t||isNaN(t[0])||isNaN(t[1]))return h.unhover(s,i.event);o.xaxis.p2c=function(){return t[0]},o.yaxis.p2c=function(){return t[1]},c.hover(s,i.event,o.id)}),l.on(\"mouseout\",function(){h.unhover(s,i.event)}),l.on(\"click\",function(){c.click(s,i.event)})}},y.makeFramework=function(){var t=this,e=t.graphDiv._fullLayout,r=\"clip\"+e._uid+t.id;t.clipDef=e._clips.append(\"clipPath\").attr(\"id\",r),t.clipRect=t.clipDef.append(\"rect\"),t.framework=i.select(t.container).append(\"g\").attr(\"class\",\"geo \"+t.id).call(l.setClipUrl,r),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:\"x\",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:\"y\",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:\"linear\",showexponent:\"all\",exponentformat:\"B\"},f.setConvert(t.mockAxis,e)},y.saveViewInitial=function(t){var e=t.center||{},r=t.projection,n=r.rotation||{};t._isScoped?this.viewInitial={\"center.lon\":e.lon,\"center.lat\":e.lat,\"projection.scale\":r.scale}:t._isClipped?this.viewInitial={\"projection.scale\":r.scale,\"projection.rotation.lon\":n.lon,\"projection.rotation.lat\":n.lat}:this.viewInitial={\"center.lon\":e.lon,\"center.lat\":e.lat,\"projection.scale\":r.scale,\"projection.rotation.lon\":n.lon}},y.render=function(){function t(t){var e=n(t.lonlat);return e?\"translate(\"+e[0]+\",\"+e[1]+\")\":null}function e(t){return n.isLonLatOverEdges(t.lonlat)?\"none\":null}var r,n=this.projection,i=n.getPath();for(r in this.basePaths)this.basePaths[r].attr(\"d\",i);for(r in this.dataPaths)this.dataPaths[r].attr(\"d\",function(t){return i(t.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr(\"display\",e).attr(\"transform\",t)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../lib\":743,\"../../lib/topojson_utils\":769,\"../../plotly\":784,\"../cartesian/axes\":789,\"../cartesian/select\":807,\"../plots\":852,\"./constants\":818,\"./projections\":824,\"./zoom\":825,d3:128,\"topojson-client\":549}],820:[function(t,e,r){\"use strict\";var n=t(\"./geo\"),i=t(\"../../plots/get_data\").getSubplotCalcData,a=t(\"../../lib\").counterRegex;r.name=\"geo\",r.attr=\"geo\",r.idRoot=\"geo\",r.idRegex=r.attrRegex=a(\"geo\"),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=e._subplots.geo;void 0===window.PlotlyGeoAssets&&(window.PlotlyGeoAssets={topojson:{}});for(var o=0;o<a.length;o++){var s=a[o],l=i(r,\"geo\",s),c=e[s]._subplot;c||(c=n({id:s,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}},r.updateFx=function(t){for(var e=t._subplots.geo,r=0;r<e.length;r++){var n=t[e[r]];n._subplot.updateFx(t,n)}}},{\"../../lib\":743,\"../../plots/get_data\":826,\"./geo\":819,\"./layout/attributes\":821,\"./layout/defaults\":822,\"./layout/layout_attributes\":823}],821:[function(t,e,r){\"use strict\";e.exports={geo:{valType:\"subplotid\",dflt:\"geo\",editType:\"calc\"}}},{}],822:[function(t,e,r){\"use strict\";function n(t,e,r){var n=r(\"resolution\"),i=r(\"scope\"),o=a.scopeDefaults[i],l=r(\"projection.type\",o.projType),c=e._isAlbersUsa=\"albers usa\"===l;c&&(i=e.scope=\"usa\");var u=e._isScoped=\"world\"!==i,f=e._isConic=-1!==l.indexOf(\"conic\");e._isClipped=!!a.lonaxisSpan[l];for(var h=0;h<s.length;h++){var d,p=s[h],m=[30,10][h];if(u)d=o[p+\"Range\"];else{var g=a[p+\"Span\"],v=(g[l]||g[\"*\"])/2,y=r(\"projection.rotation.\"+p.substr(0,3),o.projRotate[h]);d=[y-v,y+v]}r(p+\".tick0\",r(p+\".range\",d)[0]),r(p+\".dtick\",m),r(p+\".showgrid\")&&(r(p+\".gridcolor\"),r(p+\".gridwidth\"))}var x=e.lonaxis.range,b=e.lataxis.range,_=x[0],w=x[1];_>0&&w<0&&(w+=360);var M,k=(_+w)/2;if(!c){var A=u?o.projRotate:[k,0,0];M=r(\"projection.rotation.lon\",A[0]),r(\"projection.rotation.lat\",A[1]),r(\"projection.rotation.roll\",A[2]),r(\"showcoastlines\",!u)&&(r(\"coastlinecolor\"),r(\"coastlinewidth\")),r(\"showocean\")&&r(\"oceancolor\")}var T,S;if(c?(T=-96.6,S=38.7):(T=u?k:M,S=(b[0]+b[1])/2),r(\"center.lon\",T),r(\"center.lat\",S),f){r(\"projection.parallels\",o.projParallels||[0,60])}r(\"projection.scale\"),r(\"showland\")&&r(\"landcolor\"),r(\"showlakes\")&&r(\"lakecolor\"),r(\"showrivers\")&&(r(\"rivercolor\"),r(\"riverwidth\")),r(\"showcountries\",u&&\"usa\"!==i)&&(r(\"countrycolor\"),r(\"countrywidth\")),(\"usa\"===i||\"north america\"===i&&50===n)&&(r(\"showsubunits\",!0),r(\"subunitcolor\"),r(\"subunitwidth\")),u||r(\"showframe\",!0)&&(r(\"framecolor\"),r(\"framewidth\")),r(\"bgcolor\")}var i=t(\"../../subplot_defaults\"),a=t(\"../constants\"),o=t(\"./layout_attributes\"),s=a.axesNames;e.exports=function(t,e,r){i(t,e,r,{type:\"geo\",attributes:o,handleDefaults:n,partition:\"y\"})}},{\"../../subplot_defaults\":865,\"../constants\":818,\"./layout_attributes\":823}],823:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color/attributes\"),i=t(\"../../domain_attributes\"),a=t(\"../constants\"),o=t(\"../../../plot_api/edit_types\").overrideAll,s={range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},showgrid:{valType:\"boolean\",dflt:!1},tick0:{valType:\"number\"},dtick:{valType:\"number\"},gridcolor:{valType:\"color\",dflt:n.lightLine},gridwidth:{valType:\"number\",min:0,dflt:1}};e.exports=o({domain:i({name:\"geo\"},{}),resolution:{valType:\"enumerated\",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:\"enumerated\",values:Object.keys(a.scopeDefaults),dflt:\"world\"},projection:{type:{valType:\"enumerated\",values:Object.keys(a.projNames)},rotation:{lon:{valType:\"number\"},lat:{valType:\"number\"},roll:{valType:\"number\"}},parallels:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},scale:{valType:\"number\",min:0,dflt:1}},center:{lon:{valType:\"number\"},lat:{valType:\"number\"}},showcoastlines:{valType:\"boolean\"},coastlinecolor:{valType:\"color\",dflt:n.defaultLine},coastlinewidth:{valType:\"number\",min:0,dflt:1},showland:{valType:\"boolean\",dflt:!1},landcolor:{valType:\"color\",dflt:a.landColor},showocean:{valType:\"boolean\",dflt:!1},oceancolor:{valType:\"color\",dflt:a.waterColor},showlakes:{valType:\"boolean\",dflt:!1},lakecolor:{valType:\"color\",dflt:a.waterColor},showrivers:{valType:\"boolean\",dflt:!1},rivercolor:{valType:\"color\",dflt:a.waterColor},riverwidth:{valType:\"number\",min:0,dflt:1},showcountries:{valType:\"boolean\"},countrycolor:{valType:\"color\",dflt:n.defaultLine},countrywidth:{valType:\"number\",min:0,dflt:1},showsubunits:{valType:\"boolean\"},subunitcolor:{valType:\"color\",dflt:n.defaultLine},subunitwidth:{valType:\"number\",min:0,dflt:1},showframe:{valType:\"boolean\"},framecolor:{valType:\"color\",dflt:n.defaultLine},framewidth:{valType:\"number\",min:0,dflt:1},bgcolor:{valType:\"color\",dflt:n.background},lonaxis:s,lataxis:s},\"plot\",\"from-root\")},{\"../../../components/color/attributes\":617,\"../../../plot_api/edit_types\":773,\"../../domain_attributes\":815,\"../constants\":818}],824:[function(t,e,r){\"use strict\";e.exports=function(t){function e(t,e){return{type:\"Feature\",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if(\"GeometryCollection\"===e.type)return{type:\"GeometryCollection\",geometries:object.geometries.map(function(t){return r(t,n)})};if(!M.hasOwnProperty(e.type))return null;var i=M[e.type];return t.geo.stream(e,n(i)),i.result()}function n(){}function i(t){return t>1?S:t<-1?-S:Math.asin(t)}function a(t){return t>1?0:t<-1?T:Math.acos(t)}function o(t,e){var r=(2+S)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>k;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(T*(4+T))*t*(1+Math.cos(e)),2*Math.sqrt(T/(4+T))*Math.sin(e)]}function s(t,e){function r(r,n){var i=D(r/e,n);return i[0]*=t,i}return arguments.length<2&&(e=t),1===e?D:e===1/0?l:(r.invert=function(r,n){var i=D.invert(r/t,n);return i[0]*=e,i},r)}function l(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function c(t,e){return[3*t/(2*T)*Math.sqrt(T*T/3-e*e),e]}function u(t,e){return[t,1.25*Math.log(Math.tan(T/4+.4*e))]}function f(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)>k&&--i>0);return e/2}}function h(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 d(t,e){var r,n=Math.min(18,36*Math.abs(e)/T),i=Math.floor(n),a=n-i,o=(r=P[i])[0],s=r[1],l=(r=P[++i])[0],c=r[1],u=(r=P[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?S:-S)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function p(t,e){return[t*Math.cos(e),e]}function m(t,e){var r=Math.cos(e),n=function(t){return t?t/Math.sin(t):1}(a(r*Math.cos(t/=2)));return[2*r*Math.sin(t)*n,Math.sin(e)*n]}function g(t,e){var r=m(t,e);return[(r[0]+t/S)/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&&v.hasOwnProperty(t.type)?v[t.type]:r)(t,n)};var v={Feature:e,FeatureCollection:function(t,r){return{type:\"FeatureCollection\",features:t.features.map(function(t){return e(t,r)})}}},y=[],x=[],b={point:function(t,e){y.push([t,e])},result:function(){var t=y.length?y.length<2?{type:\"Point\",coordinates:y[0]}:{type:\"MultiPoint\",coordinates:y}:null;return y=[],t}},_={lineStart:n,point:function(t,e){y.push([t,e])},lineEnd:function(){y.length&&(x.push(y),y=[])},result:function(){var t=x.length?x.length<2?{type:\"LineString\",coordinates:x[0]}:{type:\"MultiLineString\",coordinates:x}:null;return x=[],t}},w={polygonStart:n,lineStart:n,point:function(t,e){y.push([t,e])},lineEnd:function(){var t=y.length;if(t){do{y.push(y[0].slice())}while(++t<4);x.push(y),y=[]}},polygonEnd:n,result:function(){if(!x.length)return null;var t=[],e=[];return x.forEach(function(r){!function(t){if((e=t.length)<4)return!1;for(var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++r<e;)n+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return n<=0}(r)?e.push(r):t.push([r])}),e.forEach(function(e){var r=e[0];t.some(function(t){if(function(t,e){for(var r=e[0],n=e[1],i=!1,a=0,o=t.length,s=o-1;a<o;s=a++){var l=t[a],c=l[0],u=l[1],f=t[s],h=f[0],d=f[1];u>n^d>n&&r<(h-c)*(n-u)/(d-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),x=[],t.length?t.length>1?{type:\"MultiPolygon\",coordinates:t}:{type:\"Polygon\",coordinates:t[0]}:null}},M={Point:b,MultiPoint:b,LineString:_,MultiLineString:_,Polygon:w,MultiPolygon:w,Sphere:w},k=1e-6,A=k*k,T=Math.PI,S=T/2,E=(Math.sqrt(T),T/180),L=180/T,C=t.geo.projection,z=t.geo.projectionMutator;t.geo.interrupt=function(e){function r(t,r){for(var n=r<0?-1:1,i=a[+(r<0)],o=0,s=i.length-1;o<s&&t>i[o][2][0];++o);var l=e(t-i[o][1][0],r);return l[0]+=e(i[o][1][0],n*r>n*i[o][0][1]?i[o][0][1]:r)[0],l}function n(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++a<o;){n=((r=t[a])[0]-s[0])/e,i=(r[1]-s[1])/e;for(var c=0;c<e;++c)l.push([s[0]+c*n,s[1]+c*i]);s=r}return l.push(r),l}var i,a=[[[[-T,0],[0,S],[T,0]]],[[[-T,0],[0,-S],[T,0]]]];e.invert&&(r.invert=function(t,n){for(var o=i[+(n<0)],s=a[+(n<0)],l=0,c=o.length;l<c;++l){var u=o[l];if(u[0][0]<=t&&t<u[1][0]&&u[0][1]<=n&&n<u[1][1]){var f=e.invert(t-e(s[l][1][0],0)[0],n);return f[0]+=s[l][1][0],function(t,e){return Math.abs(t[0]-e[0])<k&&Math.abs(t[1]-e[1])<k}(r(f[0],f[1]),[t,n])?f:null}}});var o=t.geo.projection(r),s=o.stream;return o.stream=function(e){var r=o.rotate(),i=s(e),l=(o.rotate([0,0]),s(e));return o.rotate(r),i.sphere=function(){t.geo.stream(function(){for(var e=[],r=0,i=a[0].length;r<i;++r){var o=180*(f=a[0][r])[0][0]/T,s=180*f[0][1]/T,l=180*f[1][1]/T,c=180*f[2][0]/T,u=180*f[2][1]/T;e.push(n([[o+1e-6,s+1e-6],[o+1e-6,l-1e-6],[c-1e-6,l-1e-6],[c-1e-6,u+1e-6]],30))}for(r=a[1].length-1;r>=0;--r){var f;o=180*(f=a[1][r])[0][0]/T,s=180*f[0][1]/T,l=180*f[1][1]/T,c=180*f[2][0]/T,u=180*f[2][1]/T,e.push(n([[c-1e-6,u-1e-6],[c-1e-6,l+1e-6],[o+1e-6,l+1e-6],[o+1e-6,s-1e-6]],30))}return{type:\"Polygon\",coordinates:[t.merge(e)]}}(),l)},i},o.lobes=function(t){return arguments.length?(a=t.map(function(t){return t.map(function(t){return[[t[0][0]*T/180,t[0][1]*T/180],[t[1][0]*T/180,t[1][1]*T/180],[t[2][0]*T/180,t[2][1]*T/180]]})}),i=a.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]]})}),o):a.map(function(t){return t.map(function(t){return[[180*t[0][0]/T,180*t[0][1]/T],[180*t[1][0]/T,180*t[1][1]/T],[180*t[2][0]/T,180*t[2][1]/T]]})})},o},o.invert=function(t,e){var r=.5*e*Math.sqrt((4+T)/T),n=i(r),a=Math.cos(n);return[t/(2/Math.sqrt(T*(4+T))*(1+a)),i((n+r*(a+2))/(2+S))]},(t.geo.eckert4=function(){return C(o)}).raw=o;var D=t.geo.azimuthalEqualArea.raw;l.invert=function(t,e){var r=2*i(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=z(s),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=s,c.invert=function(t,e){return[2/3*T*t/Math.sqrt(T*T/3-e*e),e]},(t.geo.kavrayskiy7=function(){return C(c)}).raw=c,u.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*T]},(t.geo.miller=function(){return C(u)}).raw=u,f(T);var I=function(t,e,r){function n(r,n){return[t*r*Math.cos(n=a(n)),e*Math.sin(n)]}var a=f(r);return n.invert=function(n,a){var o=i(a/e);return[n/(t*Math.cos(o)),i((2*o+Math.sin(2*o))/r)]},n}(Math.SQRT2/S,Math.SQRT2,T);(t.geo.mollweide=function(){return C(I)}).raw=I,h.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>k&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return C(h)}).raw=h;var P=[[.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]];P.forEach(function(t){t[1]*=1.0144}),d.invert=function(t,e){var r=e/S,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=P[a][1],s=P[a+1][1],l=P[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,h=u/c,d=f*(1-h*f*(1-2*h*f));if(d>=0||1===a){n=(e>=0?5:-5)*(d+i);var p,m=50;do{d=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=P[a][1],s=P[a+1][1],l=P[Math.min(19,a+2)][1],n-=(p=(e>=0?S:-S)*(s+d*(l-o)/2+d*d*(l-2*s+o)/2)-e)*L}while(Math.abs(p)>A&&--m>0);break}}while(--a>=0);var g=P[a][0],v=P[a+1][0],y=P[Math.min(19,a+2)][0];return[t/(v+d*(y-g)/2+d*d*(y-2*v+g)/2),n*E]},(t.geo.robinson=function(){return C(d)}).raw=d,p.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return C(p)}).raw=p,m.invert=function(t,e){if(!(t*t+4*e*e>T*T+k)){var r=t,n=e,i=25;do{var o,s=Math.sin(r),l=Math.sin(r/2),c=Math.cos(r/2),u=Math.sin(n),f=Math.cos(n),h=Math.sin(2*n),d=u*u,p=f*f,m=l*l,g=1-p*c*c,v=g?a(f*c)*Math.sqrt(o=1/g):o=0,y=2*v*f*l-t,x=v*u-e,b=o*(p*m+v*f*c*d),_=o*(.5*s*h-2*v*u*l),w=.25*o*(h*l-v*u*p*s),M=o*(d*c+v*m*f),A=_*w-M*b;if(!A)break;var S=(x*_-y*M)/A,E=(y*w-x*b)/A;r-=S,n-=E}while((Math.abs(S)>k||Math.abs(E)>k)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return C(m)}).raw=m,g.invert=function(t,e){var r=t,n=e,i=25;do{var o,s=Math.cos(n),l=Math.sin(n),c=Math.sin(2*n),u=l*l,f=s*s,h=Math.sin(r),d=Math.cos(r/2),p=Math.sin(r/2),m=p*p,g=1-f*d*d,v=g?a(s*d)*Math.sqrt(o=1/g):o=0,y=.5*(2*v*s*p+r/S)-t,x=.5*(v*l+n)-e,b=.5*o*(f*m+v*s*d*u)+.5/S,_=o*(h*c/4-v*l*p),w=.125*o*(c*p-v*l*f*h),M=.5*o*(u*d+v*m*s)+.5,A=_*w-M*b,T=(x*_-y*M)/A,E=(y*w-x*b)/A;r-=T,n-=E}while((Math.abs(T)>k||Math.abs(E)>k)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return C(g)}).raw=g}},{}],825:[function(t,e,r){\"use strict\";function n(t,e){return d.behavior.zoom().translate(e.translate()).scale(e.scale())}function i(t,e,r){function n(t,e){var r=p.nestedProperty(s,t);r.get()!==e&&(r.set(e),p.nestedProperty(o,t).set(e),l[i+\".\"+t]=e)}var i=t.id,a=t.graphDiv,o=a.layout[i],s=a._fullLayout[i],l={};r(n),n(\"projection.scale\",e.scale()/t.fitScale),a.emit(\"plotly_relayout\",l)}function a(t,e){function r(r){var n=e.invert(t.midPt);r(\"center.lon\",n[0]),r(\"center.lat\",n[1])}var a=n(0,e);return a.on(\"zoomstart\",function(){d.select(this).style(v)}).on(\"zoom\",function(){e.scale(d.event.scale).translate(d.event.translate),t.render()}).on(\"zoomend\",function(){d.select(this).style(y),i(t,e,r)}),a}function o(t,e){function r(t){return e.invert(t)}function a(r){var n=e.rotate(),i=e.invert(t.midPt);r(\"projection.rotation.lon\",-n[0]),r(\"center.lon\",i[0]),r(\"center.lat\",i[1])}var o,s,l,c,u,f,h,p,m=n(0,e),g=2;return m.on(\"zoomstart\",function(){d.select(this).style(v),o=d.mouse(this),s=e.rotate(),l=e.translate(),c=s,u=r(o)}).on(\"zoom\",function(){if(f=d.mouse(this),function(t){var n=e(r(t));return Math.abs(n[0]-t[0])>g||Math.abs(n[1]-t[1])>g}(o))return m.scale(e.scale()),void m.translate(e.translate());e.scale(d.event.scale),e.translate([l[0],d.event.translate[1]]),u?r(f)&&(p=r(f),h=[c[0]+(p[0]-u[0]),s[1],s[2]],e.rotate(h),c=h):u=r(o=f),t.render()}).on(\"zoomend\",function(){d.select(this).style(y),i(t,e,a)}),m}function s(t,e){function r(t){var r=e.rotate();t(\"projection.rotation.lon\",-r[0]),t(\"projection.rotation.lat\",-r[1])}var a,o={r:e.rotate(),k:e.scale()},s=n(0,e),u=function(t){var e=0,r=arguments.length,n=[];for(;++e<r;)n.push(arguments[e]);var i=d.dispatch.apply(null,n);return i.of=function(e,r){return function(n){var a;try{a=n.sourceEvent=d.event,n.target=t,d.event=n,i[n.type].apply(e,r)}finally{d.event=a}}},i}(s,\"zoomstart\",\"zoom\",\"zoomend\"),p=0,x=s.on;return s.on(\"zoomstart\",function(){d.select(this).style(v);var t=d.mouse(this),r=e.rotate(),n=r,i=e.translate(),y=function(t){var e=.5*t[0]*m,r=.5*t[1]*m,n=.5*t[2]*m,i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),c=Math.cos(n);return[a*s*c+i*o*l,i*s*c-a*o*l,a*o*c+i*s*l,a*s*l-i*o*c]}(r);a=l(e,t),x.call(s,\"zoom\",function(){var s=d.mouse(this);if(e.scale(o.k=d.event.scale),a){if(l(e,s)){e.rotate(r).translate(i);var p=l(e,s),m=function(t,e){if(!t||!e)return;var r=function(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]]}(t,e),n=Math.sqrt(h(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,h(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}(a,p),v=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*g,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*g,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*g]}(function(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],c=e[3];return[r*o-n*s-i*l-a*c,r*s+n*o+i*c-a*l,r*l-n*c+i*o+a*s,r*c+n*l-i*s+a*o]}(y,m)),x=o.r=function(t,e,r){var n=f(e,2,t[0]);n=f(n=f(n,1,t[1]),0,t[2]-r[2]);var i,a,o=e[0],s=e[1],l=e[2],u=n[0],h=n[1],d=n[2],p=Math.atan2(s,o)*g,m=Math.sqrt(o*o+s*s);Math.abs(h)>m?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/m)*g-p,i=Math.sqrt(m*m-h*h));var v=180-a-2*p,y=(Math.atan2(d,u)-Math.atan2(l,i))*g,x=(Math.atan2(d,u)-Math.atan2(l,-i))*g,b=c(r[0],r[1],a,y),_=c(r[0],r[1],v,x);return b<=_?[a,y,r[2]]:[v,x,r[2]]}(v,a,n);isFinite(x[0])&&isFinite(x[1])&&isFinite(x[2])||(x=n),e.rotate(x),n=x}}else a=l(e,t=s);!function(t){t({type:\"zoom\"})}(u.of(this,arguments))}),function(t){p++||t({type:\"zoomstart\"})}(u.of(this,arguments))}).on(\"zoomend\",function(){d.select(this).style(y),x.call(s,\"zoom\",null),function(t){--p||t({type:\"zoomend\"})}(u.of(this,arguments)),i(t,e,r)}).on(\"zoom.redraw\",function(){t.render()}),d.rebind(s,u,\"on\")}function l(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*m,r=t[1]*m,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function c(t,e,r,n){var i=u(r-t),a=u(n-e);return Math.sqrt(i*i+a*a)}function u(t){return(t%360+540)%360-180}function f(t,e,r){var n=r*m,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 h(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}var d=t(\"d3\"),p=t(\"../../lib\"),m=Math.PI/180,g=180/Math.PI,v={cursor:\"pointer\"},y={cursor:\"auto\"};e.exports=function(t,e){var r=t.projection;return(e._isScoped?a:e._isClipped?s:o)(t,r)}},{\"../../lib\":743,d3:128}],826:[function(t,e,r){\"use strict\";var n=t(\"../registry\"),i=t(\"./cartesian/constants\").SUBPLOT_PATTERN;r.getSubplotCalcData=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},r.getModuleCalcData=function(t,e){var r=[],i=\"string\"==typeof e?n.getModule(e):e;if(!i)return r;for(var a=0;a<t.length;a++){var o=t[a],s=o[0].trace;s._module===i&&!0===s.visible&&r.push(o)}return r},r.getSubplotData=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if(\"gl2d\"===e){var u=r.match(i);o=\"x\"+u[1],s=\"y\"+u[2]}for(var f=0;f<t.length;f++)a=t[f],\"gl2d\"===e&&n.traceIs(a,\"gl2d\")?a[l[0]]===o&&a[l[1]]===s&&c.push(a):a[l]===r&&c.push(a);return c}},{\"../registry\":873,\"./cartesian/constants\":794}],827:[function(t,e,r){\"use strict\";var n=t(\"mouse-change\"),i=t(\"mouse-wheel\"),a=t(\"mouse-event-offset\"),o=t(\"../cartesian/constants\");e.exports=function(t){function e(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function r(r,n,i){function a(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(f[e]=i,f[e+2]=a,c.dataBox=f,t.setRanges(f)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}var s,u,f=t.calcDataBox(),h=l.viewBox,d=c.lastPos[0],p=c.lastPos[1],m=o.MINDRAG*l.pixelRatio,g=o.MINZOOM*l.pixelRatio;switch(n*=l.pixelRatio,i*=l.pixelRatio,i=h[3]-h[1]-i,t.fullLayout.dragmode){case\"zoom\":if(r){var v=n/(h[2]-h[0])*(f[2]-f[0])+f[0],y=i/(h[3]-h[1])*(f[3]-f[1])+f[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)<g,b=Math.abs(c.dragStart[1]-i)<g;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(c.boxEnd[0]=c.boxStart[0]),b&&(c.boxEnd[1]=c.boxStart[1]);else{s=c.boxEnd[0]-c.boxStart[0],u=c.boxEnd[1]-c.boxStart[1];var _=(f[3]-f[1])/(f[2]-f[0]);Math.abs(s*_)>Math.abs(u)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(s)*_*(u>=0?1:-1),c.boxEnd[1]<f[1]?(c.boxEnd[1]=f[1],c.boxEnd[0]=c.boxStart[0]+(f[1]-c.boxStart[1])/Math.abs(_)):c.boxEnd[1]>f[3]&&(c.boxEnd[1]=f[3],c.boxEnd[0]=c.boxStart[0]+(f[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(u)/_*(s>=0?1:-1),c.boxEnd[0]<f[0]?(c.boxEnd[0]=f[0],c.boxEnd[1]=c.boxStart[1]+(f[0]-c.boxStart[0])*Math.abs(_)):c.boxEnd[0]>f[2]&&(c.boxEnd[0]=f[2],c.boxEnd[1]=c.boxStart[1]+(f[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(s=c.boxStart[0]!==c.boxEnd[0],u=c.boxStart[1]!==c.boxEnd[1],s||u?(s&&(a(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),u&&(a(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case\"pan\":c.boxEnabled=!1,c.boxInited=!1,r?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)<m&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<m&&(i=c.dragStart[1]),s=(d-n)*(f[2]-f[0])/(l.viewBox[2]-l.viewBox[0]),u=(p-i)*(f[3]-f[1])/(l.viewBox[3]-l.viewBox[1]),f[0]+=s,f[2]+=s,f[1]+=u,f[3]+=u,t.setRanges(f),c.panning=!0,c.lastInputTime=Date.now(),e(),t.cameraChanged(),t.handleAnnotations()):c.panning&&(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}var s=t.mouseContainer,l=t.glplot,c=new function(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}(s,l);return c.mouseListener=n(s,r),s.addEventListener(\"touchstart\",function(t){var e=a(t.changedTouches[0],s);r(0,e[0],e[1]),r(1,e[0],e[1])}),s.addEventListener(\"touchmove\",function(t){t.preventDefault();var e=a(t.changedTouches[0],s);r(1,e[0],e[1])}),s.addEventListener(\"touchend\",function(){r(0,c.lastPos[0],c.lastPos[1])}),c.wheelListener=i(s,function(r,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=l.viewBox,o=c.lastPos[0],s=c.lastPos[1],u=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*u+f,i[2]=(i[2]-f)*u+f,i[1]=(i[1]-h)*u+h,i[3]=(i[3]-h)*u+h,t.setRanges(i),c.lastInputTime=Date.now(),e(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),c}},{\"../cartesian/constants\":794,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446}],828:[function(t,e,r){\"use strict\";function n(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=[\"x\",\"y\"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=[\"sans-serif\",\"sans-serif\"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title=\"\",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont=\"sans-serif\",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=!1,this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var i=t(\"../cartesian/axes\"),a=t(\"../../lib/html2unicode\"),o=t(\"../../lib/str2rgbarray\"),s=n.prototype,l=[\"xaxis\",\"yaxis\"];s.merge=function(t){this.titleEnable=!1,this.backgroundColor=o(t.plot_bgcolor);var e,r,n,i,s,c,u,f,h,d,p;for(d=0;d<2;++d){var m=(e=l[d]).charAt(0);for(n=(r=t[this.scene[e]._name]).title===this.scene.fullLayout._dfltTitle[m]?\"\":r.title,p=0;p<=2;p+=2)this.labelEnable[d+p]=!1,this.labels[d+p]=a(n),this.labelColor[d+p]=o(r.titlefont.color),this.labelFont[d+p]=r.titlefont.family,this.labelSize[d+p]=r.titlefont.size,this.labelPad[d+p]=this.getLabelPad(e,r),this.tickEnable[d+p]=!1,this.tickColor[d+p]=o((r.tickfont||{}).color),this.tickAngle[d+p]=\"auto\"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[d+p]=this.getTickPad(r),this.tickMarkLength[d+p]=0,this.tickMarkWidth[d+p]=r.tickwidth||0,this.tickMarkColor[d+p]=o(r.tickcolor),this.borderLineEnable[d+p]=!1,this.borderLineColor[d+p]=o(r.linecolor),this.borderLineWidth[d+p]=r.linewidth||0;u=this.hasSharedAxis(r),s=this.hasAxisInDfltPos(e,r)&&!u,c=this.hasAxisInAltrPos(e,r)&&!u,i=r.mirror||!1,f=u?-1!==String(i).indexOf(\"all\"):!!i,h=u?\"allticks\"===i:-1!==String(i).indexOf(\"ticks\"),s?this.labelEnable[d]=!0:c&&(this.labelEnable[d+2]=!0),s?this.tickEnable[d]=r.showticklabels:c&&(this.tickEnable[d+2]=r.showticklabels),(s||f)&&(this.borderLineEnable[d]=r.showline),(c||f)&&(this.borderLineEnable[d+2]=r.showline),(s||h)&&(this.tickMarkLength[d]=this.getTickMarkLength(r)),(c||h)&&(this.tickMarkLength[d+2]=this.getTickMarkLength(r)),this.gridLineEnable[d]=r.showgrid,this.gridLineColor[d]=o(r.gridcolor),this.gridLineWidth[d]=r.gridwidth,this.zeroLineEnable[d]=r.zeroline,this.zeroLineColor[d]=o(r.zerolinecolor),this.zeroLineWidth[d]=r.zerolinewidth}},s.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==i.findSubplotsWithAxis(r,t).indexOf(e.id)},s.hasAxisInDfltPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"bottom\"===r:\"yaxis\"===t?\"left\"===r:void 0},s.hasAxisInAltrPos=function(t,e){var r=e.side;return\"xaxis\"===t?\"top\"===r:\"yaxis\"===t?\"right\"===r:void 0},s.getLabelPad=function(t,e){var r=e.titlefont.size,n=e.showticklabels;return\"xaxis\"===t?\"top\"===e.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:\"yaxis\"===t?\"right\"===e.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},s.getTickPad=function(t){return\"outside\"===t.ticks?10+t.ticklen:15},s.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return\"inside\"===t.ticks?-e:e},e.exports=function(t){return new n(t)}},{\"../../lib/html2unicode\":741,\"../../lib/str2rgbarray\":765,\"../cartesian/axes\":789}],829:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"./scene2d\"),a=t(\"../layout_attributes\"),o=t(\"../../constants/xmlns_namespaces\"),s=t(\"../cartesian/constants\"),l=t(\"../cartesian\"),c=t(\"../../components/fx/layout_attributes\"),u=t(\"../get_data\").getSubplotData;r.name=\"gl2d\",r.attr=[\"xaxis\",\"yaxis\"],r.idRoot=[\"x\",\"y\"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=t(\"../cartesian/attributes\"),r.supplyLayoutDefaults=function(t,e,r){e._has(\"cartesian\")||l.supplyLayoutDefaults(t,e,r)},r.layoutAttrOverrides=n(l.layoutAttributes,\"plot\",\"from-root\"),r.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=u(r,\"gl2d\",o),c=s._scene2d;void 0===c&&(c=new i({id:o,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];if(s._scene2d){0===u(t,\"gl2d\",o).length&&(s._scene2d.destroy(),delete n._plots[o])}}l.clean.apply(this,arguments)},r.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":a,x:0,y:0,width:\"100%\",height:\"100%\",preserveAspectRatio:\"none\"}),i.destroy()}},r.updateFx=function(t){for(var e=t._subplots.gl2d,r=0;r<e.length;r++){t._plots[e[r]]._scene2d.updateFx(t.dragmode)}}},{\"../../components/fx/layout_attributes\":661,\"../../constants/xmlns_namespaces\":723,\"../../plot_api/edit_types\":773,\"../cartesian\":800,\"../cartesian/attributes\":788,\"../cartesian/constants\":794,\"../get_data\":826,\"../layout_attributes\":843,\"./scene2d\":830}],830:[function(t,e,r){\"use strict\";function n(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context.scrollZoom,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.glplotOptions=d(this),this.glplotOptions.merge(e),this.glplot=c(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=u(this.glplot),this.selectBox=f(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.bounds=[1/0,1/0,-1/0,-1/0],this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw()}var i,a,o=t(\"../../registry\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../../components/fx\"),c=t(\"gl-plot2d\"),u=t(\"gl-spikes2d\"),f=t(\"gl-select-box\"),h=t(\"webgl-context\"),d=t(\"./convert\"),p=t(\"./camera\"),m=t(\"../../lib/html2unicode\"),g=t(\"../../lib/show_no_webgl_msg\"),v=t(\"../cartesian/constraints\"),y=v.enforce,x=v.clean,b=[\"xaxis\",\"yaxis\"],_=t(\"../cartesian/constants\").SUBPLOT_PATTERN;e.exports=n;var w=n.prototype;w.makeFramework=function(){if(this.staticPlot){if(!(a||(i=document.createElement(\"canvas\"),a=h({canvas:i,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"Error creating static canvas/context for image server\");this.canvas=i,this.gl=a}else{var t=this.container.querySelector(\".gl-canvas-focus\"),e=h({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});e||g(this),this.canvas=t,this.gl=e}var r=this.canvas;r.style.width=\"100%\",r.style.height=\"100%\",r.style.position=\"absolute\",r.style.top=\"0px\",r.style.left=\"0px\",r.style[\"pointer-events\"]=\"none\",this.updateSize(r),r.className+=\" user-select-none\";var n=this.svgContainer=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");n.style.position=\"absolute\",n.style.top=n.style.left=\"0px\",n.style.width=n.style.height=\"100%\",n.style[\"z-index\"]=20,n.style[\"pointer-events\"]=\"none\";var o=this.mouseContainer=document.createElement(\"div\");o.style.position=\"absolute\",o.style[\"pointer-events\"]=\"auto\",this.pickCanvas=this.container.querySelector(\".gl-canvas-pick\");var s=this.container;s.appendChild(n),s.appendChild(o);var l=this;o.addEventListener(\"mouseout\",function(){l.isMouseOver=!1,l.unhover()}),o.addEventListener(\"mouseover\",function(){l.isMouseOver=!0})},w.toImage=function(t){t||(t=\"png\"),this.stopped=!0,this.staticPlot&&this.container.appendChild(i),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,n=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*n*4);e.readPixels(0,0,r,n,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=n-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var f=document.createElement(\"canvas\");f.width=r,f.height=n;var h=f.getContext(\"2d\"),d=h.createImageData(r,n);d.data.set(a),h.putImageData(d,0,0);var p;switch(t){case\"jpeg\":p=f.toDataURL(\"image/jpeg\");break;case\"webp\":p=f.toDataURL(\"image/webp\");break;default:p=f.toDataURL(\"image/png\")}return this.staticPlot&&this.container.removeChild(i),p},w.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),this.redraw&&this.redraw(),t},w.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[s.calcTicks(this.xaxis),s.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=m(t[e][r].text+\"\");return t},w.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(_),r=\"xaxis\"+e[1],n=\"yaxis\"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},w.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout;n.xaxis.autorange=e.autorange,n.xaxis.range=e.range.slice(0),n.yaxis.autorange=r.autorange,n.yaxis.range=r.range.slice(0);var i={lastInputTime:this.camera.lastInputTime};i[e._name]=e.range.slice(0),i[r._name]=r.range.slice(0),t.emit(\"plotly_relayout\",i)},w.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},w.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&o.getComponentMethod(\"annotations\",\"drawOne\")(t,r)}},w.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map(function(e){t[e].dispose(),delete t[e]}),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=null}},w.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var l={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};x(l,this.xaxis),x(l,this.yaxis);var c=r._size,u=this.xaxis.domain,f=this.yaxis.domain;o.viewBox=[c.l+u[0]*c.w,c.b+f[0]*c.h,i-c.r-(1-u[1])*c.w,a-c.t-(1-f[1])*c.h],this.mouseContainer.style.width=c.w*(u[1]-u[0])+\"px\",this.mouseContainer.style.height=c.h*(f[1]-f[0])+\"px\",this.mouseContainer.height=c.h*(f[1]-f[0]),this.mouseContainer.style.left=c.l+u[0]*c.w+\"px\",this.mouseContainer.style.top=c.t+(1-f[1])*c.h+\"px\";var h=this.bounds;h[0]=h[1]=1/0,h[2]=h[3]=-1/0;var d,p,m=Object.keys(this.traces);for(p=0;p<m.length;++p)for(var g=this.traces[m[p]],v=0;v<2;++v)h[v]=Math.min(h[v],g.bounds[v]),h[v+2]=Math.max(h[v+2],g.bounds[v+2]);for(p=0;p<2;++p)h[p]>h[p+2]&&(h[p]=-1,h[p+2]=1),(d=this[b[p]])._length=o.viewBox[p+2]-o.viewBox[p],s.doAutoRange(d),d.setScale();y(l),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},w.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])]},w.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])]},w.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort(function(t,e){return t._trace.index-e._trace.index})},w.updateFx=function(t){\"lasso\"===t||\"select\"===t?(this.pickCanvas.style[\"pointer-events\"]=\"none\",this.mouseContainer.style[\"pointer-events\"]=\"none\"):(this.pickCanvas.style[\"pointer-events\"]=\"auto\",this.mouseContainer.style[\"pointer-events\"]=\"auto\"),this.mouseContainer.style.cursor=\"pan\"===t?\"move\":\"zoom\"===t?\"crosshair\":null},w.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};l.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},w.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,s=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&\"zoom\"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u<2;u++)e.boxStart[u]===e.boxEnd[u]&&(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,d=this.yaxis.domain,p=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,s/t.pixelRatio-(f.t+(1-d[1])*f.h)))&&a.object._trace.handlePick(a);if(p&&n&&this.emitPointAction(p,\"plotly_click\"),a&&\"skip\"!==a.object._trace.hoverinfo&&i.hovermode&&p&&(!this.lastPickResult||this.lastPickResult.traceUid!==p.trace.uid||this.lastPickResult.dataCoord[0]!==p.dataCoord[0]||this.lastPickResult.dataCoord[1]!==p.dataCoord[1])){var m=p;this.lastPickResult={traceUid:p.trace?p.trace.uid:null,dataCoord:p.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),m.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(p,\"plotly_hover\");var g=this.fullData[m.trace.index]||{},v=m.pointIndex,y=l.castHoverinfo(g,i,v);if(y&&\"all\"!==y){var x=y.split(\"+\");-1===x.indexOf(\"x\")&&(m.traceCoord[0]=void 0),-1===x.indexOf(\"y\")&&(m.traceCoord[1]=void 0),-1===x.indexOf(\"z\")&&(m.traceCoord[2]=void 0),-1===x.indexOf(\"text\")&&(m.textLabel=void 0),-1===x.indexOf(\"name\")&&(m.name=void 0)}l.loneHover({x:m.screenCoord[0],y:m.screenCoord[1],xLabel:this.hoverFormatter(\"xaxis\",m.traceCoord[0]),yLabel:this.hoverFormatter(\"yaxis\",m.traceCoord[1]),zLabel:m.traceCoord[2],text:m.textLabel,name:m.name,color:l.castHoverOption(g,v,\"bgcolor\")||m.color,borderColor:l.castHoverOption(g,v,\"bordercolor\"),fontFamily:l.castHoverOption(g,v,\"font.family\"),fontSize:l.castHoverOption(g,v,\"font.size\"),fontColor:l.castHoverOption(g,v,\"font.color\")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},w.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit(\"plotly_unhover\"),l.loneUnhover(this.svgContainer))},w.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return s.tickText(r,r.c2l(e),\"hover\").text}}},{\"../../components/fx\":660,\"../../lib/html2unicode\":741,\"../../lib/show_no_webgl_msg\":763,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../cartesian/constants\":794,\"../cartesian/constraints\":796,\"./camera\":827,\"./convert\":828,\"gl-plot2d\":224,\"gl-select-box\":241,\"gl-spikes2d\":250,\"webgl-context\":577}],831:[function(t,e,r){\"use strict\";e.exports=function(t,e){function r(e,r,i,a){var o=p.keyBindingMode;if(!1!==o){var s=\"rotate\"===o,l=\"pan\"===o,u=\"zoom\"===o,h=!!a.control,d=!!a.alt,y=!!a.shift,x=!!(1&e),b=!!(2&e),_=!!(4&e),w=1/t.clientHeight,M=w*(r-m),k=w*(i-g),A=p.flipX?1:-1,T=p.flipY?1:-1,S=n(),E=Math.PI*p.rotateSpeed;if((s&&x&&!h&&!d&&!y||x&&!h&&!d&&y)&&c.rotate(S,A*E*M,-T*E*k,0),(l&&x&&!h&&!d&&!y||b||x&&h&&!d&&!y)&&c.pan(S,-p.translateSpeed*M*f,p.translateSpeed*k*f,0),u&&x&&!h&&!d&&!y||_||x&&!h&&d&&!y){var L=-p.zoomSpeed*k/window.innerHeight*(S-c.lastT())*100;c.pan(S,0,0,f*(Math.exp(L)-1))}return m=r,g=i,v=a,!0}}t=t||document.body;var l=[.01,1/0];\"distanceLimits\"in(e=e||{})&&(l[0]=e.distanceLimits[0],l[1]=e.distanceLimits[1]),\"zoomMin\"in e&&(l[0]=e.zoomMin),\"zoomMax\"in e&&(l[1]=e.zoomMax);var c=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||\"orbit\",distanceLimits:l}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,d=t.clientHeight,p={keyBindingMode:\"rotate\",view:c,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:c.modes,tick:function(){var e=n(),r=this.delay,i=e-2*r;c.idle(e-r),c.recalcMatrix(i),c.flush(e-(100+2*r));for(var a=!0,o=c.computedMatrix,s=0;s<16;++s)a=a&&u[s]===o[s],u[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===d;return h=t.clientWidth,d=t.clientHeight,a?!l:(f=Math.exp(c.computedRadius[0]),!0)},lookAt:function(t,e,r){c.lookAt(c.lastT(),t,e,r)},rotate:function(t,e,r){c.rotate(c.lastT(),t,e,r)},pan:function(t,e,r){c.pan(c.lastT(),t,e,r)},translate:function(t,e,r){c.translate(c.lastT(),t,e,r)}};Object.defineProperties(p,{matrix:{get:function(){return c.computedMatrix},set:function(t){return c.setMatrix(c.lastT(),t),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(t){var e=c.computedUp.slice(),r=c.computedEye.slice(),i=c.computedCenter.slice();if(c.setMode(t),\"turntable\"===t){var a=n();c._active.lookAt(a,r,i,e),c._active.lookAt(a+500,r,i,[0,0,1]),c._active.flush(a)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(t){return c.lookAt(c.lastT(),null,t),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(t){return c.lookAt(c.lastT(),t),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(t){return c.lookAt(c.lastT(),null,null,t),c.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return c.setDistance(c.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(l)},set:function(t){return c.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener(\"contextmenu\",function(t){return t.preventDefault(),!1});var m=0,g=0,v={shift:!1,control:!1,alt:!1,meta:!1};return p.mouseListener=a(t,r),t.addEventListener(\"touchstart\",function(e){var n=s(e.changedTouches[0],t);r(0,n[0],n[1],v),r(1,n[0],n[1],v)}),t.addEventListener(\"touchmove\",function(e){var n=s(e.changedTouches[0],t);r(1,n[0],n[1],v)}),t.addEventListener(\"touchend\",function(){r(0,m,g,v)}),p.wheelListener=o(t,function(t,e){if(!1!==p.keyBindingMode){var r=p.flipX?1:-1,i=p.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))c.rotate(a,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else{var o=-p.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}},!0),p};var n=t(\"right-now\"),i=t(\"3d-view\"),a=t(\"mouse-change\"),o=t(\"mouse-wheel\"),s=t(\"mouse-event-offset\")},{\"3d-view\":40,\"mouse-change\":443,\"mouse-event-offset\":444,\"mouse-wheel\":446,\"right-now\":509}],832:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../components/fx/layout_attributes\"),a=t(\"./scene\"),o=t(\"../get_data\").getSubplotData,s=t(\"../../lib\"),l=t(\"../../constants/xmlns_namespaces\");r.name=\"gl3d\",r.attr=\"scene\",r.idRoot=\"scene\",r.idRegex=r.attrRegex=s.counterRegex(\"scene\"),r.attributes=t(\"./layout/attributes\"),r.layoutAttributes=t(\"./layout/layout_attributes\"),r.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},\"plot\",\"nested\"),r.supplyLayoutDefaults=t(\"./layout/defaults\"),r.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var l=n[i],c=o(r,\"gl3d\",l),u=e[l],f=u._scene;f||(f=new a({id:l,graphDiv:t,container:t.querySelector(\".gl-container\"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),u._scene=f),f.cameraInitial||(f.cameraInitial=s.extendDeep({},u.camera)),f.plot(c,e,t.layout)}},r.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(\".annotation-\"+o).remove())}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:l.svg,\"xlink:href\":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:\"none\"}),s.destroy()}},r.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return\"1\"===e&&(e=\"\"),\"scene\"+e}},r.updateFx=function(t){for(var e=t._subplots.gl3d,r=0;r<e.length;r++){t[e[r]]._scene.updateFx(t.dragmode,t.hovermode)}}},{\"../../components/fx/layout_attributes\":661,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../get_data\":826,\"./layout/attributes\":833,\"./layout/defaults\":837,\"./layout/layout_attributes\":838,\"./scene\":842}],833:[function(t,e,r){\"use strict\";e.exports={scene:{valType:\"subplotid\",dflt:\"scene\",editType:\"calc+clearAxisTypes\"}}},{}],834:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color\"),i=t(\"../../cartesian/layout_attributes\"),a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../plot_api/edit_types\").overrideAll;e.exports=o({visible:i.visible,showspikes:{valType:\"boolean\",dflt:!0},spikesides:{valType:\"boolean\",dflt:!0},spikethickness:{valType:\"number\",min:0,dflt:2},spikecolor:{valType:\"color\",dflt:n.defaultLine},showbackground:{valType:\"boolean\",dflt:!1},backgroundcolor:{valType:\"color\",dflt:\"rgba(204, 204, 204, 0.5)\"},showaxeslabels:{valType:\"boolean\",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:i.title,titlefont:i.titlefont,type:i.type,autorange:i.autorange,rangemode:i.rangemode,range:i.range,tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:\"rgb(204, 204, 204)\"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},\"plot\",\"from-root\")},{\"../../../components/color\":618,\"../../../lib/extend\":732,\"../../../plot_api/edit_types\":773,\"../../cartesian/layout_attributes\":801}],835:[function(t,e,r){\"use strict\";var n=t(\"tinycolor2\").mix,i=t(\"../../../lib\"),a=t(\"./axis_attributes\"),o=t(\"../../cartesian/type_defaults\"),s=t(\"../../cartesian/axis_defaults\"),l=[\"xaxis\",\"yaxis\",\"zaxis\"];e.exports=function(t,e,r){function c(t,e){return i.coerce(u,f,a,t,e)}for(var u,f,h=0;h<l.length;h++){var d=l[h];u=t[d]||{},f=e[d]={_id:d[0]+r.scene,_name:d},o(u,f,c,r.data),s(u,f,c,{font:r.font,letter:d[0],data:r.data,showGrid:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),c(\"gridcolor\",n(f.color,r.bgColor,13600/187).toRgbString()),c(\"title\",d[0]),f.setScale=i.noop,c(\"showspikes\")&&(c(\"spikesides\"),c(\"spikethickness\"),c(\"spikecolor\",f.color)),c(\"showaxeslabels\"),c(\"showbackground\")&&c(\"backgroundcolor\")}}},{\"../../../lib\":743,\"../../cartesian/axis_defaults\":791,\"../../cartesian/type_defaults\":813,\"./axis_attributes\":834,tinycolor2:546}],836:[function(t,e,r){\"use strict\";function n(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=[\"sans-serif\",\"sans-serif\",\"sans-serif\"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=[\"x\",\"y\",\"z\"],this.labelEnable=[!0,!0,!0],this.labelFont=[\"Open Sans\",\"Open Sans\",\"Open Sans\"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var i=t(\"../../../lib/html2unicode\"),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.labels[e]=i(r.title),\"titlefont\"in r&&(r.titlefont.color&&(this.labelColor[e]=a(r.titlefont.color)),r.titlefont.family&&(this.labelFont[e]=r.titlefont.family),r.titlefont.size&&(this.labelSize[e]=r.titlefont.size)),\"showline\"in r&&(this.lineEnable[e]=r.showline),\"linecolor\"in r&&(this.lineColor[e]=a(r.linecolor)),\"linewidth\"in r&&(this.lineWidth[e]=r.linewidth),\"showgrid\"in r&&(this.gridEnable[e]=r.showgrid),\"gridcolor\"in r&&(this.gridColor[e]=a(r.gridcolor)),\"gridwidth\"in r&&(this.gridWidth[e]=r.gridwidth),\"log\"===r.type?this.zeroEnable[e]=!1:\"zeroline\"in r&&(this.zeroEnable[e]=r.zeroline),\"zerolinecolor\"in r&&(this.zeroLineColor[e]=a(r.zerolinecolor)),\"zerolinewidth\"in r&&(this.zeroLineWidth[e]=r.zerolinewidth),\"ticks\"in r&&r.ticks?this.lineTickEnable[e]=!0:this.lineTickEnable[e]=!1,\"ticklen\"in r&&(this.lineTickLength[e]=this._defaultLineTickLength[e]=r.ticklen),\"tickcolor\"in r&&(this.lineTickColor[e]=a(r.tickcolor)),\"tickwidth\"in r&&(this.lineTickWidth[e]=r.tickwidth),\"tickangle\"in r&&(this.tickAngle[e]=\"auto\"===r.tickangle?0:Math.PI*-r.tickangle/180),\"showticklabels\"in r&&(this.tickEnable[e]=r.showticklabels),\"tickfont\"in r&&(r.tickfont.color&&(this.tickColor[e]=a(r.tickfont.color)),r.tickfont.family&&(this.tickFont[e]=r.tickfont.family),r.tickfont.size&&(this.tickSize[e]=r.tickfont.size)),\"mirror\"in r?-1!==[\"ticks\",\"all\",\"allticks\"].indexOf(r.mirror)?(this.lineTickMirror[e]=!0,this.lineMirror[e]=!0):!0===r.mirror?(this.lineTickMirror[e]=!1,this.lineMirror[e]=!0):(this.lineTickMirror[e]=!1,this.lineMirror[e]=!1):this.lineMirror[e]=!1,\"showbackground\"in r&&!1!==r.showbackground?(this.backgroundEnable[e]=!0,this.backgroundColor[e]=a(r.backgroundcolor)):this.backgroundEnable[e]=!1):(this.tickEnable[e]=!1,this.labelEnable[e]=!1,this.lineEnable[e]=!1,this.lineTickEnable[e]=!1,this.gridEnable[e]=!1,this.zeroEnable[e]=!1,this.backgroundEnable[e]=!1)}},e.exports=function(t){var e=new n;return e.merge(t),e}},{\"../../../lib/html2unicode\":741,\"../../../lib/str2rgbarray\":765}],837:[function(t,e,r){\"use strict\";function n(t,e,r,n){for(var i=r(\"bgcolor\"),s=a.combine(i,n.paper_bgcolor),c=[\"up\",\"center\",\"eye\"],u=0;u<c.length;u++)r(\"camera.\"+c[u]+\".x\"),r(\"camera.\"+c[u]+\".y\"),r(\"camera.\"+c[u]+\".z\");var f=!!r(\"aspectratio.x\")&&!!r(\"aspectratio.y\")&&!!r(\"aspectratio.z\"),h=r(\"aspectmode\",f?\"manual\":\"auto\");f||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},\"manual\"===h&&(e.aspectmode=\"auto\"),t.aspectmode=e.aspectmode),l(t,e,{font:n.font,scene:n.id,data:n.fullData,bgColor:s,calendar:n.calendar,fullLayout:n.fullLayout}),o.getComponentMethod(\"annotations3d\",\"handleDefaults\")(t,e,n),r(\"dragmode\",n.getDfltFromLayout(\"dragmode\")),r(\"hovermode\",n.getDfltFromLayout(\"hovermode\"))}var i=t(\"../../../lib\"),a=t(\"../../../components/color\"),o=t(\"../../../registry\"),s=t(\"../../subplot_defaults\"),l=t(\"./axis_defaults\"),c=t(\"./layout_attributes\");e.exports=function(t,e,r){var a=e._basePlotModules.length>1;s(t,e,r,{type:\"gl3d\",attributes:c,handleDefaults:n,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!a)return i.validate(t[e],c[e])?t[e]:void 0},paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{\"../../../components/color\":618,\"../../../lib\":743,\"../../../registry\":873,\"../../subplot_defaults\":865,\"./axis_defaults\":835,\"./layout_attributes\":838}],838:[function(t,e,r){\"use strict\";function n(t,e,r){return{x:{valType:\"number\",dflt:t,editType:\"camera\"},y:{valType:\"number\",dflt:e,editType:\"camera\"},z:{valType:\"number\",dflt:r,editType:\"camera\"},editType:\"camera\"}}var i=t(\"./axis_attributes\"),a=t(\"../../domain_attributes\"),o=t(\"../../../lib/extend\").extendFlat,s=t(\"../../../lib\").counterRegex;e.exports={_arrayAttrRegexps:[s(\"scene\",\".annotations\",!0)],bgcolor:{valType:\"color\",dflt:\"rgba(0,0,0,0)\",editType:\"plot\"},camera:{up:o(n(0,0,1),{}),center:o(n(0,0,0),{}),eye:o(n(1.25,1.25,1.25),{}),editType:\"camera\"},domain:a({name:\"scene\",editType:\"plot\"}),aspectmode:{valType:\"enumerated\",values:[\"auto\",\"cube\",\"data\",\"manual\"],dflt:\"auto\",editType:\"plot\",impliedEdits:{\"aspectratio.x\":void 0,\"aspectratio.y\":void 0,\"aspectratio.z\":void 0}},aspectratio:{x:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},y:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},z:{valType:\"number\",min:0,editType:\"plot\",impliedEdits:{\"^aspectmode\":\"manual\"}},editType:\"plot\",impliedEdits:{aspectmode:\"manual\"}},xaxis:i,yaxis:i,zaxis:i,dragmode:{valType:\"enumerated\",values:[\"orbit\",\"turntable\",\"zoom\",\"pan\",!1],dflt:\"turntable\",editType:\"plot\"},hovermode:{valType:\"enumerated\",values:[\"closest\",!1],dflt:\"closest\",editType:\"modebar\"},editType:\"plot\",_deprecated:{cameraposition:{valType:\"info_array\",editType:\"camera\"}}}},{\"../../../lib\":743,\"../../../lib/extend\":732,\"../../domain_attributes\":815,\"./axis_attributes\":834}],839:[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]}var i=t(\"../../../lib/str2rgbarray\"),a=[\"xaxis\",\"yaxis\",\"zaxis\"];n.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[a[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=i(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new n;return e.merge(t),e}},{\"../../../lib/str2rgbarray\":765}],840:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,l=t.fullSceneLayout,c=[[],[],[]],u=0;u<3;++u){var f=l[o[u]];if(f._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(f._length)===1/0)c[u]=[];else{f.range[0]=r[u].lo/t.dataScale[u],f.range[1]=r[u].hi/t.dataScale[u],f._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),f.range[0]===f.range[1]&&(f.range[0]-=1,f.range[1]+=1);var h=f.tickmode;if(\"auto\"===f.tickmode){f.tickmode=\"linear\";var d=f.nticks||i.constrain(f._length/40,4,9);n.autoTicks(f,Math.abs(f.range[1]-f.range[0])/d)}for(var p=n.calcTicks(f),m=0;m<p.length;++m)p[m].x=p[m].x*t.dataScale[u],p[m].text=a(p[m].text);c[u]=p,f.tickmode=h}}for(e.ticks=c,u=0;u<3;++u)for(s[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]),m=0;m<2;++m)e.bounds[m][u]=t.glplot.bounds[m][u];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(c)};var n=t(\"../../cartesian/axes\"),i=t(\"../../../lib\"),a=t(\"../../../lib/html2unicode\"),o=[\"xaxis\",\"yaxis\",\"zaxis\"],s=[0,0,0]},{\"../../../lib\":743,\"../../../lib/html2unicode\":741,\"../../cartesian/axes\":789}],841:[function(t,e,r){\"use strict\";function n(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}e.exports=function(t,e){return n(t.projection,n(t.view,n(t.model,[e[0],e[1],e[2],1])))}},{}],842:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i={canvas:r,gl:n,container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1};if(t.staticMode){if(!(c||(l=document.createElement(\"canvas\"),c=f({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error(\"error creating static canvas/context for image server\");i.pixelRatio=t.pixelRatio,i.gl=c,i.canvas=l}try{t.glplot=u(i)}catch(e){v(t)}var a=function(t){if(!1!==t.fullSceneLayout.dragmode){var e={};e[t.id+\".camera\"]=s(t.camera),t.saveCamera(t.graphDiv.layout),t.graphDiv.emit(\"plotly_relayout\",e)}};if(t.glplot.canvas.addEventListener(\"mouseup\",a.bind(null,t)),t.glplot.canvas.addEventListener(\"wheel\",a.bind(null,t)),t.staticMode||t.glplot.canvas.addEventListener(\"webglcontextlost\",function(t){d.warn(\"Lost WebGL context.\"),t.preventDefault()}),!t.camera){var o=t.fullSceneLayout.camera;t.camera=y(t.container,{center:[o.center.x,o.center.y,o.center.z],eye:[o.eye.x,o.eye.y,o.eye.z],up:[o.up.x,o.up.y,o.up.z],zoomMin:.1,zoomMax:100,mode:\"orbit\"})}return t.glplot.camera=t.camera,t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(t){function e(e,r){var n=t.fullSceneLayout[e];return p.tickText(n,n.d2l(r),\"hover\").text}var r,n=t.svgContainer,i=t.container.getBoundingClientRect(),a=i.width,o=i.height;n.setAttributeNS(null,\"viewBox\",\"0 0 \"+a+\" \"+o),n.setAttributeNS(null,\"width\",a),n.setAttributeNS(null,\"height\",o),w(t),t.glplot.axes.update(t.axesOptions);for(var s=Object.keys(t.traces),l=null,c=t.glplot.selection,u=0;u<s.length;++u)\"skip\"!==(r=t.traces[s[u]]).data.hoverinfo&&r.handlePick(c)&&(l=r),r.setContourLevels&&r.setContourLevels();var f;if(null!==l){var h=x(t.glplot.cameraParams,c.dataCoordinate);r=l.data;var d=c.index,g=m.castHoverinfo(r,t.fullLayout,d),v=e(\"xaxis\",c.traceCoordinate[0]),y=e(\"yaxis\",c.traceCoordinate[1]),b=e(\"zaxis\",c.traceCoordinate[2]);if(\"all\"!==g){var _=g.split(\"+\");-1===_.indexOf(\"x\")&&(v=void 0),-1===_.indexOf(\"y\")&&(y=void 0),-1===_.indexOf(\"z\")&&(b=void 0),-1===_.indexOf(\"text\")&&(c.textLabel=void 0),-1===_.indexOf(\"name\")&&(l.name=void 0)}t.fullSceneLayout.hovermode&&m.loneHover({x:(.5+.5*h[0]/h[3])*a,y:(.5-.5*h[1]/h[3])*o,xLabel:v,yLabel:y,zLabel:b,text:c.textLabel,name:l.name,color:m.castHoverOption(r,d,\"bgcolor\")||l.color,borderColor:m.castHoverOption(r,d,\"bordercolor\"),fontFamily:m.castHoverOption(r,d,\"font.family\"),fontSize:m.castHoverOption(r,d,\"font.size\"),fontColor:m.castHoverOption(r,d,\"font.color\")},{container:n,gd:t.graphDiv});var M={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:r._input,fullData:r,curveNumber:r.index,pointNumber:d};m.appendArrayPointValue(M,r,d);var k={points:[M]};c.buttons&&c.distance<5?t.graphDiv.emit(\"plotly_click\",k):t.graphDiv.emit(\"plotly_hover\",k),f=k}else m.loneUnhover(n),t.graphDiv.emit(\"plotly_unhover\",f);t.drawAnnotations(t)}.bind(null,t),t.traces={},!0}function i(t,e){var r=document.createElement(\"div\"),i=t.container;this.graphDiv=t.graphDiv;var a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");a.style.position=\"absolute\",a.style.top=a.style.left=\"0px\",a.style.width=a.style.height=\"100%\",a.style[\"z-index\"]=20,a.style[\"pointer-events\"]=\"none\",r.appendChild(a),this.svgContainer=a,r.id=t.id,r.style.position=\"absolute\",r.style.top=r.style.left=\"0px\",r.style.width=r.style.height=\"100%\",i.appendChild(r),this.fullLayout=e,this.id=t.id||\"scene\",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=b(e[this.id]),this.spikeOptions=_(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=h.getComponentMethod(\"annotations3d\",\"convert\"),this.drawAnnotations=h.getComponentMethod(\"annotations3d\",\"draw\"),n(this)}function a(t,e,r,n,i){for(var a,o=0;o<e.length;++o)if(Array.isArray(e[o]))for(var s=0;s<e[o].length;++s)a=t.d2l(e[o][s],0,i),!isNaN(a)&&isFinite(a)&&(n[0][r]=Math.min(n[0][r],a),n[1][r]=Math.max(n[1][r],a));else a=t.d2l(e[o],0,i),!isNaN(a)&&isFinite(a)&&(n[0][r]=Math.min(n[0][r],a),n[1][r]=Math.max(n[1][r],a))}function o(t,e,r){var n=t.fullSceneLayout;a(n.xaxis,e.x,0,r,e.xcalendar),a(n.yaxis,e.y,1,r,e.ycalendar),a(n.zaxis,e.z,2,r,e.zcalendar)}function s(t){return{up:{x:t.up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]}}}var l,c,u=t(\"gl-plot3d\"),f=t(\"webgl-context\"),h=t(\"../../registry\"),d=t(\"../../lib\"),p=t(\"../../plots/cartesian/axes\"),m=t(\"../../components/fx\"),g=t(\"../../lib/str2rgbarray\"),v=t(\"../../lib/show_no_webgl_msg\"),y=t(\"./camera\"),x=t(\"./project\"),b=t(\"./layout/convert\"),_=t(\"./layout/spikes\"),w=t(\"./layout/tick_marks\"),M=i.prototype;M.recoverContext=function(){function t(){r.isContextLost()?requestAnimationFrame(t):n(e,e.fullLayout,i,r)?e.plot.apply(e,e.plotArgs):d.error(\"Catastrophic and unrecoverable WebGL error. Context lost.\")}var e=this,r=this.glplot.gl,i=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame(t)};var k=[\"xaxis\",\"yaxis\",\"zaxis\"];M.plot=function(t,e,r){if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var n,i,a,s,l,c,u=e[this.id],f=r[this.id];u.bgcolor?this.glplot.clearColor=g(u.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=e,this.fullSceneLayout=u,this.glplotLayout=u,this.axesOptions.merge(u),this.spikeOptions.merge(u),this.setCamera(u.camera),this.updateFx(u.dragmode,u.hovermode),this.glplot.update({}),this.setConvert(l),t?Array.isArray(t)||(t=[t]):t=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;a<t.length;++a)!0===(n=t[a]).visible&&o(this,n,h);var d=[1,1,1];for(s=0;s<3;++s)h[0][s]>h[1][s]?d[s]=1:h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(this.dataScale=d,this.convertAnnotations(this),a=0;a<t.length;++a)!0===(n=t[a]).visible&&((i=this.traces[n.uid])?i.update(n):(i=n._module.plot(this,n),this.traces[n.uid]=i),i.name=n.name);var p=Object.keys(this.traces);t:for(a=0;a<p.length;++a){for(s=0;s<t.length;++s)if(t[s].uid===p[a]&&!0===t[s].visible)continue t;(i=this.traces[p[a]]).dispose(),delete this.traces[p[a]]}this.glplot.objects.sort(function(t,e){return t._trace.data.index-e._trace.data.index});var m=[[0,0,0],[0,0,0]],v=[],y={};for(a=0;a<3;++a){if(l=u[k[a]],(c=l.type)in y?(y[c].acc*=d[a],y[c].count+=1):y[c]={acc:d[a],count:1},l.autorange){m[0][a]=1/0,m[1][a]=-1/0;var x=this.glplot.objects,b=this.fullSceneLayout.annotations||[],_=l._name.charAt(0);for(s=0;s<x.length;s++){var w=x[s].bounds;m[0][a]=Math.min(m[0][a],w[0][a]/d[a]),m[1][a]=Math.max(m[1][a],w[1][a]/d[a])}for(s=0;s<b.length;s++){var M=b[s];if(M.visible){var A=l.r2l(M[_]);m[0][a]=Math.min(m[0][a],A),m[1][a]=Math.max(m[1][a],A)}}if(\"rangemode\"in l&&\"tozero\"===l.rangemode&&(m[0][a]=Math.min(m[0][a],0),m[1][a]=Math.max(m[1][a],0)),m[0][a]>m[1][a])m[0][a]=-1,m[1][a]=1;else{var T=m[1][a]-m[0][a];m[0][a]-=T/32,m[1][a]+=T/32}}else{var S=l.range;m[0][a]=l.r2l(S[0]),m[1][a]=l.r2l(S[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[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 E=[1,1,1];for(a=0;a<3;++a){var L=y[c=(l=u[k[a]]).type];E[a]=Math.pow(L.acc,1/L.count)/d[a]}var C;if(\"auto\"===u.aspectmode)C=Math.max.apply(null,E)/Math.min.apply(null,E)<=4?E:[1,1,1];else if(\"cube\"===u.aspectmode)C=[1,1,1];else if(\"data\"===u.aspectmode)C=E;else{if(\"manual\"!==u.aspectmode)throw new Error(\"scene.js aspectRatio was not one of the enumerated types\");var z=u.aspectratio;C=[z.x,z.y,z.z]}u.aspectratio.x=f.aspectratio.x=C[0],u.aspectratio.y=f.aspectratio.y=C[1],u.aspectratio.z=f.aspectratio.z=C[2],this.glplot.aspect=C;var D=u.domain||null,I=e._size||null;if(D&&I){var P=this.container.style;P.position=\"absolute\",P.left=I.l+D.x[0]*I.w+\"px\",P.top=I.t+(1-D.y[1])*I.h+\"px\",P.width=I.w*(D.x[1]-D.x[0])+\"px\",P.height=I.h*(D.y[1]-D.y[0])+\"px\"}this.glplot.redraw()}},M.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener(\"wheel\",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},M.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),s(this.glplot.camera)},M.setCamera=function(t){this.glplot.camera.lookAt.apply(this,function(t){return[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]}(t))},M.saveCamera=function(t){function e(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]]}var r=this.getCamera(),n=d.nestedProperty(t,this.id+\".camera\"),i=n.get(),a=!1;if(void 0===i)a=!0;else for(var o=0;o<3;o++)for(var s=0;s<3;s++)if(!e(r,i,o,s)){a=!0;break}return a&&n.set(r),a},M.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},M.toImage=function(t){t||(t=\"png\"),this.staticMode&&this.container.appendChild(l),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;a<o;++a,--o)for(var s=0;s<r;++s)for(var c=0;c<4;++c){var u=i[4*(r*a+s)+c];i[4*(r*a+s)+c]=i[4*(r*o+s)+c],i[4*(r*o+s)+c]=u}var f=document.createElement(\"canvas\");f.width=r,f.height=n;var h=f.getContext(\"2d\"),d=h.createImageData(r,n);d.data.set(i),h.putImageData(d,0,0);var p;switch(t){case\"jpeg\":p=f.toDataURL(\"image/jpeg\");break;case\"webp\":p=f.toDataURL(\"image/webp\");break;default:p=f.toDataURL(\"image/png\")}return this.staticMode&&this.container.removeChild(l),p},M.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=d.noop}},e.exports=i},{\"../../components/fx\":660,\"../../lib\":743,\"../../lib/show_no_webgl_msg\":763,\"../../lib/str2rgbarray\":765,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./camera\":831,\"./layout/convert\":836,\"./layout/spikes\":839,\"./layout/tick_marks\":840,\"./project\":841,\"gl-plot3d\":226,\"webgl-context\":577}],843:[function(t,e,r){\"use strict\";var n=t(\"./font_attributes\"),i=t(\"../components/color/attributes\"),a=n({editType:\"calc\"});a.family.dflt='\"Open Sans\", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=i.defaultLine,e.exports={font:a,title:{valType:\"string\",editType:\"layoutstyle\"},titlefont:n({editType:\"layoutstyle\"}),autosize:{valType:\"boolean\",dflt:!1,editType:\"none\"},width:{valType:\"number\",min:10,dflt:700,editType:\"none\"},height:{valType:\"number\",min:10,dflt:450,editType:\"none\"},margin:{l:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},r:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},t:{valType:\"number\",min:0,dflt:100,editType:\"calc\"},b:{valType:\"number\",min:0,dflt:80,editType:\"calc\"},pad:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},autoexpand:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},paper_bgcolor:{valType:\"color\",dflt:i.background,editType:\"plot\"},plot_bgcolor:{valType:\"color\",dflt:i.background,editType:\"layoutstyle\"},separators:{valType:\"string\",editType:\"plot\"},hidesources:{valType:\"boolean\",dflt:!1,editType:\"plot\"},showlegend:{valType:\"boolean\",editType:\"legend\"},colorway:{valType:\"colorlist\",dflt:i.defaults,editType:\"calc\"}}},{\"../components/color/attributes\":617,\"./font_attributes\":816}],844:[function(t,e,r){\"use strict\";e.exports={styleUrlPrefix:\"mapbox://styles/mapbox/\",styleUrlSuffix:\"v9\",controlContainerClassName:\"mapboxgl-control-container\",noAccessTokenErrorMsg:[\"Missing Mapbox access token.\",\"Mapbox trace type require a Mapbox access token to be registered.\",\"For example:\",\" Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\",\"More info here: https://www.mapbox.com/help/define-access-token/\"].join(\"\\n\"),mapOnErrorMsg:\"Mapbox error.\"}},{}],845:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){var r=t.split(\" \"),i=r[0],a=r[1],o=Array.isArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=[\"\",\"\"],u=[0,0];switch(i){case\"top\":c[0]=\"top\",u[1]=-l;break;case\"bottom\":c[0]=\"bottom\",u[1]=l}switch(a){case\"left\":c[1]=\"right\",u[0]=-s;break;case\"right\":c[1]=\"left\",u[0]=s}var f;return f=c[0]&&c[1]?c.join(\"-\"):c[0]?c[0]:c[1]?c[1]:\"center\",{anchor:f,offset:u}}},{\"../../lib\":743}],846:[function(t,e,r){\"use strict\";var n=t(\"mapbox-gl\"),i=t(\"../../lib\"),a=t(\"../../plots/get_data\").getSubplotCalcData,o=t(\"../../constants/xmlns_namespaces\"),s=t(\"./mapbox\"),l=t(\"./constants\");r.name=\"mapbox\",r.attr=\"subplot\",r.idRoot=\"mapbox\",r.idRegex=r.attrRegex=i.counterRegex(\"mapbox\"),r.attributes={subplot:{valType:\"subplotid\",dflt:\"mapbox\",editType:\"calc\"}},r.layoutAttributes=t(\"./layout_attributes\"),r.supplyLayoutDefaults=t(\"./layout_defaults\"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,o=e._subplots.mapbox,c=function(t,e){var r=t._fullLayout,n=t._context;if(\"\"===n.mapboxAccessToken)return\"\";for(var i=n.mapboxAccessToken,a=0;a<e.length;a++){var o=r[e[a]];if(o.accesstoken){i=o.accesstoken;break}}if(!i)throw new Error(l.noAccessTokenErrorMsg);return i}(t,o);n.accessToken=c;for(var u=0;u<o.length;u++){var f=o[u],h=a(r,\"mapbox\",f),d=e[f],p=d._subplot;d.accesstoken=c,p||(p=s({gd:t,container:e._glcontainer.node(),id:f,fullLayout:e,staticPlot:t._context.staticPlot}),e[f]._subplot=p),p.viewInitial||(p.viewInitial={center:i.extendFlat({},d.center),zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),p.plot(h,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.mapbox||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],s=a.domain,l=a._subplot,c=l.toImage(\"png\");e._glimages.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":c,x:n.l+n.w*s.x[0],y:n.t+n.h*(1-s.y[1]),width:n.w*(s.x[1]-s.x[0]),height:n.h*(s.y[1]-s.y[0]),preserveAspectRatio:\"none\"}),l.destroy()}},r.updateFx=function(t){for(var e=t._subplots.mapbox,r=0;r<e.length;r++){t[e[r]]._subplot.updateFx(t)}}},{\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../plots/get_data\":826,\"./constants\":844,\"./layout_attributes\":848,\"./layout_defaults\":849,\"./mapbox\":850,\"mapbox-gl\":334}],847:[function(t,e,r){\"use strict\";function n(t,e){this.mapbox=t,this.map=t.map,this.uid=t.uid+\"-layer\"+e,this.idSource=this.uid+\"-source\",this.idLayer=this.uid+\"-layer\",this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}function i(t){var e=t.source;return a.isPlainObject(e)||\"string\"==typeof e&&e.length>0}var a=t(\"../../lib\"),o=t(\"./convert_text_opts\"),s=n.prototype;s.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)},s.needsNewSource=function(t){return this.sourceType!==t.sourcetype||this.source!==t.source||this.layerType!==t.type},s.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==t.below},s.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=function(t){var e,r=t.sourcetype,n=t.source,i={type:r};return\"geojson\"===r?e=\"data\":\"vector\"===r&&(e=\"string\"==typeof n?\"url\":\"tiles\"),i[e]=n,i}(t);e.addSource(this.idSource,r)}},s.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);this.mapbox.setOptions(this.idLayer,\"setLayoutProperty\",{visibility:\"visible\"})}},s.updateStyle=function(t){var e=function(t){var e={},r={};switch(t.type){case\"circle\":a.extendFlat(r,{\"circle-radius\":t.circle.radius,\"circle-color\":t.color,\"circle-opacity\":t.opacity});break;case\"line\":a.extendFlat(r,{\"line-width\":t.line.width,\"line-color\":t.color,\"line-opacity\":t.opacity});break;case\"fill\":a.extendFlat(r,{\"fill-color\":t.color,\"fill-outline-color\":t.fill.outlinecolor,\"fill-opacity\":t.opacity});break;case\"symbol\":var n=t.symbol,i=o(n.textposition,n.iconsize);a.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}),a.extendFlat(r,{\"icon-color\":t.color,\"text-color\":n.textfont.color,\"text-opacity\":t.opacity})}return{layout:e,paint:r}}(t);i(t)&&(this.mapbox.setOptions(this.idLayer,\"setLayoutProperty\",e.layout),this.mapbox.setOptions(this.idLayer,\"setPaintProperty\",e.paint))},s.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\":743,\"./convert_text_opts\":845}],848:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\").defaultLine,a=t(\"../domain_attributes\"),o=t(\"../font_attributes\"),s=t(\"../../traces/scatter/attributes\").textposition,l=t(\"../../plot_api/edit_types\").overrideAll,c=o({});c.family.dflt=\"Open Sans Regular, Arial Unicode MS Regular\",e.exports=l({_arrayAttrRegexps:[n.counterRegex(\"mapbox\",\".layers\",!0)],domain:a({name:\"mapbox\"}),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:c,textposition:n.extendFlat({},s,{arrayOk:!1})}}},\"plot\",\"from-root\")},{\"../../components/color\":618,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../../traces/scatter/attributes\":1066,\"../domain_attributes\":815,\"../font_attributes\":816}],849:[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\"),function(t,e){function r(t,e){return i.coerce(n,a,o.layers,t,e)}var n,a,s=t.layers||[],l=e.layers=[];for(var c=0;c<s.length;c++)if(n=s[c],a={},i.isPlainObject(n)){var u=r(\"sourcetype\");r(\"source\"),\"vector\"===u&&r(\"sourcelayer\");var f=r(\"type\");r(\"below\"),r(\"color\"),r(\"opacity\"),\"circle\"===f&&r(\"circle.radius\"),\"line\"===f&&r(\"line.width\"),\"fill\"===f&&r(\"fill.outlinecolor\"),\"symbol\"===f&&(r(\"symbol.icon\"),r(\"symbol.iconsize\"),r(\"symbol.text\"),i.coerceFont(r,\"symbol.textfont\"),r(\"symbol.textposition\")),a._index=c,l.push(a)}}(t,e),e._input=t}var i=t(\"../../lib\"),a=t(\"../subplot_defaults\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){a(t,e,r,{type:\"mapbox\",attributes:o,handleDefaults:n,partition:\"y\"})}},{\"../../lib\":743,\"../subplot_defaults\":865,\"./layout_attributes\":848}],850:[function(t,e,r){\"use strict\";function n(t){this.id=t.id,this.gd=t.gd,this.container=t.container,this.isStatic=t.staticPlot;var e=t.fullLayout;this.uid=e._uid+\"-\"+this.id,this.opts=e[this.id],this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(e),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[]}function i(t){var e=d.style.values,r=d.style.dflt,n={};return c.isPlainObject(t)?(n.id=t.id,n.style=t):\"string\"==typeof t?(n.id=t,n.style=-1!==e.indexOf(t)?a(t):t):(n.id=r,n.style=a(r)),n}function a(t){return h.styleUrlPrefix+t+\"-\"+h.styleUrlSuffix}function o(t){return[t.lon,t.lat]}var s=t(\"mapbox-gl\"),l=t(\"../../components/fx\"),c=t(\"../../lib\"),u=t(\"../../components/dragelement\"),f=t(\"../cartesian/select\"),h=t(\"./constants\"),d=t(\"./layout_attributes\"),p=t(\"./layers\"),m=n.prototype;e.exports=function(t){return new n(t)},m.plot=function(t,e,r){var n=this,i=n.opts=e[this.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash=[],n.layerList={});var a;a=n.map?new Promise(function(r,i){n.updateMap(t,e,r,i)}):new Promise(function(r,i){n.createMap(t,e,r,i)}),r.push(a)},m.createMap=function(t,e,r,n){function a(){l.loneUnhover(e._toppaper)}var u=this,f=u.gd,d=u.opts,p=u.styleObj=i(d.style);u.accessToken=d.accesstoken;var m=u.map=new s.Map({container:u.div,style:p.style,center:o(d.center),zoom:d.zoom,bearing:d.bearing,pitch:d.pitch,interactive:!u.isStatic,preserveDrawingBuffer:u.isStatic,doubleClickZoom:!1,boxZoom:!1}),g=h.controlContainerClassName,v=u.div.getElementsByClassName(g)[0];u.div.removeChild(v),m._canvas.canvas.style.left=\"0px\",m._canvas.canvas.style.top=\"0px\",u.rejectOnError(n),m.once(\"load\",function(){u.updateData(t),u.updateLayout(e),u.resolveOnRender(r)}),u.isStatic||(m.on(\"moveend\",function(t){if(u.map){var e=u.getView();if(d._input.center=d.center=e.center,d._input.zoom=d.zoom=e.zoom,d._input.bearing=d.bearing=e.bearing,d._input.pitch=d.pitch=e.pitch,t.originalEvent){var r={};r[u.id]=c.extendFlat({},e),f.emit(\"plotly_relayout\",r)}}}),m.on(\"mousemove\",function(t){var e=u.div.getBoundingClientRect();t.clientX=t.point.x+e.left,t.clientY=t.point.y+e.top,t.target.getBoundingClientRect=function(){return e},u.xaxis.p2c=function(){return t.lngLat.lng},u.yaxis.p2c=function(){return t.lngLat.lat},l.hover(f,t,u.id)}),m.on(\"click\",function(t){l.click(f,t.originalEvent)}),m.on(\"dragstart\",a),m.on(\"zoomstart\",a),m.on(\"dblclick\",function(){var t=u.viewInitial;m.setCenter(o(t.center)),m.setZoom(t.zoom),m.setBearing(t.bearing),m.setPitch(t.pitch);var e=u.getView();d._input.center=d.center=e.center,d._input.zoom=d.zoom=e.zoom,d._input.bearing=d.bearing=e.bearing,d._input.pitch=d.pitch=e.pitch,f.emit(\"plotly_doubleclick\",null)}))},m.updateMap=function(t,e,r,n){var a=this,o=a.map;a.rejectOnError(n);var s=i(a.opts.style);a.styleObj.id!==s.id?(a.styleObj=s,o.setStyle(s.style),o.style.once(\"load\",function(){a.traceHash={},a.updateData(t),a.updateLayout(e),a.resolveOnRender(r)})):(a.updateData(t),a.updateLayout(e),a.resolveOnRender(r))},m.updateData=function(t){var e,r,n,i,a=this.traceHash;for(n=0;n<t.length;n++){var o=t[n];(e=a[(r=o[0].trace).uid])?e.update(o):r._module&&(a[r.uid]=r._module.plot(this,o))}var s=Object.keys(a);t:for(n=0;n<s.length;n++){var l=s[n];for(i=0;i<t.length;i++)if(r=t[i][0].trace,l===r.uid)continue t;(e=a[l]).dispose(),delete a[l]}},m.updateLayout=function(t){var e=this.map,r=this.opts;e.setCenter(o(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch),this.updateLayers(),this.updateFramework(t),this.updateFx(t),this.map.resize()},m.resolveOnRender=function(t){var e=this.map;e.on(\"render\",function r(){e.loaded()&&(e.off(\"render\",r),t())})},m.rejectOnError=function(t){function e(){t(new Error(h.mapOnErrorMsg))}var r=this.map;r.once(\"error\",e),r.once(\"style.error\",e),r.once(\"source.error\",e),r.once(\"tile.error\",e),r.once(\"layer.error\",e)},m.createFramework=function(t){var e=this,r=e.div=document.createElement(\"div\");r.id=e.uid,r.style.position=\"absolute\",e.container.appendChild(r),e.xaxis={_id:\"x\",c2p:function(t){return e.project(t).x}},e.yaxis={_id:\"y\",c2p:function(t){return e.project(t).y}},e.updateFramework(t)},m.updateFx=function(t){function e(t){var e=r.map.unproject(t);return[e.lng,e.lat]}var r=this,n=r.map,i=r.gd;if(!r.isStatic){var a,o=t.dragmode;if(a=\"select\"===o?function(t,n){(t.range={})[r.id]=[e([n.xmin,n.ymin]),e([n.xmax,n.ymax])]}:function(t,n,i){(t.lassoPoints={})[r.id]=i.filtered.map(e)},\"select\"===o||\"lasso\"===o){n.dragPan.disable();var s={element:r.div,gd:i,plotinfo:{xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:a},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id};s.prepFn=function(t,e,r){f(t,e,r,s,o)},u.init(s)}else n.dragPan.enable(),r.div.onmousedown=null}},m.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+\"px\",n.height=r.h*(e.y[1]-e.y[0])+\"px\",n.left=r.l+e.x[0]*r.w+\"px\",n.top=r.t+(1-e.y[1])*r.h+\"px\",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},m.updateLayers=function(){var t,e=this.opts.layers,r=this.layerList;if(e.length!==r.length){for(t=0;t<r.length;t++)r[t].dispose();for(r=this.layerList=[],t=0;t<e.length;t++)r.push(p(this,t,e[t]))}else for(t=0;t<e.length;t++)r[t].update(e[t])},m.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},m.toImage=function(){return this.map.getCanvas().toDataURL()},m.initSource=function(t){return this.map.addSource(t,{type:\"geojson\",data:{type:\"Feature\",geometry:{type:\"Point\",coordinates:[]}}})},m.setSourceData=function(t,e){this.map.getSource(t).setData(e)},m.setOptions=function(t,e,r){for(var n=this.map,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];n[e](t,o,r[o])}},m.project=function(t){return this.map.project(new s.LngLat(t[0],t[1]))},m.getView=function(){var t=this.map,e=t.getCenter();return{center:{lon:e.lng,lat:e.lat},zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch()}}},{\"../../components/dragelement\":640,\"../../components/fx\":660,\"../../lib\":743,\"../cartesian/select\":807,\"./constants\":844,\"./layers\":847,\"./layout_attributes\":848,\"mapbox-gl\":334}],851:[function(t,e,r){\"use strict\";e.exports={t:{valType:\"number\",dflt:0,editType:\"arraydraw\"},r:{valType:\"number\",dflt:0,editType:\"arraydraw\"},b:{valType:\"number\",dflt:0,editType:\"arraydraw\"},l:{valType:\"number\",dflt:0,editType:\"arraydraw\"},editType:\"arraydraw\"}},{}],852:[function(t,e,r){\"use strict\";function n(t){for(var e=0;e<t.length;e++){t[e]._categories=t[e]._initialCategories.slice(),t[e]._categoriesMap={};for(var r=0;r<t[e]._categories.length;r++)t[e]._categoriesMap[t[e]._categories[r]]=r}}var i=t(\"d3\"),a=t(\"fast-isnumeric\"),o=t(\"../plotly\"),s=t(\"../plot_api/plot_schema\"),l=t(\"../registry\"),c=t(\"../plots/cartesian/axis_ids\"),u=t(\"../lib\"),f=u._,h=t(\"../components/color\"),d=t(\"../constants/numerical\").BADNUM,p=e.exports={},m=t(\"./animation_attributes\"),g=t(\"./frame_attributes\"),v=u.relinkPrivateKeys;u.extendFlat(p,l),p.attributes=t(\"./attributes\"),p.attributes.type.values=p.allTypes,p.fontAttrs=t(\"./font_attributes\"),p.layoutAttributes=t(\"./layout_attributes\"),p.fontWeight=\"normal\";var y=p.transformsRegistry,x=t(\"../components/errorbars\"),b=t(\"./command\");p.executeAPICommand=b.executeAPICommand,p.computeAPICommandBindings=b.computeAPICommandBindings,p.manageCommandObserver=b.manageCommandObserver,p.hasSimpleAPICommandBindings=b.hasSimpleAPICommandBindings,p.redrawText=function(t){if(!((t=u.getGraphDiv(t)).data&&t.data[0]&&t.data[0].r))return new Promise(function(e){setTimeout(function(){l.getComponentMethod(\"annotations\",\"draw\")(t),l.getComponentMethod(\"legend\",\"draw\")(t),(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()}),e(p.previousPromises(t))},300)})},p.resize=function(t){return t=u.getGraphDiv(t),new Promise(function(e,r){t&&!function(t){var e=window.getComputedStyle(t).display;return!e||\"none\"===e}(t)||r(new Error(\"Resize must be passed a displayed plot div element.\")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._redrawTimer=setTimeout(function(){if(t.layout.width&&t.layout.height)e(t);else{delete t.layout.width,delete t.layout.height;var r=t.changed;t.autoplay=!0,o.relayout(t,{autosize:!0}).then(function(){t.changed=r,e(t)})}},100)})},p.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})},p.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=e._paper.selectAll(\"text.js-plot-link-container\").data([0]);r.enter().append(\"text\").classed(\"js-plot-link-container\",!0).style({\"font-family\":'\"Open Sans\", Arial, sans-serif',\"font-size\":\"12px\",fill:h.defaultLine,\"pointer-events\":\"all\"}).each(function(){var t=i.select(this);t.append(\"tspan\").classed(\"js-link-to-tool\",!0),t.append(\"tspan\").classed(\"js-link-spacer\",!0),t.append(\"tspan\").classed(\"js-sourcelinks\",!0)});var n=r.node(),a={y:e._paper.attr(\"height\")-9};document.body.contains(n)&&n.getComputedTextLength()>=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\"),s=r.select(\".js-link-spacer\"),l=r.select(\".js-sourcelinks\");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text(\"\");var r=e.append(\"a\").attr({\"xlink:xlink:href\":\"#\",class:\"link--impt link--embedview\",\"font-weight\":\"bold\"}).text(t._context.linkText+\" \"+String.fromCharCode(187));if(t._context.sendData)r.on(\"click\",function(){p.sendDataToCloud(t)});else{var n=window.location.pathname.split(\"/\"),i=window.location.search;r.attr({\"xlink:xlink:show\":\"new\",\"xlink:xlink:href\":\"/\"+n[2].split(\".\")[0]+\"/\"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?\" - \":\"\")}},p.sendDataToCloud=function(t){t.emit(\"plotly_beforeexport\");var e=window.PLOTLYENV&&window.PLOTLYENV.BASE_URL||\"https://plot.ly\",r=i.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=p.graphJson(t,!1,\"keepdata\"),n.node().submit(),r.remove(),t.emit(\"plotly_afterexport\"),!1},p.supplyDefaults=function(t){var e,r=t._fullLayout||{},n=t._fullLayout={},a=t.layout||{},o=t._fullData||[],s=t._fullData=[],h=t.data||[];t._transitionData||p.createTransitionData(t),n._dfltTitle={plot:f(t,\"Click to enter Plot title\"),x:f(t,\"Click to enter X axis title\"),y:f(t,\"Click to enter Y axis title\"),colorbar:f(t,\"Click to enter Colorscale title\"),annotation:f(t,\"new text\")},n._traceWord=f(t,\"trace\");var d=function(t){function e(t){for(var e=!0,r=0;r<w.length;r++){var a=w[r];i[a]||(t[a]?i[a]=t[a]:e=!1)}e&&(n=!0)}for(var r=t._context.locale,n=!1,i={},a=0;a<2;a++){for(var o=t._context.locales,s=0;s<2;s++){var c=(o[r]||{}).format;if(c&&(e(c),n))break;o=l.localeRegistry}var u=r.split(\"-\")[0];if(n||u===r)break;r=u}return n||e(l.localeRegistry.en.format),i}(t);if(r._initialAutoSizeIsDone){var m=r.width,g=r.height;p.supplyLayoutGlobalDefaults(a,n,d),a.width||(n.width=m),a.height||(n.height=g)}else{p.supplyLayoutGlobalDefaults(a,n,d);var y=!a.width||!a.height,x=n.autosize,b=t._context&&t._context.autosizable;y&&(x||b)?p.plotAutoSize(t,a,n):y&&p.sanitizeMargins(t),!x&&y&&(a.width=n.width,a.height=n.height)}n._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),i.locale(t)}(d,n.separators),n._initialAutoSizeIsDone=!0,n._dataLength=h.length,n._modules=[],n._basePlotModules=[],n._subplots=function(){var t,e,r={};if(!_){_=[];var n=l.subplotsRegistry;for(var i in n){var a=n[i].attr;if(a&&(_.push(i),Array.isArray(a)))for(e=0;e<a.length;e++)u.pushUnique(_,a[e])}}for(t=0;t<_.length;t++)r[_[t]]=[];return r}(),n._globalTransforms=(t._context||{}).globalTransforms,p.supplyDataDefaults(h,s,a,n),n._has=p._hasPlotType.bind(n);var M=n._modules;for(e=0;e<M.length;e++){var k=M[e];k.cleanData&&k.cleanData(s)}if(o.length===h.length)for(e=0;e<s.length;e++)v(s[e],o[e]);p.supplyLayoutModuleDefaults(a,n,s,t._transitionData),n._hasCartesian=n._has(\"cartesian\"),n._hasGeo=n._has(\"geo\"),n._hasGL3D=n._has(\"gl3d\"),n._hasGL2D=n._has(\"gl2d\"),n._hasTernary=n._has(\"ternary\"),n._hasPie=n._has(\"pie\"),p.cleanPlot(s,n,o,r),p.linkSubplots(s,n,o,r),v(n,r),p.doAutoMargin(t);var A=c.list(t);for(e=0;e<A.length;e++){A[e].setScale()}if((t.calcdata||[]).length===s.length)for(e=0;e<s.length;e++){var T=s[e],S=t.calcdata[e][0];S&&S.trace&&(S.trace._hasCalcTransform?function(t,e){var r,n,i=t.trace,a=i._arrayAttrs,o={};for(r=0;r<a.length;r++)o[n=a[r]]=u.nestedProperty(i,n).get().slice();for(t.trace=e,r=0;r<a.length;r++)n=a[r],u.nestedProperty(t.trace,n).set(o[n])}(S,T):S.trace=T)}};var _,w=[\"days\",\"shortDays\",\"months\",\"shortMonths\",\"periods\",\"dateTime\",\"date\",\"time\",\"decimal\",\"thousands\",\"grouping\",\"currency\"];p.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},p._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++){if(r[e].name===t)return!0}var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e];if(i.categories&&i.categories.indexOf(t)>=0)return!0}return!1},p.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=!!n._paper,c=!!n._infolayer,u=n._has&&n._has(\"gl\"),f=e._has&&e._has(\"gl\");u&&!f&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(\".gl-canvas\").remove(),n._glcanvas=null);t:for(i=0;i<r.length;i++){var h=r[i].uid;for(a=0;a<t.length;a++){if(h===t[a].uid)continue t}var d=\".hm\"+h+\",.contour\"+h+\",.carpet\"+h+\",#clip\"+h+\",.trace\"+h;l&&n._paper.selectAll(d).remove(),c&&(n._infolayer.selectAll(\".cb\"+h).remove(),n._infolayer.selectAll(\"g.rangeslider-container\").selectAll(d).remove())}n._zoomlayer&&n._zoomlayer.selectAll(\".select-outline\").remove()},p.linkSubplots=function(t,e,r,n){var i,a,o,s,l=n._plots||{},f=e._plots={},h=e._subplots,d={_fullData:t,_fullLayout:e},p=h.cartesian.concat(h.gl2d||[]);for(var m in h)h[m].sort(u.subplotSort);for(i=0;i<p.length;i++){var g,v=l[o=p[i]],y=c.getFromId(d,o,\"x\"),x=c.getFromId(d,o,\"y\");for(v?((g=f[o]=v).xaxis.layer!==y.layer&&(g.xlines.attr(\"d\",null),g.xaxislayer.selectAll(\"*\").remove()),g.yaxis.layer!==x.layer&&(g.ylines.attr(\"d\",null),g.yaxislayer.selectAll(\"*\").remove())):(g=f[o]={}).id=o,g.xaxis=y,g.yaxis=x,g._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var b=t[a];if(b.xaxis===g.xaxis._id&&b.yaxis===g.yaxis._id&&!1===b.cliponaxis){g._hasClipOnAxisFalse=!0;break}}}var _=c.list(d,null,!0);for(i=0;i<_.length;i++){var w=null;(s=_[i]).overlaying&&(w=c.getFromId(d,s.overlaying))&&w.overlaying&&(s.overlaying=!1,w=null),s._mainAxis=w||s,w&&(s.domain=w.domain.slice()),s._anchorAxis=\"free\"===s.anchor?null:c.getFromId(d,s.anchor)}for(i=0;i<_.length;i++){var M=\"x\"===(s=_[i])._id.charAt(0),k=s._mainAxis._anchorAxis,A=\"\",T=\"\",S=\"\";if(k&&(S=k._mainAxis._id,A=M?s._id+S:S+s._id),!A||-1===p.indexOf(A))for(A=\"\",a=0;a<p.length;a++){var E=(o=p[a]).indexOf(\"y\"),L=M?o.substr(0,E):o.substr(E),C=M?o.substr(E):o.substr(0,E);if(L===s._id){T||(T=o);var z=c.getFromId(d,C);if(S&&z.overlaying===S){A=o;break}}}s._mainSubplot=A||T}},p.clearExpandedTraceDefaultColors=function(t){function e(t,e,i,a){n[a]=e,n.length=a+1,\"color\"===t.valType&&void 0===t.dflt&&r.push(n.join(\".\"))}var r,n,i;for(n=[],(r=t._module._colorAttrs)||(t._module._colorAttrs=r=[],s.crawl(t._module.attributes,e)),i=0;i<r.length;i++){u.nestedProperty(t,\"_input.\"+r[i]).get()||u.nestedProperty(t,r[i]).set(null)}},p.supplyDataDefaults=function(t,e,r,n){function i(t){e.push(t);var r=t._module;r&&(!0===t.visible&&u.pushUnique(c,r),u.pushUnique(f,t._module.basePlotModule),h++,!1!==t._input.visible&&d++)}var a,o,s,c=n._modules,f=n._basePlotModules,h=0,d=0;n._transformModules=[];var m={},g=[];for(a=0;a<t.length;a++){if(s=t[a],o=p.supplyTraceDefaults(s,d,n,a),o.index=a,o._input=s,o._expandedIndex=h,o.transforms&&o.transforms.length)for(var x=function(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=y[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}(o,e,r,n),b=0;b<x.length;b++){var _=x[b],w=p.supplyTraceDefaults(_,h,n,a);v(w,_),_.uid=w.uid=o.uid+b,w.index=a,w._input=s,w._fullInput=o,w._expandedIndex=h,w._expandedInput=_,i(w)}else o._fullInput=o,o._expandedInput=o,i(o);l.traceIs(o,\"carpetAxis\")&&(m[o.carpet]=o),l.traceIs(o,\"carpetDependent\")&&g.push(a)}for(a=0;a<g.length;a++)if((o=e[g[a]]).visible){var M=m[o.carpet];o._carpet=M,M&&M.visible?(o.xaxis=M.xaxis,o.yaxis=M.yaxis):o.visible=!1}},p.supplyAnimationDefaults=function(t){function e(e,r){return u.coerce(t||{},n,m,e,r)}t=t||{};var r,n={};if(e(\"mode\"),e(\"direction\"),e(\"fromcurrent\"),Array.isArray(t.frame))for(n.frame=[],r=0;r<t.frame.length;r++)n.frame[r]=p.supplyAnimationFrameDefaults(t.frame[r]||{});else n.frame=p.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(n.transition=[],r=0;r<t.transition.length;r++)n.transition[r]=p.supplyAnimationTransitionDefaults(t.transition[r]||{});else n.transition=p.supplyAnimationTransitionDefaults(t.transition||{});return n},p.supplyAnimationFrameDefaults=function(t){function e(e,n){return u.coerce(t||{},r,m.frame,e,n)}var r={};return e(\"duration\"),e(\"redraw\"),r},p.supplyAnimationTransitionDefaults=function(t){function e(e,n){return u.coerce(t||{},r,m.transition,e,n)}var r={};return e(\"duration\"),e(\"easing\"),r},p.supplyFrameDefaults=function(t){function e(e,n){return u.coerce(t,r,g,e,n)}var r={};return e(\"group\"),e(\"name\"),e(\"traces\"),e(\"baseframe\"),e(\"data\"),e(\"layout\"),r},p.supplyTraceDefaults=function(t,e,r,n){function i(e,r){return u.coerce(t,s,p.attributes,e,r)}var a,o=r.colorway||h.defaults,s={},c=o[e%o.length],f=i(\"visible\");i(\"type\"),i(\"uid\"),i(\"name\",r._traceWord+\" \"+n);var d=p.getModule(s);if(s._module=d,d){var m=d.basePlotModule,g=m.attr;if(g){var v=r._subplots,y=m.attributes,x=\"\";if(\"gl2d\"!==m.name||f){if(Array.isArray(g))for(a=0;a<g.length;a++){var b=g[a],_=u.coerce(t,s,y,b);v[b]&&u.pushUnique(v[b],_),x+=_}else x=u.coerce(t,s,y,g);v[m.name]&&u.pushUnique(v[m.name],x)}}}return f&&(i(\"customdata\"),i(\"ids\"),p.traceIs(s,\"showLegend\")&&(i(\"showlegend\"),i(\"legendgroup\")),l.getComponentMethod(\"fx\",\"supplyDefaults\")(t,s,c,r),d&&(d.supplyDefaults(t,s,c,r),u.coerceHoverinfo(t,s,r)),p.traceIs(s,\"noOpacity\")||i(\"opacity\"),p.traceIs(s,\"notLegendIsolatable\")&&(s.visible=!!s.visible),d&&d.selectPoints&&i(\"selectedpoints\"),p.supplyTransformDefaults(t,s,r)),s},p.supplyTransformDefaults=function(t,e,r){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var c,f=o[l],h=f.type,d=y[h],p=!(f._module&&f._module===d),m=d&&\"function\"==typeof d.transform;d||u.warn(\"Unrecognized transform type \"+h+\".\"),d&&d.supplyDefaults&&(p||m)?((c=d.supplyDefaults(f,e,r,t)).type=h,c._module=d,u.pushUnique(i,d)):c=u.extendFlat({},f),s.push(c)}},p.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return u.coerce(t,e,p.layoutAttributes,r,n)}var i=u.coerceFont(n,\"font\");n(\"title\",e._dfltTitle.plot),u.coerceFont(n,\"titlefont\",{family:i.family,size:Math.round(1.4*i.size),color:i.color}),n(\"autosize\",!(t.width&&t.height)),n(\"width\"),n(\"height\"),n(\"margin.l\"),n(\"margin.r\"),n(\"margin.t\"),n(\"margin.b\"),n(\"margin.pad\"),n(\"margin.autoexpand\"),t.width&&t.height&&p.sanitizeMargins(e),n(\"paper_bgcolor\"),n(\"separators\",r.decimal+r.thousands),n(\"hidesources\"),n(\"colorway\"),l.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\"),l.getComponentMethod(\"fx\",\"supplyLayoutGlobalDefaults\")(t,e,n)},p.plotAutoSize=function(t,e,r){var n,i,o=t._context||{},s=o.frameMargins,l=u.isPlotDiv(t);if(l&&t.emit(\"plotly_autosize\"),o.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow=\"hidden\";else if(a(s)&&s>0){var c=function(t){var e,r={left:0,right:0,bottom:0,top:0};if(t)for(e in t)t.hasOwnProperty(e)&&(r.left+=t[e].left||0,r.right+=t[e].right||0,r.bottom+=t[e].bottom||0,r.top+=t[e].top||0);return r}(t._boundingBoxMargins),f=c.left+c.right,h=c.bottom+c.top,d=1-2*s,m=r._container&&r._container.node?r._container.node().getBoundingClientRect():{width:r.width,height:r.height};n=Math.round(d*(m.width-f)),i=Math.round(d*(m.height-h))}else{var g=l?window.getComputedStyle(t):{};n=parseFloat(g.width)||r.width,i=parseFloat(g.height)||r.height}var v=p.layoutAttributes.width.min,y=p.layoutAttributes.height.min;n<v&&(n=v),i<y&&(i=y);var x=!e.width&&Math.abs(r.width-n)>1,b=!e.height&&Math.abs(r.height-i)>1;(b||x)&&(x&&(r.width=n),b&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),p.sanitizeMargins(r)},p.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(c.length||c.push(u),e._has(\"cartesian\")&&u.finalizeSubplots(t,e),a=0;a<c.length;a++)(o=c[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var f=e._modules;for(a=0;a<f.length;a++)(o=f[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var h=e._transformModules;for(a=0;a<h.length;a++)(o=h[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},p.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(\".gl-canvas\").remove(),e._glcontainer.remove(),e._glcanvas=null),void 0!==e._geocontainer&&e._geocontainer.remove(),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),u.clearThrottle(),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.framework,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t.firstscatter,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._replotPending,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},p.style=function(t){var e,r=t._fullLayout._modules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&u.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},p.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},p.autoMargin=function(t,e,r){var n=t._fullLayout;if(n._pushmargin||(n._pushmargin={}),!1!==n.margin.autoexpand){if(r){var i=void 0===r.pad?12:r.pad;r.l+r.r>.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||p.doAutoMargin(t)}},p.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),s=Math.max(e.margin.r||0,0),l=Math.max(e.margin.t||0,0),c=Math.max(e.margin.b||0,0),u=e._pushmargin;if(!1!==e.margin.autoexpand){u.base={l:{val:0,size:i},r:{val:1,size:s},t:{val:1,size:l},b:{val:0,size:c}};for(var f in u){var h=u[f].l||{},d=u[f].b||{},p=h.val,m=h.size,g=d.val,v=d.size;for(var y in u){if(a(m)&&u[y].r){var x=u[y].r.val,b=u[y].r.size;if(x>p){var _=(m*x+(b-e.width)*p)/(x-p),w=(b*(1-p)+(m-e.width)*(1-x))/(x-p);_>=0&&w>=0&&_+w>i+s&&(i=_,s=w)}}if(a(v)&&u[y].t){var M=u[y].t.val,k=u[y].t.size;if(M>g){var A=(v*M+(k-e.height)*g)/(M-g),T=(k*(1-g)+(v-e.height)*(1-M))/(M-g);A>=0&&T>=0&&A+T>c+l&&(c=A,l=T)}}}}}if(r.l=Math.round(i),r.r=Math.round(s),r.t=Math.round(l),r.b=Math.round(c),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 o.plot(t)},p.graphJson=function(t,e,r,n,i){function a(t){if(\"function\"==typeof t)return null;if(u.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&&!u.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):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&p.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames,c={data:(o||[]).map(function(t){var r=a(t);return e&&delete r.fit,r})};return e||(c.layout=a(s)),t.framework&&t.framework.isPolar&&(c=t.framework.getConfig()),l&&(c.frames=a(l)),\"object\"===n?c:JSON.stringify(c)},p.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case\"replace\":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case\"insert\":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case\"delete\":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},p.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error(\"computeFrame must be given a string frame name\");var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=p.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)void 0!==(i=n[r])&&null!==i&&(-1===(a=u.traces.indexOf(i))&&(a=u.data.length,u.traces[a]=i),u.data[a]=p.extendTrace(u.data[a],s.data[r]))}return u},p.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},p.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,c,f,h=u.extendDeepNoArrays({},e||{}),d=u.expandObjectPaths(h),m={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=u.nestedProperty(d,r[a])).get())?u.nestedProperty(m,r[a]).set(null):(n.set(null),u.nestedProperty(m,r[a]).set(i));if(t=u.extendDeepNoArrays(t||{},d),r&&r.length)for(a=0;a<r.length;a++)if(s=u.nestedProperty(m,r[a]),c=s.get()){for(f=(l=u.nestedProperty(t,r[a])).get(),Array.isArray(f)||(f=[],l.set(f)),o=0;o<c.length;o++){var g=c[o];f[o]=null===g?null:p.extendObjectWithContainers(f[o],g)}l.set(f)}return t},p.dataArrayContainers=[\"transforms\"],p.layoutArrayContainers=l.layoutArrayContainers,p.extendTrace=function(t,e){return p.extendObjectWithContainers(t,e,p.dataArrayContainers)},p.extendLayout=function(t,e){return p.extendObjectWithContainers(t,e,p.layoutArrayContainers)},p.transition=function(t,e,r,n,i,a){var s,l,c=Array.isArray(e)?e.length:0,f=n.slice(0,c),h=[],d=!1;for(s=0;s<f.length;s++){l=f[s];var m=t._fullData[l]._module;if(m&&!m.animatable){var g={};for(var v in e[s])g[v]=[e[s][v]]}}var y=[p.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},function(){var n;for(n=0;n<f.length;n++){var i=f[n],a=t._fullData[i]._module;a&&(a.animatable&&h.push(i),t.data[f[n]]=p.extendTrace(t.data[f[n]],e[n]))}var o=u.expandObjectPaths(u.extendDeepNoArrays({},r)),s=/^[xy]axis[0-9]*$/;for(var l in o)s.test(l)&&delete o[l].range;return p.extendLayout(t.layout,o),delete t.calcdata,p.supplyDefaults(t),p.doCalcdata(t),x.calc(t),Promise.resolve()},p.rehover,function(){return t.emit(\"plotly_transitioning\",[]),new Promise(function(e){function n(){return c++,function(){f++,d||f!==c||function(e){t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(i.redraw)return o.redraw(t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit(\"plotly_transitioned\",[])}).then(e))}(e)}}t._transitioning=!0,a.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){d=!0}),i.redraw&&t._transitionData._interruptCallbacks.push(function(){return o.redraw(t)}),t._transitionData._interruptCallbacks.push(function(){t.emit(\"plotly_transitioninterrupted\",[])});var s,l,c=0,f=0,p=t._fullLayout._basePlotModules,m=!1;if(r)for(l=0;l<p.length;l++)if(p[l].transitionAxes){var g=u.expandObjectPaths(r);m=p[l].transitionAxes(t,g,a,n)||m}for(m?(s=u.extendFlat({},a)).duration=0:s=a,l=0;l<p.length;l++)p[l].plot(t,h,s,n);setTimeout(n())})}],b=u.syncOrAsync(y,t);return b&&b.then||(b=Promise.resolve()),b.then(function(){return t})},p.doCalcdata=function(t,e){var r,i,a,o,u=c.list(t),f=t._fullData,h=t._fullLayout,p=new Array(f.length),m=(t.calcdata||[]).slice(0);for(t.calcdata=p,t.firstscatter=!0,h._numBoxes=0,h._numViolins=0,h._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,h._piecolormap={},h._piecolorway=null,h._piedefaultcolorcount=0,a=0;a<f.length;a++)Array.isArray(e)&&-1===e.indexOf(a)&&(p[a]=m[a]);for(a=0;a<f.length;a++)(r=f[a])._arrayAttrs=s.findArrayAttributes(r);var g=h._subplots.polar||[];for(a=0;a<g.length;a++)u.push(h[g[a]].radialaxis,h[g[a]].angularaxis);n(u);var v=!1;for(a=0;a<f.length;a++)if(!0===(r=f[a]).visible&&r.transforms)for((i=r._module)&&i.calc&&i.calc(t,r),o=0;o<r.transforms.length;o++){var x=r.transforms[o];(i=y[x.type])&&i.calcTransform&&(r._hasCalcTransform=!0,v=!0,i.calcTransform(t,r,x))}if(v){for(a=0;a<u.length;a++)u[a]._min=[],u[a]._max=[],u[a]._categories=[],u[a]._categoriesMap={};n(u)}for(a=0;a<f.length;a++){var b=[];if(!0===(r=f[a]).visible){i=r._module;var _=r.transforms||[];for(o=_.length-1;o>=0;o--)if(_[o].enabled){r._indexToPoints=_[o]._indexToPoints;break}i&&i.calc&&(b=i.calc(t,r))}Array.isArray(b)&&b[0]||(b=[{x:d,y:d}]),b[0].t||(b[0].t={}),b[0].trace=r,p[a]=b}l.getComponentMethod(\"fx\",\"calc\")(t)},p.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},p.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var c in a)if(!o[c]){var f=a[c][0];f[0].trace.visible=!1,o[c]=[f]}for(var h in o){var d=o[h];d[0][0].trace._module.plot(t,e,u.filterVisible(d),n)}e.traceHash=o}},{\"../components/color\":618,\"../components/errorbars\":649,\"../constants/numerical\":721,\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plotly\":784,\"../plots/cartesian/axis_ids\":792,\"../registry\":873,\"./animation_attributes\":785,\"./attributes\":787,\"./command\":814,\"./font_attributes\":816,\"./frame_attributes\":817,\"./layout_attributes\":843,d3:128,\"fast-isnumeric\":140}],853:[function(t,e,r){\"use strict\";e.exports={attr:\"subplot\",name:\"polar\",axisNames:[\"angularaxis\",\"radialaxis\"],axisName2dataArray:{angularaxis:\"theta\",radialaxis:\"r\"},layerNames:[\"draglayer\",\"plotbg\",\"backplot\",\"angular-grid\",\"radial-grid\",\"frontplot\",\"angular-axis\",\"radial-axis\",\"angular-line\",\"radial-line\"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],854:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");r.setConvertAngular=function(t){function e(){return t.period?Math.max(t.period,t._categories.length):t._categories.length}function r(t){return(t-s)/o}var i,a,o={clockwise:-1,counterclockwise:1}[t.direction],s=n.deg2rad(t.rotation);\"linear\"===t.type?(i=function(t,e){return\"degrees\"===e?n.deg2rad(t):t},a=function(t,e){return\"degrees\"===e?n.rad2deg(t):t}):\"category\"===t.type&&(i=function(t){var r=e();return 2*t*Math.PI/r},a=function(t){return t*e()/Math.PI/2}),t.unTransformRad=r,t._c2rad=i,t.c2rad=function(t,e){return function(t){return o*t+s}(i(t,e))},t.rad2c=function(t,e){return a(r(t),e)},t.c2deg=function(e,r){return n.rad2deg(t.c2rad(e,r))},t.deg2c=function(e,r){return t.rad2c(n.deg2rad(e),r)}}},{\"../../lib\":743}],855:[function(t,e,r){\"use strict\";var n=t(\"../get_data\").getSubplotCalcData,i=t(\"../../lib\").counterRegex,a=t(\"./polar\"),o=t(\"./constants\"),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:\"subplotid\",dflt:l,editType:\"calc\"},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:t(\"./layout_attributes\"),supplyLayoutDefaults:t(\"./layout_defaults\"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!e[o]&&s){s.framework.remove(),s.layers[\"radial-axis-title\"].remove();for(var c in s.clipPaths)s.clipPaths[c].remove()}}},toSVG:t(\"../cartesian\").toSVG}},{\"../../lib\":743,\"../cartesian\":800,\"../get_data\":826,\"./constants\":853,\"./layout_attributes\":856,\"./layout_defaults\":857,\"./polar\":864}],856:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../cartesian/layout_attributes\"),a=t(\"../domain_attributes\"),o=t(\"../../lib\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth},\"plot\",\"from-root\"),c=s({tickmode:i.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},\"plot\",\"from-root\"),u={visible:o({},i.visible,{dflt:!0}),type:i.type,autorange:i.autorange,rangemode:{valType:\"enumerated\",values:[\"tozero\",\"nonnegative\",\"normal\"],dflt:\"tozero\",editType:\"calc\"},range:i.range,categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:\"angle\",editType:\"plot\"},side:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"clockwise\",editType:\"plot\"},title:o({},i.title,{editType:\"plot\",dflt:\"\"}),titlefont:s(i.titlefont,\"plot\",\"from-root\"),hoverformat:i.hoverformat,editType:\"calc\"};o(u,l,c);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"category\"],dflt:\"-\",editType:\"calc\"},categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\"],dflt:\"degrees\",editType:\"calc\"},period:{valType:\"number\",editType:\"calc\",min:0},direction:{valType:\"enumerated\",values:[\"counterclockwise\",\"clockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"angle\",editType:\"calc\"},hoverformat:i.hoverformat,editType:\"calc\"};o(f,l,c),e.exports={domain:a({name:\"polar\",editType:\"plot\"}),sector:{valType:\"info_array\",items:[{valType:\"number\",editType:\"plot\"},{valType:\"number\",editType:\"plot\"}],dflt:[0,360],editType:\"plot\"},bgcolor:{valType:\"color\",editType:\"plot\",dflt:n.background},radialaxis:u,angularaxis:f,editType:\"calc\"}},{\"../../components/color/attributes\":617,\"../../lib\":743,\"../../plot_api/edit_types\":773,\"../cartesian/layout_attributes\":801,\"../domain_attributes\":815}],857:[function(t,e,r){\"use strict\";function n(t,e,r,n){function o(t,e){return r(_+\".\"+t,e)}var b=r(\"bgcolor\");n.bgColor=a.combine(b,n.paper_bgcolor);for(var _,w=r(\"sector\"),M=s(n.fullData,y.name,n.id),k=n.layoutOut,A=0;A<x.length;A++){_=x[A],i.isPlainObject(t[_])||(t[_]={});var T=t[_],S=e[_]={};S._id=S._name=_;var E=y.axisName2dataArray[_],L=function(t,e,r,n,i){if(\"-\"===r(\"type\")){for(var a,o=0;o<n.length;o++)if(n[o].visible){a=n[o];break}a&&(e.type=d(a[i],\"gregorian\")),\"-\"===e.type?e.type=\"linear\":t.type=e.type}return e.type}(T,S,o,M,E);f(T,S,o),S._initialCategories=\"category\"===L?p(E,S.categoryorder,S.categoryarray,M):[];var C=o(\"visible\");m(S,k);var z,D;switch(C&&(D=(z=o(\"color\"))===T.color?z:n.font.color),S._m=1,_){case\"radialaxis\":var I=o(\"autorange\",!S.isValidRange(T.range));I&&o(\"rangemode\"),\"reversed\"===I&&(S._m=-1),o(\"range\"),S.cleanRange(\"range\",{dfltRange:[0,1]}),C&&(o(\"side\"),o(\"angle\",w[0]),o(\"title\"),i.coerceFont(o,\"titlefont\",{family:n.font.family,size:Math.round(1.2*n.font.size),color:D}));break;case\"angularaxis\":if(\"date\"===L){i.log(\"Polar plots do not support date angular axes yet.\");for(var P=0;P<M.length;P++)M[P].visible=!1;L=T.type=S.type=\"linear\"}o(\"linear\"===L?\"thetaunit\":\"period\");o(\"rotation\",{counterclockwise:0,clockwise:90}[o(\"direction\")]),g(S)}if(C){l(T,S,o,S.type),u(T,S,o,S.type,{noHover:!1,tickSuffixDflt:\"degrees\"===S.thetaunit?\"\\xb0\":void 0}),c(T,S,o,{outerTicks:!0});o(\"showticklabels\")&&(i.coerceFont(o,\"tickfont\",{family:n.font.family,size:n.font.size,color:D}),o(\"tickangle\"),o(\"tickformat\")),h(T,S,o,{dfltColor:z,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v[_]}),o(\"layer\")}o(\"hoverformat\"),S._input=T}}var i=t(\"../../lib\"),a=t(\"../../components/color\"),o=t(\"../subplot_defaults\"),s=t(\"../get_data\").getSubplotData,l=t(\"../cartesian/tick_value_defaults\"),c=t(\"../cartesian/tick_mark_defaults\"),u=t(\"../cartesian/tick_label_defaults\"),f=t(\"../cartesian/category_order_defaults\"),h=t(\"../cartesian/line_grid_defaults\"),d=t(\"../cartesian/axis_autotype\"),p=t(\"../cartesian/ordered_categories\"),m=t(\"../cartesian/set_convert\"),g=t(\"./helpers\").setConvertAngular,v=t(\"./layout_attributes\"),y=t(\"./constants\"),x=y.axisNames;e.exports=function(t,e,r){o(t,e,r,{type:y.name,attributes:v,handleDefaults:n,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},{\"../../components/color\":618,\"../../lib\":743,\"../cartesian/axis_autotype\":790,\"../cartesian/category_order_defaults\":793,\"../cartesian/line_grid_defaults\":803,\"../cartesian/ordered_categories\":804,\"../cartesian/set_convert\":808,\"../cartesian/tick_label_defaults\":809,\"../cartesian/tick_mark_defaults\":810,\"../cartesian/tick_value_defaults\":811,\"../get_data\":826,\"../subplot_defaults\":865,\"./constants\":853,\"./helpers\":854,\"./layout_attributes\":856}],858:[function(t,e,r){\"use strict\";var n=t(\"../../../traces/scatter/attributes\"),i=n.marker;e.exports={r:n.r,t:n.t,marker:{color:i.color,size:i.size,symbol:i.symbol,opacity:i.opacity,editType:\"calc\"}}},{\"../../../traces/scatter/attributes\":1066}],859:[function(t,e,r){\"use strict\";function n(t,e){return a({},e,{showline:{valType:\"boolean\"},showticklabels:{valType:\"boolean\"},tickorientation:{valType:\"enumerated\",values:[\"horizontal\",\"vertical\"]},ticklen:{valType:\"number\",min:0},tickcolor:{valType:\"color\"},ticksuffix:{valType:\"string\"},endpadding:{valType:\"number\"},visible:{valType:\"boolean\"}})}var i=t(\"../../cartesian/layout_attributes\"),a=t(\"../../../lib/extend\").extendFlat,o=t(\"../../../plot_api/edit_types\").overrideAll,s=a({},i.domain,{});e.exports=o({radialaxis:n(0,{range:{valType:\"info_array\",items:[{valType:\"number\"},{valType:\"number\"}]},domain:s,orientation:{valType:\"number\"}}),angularaxis:n(0,{range:{valType:\"info_array\",items:[{valType:\"number\",dflt:0},{valType:\"number\",dflt:360}]},domain:s}),layout:{direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"]},orientation:{valType:\"angle\"}}},\"plot\",\"nested\")},{\"../../../lib/extend\":732,\"../../../plot_api/edit_types\":773,\"../../cartesian/layout_attributes\":801}],860:[function(t,e,r){\"use strict\";(e.exports=t(\"./micropolar\")).manager=t(\"./micropolar_manager\")},{\"./micropolar\":861,\"./micropolar_manager\":862}],861:[function(t,e,r){var n=t(\"d3\"),i=t(\"../../../lib\").extendDeepAll,a=t(\"../../../constants/alignment\").MID_SHIFT,o=e.exports={version:\"0.2.2\"};o.Axis=function(){var t,e,r,s,l={data:[],layout:{}},c={},u={},f=n.dispatch(\"hover\"),h={};return h.render=function(c){return function(c){e=c||e;var f=l.data,h=l.layout;(\"string\"==typeof e||e.nodeName)&&(e=n.select(e)),e.datum(f).each(function(e,l){function c(t,e){return s(t)%360+h.orientation}var f=e.slice();u={data:o.util.cloneJson(f),layout:o.util.cloneJson(h)};var d=0;f.forEach(function(t,e){t.color||(t.color=h.defaultColorRange[d],d=(d+1)%h.defaultColorRange.length),t.strokeColor||(t.strokeColor=\"LinePlot\"===t.geometry?t.color:n.rgb(t.color).darker().toString()),u.data[e].color=t.color,u.data[e].strokeColor=t.strokeColor,u.data[e].strokeDash=t.strokeDash,u.data[e].strokeSize=t.strokeSize});var p=f.filter(function(t,e){var r=t.visible;return void 0===r||!0===r}),m=!1,g=p.map(function(t,e){return m=m||void 0!==t.groupId,t});if(m){var v=[],y=n.nest().key(function(t,e){return void 0!==t.groupId?t.groupId:\"unstacked\"}).entries(g).map(function(t,e){if(\"unstacked\"===t.key)return t.values;var r=t.values[0].r.map(function(t,e){return 0});return t.values.forEach(function(t,e,n){t.yStack=[r],v.push(r),r=o.util.sumArrays(t.r,r)}),t.values});p=n.merge(y)}p.forEach(function(t,e){t.t=Array.isArray(t.t[0])?t.t:[t.t],t.r=Array.isArray(t.r[0])?t.r:[t.r]});var x=Math.min(h.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2;x=Math.max(10,x);var b,_=[h.margin.left+x,h.margin.top+x];b=m?[0,n.max(o.util.sumArrays(o.util.arrayLast(p).r[0],o.util.arrayLast(v)))]:n.extent(o.util.flattenArray(p.map(function(t,e){return t.r}))),h.radialAxis.domain!=o.DATAEXTENT&&(b[0]=0),r=n.scale.linear().domain(h.radialAxis.domain!=o.DATAEXTENT&&h.radialAxis.domain?h.radialAxis.domain:b).range([0,x]),u.layout.radialAxis.domain=r.domain();var w,M=o.util.flattenArray(p.map(function(t,e){return t.t})),k=\"string\"==typeof M[0];k&&(M=o.util.deduplicate(M),w=M.slice(),M=n.range(M.length),p=p.map(function(t,e){var r=t;return t.t=[M],m&&(r.yStack=t.yStack),r}));var A=p.filter(function(t,e){return\"LinePlot\"===t.geometry||\"DotPlot\"===t.geometry}).length===p.length,T=null===h.needsEndSpacing?k||!A:h.needsEndSpacing,S=h.angularAxis.domain&&h.angularAxis.domain!=o.DATAEXTENT&&!k&&h.angularAxis.domain[0]>=0?h.angularAxis.domain:n.extent(M),E=Math.abs(M[1]-M[0]);A&&!k&&(E=0);var L=S.slice();T&&k&&(L[1]+=E);var C=h.angularAxis.ticksCount||4;C>8&&(C=C/(C/8)+C%8),h.angularAxis.ticksStep&&(C=(L[1]-L[0])/C);var z=h.angularAxis.ticksStep||(L[1]-L[0])/(C*(h.minorTicks+1));w&&(z=Math.max(Math.round(z),1)),L[2]||(L[2]=z);var D=n.range.apply(this,L);if(D=D.map(function(t,e){return parseFloat(t.toPrecision(12))}),s=n.scale.linear().domain(L.slice(0,2)).range(\"clockwise\"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=T?E:0,void 0===(t=n.select(this).select(\"svg.chart-root\"))||t.empty()){var I=(new DOMParser).parseFromString(\"<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>\",\"application/xml\"),P=this.appendChild(this.ownerDocument.importNode(I.documentElement,!0));t=n.select(P)}t.select(\".guides-group\").style({\"pointer-events\":\"none\"}),t.select(\".angular.axis-group\").style({\"pointer-events\":\"none\"}),t.select(\".radial.axis-group\").style({\"pointer-events\":\"none\"});var O,F=t.select(\".chart-group\"),R={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){O=t.select(\".legend-group\").attr({transform:\"translate(\"+[x,h.margin.top]+\")\"}).style({display:\"block\"});var j=p.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:p.map(function(t,e){return t.name||\"Element\"+e}),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:O,elements:j,reverseOrder:h.legend.reverseOrder})})();var B=O.node().getBBox();x=Math.min(h.width-B.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),O.attr(\"transform\",\"translate(\"+[_[0]+x,_[1]-x]+\")\")}else O=t.select(\".legend-group\").style({display:\"none\"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),F.attr(\"transform\",\"translate(\"+_+\")\").style({cursor:\"crosshair\"});var U=[(h.width-(h.margin.left+h.margin.right+2*x+(B?B.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(\".outer-group\").attr(\"transform\",\"translate(\"+U+\")\"),h.title){var V=t.select(\"g.title-group text\").style(N).text(h.title),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(\".radial.axis-group\");if(h.radialAxis.gridLinesVisible){var G=H.selectAll(\"circle.grid-circle\").data(r.ticks(5));G.enter().append(\"circle\").attr({class:\"grid-circle\"}).style(R),G.attr(\"r\",r),G.exit().remove()}H.select(\"circle.outside-circle\").attr({r:x}).style(R);var Y=t.select(\"circle.background-circle\").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});if(h.radialAxis.visible){var W=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(W).attr({transform:\"rotate(\"+h.radialAxis.orientation+\")\"}),H.selectAll(\".domain\").style(R),H.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\"]]+\")\"}}),H.selectAll(\"g>line\").style({stroke:\"black\"})}var X=t.select(\".angular.axis-group\").selectAll(\"g.angular-tick\").data(D),Z=X.enter().append(\"g\").classed(\"angular-tick\",!0);X.attr({transform:function(t,e){return\"rotate(\"+c(t)+\")\"}}).style({display:h.angularAxis.visible?\"block\":\"none\"}),X.exit().remove(),Z.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(R),Z.selectAll(\".minor\").style({stroke:h.minorTickColor}),X.select(\"line.grid-line\").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?\"block\":\"none\"}),Z.append(\"text\").classed(\"axis-text\",!0).style(N);var J=X.select(\"text.axis-text\").attr({x:x+h.labelOffset,dy:a+\"em\",transform:function(t,e){var r=c(t),n=x+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&&J.text(function(t,e){return e%(h.minorTicks+1)!=0?\"\":h.angularAxis.rewriteTicks(this.textContent,e)});var K=n.max(F.selectAll(\".angular-tick text\")[0].map(function(t,e){return t.getCTM().e+t.getBBox().width}));O.attr({transform:\"translate(\"+[x+K,h.margin.top]+\")\"});var Q=t.select(\"g.geometry-group\").selectAll(\"g\").size()>0,$=t.select(\"g.geometry-group\").selectAll(\"g.geometry\").data(p);if($.enter().append(\"g\").attr({class:function(t,e){return\"geometry geometry\"+e}}),$.exit().remove(),p[0]||Q){var tt=[];p.forEach(function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=$.filter(function(t,r){return r==e}),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,tt.push({data:t,geometryConfig:n})});var et=[];n.nest().key(function(t,e){return void 0!==t.data.groupId||\"unstacked\"}).entries(tt).forEach(function(t,e){\"unstacked\"===t.key?et=et.concat(t.values.map(function(t,e){return[t]})):et.push(t.values)}),et.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 i(o[r].defaultConfig(),t)});o[r]().config(n)()})}var rt,nt,it=t.select(\".guides-group\"),at=t.select(\".tooltips-group\"),ot=o.tooltipPanel().config({container:at,fontSize:8})(),st=o.tooltipPanel().config({container:at,fontSize:8})(),lt=o.tooltipPanel().config({container:at,hasTick:!0})();if(!k){var ct=it.select(\"line\").attr({x1:0,y1:0,y2:0}).style({stroke:\"grey\",\"pointer-events\":\"none\"});F.on(\"mousemove.angular-guide\",function(t,e){var r=o.util.getMousePos(Y).angle;ct.attr({x2:-x,transform:\"rotate(\"+r+\")\"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;rt=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);ot.text(o.util.round(rt)).move([i[0]+_[0],i[1]+_[1]])}).on(\"mouseout.angular-guide\",function(t,e){it.select(\"line\").style({opacity:0})})}var ut=it.select(\"circle\").style({stroke:\"grey\",fill:\"none\"});F.on(\"mousemove.radial-guide\",function(t,e){var n=o.util.getMousePos(Y).radius;ut.attr({r:n}).style({opacity:.5}),nt=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);st.text(o.util.round(nt)).move([i[0]+_[0],i[1]+_[1]])}).on(\"mouseout.radial-guide\",function(t,e){ut.style({opacity:0}),lt.hide(),ot.hide(),st.hide()}),t.selectAll(\".geometry-group .mark\").on(\"mouseover.tooltip\",function(e,r){var i=n.select(this),a=this.style.fill,s=\"black\",l=this.style.opacity||1;if(i.attr({\"data-opacity\":l}),a&&\"none\"!==a){i.attr({\"data-fill\":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};k&&(c.t=w[e[0]]);var u=\"t: \"+c.t+\", r: \"+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),d=[f.left+f.width/2-U[0]-h.left,f.top+f.height/2-U[1]-h.top];lt.config({color:s}).text(u),lt.move(d)}else a=this.style.stroke||\"black\",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\")&<.show()}).on(\"mouseout.tooltip\",function(t,e){lt.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\")})})})}(c),this},h.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]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)}),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,\"on\"),h},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;i<a;i++)(e=t[i])in r?(r[e]++,n[e]=r[e]):r[e]=1;return n},o.util.duplicates=function(t){return Object.keys(o.util.duplicatesCount(t))},o.util.translator=function(t,e,r,n){if(n){var i=r.slice();r=e,e=i}var a=e.reduce(function(t,e){if(void 0!==t)return t[e]},t);void 0!==a&&(e.reduce(function(t,r,n){if(void 0!==t)return n===e.length-1&&delete t[r],t[r]},t),r.reduce(function(t,e,n){return void 0===t[e]&&(t[e]={}),n===r.length-1&&(t[e]=a),t[e]},t))},o.PolyChart=function(){function t(){var t=e[0].geometryConfig,r=t.container;\"string\"==typeof r&&(r=n.select(r)),r.datum(e).each(function(e,r){var i=!!e[0].data.yStack,o=e.map(function(t,e){return i?n.zip(t.data.t[0],t.data.r[0],t.data.yStack[0]):n.zip(t.data.t[0],t.data.r[0])}),s=t.angularScale,l=t.radialScale.domain()[0],c={};c.bar=function(r,i,a){var o=e[a].data,l=t.radialScale(r[1])-t.radialScale(0),c=t.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:\"mark bar\",d:\"M\"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join(\"L\")+\"Z\",transform:function(e,r){return\"rotate(\"+(t.orientation+s(e[0]))+\")\"}})},c.dot=function(r,i,a){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(e[a].data.dotSize).type(e[a].data.dotType)(r,i);n.select(this).attr({class:\"mark dot\",d:s,transform:function(e,r){var n=function(t){return{x:t.r*Math.cos(t.t),y:t.r*Math.sin(t.t)}}(function(e,r){return{r:t.radialScale(e[1]),t:(t.angularScale(e[0])+t.orientation)*Math.PI/180}}(o));return\"translate(\"+[n.x,n.y]+\")\"}})};var u=n.svg.line.radial().interpolate(e[0].data.lineInterpolation).radius(function(e){return t.radialScale(e[1])}).angle(function(e){return t.angularScale(e[0])*Math.PI/180});c.line=function(r,i,a){var s=r[2]?o[a].map(function(t,e){return[t[0],t[1]+t[2]]}):o[a];if(n.select(this).each(c.dot).style({opacity:function(t,r){return+e[a].data.dotVisible},fill:p.stroke(r,i,a)}).attr({class:\"mark dot\"}),!(i>0)){var l=n.select(this.parentNode).selectAll(\"path.line\").data([0]);l.enter().insert(\"path\"),l.attr({class:\"line\",d:u(s),transform:function(e,r){return\"rotate(\"+(t.orientation+90)+\")\"},\"pointer-events\":\"none\"}).style({fill:function(t,e){return p.fill(r,i,a)},\"fill-opacity\":0,stroke:function(t,e){return p.stroke(r,i,a)},\"stroke-width\":function(t,e){return p[\"stroke-width\"](r,i,a)},\"stroke-dasharray\":function(t,e){return p[\"stroke-dasharray\"](r,i,a)},opacity:function(t,e){return p.opacity(r,i,a)},display:function(t,e){return p.display(r,i,a)}})}};var f=t.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,d=n.svg.arc().startAngle(function(t){return-h/2}).endAngle(function(t){return h/2}).innerRadius(function(e){return t.radialScale(l+(e[2]||0))}).outerRadius(function(e){return t.radialScale(l+(e[2]||0))+t.radialScale(e[1])});c.arc=function(e,r,i){n.select(this).attr({class:\"mark arc\",d:d,transform:function(e,r){return\"rotate(\"+(t.orientation+s(e[0])+90)+\")\"}})};var p={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 a[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\"}},m=n.select(this).selectAll(\"g.layer\").data(o);m.enter().append(\"g\").attr({class:\"layer\"});var g=m.selectAll(\"path.mark\").data(function(t,e){return t});g.enter().append(\"path\").attr({class:\"mark\"}),g.style(p).each(c[t.geometryType]),g.exit().remove(),m.exit().remove()})}var e=[o.PolyChart.defaultConfig()],r=n.dispatch(\"hover\"),a={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]={}),i(e[r],o.PolyChart.defaultConfig()),i(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,a=e.data.map(function(t,e){return[].concat(t).map(function(t,n){var a=i({},r.elements[e]);return a.name=t,a.color=[].concat(r.elements[e].color)[n],a})}),o=n.merge(a);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}),c=r.fontSize,u=null==r.isContinuous?\"number\"==typeof o[0]:r.isContinuous,f=u?r.height:c*o.length,h=s.classed(\"legend-group\",!0).selectAll(\"svg\").data([0]),d=h.enter().append(\"svg\").attr({width:300,height:f+c,xmlns:\"http://www.w3.org/2000/svg\",\"xmlns:xlink\":\"http://www.w3.org/1999/xlink\",version:\"1.1\"});d.append(\"g\").classed(\"legend-axis\",!0),d.append(\"g\").classed(\"legend-marks\",!0);var p=n.range(o.length),m=n.scale[u?\"linear\":\"ordinal\"]().domain(p).range(l),g=n.scale[u?\"linear\":\"ordinal\"]().domain(p)[u?\"range\":\"rangePoints\"]([0,f]);if(u){var v=h.select(\".legend-marks\").append(\"defs\").append(\"linearGradient\").attr({id:\"grad1\",x1:\"0%\",y1:\"0%\",x2:\"0%\",y2:\"100%\"}).selectAll(\"stop\").data(l);v.enter().append(\"stop\"),v.attr({offset:function(t,e){return e/(l.length-1)*100+\"%\"}}).style({\"stop-color\":function(t,e){return t}}),h.append(\"rect\").classed(\"legend-mark\",!0).attr({height:r.height,width:r.colorBandWidth,fill:\"url(#grad1)\"})}else{var y=h.select(\".legend-marks\").selectAll(\"path.legend-mark\").data(o);y.enter().append(\"path\").classed(\"legend-mark\",!0),y.attr({transform:function(t,e){return\"translate(\"+[c/2,g(e)+c/2]+\")\"},d:function(t,e){return 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)()}(t.symbol,c)},fill:function(t,e){return m(e)}}),y.exit().remove()}var x=n.svg.axis().scale(g).orient(\"right\"),b=h.select(\"g.legend-axis\").attr({transform:\"translate(\"+[u?r.colorBandWidth:c,c/2]+\")\"}).call(x);return b.selectAll(\".domain\").style({fill:\"none\",stroke:\"none\"}),b.selectAll(\"line\").style({fill:\"none\",stroke:u?r.textColor:\"none\"}),b.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?(i(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,a={container:null,hasTick:!1,fontSize:12,color:\"white\",padding:5},s=\"tooltip-\"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll(\"g.\"+s).data([0])).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:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?\"#aaa\":\"white\",u=o>=.5?\"black\":\"white\",f=i||\"\";e.style({fill:u,\"font-size\":a.fontSize+\"px\"}).text(f);var h=a.padding,d=e.node().getBBox(),p={fill:a.color,stroke:s,\"stroke-width\":\"2px\"},m=d.width+2*h+l,g=d.height+2*h;return r.attr({d:\"M\"+[[l,-g/2],[l,-g/4],[a.hasTick?0:l,0],[l,g/4],[l,g/2],[m,g/2],[m,-g/2]].join(\"L\")+\"Z\"}).style(p),t.attr({transform:\"translate(\"+[l,-g/2+2*h]+\")\"}),t.style({display:\"block\"}),c},c.move=function(e){if(t)return t.attr({transform:\"translate(\"+[e[0],e[1]]+\")\"}).style({display:\"block\"}),c},c.hide=function(){if(t)return t.style({display:\"none\"}),c},c.show=function(){if(t)return t.style({display:\"block\"}),c},c.config=function(t){return i(a,t),c},c},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=i({},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 a=o.util.duplicates(r.data.map(function(t,e){return t.geometry}));r.data.forEach(function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)})}if(t.layout){var s=i({},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\"],c=[\"top\",\"right\",\"bottom\",\"left\",\"pad\"],u={};n.entries(s.margin).forEach(function(t,e){u[c[l.indexOf(t.key)]]=t.value}),s.margin=u}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}},{\"../../../constants/alignment\":716,\"../../../lib\":743,d3:128}],862:[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,c=e.exports={};c.framework=function(t){function e(e,i){return i&&(f=i),n.select(n.select(f).node().parentNode).selectAll(\".svg-container>*:not(.chart-root)\").remove(),r=r?l(r,e):e,a||(a=o.Axis()),u=o.adapter.plotly().convert(r),a.config(u).render(f),t.data=r.data,t.layout=r.layout,c.fillLayout(t),r}var r,i,a,u,f,h=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){h.add({undo:function(){r&&t(r)},redo:function(){t(e)}})}(e,i),i=o.util.cloneJson(e)},e.undo=function(){h.undo()},e.redo=function(){h.redo()},e},c.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\":618,\"../../../lib\":743,\"./micropolar\":861,\"./undo_manager\":863,d3:128}],863:[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<r.length-1},getCommands:function(){return r},getPreviousCommand:function(){return r[n-1]},getIndex:function(){return n}}}},{}],864:[function(t,e,r){\"use strict\";function n(t,e){this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=t._fullLayout,n=\"clip\"+r._uid+e;this.clipIds.circle=n+\"-circle\",this.clipPaths.circle=r._clips.append(\"clipPath\").attr(\"id\",this.clipIds.circle),this.clipPaths.circle.append(\"path\"),this.framework=r._polarlayer.append(\"g\").attr(\"class\",e),this.radialTickLayout=null,this.angularTickLayout=null}function i(t,e,r){M.setConvert(t,r),t._min=e._min,t._max=e._max,t.setScale()}function a(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return\"side\"in t&&(e+=t.side),e}function o(t,e){if(l(e))return _.symbolFuncs[0](t);var r=t*Math.cos(D(e[0])),n=-t*Math.sin(D(e[0])),i=t*Math.cos(D(e[1])),a=-t*Math.sin(D(e[1]));return\"M\"+[r,n]+\"A\"+[t,t]+\" \"+(Math.abs(e[1]-e[0])<=180?[0,0,0]:[0,1,0])+\" \"+[i,a]}function s(t,e){return o(t,e)+(l(e)?\"\":\"L0,0Z\")}function l(t){return 360===Math.abs(t[1]-t[0])}function c(t,e,r){return e?(t.attr(\"display\",null),t.attr(r)):t&&t.attr(\"display\",\"none\"),t}function u(t,e){return\"translate(\"+t+\",\"+e+\")\"}function f(t){return\"rotate(\"+t+\")\"}function h(t){return Math.abs(t)<1e-10?0:t>0?1:-1}function d(t){return h(Math.cos(t))}function p(t){return h(Math.sin(t))}var m=t(\"d3\"),g=t(\"tinycolor2\"),v=t(\"../../plotly\"),y=t(\"../../registry\"),x=t(\"../../lib\"),b=t(\"../../components/color\"),_=t(\"../../components/drawing\"),w=t(\"../plots\"),M=t(\"../cartesian/axes\"),k=t(\"../../components/dragelement\"),A=t(\"../cartesian/dragbox\"),T=t(\"../../components/fx\"),S=t(\"../../components/titles\"),E=t(\"../cartesian/select\"),L=t(\"../../lib/setcursor\"),C=t(\"../../constants/alignment\").MID_SHIFT,z=x._,D=x.deg2rad,I=x.rad2deg,P=x.wrap360,O=x.wrap180,F=t(\"./helpers\").setConvertAngular,R=t(\"./constants\"),N=n.prototype;e.exports=function(t,e){return new n(t,e)},N.plot=function(t,e){var r=e[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n<t.length;n++){if(!1===t[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(e,r),this.updateLayout(e,r),w.generalUpdatePerTraceModule(this.gd,this,t,r),this.updateFx(e,r)},N.updateLayers=function(t,e){var r=this.layers,n=e.radialaxis,i=e.angularaxis,a=R.layerNames,o=a.indexOf(\"frontplot\"),s=a.slice(0,o),l=\"below traces\"===i.layer,c=\"below traces\"===n.layer;l&&s.push(\"angular-axis\"),c&&s.push(\"radial-axis\"),l&&s.push(\"angular-line\"),c&&s.push(\"radial-line\"),s.push(\"frontplot\"),l||s.push(\"angular-axis\"),c||s.push(\"radial-axis\"),l||s.push(\"angular-line\"),c||s.push(\"radial-line\");var u=this.framework.selectAll(\".polarsublayer\").data(s,String);u.enter().append(\"g\").attr(\"class\",function(t){return\"polarsublayer \"+t}).each(function(t){var e=r[t]=m.select(this);switch(t){case\"frontplot\":e.append(\"g\").classed(\"scatterlayer\",!0);break;case\"backplot\":e.append(\"g\").classed(\"maplayer\",!0);break;case\"plotbg\":r.bgcircle=e.append(\"path\");break;case\"radial-grid\":e.style(\"fill\",\"none\"),e.append(\"g\").classed(\"x\",1);break;case\"angular-grid\":e.style(\"fill\",\"none\"),e.append(\"g\").classed(\"angular\",1);break;case\"radial-line\":e.append(\"line\").style(\"fill\",\"none\");break;case\"angular-line\":e.append(\"path\").style(\"fill\",\"none\")}}),u.order()},N.updateLayout=function(t,e){var r=this,n=r.layers,i=t._size,a=e.domain.x,o=e.domain.y;r.xOffset=i.l+i.w*a[0],r.yOffset=i.t+i.h*(1-o[1]);var l,c,f,h,d,p=r.xLength=i.w*(a[1]-a[0]),m=r.yLength=i.h*(o[1]-o[0]),g=r.sector=e.sector,v=r.sectorBBox=function(t){var e,r,n,i,a=t[0],o=t[1]-a,s=P(a),l=s+o,c=Math.cos(D(s)),u=Math.sin(D(s)),f=Math.cos(D(l)),h=Math.sin(D(l));return i=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h),e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f),r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h),n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f),[e,r,n,i]}(g),y=v[2]-v[0],x=v[3]-v[1],w=m/p,k=Math.abs(x/y);w>k?(l=p,d=(m-(c=p*k))/i.h/2,f=[a[0],a[1]],h=[o[0]+d,o[1]-d]):(c=m,d=(p-(l=m/k))/i.w/2,f=[a[0]+d,a[1]-d],h=[o[0],o[1]]),r.xLength2=l,r.yLength2=c,r.xDomain2=f,r.yDomain2=h;var A=r.xOffset2=i.l+i.w*f[0],T=r.yOffset2=i.t+i.h*(1-h[1]),S=r.radius=l/y,E=r.cx=A-S*v[0],L=r.cy=T+S*v[3],C=r.cxx=E-A,z=r.cyy=L-T;r.updateRadialAxis(t,e),r.updateRadialAxisTitle(t,e),r.updateAngularAxis(t,e);var I=r.radialAxis.range,O=I[1]-I[0],F=r.xaxis={type:\"linear\",_id:\"x\",range:[v[0]*O,v[2]*O],domain:f};M.setConvert(F,t),F.setScale();var R=r.yaxis={type:\"linear\",_id:\"y\",range:[v[1]*O,v[3]*O],domain:h};M.setConvert(R,t),R.setScale(),F.isPtWithinRange=function(t){return r.isPtWithinSector(t)},R.isPtWithinRange=function(){return!0},n.frontplot.attr(\"transform\",u(A,T)).call(_.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.circle),n.bgcircle.attr({d:s(S,g),transform:u(E,L)}).call(b.fill,e.bgcolor),r.clipPaths.circle.select(\"path\").attr(\"d\",s(S,g)).attr(\"transform\",u(C,z)),r.framework.selectAll(\".crisp\").classed(\"crisp\",0)},N.updateRadialAxis=function(t,e){var r=this.gd,n=this.layers,s=this.radius,l=this.cx,h=this.cy,d=t._size,p=e.radialaxis,m=e.sector,g=P(m[0]);this.fillViewInitialKey(\"radialaxis.angle\",p.angle);var v=this.radialAxis=x.extendFlat({},p,{_axislayer:n[\"radial-axis\"],_gridlayer:n[\"radial-grid\"],_id:\"x\",_pos:0,side:{counterclockwise:\"top\",clockwise:\"bottom\"}[p.side],domain:[0,s/d.w],anchor:\"free\",position:0,_counteraxis:!0});i(v,p,t),M.doAutoRange(v),p.range=v.range.slice(),p._input.range=v.range.slice(),this.fillViewInitialKey(\"radialaxis.range\",v.range.slice()),\"auto\"===v.tickangle&&g>90&&g<=270&&(v.tickangle=180),v._transfn=function(t){return\"translate(\"+v.l2p(t.x)+\",0)\"},v._gridpath=function(t){return o(v.r2p(t.x),m)};var y=a(p);this.radialTickLayout!==y&&(n[\"radial-axis\"].selectAll(\".xtick\").remove(),this.radialTickLayout=y),M.doTicks(r,v,!0),c(n[\"radial-axis\"],p.showticklabels||p.ticks,{transform:u(l,h)+f(-p.angle)}),c(n[\"radial-grid\"],p.showgrid,{transform:u(l,h)}).selectAll(\"path\").attr(\"transform\",null),c(n[\"radial-line\"].select(\"line\"),p.showline,{x1:0,y1:0,x2:s,y2:0,transform:u(l,h)+f(-p.angle)}).attr(\"stroke-width\",p.linewidth).call(b.stroke,p.linecolor)},N.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,l=this.id+\"title\",c=void 0!==r?r:s.angle,u=D(c),f=Math.cos(u),h=Math.sin(u),d=0;if(s.title){var p=_.bBox(this.layers[\"radial-axis\"].node()).height,m=s.titlefont.size;d=\"counterclockwise\"===s.side?-p-.4*m:p+.8*m}this.layers[\"radial-axis-title\"]=S.draw(n,l,{propContainer:s,propName:this.id+\".radialaxis.title\",placeholder:z(n,\"Click to enter radial axis title\"),attributes:{x:a+i/2*f+d*h,y:o-i/2*h+d*f,\"text-anchor\":\"middle\"},transform:{rotate:-c}})},N.updateAngularAxis=function(t,e){function r(t){return T.c2rad(t.x,\"degrees\")}function n(t){return[v*Math.cos(t),v*Math.sin(t)]}var o=this,h=o.gd,g=o.layers,v=o.radius,y=o.cx,_=o.cy,w=e.angularaxis,k=e.sector,A=k.map(D);o.fillViewInitialKey(\"angularaxis.rotation\",w.rotation);var T=o.angularAxis=x.extendFlat({},w,{_axislayer:g[\"angular-axis\"],_gridlayer:g[\"angular-grid\"],_id:\"angular\",_pos:0,side:\"right\",domain:[0,Math.PI],anchor:\"free\",position:0,_counteraxis:!0});\"linear\"===T.type?(T.autorange=!1,l(k)?T.range=k.slice():T.range=A.map(T.unTransformRad).map(I),\"radians\"===T.thetaunit&&(T.tick0=I(T.tick0),T.dtick=I(T.dtick))):\"category\"===T.type&&(T._tickFilter=function(t){return o.isPtWithinSector({r:o.radialAxis.range[1],rad:T.c2rad(t.x)})}),i(T,w,t),M.doAutoRange(T),T._transfn=function(t){var e=r(t),i=n(e),a=u(y+i[0],_-i[1]),o=m.select(this);return o&&o.node()&&o.classed(\"ticks\")&&(a+=f(-I(e))),a},T._gridpath=function(t){var e=n(r(t));return\"M0,0L\"+-e[0]+\",\"+e[1]};var S=\"outside\"!==w.ticks?.7:.5;T._labelx=function(t){var e=r(t),n=T._labelStandoff,i=T._pad;return(0===p(e)?0:Math.cos(e)*(n+i+S*t.fontSize))+d(e)*(t.dx+n+i)},T._labely=function(t){var e=r(t),n=T._labelStandoff,i=T._labelShift,a=T._pad;return t.dy+t.fontSize*C-i+-Math.sin(e)*(n+a+S*t.fontSize)},T._labelanchor=function(t,e){var n=r(e);return 0===p(n)?d(n)>0?\"start\":\"end\":\"middle\"};var E=a(w);o.angularTickLayout!==E&&(g[\"angular-axis\"].selectAll(\".angulartick\").remove(),o.angularTickLayout=E),M.doTicks(h,T,!0),c(g[\"angular-line\"].select(\"path\"),w.showline,{d:s(v,k),transform:u(y,_)}).attr(\"stroke-width\",w.linewidth).call(b.stroke,w.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t,e),this.updateRadialDrag(t,e),this.updateMainDrag(t,e))},N.updateMainDrag=function(t,e){function r(t,e){var r=t-w,n=e-M;return Math.sqrt(r*r+n*n)}function n(t,e){return Math.atan2(M-e,t-w)}function i(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function a(t,e){var r=R.cornerLen,n=R.cornerHalfWidth;if(0===t)return s(2*n,S);var a=r/t/2,o=e-a,l=e+a,c=Math.max(0,Math.min(t,x)),u=c-n,f=c+n;return\"M\"+i(u,o)+\"A\"+[u,u]+\" 0,0,0 \"+i(u,l)+\"L\"+i(f,l)+\"A\"+[f,f]+\" 0,0,1 \"+i(f,o)+\"Z\"}function o(t,e){var i=C+t,o=z+e,l=r(C,z),c=Math.min(r(i,o),x),u=n(C,z),f=n(i,o);l<y?l=0:x-l<y?l=x:c<y?c=0:x-c<y&&(c=x);var h,d;Math.abs(c-l)>p?(l<c?(D=l,I=c):(D=c,I=l,f=[u,u=f][0]),h=P+s(I,S)+s(D,S),d=a(D,u)+a(I,f)):(D=null,I=null,h=P,d=\"M0,0Z\"),N.attr(\"d\",h),j.attr(\"d\",d),A.transitionZoombox(N,j,O,F),O=!0}function l(){if(A.removeZoombox(f),null!==D&&null!==I){A.showDoubleClickNotifier(f);var t=c.radialAxis.range,e=t[1]-t[0],r={};r[c.id+\".radialaxis.range\"]=[t[0]+D*e/x,t[0]+I*e/x],v.relayout(f,r)}}var c=this,f=c.gd,h=c.layers,d=t._zoomlayer,p=R.MINZOOM,y=R.OFFEDGE,x=c.radius,b=c.cx,_=c.cy,w=c.cxx,M=c.cyy,S=e.sector,L=A.makeDragger(h,\"path\",\"maindrag\",\"crosshair\");m.select(L).attr(\"d\",s(x,S)).attr(\"transform\",u(b,_));var C,z,D,I,P,O,F,N,j,B={element:L,gd:f,subplot:c.id,plotinfo:{xaxis:c.xaxis,yaxis:c.yaxis},xaxes:[c.xaxis],yaxes:[c.yaxis]};B.prepFn=function(t,e,r){var n=f._fullLayout.dragmode,i=L.getBoundingClientRect();switch(C=e-i.left,z=r-i.top,n){case\"zoom\":B.moveFn=o,B.doneFn=l,function(){D=null,I=null,P=s(x,S),O=!1;var t=f._fullLayout[c.id];F=g(t.bgcolor).getLuminance(),(N=A.makeZoombox(d,F,b,_,P)).attr(\"fill-rule\",\"evenodd\"),j=A.makeCorners(d,b,_),A.clearSelect(d)}();break;case\"select\":case\"lasso\":E(t,e,r,B,n)}},B.clickFn=function(t,e){if(A.removeZoombox(f),2===t){var r={};for(var n in c.viewInitial)r[c.id+\".\"+n]=c.viewInitial[n];f.emit(\"plotly_doubleclick\",null),v.relayout(f,r)}T.click(f,e,c.id)},L.onmousemove=function(t){T.hover(f,t,c.id),f._fullLayout._lasthover=L,f._fullLayout._hoversubplot=c.id},L.onmouseout=function(t){f._dragging||k.unhover(f,t)},k.init(B)},N.updateRadialDrag=function(t,e){function r(t,e){if(C)C(t,e);else{var r=[t,-e],n=[Math.cos(p),Math.sin(p)],d=Math.abs(x.dot(r,n)/Math.sqrt(x.dot(r,r)));isNaN(d)||(C=d<.5?function(t,e){var r=E+t,n=L+e;z=I(Math.atan2(c-n,r-l));var a=u(l,c)+f(-z);o[\"radial-axis\"].attr(\"transform\",a),o[\"radial-line\"].select(\"line\").attr(\"transform\",a);var s=i.gd._fullLayout,h=s[i.id];i.updateRadialAxisTitle(s,h,z)}:function(t,e){var r=x.dot([t,-e],[Math.cos(p),Math.sin(p)]),n=g[1]-b*r/s*.75;if(b>0!=n>g[0])return;P=h.range[1]=n,M.doTicks(a,i.radialAxis,!0),o[\"radial-grid\"].attr(\"transform\",u(l,c)).selectAll(\"path\").attr(\"transform\",null);var f=P-g[0],d=i.sectorBBox;i.xaxis.range=[d[0]*f,d[2]*f],i.yaxis.range=[d[1]*f,d[3]*f],i.xaxis.setScale(),i.yaxis.setScale();for(var m in i.traceHash){var v=i.traceHash[m],_=x.filterVisible(v),w=v[0][0].trace._module,k=a._fullLayout[i.id];if(w.plot(a,i,_,k),!y.traceIs(m,\"gl\"))for(var A=0;A<_.length;A++)w.style(a,_[A])}})}}function n(){null!==z?v.relayout(a,i.id+\".radialaxis.angle\",z):null!==P&&v.relayout(a,i.id+\".radialaxis.range[1]\",P)}var i=this,a=i.gd,o=i.layers,s=i.radius,l=i.cx,c=i.cy,h=i.radialAxis,d=e.radialaxis,p=D(d.angle),g=h.range.slice(),b=g[1]-g[0],_=R.radialDragBoxSize,w=_/2;if(d.visible){var T=A.makeRectDragger(o,\"radialdrag\",\"crosshair\",-w,-w,_,_),S={element:T,gd:a},E=l+(s+w)*Math.cos(p),L=c-(s+w)*Math.sin(p);m.select(T).attr(\"transform\",u(E,L));var C,z,P;S.prepFn=function(){C=null,z=null,P=null,S.moveFn=r,S.doneFn=n,A.clearSelect(t._zoomlayer)},S.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<R.MINDRAG&&(t=0,e=0),[t,e]},k.init(S)}},N.updateAngularDrag=function(t,e){function r(t,e){return Math.atan2(g+w-e,t-p-w)}function n(t,e){var n=r(E+t,C+e),i=I(n-j);P=z+i,s.frontplot.attr(\"transform\",u(a.xOffset2,a.yOffset2)+f([-i,p,g])),a.clipPaths.circle.select(\"path\").attr(\"transform\",u(p,g)+f(i)),U.each(function(){var t=m.select(this),e=_.getTranslate(t);t.attr(\"transform\",u(e.x,e.y)+f([i]))}),V.each(function(){var t=m.select(this),e=t.select(\"text\"),r=_.getTranslate(t);t.attr(\"transform\",f([i,e.attr(\"x\"),e.attr(\"y\")])+u(r.x,r.y))});var c=a.angularAxis;c.rotation=O(P),\"linear\"!==c.type||l(b)||(c.range=N.map(D).map(c.unTransformRad).map(I)),F(c),M.doTicks(o,c,!0),a._hasClipOnAxisFalse&&!l(b)&&(a.sector=[N[0]-i,N[1]-i],B.call(_.hideOutsideRangePoints,a));for(var h in a.traceHash)if(y.traceIs(h,\"gl\")){var d=a.traceHash[h],v=x.filterVisible(d),w=d[0][0].trace._module,k=o._fullLayout[a.id];w.plot(o,a,v,k)}}function i(){V.select(\"text\").attr(\"transform\",null);var t={};t[a.id+\".angularaxis.rotation\"]=P,v.relayout(o,t)}var a=this,o=a.gd,s=a.layers,c=a.radius,h=a.cx,d=a.cy,p=a.cxx,g=a.cyy,b=e.sector,w=R.angularDragBoxSize,T=A.makeDragger(s,\"path\",\"angulardrag\",\"move\"),S={element:T,gd:o};m.select(T).attr(\"d\",function(t,e,r){function n(t,e){return[t*Math.cos(e),-t*Math.sin(e)]}function i(t,e,r){return\"A\"+[t,t]+\" \"+[0,c,r]+\" \"+n(t,e)}var a,o,s,c=Math.abs(r[1]-r[0])<=180?0:1;return l(r)?(a=0,s=2*Math.PI,o=Math.PI,\"M\"+n(t,a)+i(t,o,0)+i(t,s,0)+\"ZM\"+n(e,a)+i(e,o,1)+i(e,s,1)+\"Z\"):(a=D(r[0]),s=D(r[1]),\"M\"+n(t,a)+\"L\"+n(e,a)+i(e,s,0)+\"L\"+n(t,s)+i(t,a,1)+\"Z\")}(c,c+w,b)).attr(\"transform\",u(h,d)).call(L,\"move\");var E,C,z,P,N,j,B=s.frontplot.select(\".scatterlayer\").selectAll(\".trace\"),U=B.selectAll(\".point\"),V=B.selectAll(\".textpoint\");S.prepFn=function(e,o,s){var l=t[a.id];N=l.sector.slice(),z=l.angularaxis.rotation;var c=T.getBoundingClientRect();E=o-c.left,C=s-c.top,j=r(E,C),S.moveFn=n,S.doneFn=i,A.clearSelect(t._zoomlayer)},k.init(S)},N.isPtWithinSector=function(t){var e=this.sector,r=this.radialAxis,n=r.range,i=r.c2r(t.r),a=P(e[0]),o=P(e[1]);a>o&&(o+=360);var s,c,u=P(I(t.rad)),f=u+360;return n[1]>=n[0]?(s=n[0],c=n[1]):(s=n[1],c=n[0]),i>=s&&i<=c&&(l(e)||u>=a&&u<=o||f>=a&&f<=o)},N.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../components/titles\":709,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/setcursor\":762,\"../../plotly\":784,\"../../registry\":873,\"../cartesian/axes\":789,\"../cartesian/dragbox\":797,\"../cartesian/select\":807,\"../plots\":852,\"./constants\":853,\"./helpers\":854,d3:128,tinycolor2:546}],865:[function(t,e,r){\"use strict\";var n=t(\"../lib\");e.exports=function(t,e,r,i){function a(t,e){return n.coerce(o,s,c,t,e)}for(var o,s,l=i.type,c=i.attributes,u=i.handleDefaults,f=i.partition||\"x\",h=e._subplots[l],d=h.length,p=0;p<d;p++){var m=h[p];o=t[m]?t[m]:t[m]={},e[m]=s={},a(\"domain.\"+f,[p/d,(p+1)/d]),a(\"domain.\"+{x:\"y\",y:\"x\"}[f]),i.id=m,u(o,s,a,i)}}},{\"../lib\":743}],866:[function(t,e,r){\"use strict\";var n=t(\"./ternary\"),i=t(\"../../plots/get_data\").getSubplotCalcData,a=t(\"../../lib\").counterRegex;r.name=\"ternary\",r.attr=\"subplot\",r.idRoot=\"ternary\",r.idRegex=r.attrRegex=a(\"ternary\"),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.calcdata,a=e._subplots.ternary,o=0;o<a.length;o++){var s=a[o],l=i(r,\"ternary\",s),c=e[s]._subplot;c||(c=new n({id:s,graphDiv:t,container:e._ternarylayer.node()},e),e[s]._subplot=c),c.plot(l,e,t._promises)}},r.clean=function(t,e,r,n){for(var i=n._subplots.ternary||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers[\"a-title\"].remove(),s.layers[\"b-title\"].remove(),s.layers[\"c-title\"].remove())}}},{\"../../lib\":743,\"../../plots/get_data\":826,\"./layout/attributes\":867,\"./layout/defaults\":870,\"./layout/layout_attributes\":871,\"./ternary\":872}],867:[function(t,e,r){\"use strict\";e.exports={subplot:{valType:\"subplotid\",dflt:\"ternary\",editType:\"calc\"}}},{}],868:[function(t,e,r){\"use strict\";var n=t(\"../../cartesian/layout_attributes\"),i=t(\"../../../lib/extend\").extendFlat;e.exports={title:n.title,titlefont:n.titlefont,color:n.color,tickmode:n.tickmode,nticks:i({},n.nticks,{dflt:6,min:1}),tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,separatethousands:n.separatethousands,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:i({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:i({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,layer:n.layer,min:{valType:\"number\",dflt:0,min:0}}},{\"../../../lib/extend\":732,\"../../cartesian/layout_attributes\":801}],869:[function(t,e,r){\"use strict\";var n=t(\"../../../lib\"),i=t(\"./axis_attributes\"),a=t(\"../../cartesian/tick_label_defaults\"),o=t(\"../../cartesian/tick_mark_defaults\"),s=t(\"../../cartesian/tick_value_defaults\"),l=t(\"../../cartesian/line_grid_defaults\");e.exports=function(t,e,r){function c(r,a){return n.coerce(t,e,i,r,a)}e.type=\"linear\";var u=c(\"color\"),f=u===t.color?u:r.font.color,h=e._name.charAt(0).toUpperCase(),d=\"Component \"+h,p=c(\"title\",d);e._hovertitle=p===d?p:h,n.coerceFont(c,\"titlefont\",{family:r.font.family,size:Math.round(1.2*r.font.size),color:f}),c(\"min\"),s(t,e,c,\"linear\"),a(t,e,c,\"linear\",{noHover:!1}),o(t,e,c,{outerTicks:!0});c(\"showticklabels\")&&(n.coerceFont(c,\"tickfont\",{family:r.font.family,size:r.font.size,color:f}),c(\"tickangle\"),c(\"tickformat\")),l(t,e,c,{dfltColor:u,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),c(\"hoverformat\"),c(\"layer\")}},{\"../../../lib\":743,\"../../cartesian/line_grid_defaults\":803,\"../../cartesian/tick_label_defaults\":809,\"../../cartesian/tick_mark_defaults\":810,\"../../cartesian/tick_value_defaults\":811,\"./axis_attributes\":868}],870:[function(t,e,r){\"use strict\";function n(t,e,r,n){var a=r(\"bgcolor\"),o=r(\"sum\");n.bgColor=i.combine(a,n.paper_bgcolor);for(var c,u,f,h=0;h<l.length;h++)u=t[c=l[h]]||{},f=e[c]={_name:c,type:\"linear\"},s(u,f,n);var d=e.aaxis,p=e.baxis,m=e.caxis;d.min+p.min+m.min>=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\":618,\"../../subplot_defaults\":865,\"./axis_defaults\":869,\"./layout_attributes\":871}],871:[function(t,e,r){\"use strict\";var n=t(\"../../../components/color/attributes\"),i=t(\"../../domain_attributes\"),a=t(\"./axis_attributes\"),o=t(\"../../../plot_api/edit_types\").overrideAll;e.exports=o({domain:i({name:\"ternary\"}),bgcolor:{valType:\"color\",dflt:n.background},sum:{valType:\"number\",dflt:1,min:0},aaxis:a,baxis:a,caxis:a},\"plot\",\"from-root\")},{\"../../../components/color/attributes\":617,\"../../../plot_api/edit_types\":773,\"../../domain_attributes\":815,\"./axis_attributes\":868}],872:[function(t,e,r){\"use strict\";function n(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e)}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\"),c=l._,u=t(\"../../components/color\"),f=t(\"../../components/drawing\"),h=t(\"../cartesian/set_convert\"),d=t(\"../../lib/extend\").extendFlat,p=t(\"../plots\"),m=t(\"../cartesian/axes\"),g=t(\"../../components/dragelement\"),v=t(\"../../components/fx\"),y=t(\"../../components/titles\"),x=t(\"../cartesian/select\"),b=t(\"../cartesian/constants\");e.exports=n;var _=n.prototype;_.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},_.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;i<t.length;i++){if(!1===t[i][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}}this.updateLayers(r),this.adjustLayout(r,n),p.generalUpdatePerTraceModule(this.graphDiv,this,t,r),this.layers.plotbg.select(\"path\").call(u.fill,r.bgcolor)},_.makeFramework=function(t){var e=t[this.id],r=this.clipId=\"clip\"+this.layoutId+this.id;this.clipDef=t._clips.selectAll(\"#\"+r).data([0]),this.clipDef.enter().append(\"clipPath\").attr(\"id\",r).append(\"path\").attr(\"d\",\"M0,0Z\");var n=this.clipIdRelative=\"clip-relative\"+this.layoutId+this.id;this.clipDefRelative=t._clips.selectAll(\"#\"+n).data([0]),this.clipDefRelative.enter().append(\"clipPath\").attr(\"id\",n).append(\"path\").attr(\"d\",\"M0,0Z\"),this.plotContainer=this.container.selectAll(\"g.\"+this.id).data([0]),this.plotContainer.enter().append(\"g\").classed(this.id,!0),this.updateLayers(e),f.setClipUrl(this.layers.backplot,r),f.setClipUrl(this.layers.grids,r)},_.updateLayers=function(t){var e=this.layers,r=[\"draglayer\",\"plotbg\",\"backplot\",\"grids\"];\"below traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"below traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"below traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\"),r.push(\"frontplot\"),\"above traces\"===t.aaxis.layer&&r.push(\"aaxis\",\"aline\"),\"above traces\"===t.baxis.layer&&r.push(\"baxis\",\"bline\"),\"above traces\"===t.caxis.layer&&r.push(\"caxis\",\"cline\");var n=this.plotContainer.selectAll(\"g.toplevel\").data(r,String),i=[\"agrid\",\"bgrid\",\"cgrid\"];n.enter().append(\"g\").attr(\"class\",function(t){return\"toplevel \"+t}).each(function(t){var r=a.select(this);e[t]=r,\"frontplot\"===t?r.append(\"g\").classed(\"scatterlayer\",!0):\"backplot\"===t?r.append(\"g\").classed(\"maplayer\",!0):\"plotbg\"===t?r.append(\"path\").attr(\"d\",\"M0,0Z\"):\"aline\"===t||\"bline\"===t||\"cline\"===t?r.append(\"path\"):\"grids\"===t&&i.forEach(function(t){e[t]=r.append(\"g\").classed(\"grid \"+t,!0);var n=\"bgrid\"===t?\"x\":\"y\";e[t].append(\"g\").classed(n,!0)})}),n.order()};var w=Math.sqrt(4/3);_.adjustLayout=function(t,e){var r,n,i,a,o,s,l=this,c=t.domain,p=(c.x[0]+c.x[1])/2,m=(c.y[0]+c.y[1])/2,g=c.x[1]-c.x[0],v=c.y[1]-c.y[0],y=g*e.w,x=v*e.h,b=t.sum,_=t.aaxis.min,M=t.baxis.min,k=t.caxis.min;y>w*x?i=(a=x)*w:a=(i=y)/w,o=g*i/y,s=v*a/x,r=e.l+e.w*p-i/2,n=e.t+e.h*(1-m)-a/2,l.x0=r,l.y0=n,l.w=i,l.h=a,l.sum=b,l.xaxis={type:\"linear\",range:[_+2*k-b,b-_-2*M],domain:[p-o/2,p+o/2],_id:\"x\"},h(l.xaxis,l.graphDiv._fullLayout),l.xaxis.setScale(),l.xaxis.isPtWithinRange=function(t){return t.a>=l.aaxis.range[0]&&t.a<=l.aaxis.range[1]&&t.b>=l.baxis.range[1]&&t.b<=l.baxis.range[0]&&t.c>=l.caxis.range[1]&&t.c<=l.caxis.range[0]},l.yaxis={type:\"linear\",range:[_,b-M-k],domain:[m-s/2,m+s/2],_id:\"y\"},h(l.yaxis,l.graphDiv._fullLayout),l.yaxis.setScale(),l.yaxis.isPtWithinRange=function(){return!0};var A=l.yaxis.domain[0],T=l.aaxis=d({},t.aaxis,{visible:!0,range:[_,b-M-k],side:\"left\",_counterangle:30,tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+s*w],_axislayer:l.layers.aaxis,_gridlayer:l.layers.agrid,_pos:0,_id:\"y\",_length:i,_gridpath:\"M0,0l\"+a+\",-\"+i/2});h(T,l.graphDiv._fullLayout),T.setScale();var S=l.baxis=d({},t.baxis,{visible:!0,range:[b-_-k,M],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(S,l.graphDiv._fullLayout),S.setScale(),T._counteraxis=S;var E=l.caxis=d({},t.caxis,{visible:!0,range:[b-_-M,k],side:\"right\",_counterangle:30,tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+s*w],_axislayer:l.layers.caxis,_gridlayer:l.layers.cgrid,_counteraxis:l.baxis,_pos:0,_id:\"y\",_length:i,_gridpath:\"M0,0l-\"+a+\",\"+i/2});h(E,l.graphDiv._fullLayout),E.setScale();var L=\"M\"+r+\",\"+(n+a)+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";l.clipDef.select(\"path\").attr(\"d\",L),l.layers.plotbg.select(\"path\").attr(\"d\",L);var C=\"M0,\"+a+\"h\"+i+\"l-\"+i/2+\",-\"+a+\"Z\";l.clipDefRelative.select(\"path\").attr(\"d\",C);var z=\"translate(\"+r+\",\"+n+\")\";l.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",z),l.clipDefRelative.select(\"path\").attr(\"transform\",null);var D=\"translate(\"+(r-S._offset)+\",\"+(n+a)+\")\";l.layers.baxis.attr(\"transform\",D),l.layers.bgrid.attr(\"transform\",D);var I=\"translate(\"+(r+i/2)+\",\"+n+\")rotate(30)translate(0,-\"+T._offset+\")\";l.layers.aaxis.attr(\"transform\",I),l.layers.agrid.attr(\"transform\",I);var P=\"translate(\"+(r+i/2)+\",\"+n+\")rotate(-30)translate(0,-\"+E._offset+\")\";l.layers.caxis.attr(\"transform\",P),l.layers.cgrid.attr(\"transform\",P),l.drawAxes(!0),l.plotContainer.selectAll(\".crisp\").classed(\"crisp\",!1),l.layers.aline.select(\"path\").attr(\"d\",T.showline?\"M\"+r+\",\"+(n+a)+\"l\"+i/2+\",-\"+a:\"M0,0\").call(u.stroke,T.linecolor||\"#000\").style(\"stroke-width\",(T.linewidth||0)+\"px\"),l.layers.bline.select(\"path\").attr(\"d\",S.showline?\"M\"+r+\",\"+(n+a)+\"h\"+i:\"M0,0\").call(u.stroke,S.linecolor||\"#000\").style(\"stroke-width\",(S.linewidth||0)+\"px\"),l.layers.cline.select(\"path\").attr(\"d\",E.showline?\"M\"+(r+i/2)+\",\"+n+\"l\"+i/2+\",\"+a:\"M0,0\").call(u.stroke,E.linecolor||\"#000\").style(\"stroke-width\",(E.linewidth||0)+\"px\"),l.graphDiv._context.staticPlot||l.initInteractions(),f.setClipUrl(l.layers.frontplot,l._hasClipOnAxisFalse?null:l.clipId)},_.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+\"title\",n=this.aaxis,i=this.baxis,a=this.caxis;if(m.doTicks(e,n,!0),m.doTicks(e,i,!0),m.doTicks(e,a,!0),t){var o=Math.max(n.showticklabels?n.tickfont.size/2:0,(a.showticklabels?.75*a.tickfont.size:0)+(\"outside\"===a.ticks?.87*a.ticklen:0));this.layers[\"a-title\"]=y.draw(e,\"a\"+r,{propContainer:n,propName:this.id+\".aaxis.title\",placeholder:c(e,\"Click to enter Component A title\"),attributes:{x:this.x0+this.w/2,y:this.y0-n.titlefont.size/3-o,\"text-anchor\":\"middle\"}});var s=(i.showticklabels?i.tickfont.size:0)+(\"outside\"===i.ticks?i.ticklen:0)+3;this.layers[\"b-title\"]=y.draw(e,\"b\"+r,{propContainer:i,propName:this.id+\".baxis.title\",placeholder:c(e,\"Click to enter Component B title\"),attributes:{x:this.x0-s,y:this.y0+this.h+.83*i.titlefont.size+s,\"text-anchor\":\"middle\"}}),this.layers[\"c-title\"]=y.draw(e,\"c\"+r,{propContainer:a,propName:this.id+\".caxis.title\",placeholder:c(e,\"Click to enter Component C title\"),attributes:{x:this.x0+this.w+s,y:this.y0+this.h+.83*a.titlefont.size+s,\"text-anchor\":\"middle\"}})}};var M=b.MINZOOM/2+.87,k=\"m-0.87,.5h\"+M+\"v3h-\"+(M+5.2)+\"l\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l2.6,1.5l-\"+M/2+\",\"+.87*M+\"Z\",A=\"m0.87,.5h-\"+M+\"v3h\"+(M+5.2)+\"l-\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l-2.6,1.5l\"+M/2+\",\"+.87*M+\"Z\",T=\"m0,1l\"+M/2+\",\"+.87*M+\"l2.6,-1.5l-\"+(M/2+2.6)+\",-\"+(.87*M+4.5)+\"l-\"+(M/2+2.6)+\",\"+(.87*M+4.5)+\"l2.6,1.5l\"+M/2+\",-\"+.87*M+\"Z\",S=\"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z\",E=!0;_.initInteractions=function(){function t(t,e){return 1-e/O.h}function e(t,e){return 1-(t+(O.h-e)/Math.sqrt(3))/O.w}function r(t,e){return(t-(O.h-e)/Math.sqrt(3))/O.w}function n(n,i){var a=m+n,o=y+i,s=Math.max(0,Math.min(1,t(0,y),t(0,o))),l=Math.max(0,Math.min(1,e(m,y),e(a,o))),c=Math.max(0,Math.min(1,r(m,y),r(a,o))),u=(s/2+c)*O.w,f=(1-s/2-l)*O.w,h=(u+f)/2,d=f-u,p=(1-s)*O.h,g=p-d/w;d<b.MINZOOM?(L=_,I.attr(\"d\",z),P.attr(\"d\",\"M0,0Z\")):(L={a:_.a+s*M,b:_.b+l*M,c:_.c+c*M},I.attr(\"d\",z+\"M\"+u+\",\"+p+\"H\"+f+\"L\"+h+\",\"+g+\"L\"+u+\",\"+p+\"Z\"),P.attr(\"d\",\"M\"+m+\",\"+y+S+\"M\"+u+\",\"+p+k+\"M\"+f+\",\"+p+A+\"M\"+h+\",\"+g+T)),D||(I.transition().style(\"fill\",C>.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 a(){if(i(R),L!==_){var t={};t[O.id+\".aaxis.min\"]=L.a,t[O.id+\".baxis.min\"]=L.b,t[O.id+\".caxis.min\"]=L.c,s.relayout(R,t),E&&R.data&&R._context.showTips&&(l.notifier(c(R,\"Double-click to zoom back out\"),\"long\"),E=!1)}}function h(t,e){var r=t/O.xaxis._m,n=e/O.yaxis._m,i=[(L={a:_.a-n,b:_.b+(r+n)/2,c:_.c-(r-n)/2}).a,L.b,L.c].sort(),a=i.indexOf(L.a),o=i.indexOf(L.b),s=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],b:i[o],c:i[s]},e=(_.a-L.a)*O.yaxis._m,t=(_.c-L.c-_.b+L.b)*O.xaxis._m);var l=\"translate(\"+(O.x0+t)+\",\"+(O.y0+e)+\")\";O.plotContainer.selectAll(\".scatterlayer,.maplayer\").attr(\"transform\",l);var c=\"translate(\"+-t+\",\"+-e+\")\";O.clipDefRelative.select(\"path\").attr(\"transform\",c),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),O._hasClipOnAxisFalse&&O.plotContainer.select(\".scatterlayer\").selectAll(\".trace\").call(f.hideOutsideRangePoints,O)}function d(){var t={};t[O.id+\".aaxis.min\"]=L.a,t[O.id+\".baxis.min\"]=L.b,t[O.id+\".caxis.min\"]=L.c,s.relayout(R,t)}function p(){N.selectAll(\".select-outline\").remove()}var m,y,_,M,L,C,z,D,I,P,O=this,F=O.layers.plotbg.select(\"path\").node(),R=O.graphDiv,N=R._fullLayout._zoomlayer,j={element:F,gd:R,plotinfo:{xaxis:O.xaxis,yaxis:O.yaxis},subplot:O.id,prepFn:function(t,e,r){j.xaxes=[O.xaxis],j.yaxes=[O.yaxis];var i=R._fullLayout.dragmode;t.shiftKey&&(i=\"pan\"===i?\"zoom\":\"pan\"),j.minDrag=\"lasso\"===i?1:void 0,\"zoom\"===i?(j.moveFn=n,j.doneFn=a,function(t,e,r){var n=F.getBoundingClientRect();m=e-n.left,y=r-n.top,_={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=_,M=O.aaxis.range[1]-_.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=N.append(\"path\").attr(\"class\",\"zoombox\").attr(\"transform\",\"translate(\"+O.x0+\", \"+O.y0+\")\").style({fill:C>.2?\"rgba(0,0,0,0)\":\"rgba(255,255,255,0)\",\"stroke-width\":0}).attr(\"d\",z),P=N.append(\"path\").attr(\"class\",\"zoombox-corners\").attr(\"transform\",\"translate(\"+O.x0+\", \"+O.y0+\")\").style({fill:u.background,stroke:u.defaultLine,\"stroke-width\":1,opacity:0}).attr(\"d\",\"M0,0Z\"),p()}(0,e,r)):\"pan\"===i?(j.moveFn=h,j.doneFn=d,_={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},L=_,p()):\"select\"!==i&&\"lasso\"!==i||x(t,e,r,j,i)},clickFn:function(t,e){if(i(R),2===t){var r={};r[O.id+\".aaxis.min\"]=0,r[O.id+\".baxis.min\"]=0,r[O.id+\".caxis.min\"]=0,R.emit(\"plotly_doubleclick\",null),s.relayout(R,r)}v.click(R,e,O.id)}};F.onmousemove=function(t){v.hover(R,t,O.id),R._fullLayout._lasthover=F,R._fullLayout._hoversubplot=O.id},F.onmouseout=function(t){R._dragging||g.unhover(R,t)},g.init(j)}},{\"../../components/color\":618,\"../../components/dragelement\":640,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../components/titles\":709,\"../../lib\":743,\"../../lib/extend\":732,\"../../plotly\":784,\"../cartesian/axes\":789,\"../cartesian/constants\":794,\"../cartesian/select\":807,\"../cartesian/set_convert\":808,\"../plots\":852,d3:128,tinycolor2:546}],873:[function(t,e,r){\"use strict\";function n(t){if(t.layoutAttributes){var e=t.layoutAttributes._arrayAttrRegexps;if(e)for(var n=0;n<e.length;n++)u(r.layoutArrayRegexes,e[n])}}function i(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[e];i&&d(r.modules[e]._module.attributes,i)}}function a(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[e];i&&d(r.transformsRegistry[e].attributes,i)}}function o(t,e){var n=r.componentsRegistry[t].schema;if(n&&n.subplots){var i=r.subplotsRegistry[e],a=i.layoutAttributes,o=\"subplot\"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&d(a,s)}}function s(t){return\"object\"==typeof t&&(t=t.type),t}var l=t(\"./lib/loggers\"),c=t(\"./lib/noop\"),u=t(\"./lib/push_unique\"),f=t(\"./lib/extend\"),h=f.extendFlat,d=f.extendDeepAll,p=t(\"./plots/attributes\"),m=t(\"./plots/layout_attributes\");r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.register=function(t,e,n,a){if(r.modules[e])l.log(\"Type \"+e+\" already registered\");else{for(var o={},s=0;s<n.length;s++)o[n[s]]=!0,r.allCategories[n[s]]=!0;r.modules[e]={_module:t,categories:o},a&&Object.keys(a).length&&(r.modules[e].meta=a),r.allTypes.push(e);for(var c in r.componentsRegistry)i(c,e);t.layoutAttributes&&h(r.traceLayoutAttributes,t.layoutAttributes)}},r.registerSubplot=function(t){var e=t.name;if(r.subplotsRegistry[e])l.log(\"Plot type \"+e+\" already registered.\");else{n(t),r.subplotsRegistry[e]=t;for(var i in r.componentsRegistry)o(i,t.name)}},r.registerComponent=function(t){var e=t.name;r.componentsRegistry[e]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&u(r.layoutArrayContainers,e),n(t));for(var s in r.modules)i(e,s);for(var l in r.subplotsRegistry)o(e,l);for(var c in r.transformsRegistry)a(e,c);t.schema&&t.schema.layout&&d(m,t.schema.layout)},r.registerTransform=function(t){r.transformsRegistry[t.name]=t;for(var e in r.componentsRegistry)a(e,t.name)},r.getModule=function(t){var e=r.modules[s(t)];return!!e&&e._module},r.traceIs=function(t,e){if(\"various\"===(t=s(t)))return!1;var n=r.modules[t];return n||(t&&\"area\"!==t&&l.log(\"Unrecognized trace type \"+t+\".\"),n=r.modules[p.type.dflt]),!!n.categories[e]},r.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},r.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},r.getComponentMethod=function(t,e){var n=r.componentsRegistry[t];return n?n[e]||c:c},r.registerLocale=function(t){var e=t.name,n=e.split(\"-\")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=r.localeRegistry,c=l[e];if(c||(l[e]=c={}),n!==e){var u=l[n];u||(l[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=i),s&&u.format===c.format&&(u.format=a)}o&&(c.dictionary=i),s&&(c.format=a)}},{\"./lib/extend\":732,\"./lib/loggers\":748,\"./lib/noop\":752,\"./lib/push_unique\":756,\"./plots/attributes\":787,\"./plots/layout_attributes\":843}],874:[function(t,e,r){\"use strict\";function n(t){var e;switch(t){case\"themes__thumb\":e={autosize:!0,width:150,height:150,title:\"\",showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case\"thumbnail\":e={title:\"\",hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:\"\",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function i(t){return[\"xaxis\",\"yaxis\",\"zaxis\"].indexOf(t.slice(0,5))>-1}var a=t(\"../lib\"),o=a.extendFlat,s=a.extendDeep;e.exports=function(t,e){t.framework&&t.framework.isPolar&&(t=t.framework.getConfig());var r,a=t.data,l=t.layout,c=s([],a),u=s({},l,n(e.tileClass)),f=t._context||{};if(e.width&&(u.width=e.width),e.height&&(u.height=e.height),\"thumbnail\"===e.tileClass||\"themes__thumb\"===e.tileClass){u.annotations=[];var h=Object.keys(u);for(r=0;r<h.length;r++)i(h[r])&&(u[h[r]].title=\"\");for(r=0;r<c.length;r++){var d=c[r];d.showscale=!1,d.marker&&(d.marker.showscale=!1),\"pie\"===d.type&&(d.textposition=\"none\")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)u.annotations.push(e.annotations[r]);var p=Object.keys(u).filter(function(t){return t.match(/^scene\\d*$/)});if(p.length){var m={};for(\"thumbnail\"===e.tileClass&&(m={title:\"\",showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<p.length;r++){var g=u[p[r]];g.xaxis||(g.xaxis={}),g.yaxis||(g.yaxis={}),g.zaxis||(g.zaxis={}),o(g.xaxis,m),o(g.yaxis,m),o(g.zaxis,m),g._scene=null}}var v=document.createElement(\"div\");e.tileClass&&(v.className=e.tileClass);var y={gd:v,td:v,layout:u,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:f.mapboxAccessToken}};return\"transparent\"!==e.setBackground&&(y.config.setBackground=e.setBackground||\"opaque\"),y.gd.defaultLayout=n(e.tileClass),y}},{\"../lib\":743}],875:[function(t,e,r){\"use strict\";var n=t(\"../plot_api/to_image\"),i=t(\"../lib\"),a=t(\"./filesaver\");e.exports=function(t,e){return e=e||{},e.format=e.format||\"png\",new Promise(function(r,o){t._snapshotInProgress&&o(new Error(\"Snapshotting already in progress.\")),i.isIE()&&\"svg\"!==e.format&&o(new Error(\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\")),t._snapshotInProgress=!0;var s=n(t,e),l=e.filename||t.fn||\"newplot\";l+=\".\"+e.format,s.then(function(e){return t._snapshotInProgress=!1,a(e,l)}).then(function(t){r(t)}).catch(function(e){t._snapshotInProgress=!1,o(e)})})}},{\"../lib\":743,\"../plot_api/to_image\":782,\"./filesaver\":876}],876:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r=document.createElement(\"a\"),n=\"download\"in r,i=/Version\\/[\\d\\.]+.*Safari/.test(navigator.userAgent);return new Promise(function(a,o){if(\"undefined\"!=typeof navigator&&/MSIE [1-9]\\./.test(navigator.userAgent)&&o(new Error(\"IE < 10 unsupported\")),i&&(document.location.href=\"data:application/octet-stream\"+t.slice(t.search(/[,;]/)),a(e)),e||(e=\"download\"),n&&(r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),a(e)),\"undefined\"!=typeof navigator&&navigator.msSaveBlob){var s=t.split(/^data:image\\/svg\\+xml,/)[1],l=decodeURIComponent(s);navigator.msSaveBlob(new Blob([l]),e),a(e)}o(new Error(\"download error\"))})}},{}],877:[function(t,e,r){\"use strict\";r.getDelay=function(t){return t._has&&(t._has(\"gl3d\")||t._has(\"gl2d\"))?500:0},r.getRedrawFunc=function(t){var e=t._fullLayout||{};if(!(!(e._has&&e._has(\"polar\"))&&t.data&&t.data[0]&&t.data[0].r))return function(){(t.calcdata||[]).forEach(function(t){t[0]&&t[0].t&&t[0].t.cb&&t[0].t.cb()})}}},{}],878:[function(t,e,r){\"use strict\";var n=t(\"./helpers\"),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:t(\"./cloneplot\"),toSVG:t(\"./tosvg\"),svgToImg:t(\"./svgtoimg\"),toImage:t(\"./toimage\"),downloadImage:t(\"./download\")};e.exports=i},{\"./cloneplot\":874,\"./download\":875,\"./helpers\":877,\"./svgtoimg\":879,\"./toimage\":880,\"./tosvg\":881}],879:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"events\").EventEmitter;e.exports=function(t){var e=t.emitter||new i,r=new Promise(function(i,a){var o=window.Image,s=t.svg,l=t.format||\"png\";if(n.isIE()&&\"svg\"!==l){var c=new Error(\"Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.\");return a(c),t.promise?r:e.emit(\"error\",c)}var u=t.canvas,f=t.scale||1,h=f*(t.width||300),d=f*(t.height||150),p=u.getContext(\"2d\"),m=new o,g=\"data:image/svg+xml,\"+encodeURIComponent(s);u.width=h,u.height=d,m.onload=function(){var r;switch(\"svg\"!==l&&p.drawImage(m,0,0,h,d),l){case\"jpeg\":r=u.toDataURL(\"image/jpeg\");break;case\"png\":r=u.toDataURL(\"image/png\");break;case\"webp\":r=u.toDataURL(\"image/webp\");break;case\"svg\":r=g;break;default:var n=\"Image format is not jpeg, png, svg or webp.\";if(a(new Error(n)),!t.promise)return e.emit(\"error\",n)}i(r),t.promise||e.emit(\"success\",r)},m.onerror=function(r){if(a(r),!t.promise)return e.emit(\"error\",r)},m.src=g});return t.promise?r:e}},{\"../lib\":743,events:138}],880:[function(t,e,r){\"use strict\";var n=t(\"events\").EventEmitter,i=t(\"../plotly\"),a=t(\"../lib\"),o=t(\"./helpers\"),s=t(\"./cloneplot\"),l=t(\"./tosvg\"),c=t(\"./svgtoimg\");e.exports=function(t,e){var r=new n,u=s(t,{format:\"png\"}),f=u.gd;f.style.position=\"absolute\",f.style.left=\"-5000px\",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.plot(f,u.data,u.layout,u.config).then(h).then(function(){var t=o.getDelay(f._fullLayout);setTimeout(function(){var t=l(f),n=document.createElement(\"canvas\");n.id=a.randstr(),(r=c({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}},t)}).catch(function(t){r.emit(\"error\",t)}),r}},{\"../lib\":743,\"../plotly\":784,\"./cloneplot\":874,\"./helpers\":877,\"./svgtoimg\":879,\"./tosvg\":881,events:138}],881:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../lib\"),a=t(\"../components/drawing\"),o=t(\"../components/color\"),s=t(\"../constants/xmlns_namespaces\"),l=/\"/g,c=\"TOBESTRIPPED\",u=new RegExp('(\"'+c+\")|(\"+c+'\")',\"g\");e.exports=function(t,e,r){var f,h=t._fullLayout,d=h._paper,p=h._toppaper,m=h.width,g=h.height;d.insert(\"rect\",\":first-child\").call(a.setRect,0,0,m,g).call(o.fill,h.paper_bgcolor);var v=h._basePlotModules||[];for(f=0;f<v.length;f++){var y=v[f];y.toSVG&&y.toSVG(t)}if(p){var x=p.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&d.node().appendChild(_)}}h._draggers&&h._draggers.remove(),d.node().style.background=\"\",d.selectAll(\"text\").attr({\"data-unformatted\":null,\"data-math\":null}).each(function(){var t=n.select(this);if(\"hidden\"!==this.style.visibility&&\"none\"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('\"')&&t.style(\"font-family\",e.replace(l,c))}else t.remove()}),d.selectAll(\".point,.scatterpts\").each(function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf(\"url(\")&&t.style(\"fill\",e.replace(l,c))}),\"pdf\"!==e&&\"eps\"!==e||d.selectAll(\"#MathJax_SVG_glyphs path\").attr(\"stroke-width\",0),d.node().setAttributeNS(s.xmlns,\"xmlns\",s.svg),d.node().setAttributeNS(s.xmlns,\"xmlns:xlink\",s.xlink),\"svg\"===e&&r&&(d.attr(\"width\",r*m),d.attr(\"height\",r*g),d.attr(\"viewBox\",\"0 0 \"+m+\" \"+g));var w=(new window.XMLSerializer).serializeToString(d.node());return w=function(t){var e=n.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}(w),w=function(t){return t.replace(/&(?!\\w+;|\\#[0-9]+;| \\#x[0-9A-F]+;)/g,\"&\")}(w),w=w.replace(u,\"'\"),i.isIE()&&(w=(w=(w=w.replace(/\"/gi,\"'\")).replace(/(\\('#)([^']*)('\\))/gi,'(\"#$2\")')).replace(/(\\\\')/gi,'\"')),w}},{\"../components/color\":618,\"../components/drawing\":643,\"../constants/xmlns_namespaces\":723,\"../lib\":743,d3:128}],882:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").mergeArray;e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n(e.text,t,\"tx\"),n(e.hovertext,t,\"htx\");var i=e.marker;if(i){n(i.opacity,t,\"mo\"),n(i.color,t,\"mc\");var a=i.line;a&&(n(a.color,t,\"mlc\"),n(a.width,t,\"mlw\"))}}},{\"../../lib\":743}],883:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../components/errorbars/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../plots/font_attributes\"),l=t(\"../../lib/extend\").extendFlat,c=s({editType:\"calc\",arrayOk:!0}),u=n.marker,f=l({line:l({width:l({},u.line.width,{dflt:0}),editType:\"calc\"},i(\"marker.line\")),editType:\"calc\"},i(\"marker\"),{showscale:u.showscale,colorbar:o,opacity:{valType:\"number\",arrayOk:!0,dflt:1,min:0,max:1,editType:\"style\"}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"none\",arrayOk:!0,editType:\"calc\"},textfont:l({},c,{}),insidetextfont:l({},c,{}),outsidetextfont:l({},c,{}),constraintext:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"both\",\"none\"],dflt:\"both\",editType:\"calc\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},base:{valType:\"any\",dflt:null,arrayOk:!0,editType:\"calc\"},offset:{valType:\"number\",dflt:null,arrayOk:!0,editType:\"calc\"},width:{valType:\"number\",dflt:null,min:0,arrayOk:!0,editType:\"calc\"},marker:f,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:\"style\"},textfont:n.selected.textfont,editType:\"style\"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:\"style\"},textfont:n.unselected.textfont,editType:\"style\"},r:n.r,t:n.t,error_y:a,error_x:a,_deprecated:{bardir:{valType:\"enumerated\",editType:\"calc\",values:[\"v\",\"h\"]}}}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/errorbars/attributes\":645,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../scatter/attributes\":1066}],884:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/colorscale/has_colorscale\"),o=t(\"../../components/colorscale/calc\"),s=t(\"./arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\");e.exports=function(t,e){var r,c,u,f,h,d=i.getFromId(t,e.xaxis||\"x\"),p=i.getFromId(t,e.yaxis||\"y\");\"h\"===(e.orientation||(e.x&&!e.y?\"h\":\"v\"))?(r=d,u=d.makeCalcdata(e,\"x\"),c=p.makeCalcdata(e,\"y\"),h=e.xcalendar):(r=p,u=p.makeCalcdata(e,\"y\"),c=d.makeCalcdata(e,\"x\"),h=e.ycalendar);var m=Math.min(c.length,u.length),g=new Array(m);for(f=0;f<m;f++)g[f]={p:c[f],s:u[f]},e.ids&&(g[f].id=String(e.ids[f]));var v,y=e.base;if(Array.isArray(y)){for(f=0;f<Math.min(y.length,g.length);f++)v=r.d2c(y[f],0,h),n(v)?(g[f].b=+v,g[f].hasB=1):g[f].b=0;for(;f<g.length;f++)g[f].b=0}else{v=r.d2c(y,0,h);var x=n(v);for(v=x?v:0,f=0;f<g.length;f++)g[f].b=v,x&&(g[f].hasB=1)}return a(e,\"marker\")&&o(e,e.marker.color,\"marker\",\"c\"),a(e,\"marker.line\")&&o(e,e.marker.line.color,\"marker.line\",\"c\"),s(g,e),l(g,e),g}},{\"../../components/colorscale/calc\":625,\"../../components/colorscale/has_colorscale\":632,\"../../plots/cartesian/axes\":789,\"../scatter/calc_selection\":1068,\"./arrays_to_calcdata\":882,\"fast-isnumeric\":140}],885:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../scatter/xy_defaults\"),o=t(\"../bar/style_defaults\"),s=t(\"../../components/errorbars/defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}var f=n.coerceFont;if(a(t,e,c,u)){u(\"orientation\",e.x&&!e.y?\"h\":\"v\"),u(\"base\"),u(\"offset\"),u(\"width\"),u(\"text\"),u(\"hovertext\");var h=u(\"textposition\"),d=Array.isArray(h)||\"auto\"===h,p=d||\"inside\"===h,m=d||\"outside\"===h;if(p||m){var g=f(u,\"textfont\",c.font);p&&f(u,\"insidetextfont\",g),m&&f(u,\"outsidetextfont\",g),u(\"constraintext\"),u(\"selected.textfont.color\"),u(\"unselected.textfont.color\")}o(t,e,u,r,c),s(t,e,i.defaultLine,{axis:\"y\"}),s(t,e,i.defaultLine,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1}},{\"../../components/color\":618,\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../bar/style_defaults\":895,\"../scatter/xy_defaults\":1090,\"./attributes\":883}],886:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../components/errorbars\"),a=t(\"../../components/color\"),o=t(\"../scatter/fill_hover_text\");e.exports=function(t,e,r,s){function l(t){return t[p]-t.w/2}function c(t){return t[p]+t.w/2}function u(t){return n.inbox(w(t)-h,M(t)-h)}function f(t){return n.inbox(t.b-d,t[m]-d)+(t[m]-d)/(t[m]-t.b)}var h,d,p,m,g,v,y=t.cd,x=y[0].trace,b=y[0].t,_=\"closest\"===s,w=_?l:function(t){return Math.min(l(t),t.p-b.bardelta/2)},M=_?c:function(t){return Math.max(c(t),t.p+b.bardelta/2)};\"h\"===x.orientation?(h=r,d=e,p=\"y\",m=\"x\",g=f,v=u):(h=e,d=r,p=\"x\",m=\"y\",v=f,g=u);var k=t[p+\"a\"],A=t[m+\"a\"],T=n.getDistanceFunction(s,g,v);if(n.getClosest(y,T,t),!1!==t.index){_||(w=function(t){return Math.min(l(t),t.p-b.bargroupwidth/2)},M=function(t){return Math.max(c(t),t.p+b.bargroupwidth/2)});var S=y[t.index],E=S.mcc||x.marker.color,L=S.mlcc||x.marker.line.color,C=S.mlw||x.marker.line.width;a.opacity(E)?t.color=E:a.opacity(L)&&C&&(t.color=L);var z=x.base?S.b+S.s:S.s;return t[m+\"0\"]=t[m+\"1\"]=A.c2p(S[m],!0),t[m+\"LabelVal\"]=z,t[p+\"0\"]=k.c2p(w(S),!0),t[p+\"1\"]=k.c2p(M(S),!0),t[p+\"LabelVal\"]=S.p,o(S,x,t),i.hoverInfo(S,x,t),[t]}}},{\"../../components/color\":618,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../scatter/fill_hover_text\":1074}],887:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.layoutAttributes=t(\"./layout_attributes\"),n.supplyDefaults=t(\"./defaults\"),n.supplyLayoutDefaults=t(\"./layout_defaults\"),n.calc=t(\"./calc\"),n.setPositions=t(\"./set_positions\"),n.colorbar=t(\"../scatter/colorbar\"),n.arraysToCalcdata=t(\"./arrays_to_calcdata\"),n.plot=t(\"./plot\"),n.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"bar\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"bar\",\"oriented\",\"markerColorscale\",\"errorBarsOK\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../scatter/colorbar\":1070,\"./arrays_to_calcdata\":882,\"./attributes\":883,\"./calc\":884,\"./defaults\":885,\"./hover\":886,\"./layout_attributes\":888,\"./layout_defaults\":889,\"./plot\":890,\"./select\":891,\"./set_positions\":892,\"./style\":894}],888:[function(t,e,r){\"use strict\";e.exports={barmode:{valType:\"enumerated\",values:[\"stack\",\"group\",\"overlay\",\"relative\"],dflt:\"group\",editType:\"calc\"},barnorm:{valType:\"enumerated\",values:[\"\",\"fraction\",\"percent\"],dflt:\"\",editType:\"calc\"},bargap:{valType:\"number\",min:0,max:1,editType:\"calc\"},bargroupgap:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"}}},{}],889:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=t(\"./layout_attributes\");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=0;h<r.length;h++){var d=r[h];if(n.traceIs(d,\"bar\")){if(l=!0,\"overlay\"!==t.barmode&&\"stack\"!==t.barmode){var p=d.xaxis+d.yaxis;f[p]&&(u=!0),f[p]=!0}if(d.visible&&\"histogram\"===d.type){\"category\"!==i.getFromId({_fullLayout:e},d[\"v\"===d.orientation?\"xaxis\":\"yaxis\"]).type&&(c=!0)}}}if(l){\"overlay\"!==s(\"barmode\")&&s(\"barnorm\"),s(\"bargap\",c&&!u?0:.2),s(\"bargroupgap\")}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./layout_attributes\":888}],890:[function(t,e,r){\"use strict\";function n(t,e,r,n,l,c,u,f){function d(e,r,n){return e.append(\"text\").text(r).attr({class:\"bartext bartext-\"+m,transform:\"\",\"text-anchor\":\"middle\",\"data-notex\":1}).call(p.font,n).call(h.convertToTspans,t)}var m,g=r[0].trace,M=g.orientation,k=function(t,e){var r=o(t.text,e);return s(v,r)}(g,n);if(k&&\"none\"!==(m=function(t,e){var r=o(t.textposition,e);return function(t,e,r){t.coerceNumber&&(e=+e);return-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt}(y,r)}(g,n))){var A,T,S,E,L=function(t,e,r){return a(x,t.textfont,e,r)}(g,n,t._fullLayout.font),C=function(t,e,r){return a(b,t.insidetextfont,e,r)}(g,n,L),z=function(t,e,r){return a(_,t.outsidetextfont,e,r)}(g,n,L),D=t._fullLayout.barmode,I=\"stack\"===D||\"relative\"===D,P=r[n],O=!I||P._outmost,F=Math.abs(c-l)-2*w,R=Math.abs(f-u)-2*w;if(\"outside\"===m&&(O||(m=\"inside\")),\"auto\"===m)if(O){m=\"inside\",A=d(e,k,C),S=(T=p.bBox(A.node())).width,E=T.height;S>0&&E>0&&(S<=F&&E<=R||S<=R&&E<=F||(\"h\"===M?F>=S*(R/E):R>=E*(F/S)))?m=\"inside\":(m=\"outside\",A.remove(),A=null)}else m=\"inside\";if(!A&&(A=d(e,k,\"outside\"===m?z:C),T=p.bBox(A.node()),S=T.width,E=T.height,S<=0||E<=0))A.remove();else{var N;N=\"outside\"===m?function(t,e,r,n,a,o,s){var l,c=\"h\"===o?Math.abs(n-r):Math.abs(e-t);c>2*w&&(l=w);var u=1;s&&(u=\"h\"===o?Math.min(1,c/a.height):Math.min(1,c/a.width));var f,h,d,p,m=(a.left+a.right)/2,g=(a.top+a.bottom)/2;f=u*a.width,h=u*a.height,\"h\"===o?e<t?(d=e-l-f/2,p=(r+n)/2):(d=e+l+f/2,p=(r+n)/2):n>r?(d=(t+e)/2,p=n+l+h/2):(d=(t+e)/2,p=n-l-h/2);return i(m,g,d,p,u,!1)}(l,c,u,f,T,M,\"both\"===g.constraintext||\"outside\"===g.constraintext):function(t,e,r,n,a,o,s){var l,c,u,f,h,d=a.width,p=a.height,m=(a.left+a.right)/2,g=(a.top+a.bottom)/2,v=Math.abs(e-t),y=Math.abs(n-r);v>2*w&&y>2*w?(v-=2*(h=w),y-=2*h):h=0;var x,b;d<=v&&p<=y?(x=!1,b=1):d<=y&&p<=v?(x=!0,b=1):d<p==v<y?(x=!1,b=s?Math.min(v/d,y/p):1):(x=!0,b=s?Math.min(y/d,v/p):1);x&&(x=90);x?(l=b*p,c=b*d):(l=b*d,c=b*p);\"h\"===o?e<t?(u=e+h+l/2,f=(r+n)/2):(u=e-h-l/2,f=(r+n)/2):n>r?(u=(t+e)/2,f=n-h-c/2):(u=(t+e)/2,f=n+h+c/2);return i(m,g,u,f,b,x)}(l,c,u,f,T,M,\"both\"===g.constraintext||\"inside\"===g.constraintext),A.attr(\"transform\",N)}}}function i(t,e,r,n,i,a){var o;i<1?o=\"scale(\"+i+\") \":(i=1,o=\"\");return\"translate(\"+(r-i*t)+\" \"+(n-i*e)+\")\"+o+(a?\"rotate(\"+a+\" \"+t+\" \"+e+\") \":\"\")}function a(t,e,r,n){var i=o((e=e||{}).family,r),a=o(e.size,r),l=o(e.color,r);return{family:s(t.family,i,n.family),size:function(t,e,r){if(c(e)){e=+e;var n=t.min,i=t.max,a=void 0!==n&&e<n||void 0!==i&&e>i;if(!a)return e}return void 0!==r?r:t.dflt}(t.size,a,n.size),color:function(t,e,r){return u(e).isValid()?e:void 0!==r?r:t.dflt}(t.color,l,n.color)}}function o(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r}function s(t,e,r){if(\"string\"==typeof e){if(e||!t.noBlank)return e}else if(\"number\"==typeof e&&!t.strict)return String(e);return void 0!==r?r:t.dflt}var l=t(\"d3\"),c=t(\"fast-isnumeric\"),u=t(\"tinycolor2\"),f=t(\"../../lib\"),h=t(\"../../lib/svg_text_utils\"),d=t(\"../../components/color\"),p=t(\"../../components/drawing\"),m=t(\"../../components/errorbars\"),g=t(\"./attributes\"),v=g.text,y=g.textposition,x=g.textfont,b=g.insidetextfont,_=g.outsidetextfont,w=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.each(function(t){t[0].node3=l.select(this)}),s.append(\"g\").attr(\"class\",\"points\").each(function(e){var r=l.select(this),s=e[0].t,u=e[0].trace,h=s.poffset,p=Array.isArray(h);r.selectAll(\"g.point\").data(f.identity).enter().append(\"g\").classed(\"point\",!0).each(function(r,s){function f(t){return 0===o.bargap&&0===o.bargroupgap?l.round(Math.round(t)-k,2):t}var m,g,v,y,x=r.p+(p?h[s]:h),b=x+r.w,_=r.b,w=_+r.s;if(\"h\"===u.orientation?(v=a.c2p(x,!0),y=a.c2p(b,!0),m=i.c2p(_,!0),g=i.c2p(w,!0),r.ct=[g,(v+y)/2]):(m=i.c2p(x,!0),g=i.c2p(b,!0),v=a.c2p(_,!0),y=a.c2p(w,!0),r.ct=[(m+g)/2,y]),c(m)&&c(g)&&c(v)&&c(y)&&m!==g&&v!==y){var M=(r.mlw+1||u.marker.line.width+1||(r.trace?r.trace.marker.line.width:0)+1)-1,k=l.round(M/2%1,2);if(!t._context.staticPlot){var A=d.opacity(r.mc||u.marker.color)<1||M>.01?f:function(t,e){return Math.abs(t-e)>=2?f(t):t>e?Math.ceil(t):Math.floor(t)};g=A(g,m=A(m,g)),y=A(y,v=A(v,y))}var T=l.select(this);T.append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"d\",\"M\"+m+\",\"+v+\"V\"+y+\"H\"+g+\"V\"+v+\"Z\"),n(t,T,e,s,m,g,v,y)}else l.select(this).remove()})}),s.call(m.plot,e)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"./attributes\":883,d3:128,\"fast-isnumeric\":140,tinycolor2:546}],891:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[];if(!1===e)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var s=n[r];e.contains(s.ct)?(o.push({pointNumber:r,x:i.c2d(s.x),y:a.c2d(s.y)}),s.selected=1):s.selected=0}return o}},{}],892:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(n.length){var g,x,b,_,w=t._fullLayout.barmode,M=\"group\"===w;if(\"overlay\"===w)i(t,e,r,n);else if(M){for(g=[],x=[],b=0;b<n.length;b++)void 0===(_=n[b])[0].trace.offset?x.push(_):g.push(_);x.length&&function(t,e,r,n){var i=t._fullLayout.barnorm,a=new y(n,!1,!i);(function(t,e,r){var n,i,a,c,u=t._fullLayout,f=u.bargap,h=u.bargroupgap,d=r.positions,p=r.distinctPositions,m=r.minDiff,g=r.traces,v=d.length!==p.length,y=g.length,x=m*(1-f),b=v?x/y:x,_=b*(1-h);for(n=0;n<y;n++){i=g[n],a=i[0];var w=v?((2*n+1-y)*b-_)/2:-_/2;(c=a.t).barwidth=_,c.poffset=w,c.bargroupwidth=x,c.bardelta=m}r.binWidth=g[0][0].t.barwidth/100,o(r),s(t,e,r),l(t,e,r,v)})(t,e,a),i?(f(t,r,a),h(t,r,a)):u(t,r,a)}(t,e,r,x),g.length&&i(t,e,r,g)}else{for(g=[],x=[],b=0;b<n.length;b++)void 0===(_=n[b])[0].trace.base?x.push(_):g.push(_);x.length&&function(t,e,r,n){var i=t._fullLayout.barmode,o=\"stack\"===i,s=\"relative\"===i,l=t._fullLayout.barnorm,u=new y(n,s,!(l||o||s));a(t,e,u),function(t,e,r){var n,i,a,o,s=t._fullLayout.barnorm,l=d(e),u=r.traces,f=[null,null];for(n=0;n<u.length;n++)for(i=u[n],a=0;a<i.length;a++)if((o=i[a]).s!==m){var h=r.put(o.p,o.b+o.s),g=h+o.b+o.s;o.b=h,o[l]=g,s||(p(e.c2l(g))&&c(f,g),o.hasB&&p(e.c2l(h))&&c(f,h))}s||v.expand(e,f,{tozero:!0,padded:!0})}(t,r,u);for(var f=0;f<n.length;f++)for(var g=n[f],x=0;x<g.length;x++){var b=g[x];if(b.s!==m){var _=b.b+b.s===u.get(b.p,b.s);_&&(b._outmost=!0)}}l&&h(t,r,u)}(t,e,r,x),g.length&&i(t,e,r,g)}}}function i(t,e,r,n){for(var i=t._fullLayout.barnorm,o=!i,s=0;s<n.length;s++){var l=n[s],c=new y([l],!1,o);a(t,e,c),i?(f(t,r,c),h(t,r,c)):u(t,r,c)}}function a(t,e,r){var n,i,a=t._fullLayout,c=a.bargap,u=a.bargroupgap,f=r.minDiff,h=r.traces,d=f*(1-c),p=d*(1-u),m=-p/2;for(n=0;n<h.length;n++)(i=h[n][0].t).barwidth=p,i.poffset=m,i.bargroupwidth=d,i.bardelta=f;r.binWidth=h[0][0].t.barwidth/100,o(r),s(t,e,r),l(t,e,r)}function o(t){var e,r,n,i,a,o,s=t.traces;for(e=0;e<s.length;e++){i=(n=(r=s[e])[0]).trace,o=n.t;var l,c=i.offset,u=o.poffset;if(Array.isArray(c)){for(l=c.slice(0,r.length),a=0;a<l.length;a++)p(l[a])||(l[a]=u);for(a=l.length;a<r.length;a++)l.push(u);o.poffset=l}else void 0!==c&&(o.poffset=c);var f=i.width,h=o.barwidth;if(Array.isArray(f)){var d=f.slice(0,r.length);for(a=0;a<d.length;a++)p(d[a])||(d[a]=h);for(a=d.length;a<r.length;a++)d.push(h);if(o.barwidth=d,void 0===c){for(l=[],a=0;a<r.length;a++)l.push(u+(h-d[a])/2);o.poffset=l}}else void 0!==f&&(o.barwidth=f,void 0===c&&(o.poffset=u+(h-f)/2))}}function s(t,e,r){for(var n=r.traces,i=d(e),a=0;a<n.length;a++)for(var o=n[a],s=o[0].t,l=s.poffset,c=Array.isArray(l),u=s.barwidth,f=Array.isArray(u),h=0;h<o.length;h++){var p=o[h],m=p.w=f?u[h]:u;p[i]=p.p+(c?l[h]:l)+m/2}}function l(t,e,r,n){var i=r.traces,a=r.distinctPositions,o=a[0],s=r.minDiff,l=s/2;v.minDtick(e,s,o,n);for(var c=Math.min.apply(Math,a)-l,u=Math.max.apply(Math,a)+l,f=0;f<i.length;f++){var h=i[f],d=h[0],p=d.trace;if(void 0!==p.width||void 0!==p.offset)for(var m=d.t,g=m.poffset,y=m.barwidth,x=Array.isArray(g),b=Array.isArray(y),_=0;_<h.length;_++){var w=h[_],M=x?g[_]:g,k=b?y[_]:y,A=w.p+M,T=A+k;c=Math.min(c,A),u=Math.max(u,T)}}v.expand(e,[c,u],{padded:!1})}function c(t,e){p(t[0])?t[0]=Math.min(t[0],e):t[0]=e,p(t[1])?t[1]=Math.max(t[1],e):t[1]=e}function u(t,e,r){for(var n=r.traces,i=d(e),a=[null,null],o=0;o<n.length;o++)for(var s=n[o],l=0;l<s.length;l++){var u=s[l],f=u.b,h=f+u.s;u[i]=h,p(e.c2l(h))&&c(a,h),u.hasB&&p(e.c2l(f))&&c(a,f)}v.expand(e,a,{tozero:!0,padded:!0})}function f(t,e,r){for(var n=r.traces,i=0;i<n.length;i++)for(var a=n[i],o=0;o<a.length;o++){var s=a[o];s.s!==m&&r.put(s.p,s.b+s.s)}}function h(t,e,r){function n(t){p(e.c2l(t))&&(t<l-s||t>u+s||!p(l))&&(h=!0,c(f,t))}for(var i=r.traces,a=d(e),o=\"fraction\"===t._fullLayout.barnorm?1:100,s=o/1e9,l=e.l2c(e.c2l(0)),u=\"stack\"===t._fullLayout.barmode?o:l,f=[l,u],h=!1,g=0;g<i.length;g++)for(var y=i[g],x=0;x<y.length;x++){var b=y[x];if(b.s!==m){var _=Math.abs(o/r.get(b.p,b.s));b.b*=_,b.s*=_;var w=b.b,M=w+b.s;b[a]=M,n(M),b.hasB&&n(w)}}v.expand(e,f,{tozero:!0,padded:h})}function d(t){return t._id.charAt(0)}var p=t(\"fast-isnumeric\"),m=t(\"../../constants/numerical\").BADNUM,g=t(\"../../registry\"),v=t(\"../../plots/cartesian/axes\"),y=t(\"./sieve.js\");e.exports=function(t,e){var r,i=e.xaxis,a=e.yaxis,o=t._fullData,s=t.calcdata,l=[],c=[];for(r=0;r<o.length;r++){var u=o[r];!0===u.visible&&g.traceIs(u,\"bar\")&&u.xaxis===i._id&&u.yaxis===a._id&&(\"h\"===u.orientation?l.push(s[r]):c.push(s[r]))}n(t,i,a,c),n(t,a,i,l)}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"./sieve.js\":893,\"fast-isnumeric\":140}],893:[function(t,e,r){\"use strict\";function n(t,e,r){this.traces=t,this.separateNegativeValues=e,this.dontMergeOverlappingData=r;for(var n=1/0,o=[],s=0;s<t.length;s++){for(var l=t[s],c=0;c<l.length;c++){var u=l[c];u.p!==a&&o.push(u.p)}l[0]&&l[0].width1&&(n=Math.min(l[0].width1,n))}this.positions=o;var f=i.distinctVals(o);this.distinctPositions=f.vals,1===f.vals.length&&n!==1/0?this.minDiff=n:this.minDiff=Math.min(f.minDiff,n),this.binWidth=this.minDiff,this.bins={}}e.exports=n;var i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM;n.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},n.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},n.prototype.getLabel=function(t,e){return(e<0&&this.separateNegativeValues?\"v\":\"^\")+(this.dontMergeOverlappingData?t:Math.round(t/this.binWidth))}},{\"../../constants/numerical\":721,\"../../lib\":743}],894:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/errorbars\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.bars\"),o=r.size(),s=t._fullLayout;r.style(\"opacity\",function(t){return t[0].trace.opacity}).each(function(t){(\"stack\"===s.barmode&&o>1||0===s.bargap&&0===s.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr(\"shape-rendering\",\"crispEdges\")}),r.selectAll(\"g.points\").each(function(e){var r=n.select(this),a=r.selectAll(\"path\"),o=r.selectAll(\"text\"),s=e[0].trace;i.pointStyle(a,s,t),i.selectedPointStyle(a,s),o.each(function(t){function e(e){var n=r[e];return Array.isArray(n)?n[t.i]:n}var r,a=n.select(this);a.classed(\"bartext-inside\")?r=s.insidetextfont:a.classed(\"bartext-outside\")&&(r=s.outsidetextfont),r||(r=s.textfont),i.font(a,e(\"family\"),e(\"size\"),e(\"color\"))}),i.selectedTextStyle(o,s)}),a.style(r)}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,d3:128}],895:[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\"),r(\"marker.opacity\"),r(\"selected.marker.color\"),r(\"unselected.marker.color\")}},{\"../../components/color\":618,\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632}],896:[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\",editType:\"calc+clearAxisTypes\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",editType:\"calc+clearAxisTypes\"},name:{valType:\"string\",editType:\"calc+clearAxisTypes\"},text:a({},n.text,{}),whiskerwidth:{valType:\"number\",min:0,max:1,dflt:.5,editType:\"calcIfAutorange\"},boxpoints:{valType:\"enumerated\",values:[\"all\",\"outliers\",\"suspectedoutliers\",!1],dflt:\"outliers\",editType:\"calcIfAutorange\"},boxmean:{valType:\"enumerated\",values:[!0,\"sd\",!1],dflt:!1,editType:\"calcIfAutorange\"},jitter:{valType:\"number\",min:0,max:1,editType:\"calcIfAutorange\"},pointpos:{valType:\"number\",min:-2,max:2,editType:\"calcIfAutorange\"},orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],editType:\"calc+clearAxisTypes\"},marker:{outliercolor:{valType:\"color\",dflt:\"rgba(0, 0, 0, 0)\",editType:\"style\"},symbol:a({},o.symbol,{arrayOk:!1,editType:\"plot\"}),opacity:a({},o.opacity,{arrayOk:!1,dflt:1,editType:\"style\"}),size:a({},o.size,{arrayOk:!1,editType:\"calcIfAutorange\"}),color:a({},o.color,{arrayOk:!1,editType:\"style\"}),line:{color:a({},s.color,{arrayOk:!1,dflt:i.defaultLine,editType:\"style\"}),width:a({},s.width,{arrayOk:!1,dflt:0,editType:\"style\"}),outliercolor:{valType:\"color\",editType:\"style\"},outlierwidth:{valType:\"number\",min:0,dflt:1,editType:\"style\"},editType:\"style\"},editType:\"plot\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,selected:{marker:n.selected.marker,editType:\"style\"},unselected:{marker:n.unselected.marker,editType:\"style\"},hoveron:{valType:\"flaglist\",flags:[\"boxes\",\"points\"],dflt:\"boxes+points\",editType:\"style\"}}},{\"../../components/color/attributes\":617,\"../../lib/extend\":732,\"../scatter/attributes\":1066}],897:[function(t,e,r){\"use strict\";function n(t,e){return t.v-e.v}function i(t){return t.v}var a=t(\"fast-isnumeric\"),o=t(\"../../lib\"),s=o._,l=t(\"../../plots/cartesian/axes\");e.exports=function(t,e){var r,c,u,f,h,d=t._fullLayout,p=l.getFromId(t,e.xaxis||\"x\"),m=l.getFromId(t,e.yaxis||\"y\"),g=[],v=\"violin\"===e.type?\"_numViolins\":\"_numBoxes\";\"h\"===e.orientation?(c=p,u=\"x\",f=m,h=\"y\"):(c=m,u=\"y\",f=p,h=\"x\");var y=c.makeCalcdata(e,u),x=function(t,e,r,n,i){if(e in t)return r.makeCalcdata(t,e);var s;s=e+\"0\"in t?t[e+\"0\"]:\"name\"in t&&(\"category\"===r.type||a(t.name)&&-1!==[\"linear\",\"log\"].indexOf(r.type)||o.isDateTime(t.name)&&\"date\"===r.type)?t.name:i;var l=r.d2c(s,0,t[e+\"calendar\"]);return n.map(function(){return l})}(e,h,f,y,d[v]),b=o.distinctVals(x),_=b.vals,w=b.minDiff/2,M=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(_,w),k=y.length,A=_.length,T=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(A);for(r=0;r<k;r++){var S=y[r];if(a(S)){var E=o.findBin(x[r],M);if(E>=0&&E<A){var L={v:S,i:r};!function(t,e,r){var n={text:\"tx\"};for(var i in n)Array.isArray(e[i])&&(t[n[i]]=e[i][r])}(L,e,r),T[E].push(L)}}}for(r=0;r<A;r++)if(T[r].length>0){var C=T[r].sort(n),z=C.map(i),D=z.length,I={pos:_[r],pts:C};I.min=z[0],I.max=z[D-1],I.mean=o.mean(z,D),I.sd=o.stdev(z,D,I.mean),I.q1=o.interp(z,.25),I.med=o.interp(z,.5),I.q3=o.interp(z,.75),I.lf=Math.min(I.q1,z[Math.min(o.findBin(2.5*I.q1-1.5*I.q3,z,!0)+1,D-1)]),I.uf=Math.max(I.q3,z[Math.max(o.findBin(2.5*I.q3-1.5*I.q1,z),0)]),I.lo=4*I.q1-3*I.q3,I.uo=4*I.q3-3*I.q1,g.push(I)}return function(t,e){if(Array.isArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;o.tagSelected(n,e,i)}}(g,e),l.expand(c,y,{padded:!0}),g.length>0?(g[0].t={num:d[v],dPos:w,posLetter:h,valLetter:u,labels:{med:s(t,\"median:\"),min:s(t,\"min:\"),q1:s(t,\"q1:\"),q3:s(t,\"q3:\"),max:s(t,\"max:\"),mean:\"sd\"===e.boxmean?s(t,\"mean \\xb1 \\u03c3:\"):s(t,\"mean:\"),lf:s(t,\"lower fence:\"),uf:s(t,\"upper fence:\")}},e._fullInput&&\"candlestick\"===e._fullInput.type&&delete g[0].t.labels,d[v]++,g):[{t:{empty:!0}}]}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"fast-isnumeric\":140}],898:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i,a=r(\"y\"),s=r(\"x\");if(a&&a.length)i=\"v\",s||r(\"x0\");else{if(!s||!s.length)return void(e.visible=!1);i=\"h\",r(\"y0\")}o.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],n),r(\"orientation\",i)}function i(t,e,r,n){var i=n.prefix,o=a.coerce2(t,e,l,\"marker.outliercolor\"),s=r(\"marker.line.outliercolor\"),c=r(i+\"points\",o||s?\"suspectedoutliers\":void 0);c?(r(\"jitter\",\"all\"===c?.3:0),r(\"pointpos\",\"all\"===c?-1.5:0),r(\"marker.symbol\"),r(\"marker.opacity\"),r(\"marker.size\"),r(\"marker.color\",e.line.color),r(\"marker.line.color\"),r(\"marker.line.width\"),\"suspectedoutliers\"===c&&(r(\"marker.line.outliercolor\",e.marker.color),r(\"marker.line.outlierwidth\")),r(\"selected.marker.color\"),r(\"unselected.marker.color\"),r(\"selected.marker.size\"),r(\"unselected.marker.size\"),r(\"text\")):delete e.marker,r(\"hoveron\"),a.coerceSelectionMarkerOpacity(e,r)}var a=t(\"../../lib\"),o=t(\"../../registry\"),s=t(\"../../components/color\"),l=t(\"./attributes\");e.exports={supplyDefaults:function(t,e,r,o){function c(r,n){return a.coerce(t,e,l,r,n)}n(t,e,c,o),!1!==e.visible&&(c(\"line.color\",(t.marker||{}).color||r),c(\"line.width\"),c(\"fillcolor\",s.addOpacity(e.line.color,.5)),c(\"whiskerwidth\"),c(\"boxmean\"),i(t,e,c,{prefix:\"box\"}))},handleSampleDefaults:n,handlePointsDefaults:i}},{\"../../components/color\":618,\"../../lib\":743,\"../../registry\":873,\"./attributes\":896}],899:[function(t,e,r){\"use strict\";function n(t,e,r,n){var i,c,u,f,h,d,p,m,g,v=t.cd,y=t.xa,x=t.ya,b=v[0].trace,_=v[0].t,w=\"violin\"===b.type,M=[],k=\"closest\"!==n||w?_.bdPos:2.5*_.bdPos,A=function(t){return t.pos+_.bPos-d};w&&\"both\"!==b.side?(\"positive\"===b.side&&(g=function(t){var e=A(t);return s.inbox(e,e+k)}),\"negative\"===b.side&&(g=function(t){var e=A(t);return s.inbox(e-k,e)})):g=function(t){var e=A(t);return s.inbox(e-k,e+k)};var T;T=w?function(t){return s.inbox(t.span[0]-h,t.span[1]-h)}:function(t){return s.inbox(t.min-h,t.max-h)},\"h\"===b.orientation?(h=e,d=r,p=T,m=g,i=\"y\",u=x,c=\"x\",f=y):(h=r,d=e,p=g,m=T,i=\"x\",u=y,c=\"y\",f=x);var S=s.getDistanceFunction(n,p,m);if(s.getClosest(v,S,t),!1===t.index)return[];var E=v[t.index],L=b.line.color,C=(b.marker||{}).color;l.opacity(L)&&b.line.width?t.color=L:l.opacity(C)&&b.boxpoints?t.color=C:t.color=b.fillcolor,t[i+\"0\"]=u.c2p(E.pos+_.bPos-_.bdPos,!0),t[i+\"1\"]=u.c2p(E.pos+_.bPos+_.bdPos,!0),a.tickText(u,u.c2l(E.pos),\"hover\").text,t[i+\"LabelVal\"]=E.pos;var z={},D=[\"med\",\"min\",\"q1\",\"q3\",\"max\"];(b.boxmean||(b.meanline||{}).visible)&&D.push(\"mean\"),(b.boxpoints||b.points)&&D.push(\"lf\",\"uf\");for(var I=0;I<D.length;I++){var P=D[I];if(P in E&&!(E[P]in z)){z[E[P]]=!0;var O=E[P],F=f.c2p(O,!0),R=o.extendFlat({},t);R[c+\"0\"]=R[c+\"1\"]=F,R[c+\"LabelVal\"]=O,R[c+\"Label\"]=(_.labels?_.labels[P]+\" \":\"\")+a.hoverLabelText(f,O),\"mean\"===P&&\"sd\"in E&&\"sd\"===b.boxmean&&(R[c+\"err\"]=E.sd),t.name=\"\",M.push(R)}}return M}function i(t,e,r){for(var n,i,a,l=t.cd,u=t.xa,f=t.ya,h=l[0].trace,d=u.c2p(e),p=f.c2p(r),m=s.quadrature(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(u.c2p(t.x)-d)-e,1-3/e)},function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-p)-e,1-3/e)}),g=!1,v=0;v<l.length;v++){i=l[v];for(var y=0;y<(i.pts||[]).length;y++){var x=m(a=i.pts[y]);x<=t.distance&&(t.distance=x,g=[v,y])}}if(!g)return!1;a=(i=l[g[0]]).pts[g[1]];var b=u.c2p(a.x,!0),_=f.c2p(a.y,!0),w=a.mrc||1;return n=o.extendFlat({},t,{index:a.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,xLabelVal:a.x,y0:_-w,y1:_+w,yLabelVal:a.y}),c(a,h,n),n}var a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\"),s=t(\"../../components/fx\"),l=t(\"../../components/color\"),c=t(\"../scatter/fill_hover_text\");e.exports={hoverPoints:function(t,e,r,a){var o,s=t.cd[0].trace.hoveron,l=[];return-1!==s.indexOf(\"boxes\")&&(l=l.concat(n(t,e,r,a))),-1!==s.indexOf(\"points\")&&(o=i(t,e,r)),\"closest\"===a?o?[o]:l:o?(l.push(o),l):l},hoverOnBoxes:n,hoverOnPoints:i}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074}],900:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.layoutAttributes=t(\"./layout_attributes\"),n.supplyDefaults=t(\"./defaults\").supplyDefaults,n.supplyLayoutDefaults=t(\"./layout_defaults\").supplyLayoutDefaults,n.calc=t(\"./calc\"),n.setPositions=t(\"./set_positions\").setPositions,n.plot=t(\"./plot\").plot,n.style=t(\"./style\"),n.hoverPoints=t(\"./hover\").hoverPoints,n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"box\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":896,\"./calc\":897,\"./defaults\":898,\"./hover\":899,\"./layout_attributes\":901,\"./layout_defaults\":902,\"./plot\":903,\"./select\":904,\"./set_positions\":905,\"./style\":906}],901:[function(t,e,r){\"use strict\";e.exports={boxmode:{valType:\"enumerated\",values:[\"group\",\"overlay\"],dflt:\"overlay\",editType:\"calc\"},boxgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"},boxgroupgap:{valType:\"number\",min:0,max:1,dflt:.3,editType:\"calc\"}}},{}],902:[function(t,e,r){\"use strict\";function n(t,e,r,n,i){for(var a,o=0;o<r.length;o++)if(r[o].type===i){a=!0;break}a&&(n(i+\"mode\"),n(i+\"gap\"),n(i+\"groupgap\"))}var i=t(\"../../lib\"),a=t(\"./layout_attributes\");e.exports={supplyLayoutDefaults:function(t,e,r){n(0,0,r,function(r,n){return i.coerce(t,e,a,r,n)},\"box\")},_supply:n}},{\"../../lib\":743,\"./layout_attributes\":901}],903:[function(t,e,r){\"use strict\";function n(){var t=u;return u=(69069*u+1)%4294967296,Math.abs(u-t)<429496729?n():u/4294967296}function i(t,e,r,n){var i,a,o=e.pos,c=e.val,u=n.bPos,f=n.wdPos||0,h=n.bPosPxOffset||0,d=r.whiskerwidth||0;Array.isArray(n.bdPos)?(i=n.bdPos[0],a=n.bdPos[1]):(i=n.bdPos,a=n.bdPos),t.selectAll(\"path.box\").data(l.identity).enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"box\").each(function(t){var e=t.pos,n=o.c2p(e+u,!0)+h,p=o.c2p(e+u-i,!0)+h,m=o.c2p(e+u+a,!0)+h,g=o.c2p(e+u-f,!0)+h,v=o.c2p(e+u+f,!0)+h,y=c.c2p(t.q1,!0),x=c.c2p(t.q3,!0),b=l.constrain(c.c2p(t.med,!0),Math.min(y,x)+1,Math.max(y,x)-1),_=c.c2p(!1===r.boxpoints?t.min:t.lf,!0),w=c.c2p(!1===r.boxpoints?t.max:t.uf,!0);\"h\"===r.orientation?s.select(this).attr(\"d\",\"M\"+b+\",\"+p+\"V\"+m+\"M\"+y+\",\"+p+\"V\"+m+\"H\"+x+\"V\"+p+\"ZM\"+y+\",\"+n+\"H\"+_+\"M\"+x+\",\"+n+\"H\"+w+(0===d?\"\":\"M\"+_+\",\"+g+\"V\"+v+\"M\"+w+\",\"+g+\"V\"+v)):s.select(this).attr(\"d\",\"M\"+p+\",\"+b+\"H\"+m+\"M\"+p+\",\"+y+\"H\"+m+\"V\"+x+\"H\"+p+\"ZM\"+n+\",\"+y+\"V\"+_+\"M\"+n+\",\"+x+\"V\"+w+(0===d?\"\":\"M\"+g+\",\"+_+\"H\"+v+\"M\"+g+\",\"+w+\"H\"+v))})}function a(t,e,r,i){var a=e.x,o=e.y,s=i.bdPos,d=i.bPos,p=r.boxpoints||r.points;u=2e9,t.selectAll(\"g.points\").data(function(t){return t.forEach(function(t){t.t=i,t.trace=r}),t}).enter().append(\"g\").attr(\"class\",\"points\").selectAll(\"path\").data(function(t){var e,i,a=\"all\"===p?t.pts:t.pts.filter(function(e){return e.v<t.lf||e.v>t.uf}),o=Math.max((t.max-t.min)/10,t.q3-t.q1),c=1e-9*o,u=o*h,m=[],g=0;if(r.jitter){if(0===o)for(g=1,m=new Array(a.length),e=0;e<a.length;e++)m[e]=1;else for(e=0;e<a.length;e++){var v=Math.max(0,e-f),y=a[v].v,x=Math.min(a.length-1,e+f),b=a[x].v;\"all\"!==p&&(a[e].v<t.lf?b=Math.min(b,t.lf):y=Math.max(y,t.uf));var _=Math.sqrt(u*(x-v)/(b-y+c))||0;_=l.constrain(Math.abs(_),0,1),m.push(_),g=Math.max(_,g)}i=2*r.jitter/g}for(e=0;e<a.length;e++){var w=a[e],M=w.v,k=r.jitter?i*m[e]*(n()-.5):0,A=t.pos+d+s*(r.pointpos+k);\"h\"===r.orientation?(w.y=A,w.x=M):(w.x=A,w.y=M),\"suspectedoutliers\"===p&&M<t.uo&&M>t.lo&&(w.so=!0)}return a}).enter().append(\"path\").classed(\"point\",!0).call(c.translatePoints,a,o)}function o(t,e,r,n){var i,a,o=e.pos,c=e.val,u=n.bPos,f=n.bPosPxOffset||0;Array.isArray(n.bdPos)?(i=n.bdPos[0],a=n.bdPos[1]):(i=n.bdPos,a=n.bdPos),t.selectAll(\"path.mean\").data(l.identity).enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}).each(function(t){var e=o.c2p(t.pos+u,!0)+f,n=o.c2p(t.pos+u-i,!0)+f,l=o.c2p(t.pos+u+a,!0)+f,h=c.c2p(t.mean,!0),d=c.c2p(t.mean-t.sd,!0),p=c.c2p(t.mean+t.sd,!0);\"h\"===r.orientation?s.select(this).attr(\"d\",\"M\"+h+\",\"+n+\"V\"+l+(\"sd\"===r.boxmean?\"m0,0L\"+d+\",\"+e+\"L\"+h+\",\"+n+\"L\"+p+\",\"+e+\"Z\":\"\")):s.select(this).attr(\"d\",\"M\"+n+\",\"+h+\"H\"+l+(\"sd\"===r.boxmean?\"m0,0L\"+e+\",\"+d+\"L\"+n+\",\"+h+\"L\"+e+\",\"+p+\"Z\":\"\"))})}var s=t(\"d3\"),l=t(\"../../lib\"),c=t(\"../../components/drawing\"),u=2e9,f=5,h=.01;e.exports={plot:function(t,e,r){var n=t._fullLayout,l=e.xaxis,c=e.yaxis;e.plot.select(\".boxlayer\").selectAll(\"g.trace.boxes\").data(r).enter().append(\"g\").attr(\"class\",\"trace boxes\").each(function(t){var e=t[0],r=e.t,u=e.trace,f=e.node3=s.select(this),h=n._numBoxes,d=\"group\"===n.boxmode&&h>1,p=r.dPos*(1-n.boxgap)*(1-n.boxgroupgap)/(d?h:1),m=d?2*r.dPos*((r.num+.5)/h-.5)*(1-n.boxgap):0,g=p*u.whiskerwidth;if(!0!==u.visible||r.empty)s.select(this).remove();else{var v,y;\"h\"===u.orientation?(v=c,y=l):(v=l,y=c),r.bPos=m,r.bdPos=p,r.wdPos=g,i(f,{pos:v,val:y},u,r),u.boxpoints&&a(f,{x:l,y:c},u,r),u.boxmean&&o(f,{pos:v,val:y},u,r)}})},plotBoxAndWhiskers:i,plotPoints:a,plotBoxMean:o}},{\"../../components/drawing\":643,\"../../lib\":743,d3:128}],904:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],c=a.c2p(l.x),u=o.c2p(l.y);e.contains([c,u])?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],905:[function(t,e,r){\"use strict\";function n(t,e,r,n,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=[],d=\"violin\"===t?\"_numViolins\":\"_numBoxes\";for(s=0;s<r.length;s++)for(c=u[r[s]],l=0;l<c.length;l++)h.push(c[l].pos);if(h.length){var p=a.distinctVals(h),m=p.minDiff/2;for(h.length===p.vals.length&&(f[d]=1),i.minDtick(n,p.minDiff,p.vals[0],!0),s=0;s<r.length;s++)(c=u[r[s]])[0].t.dPos=m;var g=(1-f[t+\"gap\"])*(1-f[t+\"groupgap\"])*m/f[d];i.expand(n,p.vals,{vpadminus:m+o[0]*g,vpadplus:m+o[1]*g})}}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\"),o=[\"v\",\"h\"];e.exports={setPositions:function(t,e){for(var r=t.calcdata,i=e.xaxis,a=e.yaxis,s=0;s<o.length;s++){for(var l=o[s],c=\"h\"===l?a:i,u=[],f=0,h=0,d=0;d<r.length;d++){var p=r[d],m=p[0].t,g=p[0].trace;!0!==g.visible||\"box\"!==g.type||m.empty||g.orientation!==l||g.xaxis!==i._id||g.yaxis!==a._id||(u.push(d),!1!==g.boxpoints&&(f=Math.max(f,g.jitter-g.pointpos-1),h=Math.max(h,g.jitter+g.pointpos-1)))}n(\"box\",t,u,c,[f,h])}},setPositionOffset:n}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789}],906:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\");e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.boxes\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;r.selectAll(\"path.box\").style(\"stroke-width\",s+\"px\").call(i.stroke,o.line.color).call(i.fill,o.fillcolor),r.selectAll(\"path.mean\").style({\"stroke-width\":s,\"stroke-dasharray\":2*s+\"px,\"+s+\"px\"}).call(i.stroke,o.line.color);var l=r.selectAll(\"path.point\");a.pointStyle(l,o,t),a.selectedPointStyle(l,o)})}},{\"../../components/color\":618,\"../../components/drawing\":643,d3:128}],907:[function(t,e,r){\"use strict\";function n(t){return{name:a.increasing.name,showlegend:a.increasing.showlegend,line:{color:i({},o.line.color,{dflt:t}),width:o.line.width,editType:\"style\"},fillcolor:o.fillcolor,editType:\"style\"}}var i=t(\"../../lib\").extendFlat,a=t(\"../ohlc/attributes\"),o=t(\"../box/attributes\");e.exports={x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:i({},o.line.width,{}),editType:\"style\"},increasing:n(a.increasing.line.color.dflt),decreasing:n(a.decreasing.line.color.dflt),text:a.text,whiskerwidth:i({},o.whiskerwidth,{dflt:0})}},{\"../../lib\":743,\"../box/attributes\":896,\"../ohlc/attributes\":1024}],908:[function(t,e,r){\"use strict\";function n(t,e,r,n){o(t,e,r,n),r(n+\".line.color\"),r(n+\".line.width\",e.line.width),r(n+\".fillcolor\")}var i=t(\"../../lib\"),a=t(\"../ohlc/ohlc_defaults\"),o=t(\"../ohlc/direction_defaults\"),s=t(\"../ohlc/helpers\"),l=t(\"./attributes\");e.exports=function(t,e,r,o){function c(r,n){return i.coerce(t,e,l,r,n)}s.pushDummyTransformOpts(t,e);0!==a(t,e,c,o)?(c(\"line.width\"),n(t,e,c,\"increasing\"),n(t,e,c,\"decreasing\"),c(\"text\"),c(\"whiskerwidth\")):e.visible=!1}},{\"../../lib\":743,\"../ohlc/direction_defaults\":1026,\"../ohlc/helpers\":1027,\"../ohlc/ohlc_defaults\":1029,\"./attributes\":907}],909:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/register\");e.exports={moduleType:\"trace\",name:\"candlestick\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"showLegend\",\"candlestick\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\")},n(t(\"../box\")),n(t(\"./transform\"))},{\"../../plot_api/register\":779,\"../../plots/cartesian\":800,\"../box\":900,\"./attributes\":907,\"./defaults\":908,\"./transform\":910}],910:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"box\",boxpoints:!1,visible:t.visible,hoverinfo:t.hoverinfo,opacity:t.opacity,xaxis:t.xaxis,yaxis:t.yaxis,transforms:o.makeTransform(t,e,r)},i=t[r];return i&&a.extendFlat(n,{x:t.x||[0],xcalendar:t.xcalendar,y:[].concat(t.low).concat(t.high),whiskerwidth:t.whiskerwidth,text:t.text,name:i.name,showlegend:i.showlegend,line:i.line,fillcolor:i.fillcolor}),n}var i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=t(\"../ohlc/helpers\");r.moduleType=\"transform\",r.name=\"candlestick\",r.attributes={},r.supplyDefaults=function(t,e,r,n){return o.clearEphemeralTransformOpts(n),o.copyOHLC(t,e),t},r.transform=function(t,e){for(var r=[],i=0;i<t.length;i++){var a=t[i];\"candlestick\"===a.type?r.push(n(a,e,\"increasing\"),n(a,e,\"decreasing\")):r.push(a)}return o.addRangeSlider(r,e.layout),r},r.calcTransform=function(t,e,r){for(var n=r.direction,a=o.getFilterFn(n),s=e.open,l=e.high,c=e.low,u=e.close,f=s.length,h=[],d=[],p=e._fullInput.x?function(t){var r=e.x[t];h.push(r,r,r,r,r,r)}:function(t){h.push(t,t,t,t,t,t)},m=function(t,e,r,n){d.push(r,t,n,n,n,e)},g=0;g<f;g++)a(s[g],u[g])&&i(l[g])&&i(c[g])&&(p(g),m(s[g],l[g],c[g],u[g]));e.x=h,e.y=d}},{\"../../lib\":743,\"../ohlc/helpers\":1027,\"fast-isnumeric\":140}],911:[function(t,e,r){\"use strict\";var n=t(\"./axis_defaults\");e.exports=function(t,e,r,i,a){i(\"a\")||(i(\"da\"),i(\"a0\"));i(\"b\")||(i(\"db\"),i(\"b0\")),function(t,e,r,i){[\"aaxis\",\"baxis\"].forEach(function(a){var o=a.charAt(0),s=t[a]||{},l={},c={tickfont:\"x\",id:o+\"axis\",letter:o,font:e.font,name:a,data:t[o],calendar:e.calendar,dfltColor:i,bgColor:r.paper_bgcolor,fullLayout:r};n(s,l,c),l._categories=l._categories||[],e[a]=l,t[a]||\"-\"===s.type||(t[a]={type:s.type})})}(t,e,r,a)}},{\"./axis_defaults\":916}],912:[function(t,e,r){\"use strict\";function n(t,e){if(!Array.isArray(t)||e>=10)return null;for(var r=1/0,i=-1/0,a=t.length,o=0;o<a;o++){var s=t[o];if(Array.isArray(s)){var l=n(s,e+1);l&&(r=Math.min(l[0],r),i=Math.max(l[1],i))}else r=Math.min(s,r),i=Math.max(s,i)}return[r,i]}e.exports=function(t){return n(t,0)}},{}],913:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"./axis_attributes\"),a=t(\"../../components/color/attributes\"),o=n({editType:\"calc\"});o.family.dflt='\"Open Sans\", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,e.exports={carpet:{valType:\"string\",editType:\"calc\"},x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},a:{valType:\"data_array\",editType:\"calc\"},a0:{valType:\"number\",dflt:0,editType:\"calc\"},da:{valType:\"number\",dflt:1,editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},b0:{valType:\"number\",dflt:0,editType:\"calc\"},db:{valType:\"number\",dflt:1,editType:\"calc\"},cheaterslope:{valType:\"number\",dflt:1,editType:\"calc\"},aaxis:i,baxis:i,font:o,color:{valType:\"color\",dflt:a.defaultLine,editType:\"plot\"}}},{\"../../components/color/attributes\":617,\"../../plots/font_attributes\":816,\"./axis_attributes\":915}],914:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a,o,s,l,c,u,f,h,d,p,m,g,v=Array.isArray(r)?\"a\":\"b\",y=(\"a\"===v?t.aaxis:t.baxis).smoothing,x=\"a\"===v?t.a2i:t.b2j,b=\"a\"===v?r:n,_=\"a\"===v?n:r,w=\"a\"===v?e.a.length:e.b.length,M=\"a\"===v?e.b.length:e.a.length,k=Math.floor(\"a\"===v?t.b2j(_):t.a2i(_)),A=\"a\"===v?function(e){return t.evalxy([],e,k)}:function(e){return t.evalxy([],k,e)};y&&(o=Math.max(0,Math.min(M-2,k)),s=k-o,a=\"a\"===v?function(e,r){return t.dxydi([],e,o,r,s)}:function(e,r){return t.dxydj([],o,e,s,r)});var T=x(b[0]),S=x(b[1]),E=T<S?1:-1,L=1e-8*(S-T),C=E>0?Math.floor:Math.ceil,z=E>0?Math.ceil:Math.floor,D=E>0?Math.min:Math.max,I=E>0?Math.max:Math.min,P=C(T+L),O=z(S-L),F=[[u=A(T)]];for(i=P;i*E<O*E;i+=E)l=[],p=I(T,i),g=(m=D(S,i+E))-p,c=Math.max(0,Math.min(w-2,Math.floor(.5*(p+m)))),f=A(m),y&&(h=a(c,p-c),d=a(c,m-c),l.push([u[0]+h[0]/3*g,u[1]+h[1]/3*g]),l.push([f[0]-d[0]/3*g,f[1]-d[1]/3*g])),l.push(f),F.push(l),u=f;return F}},{}],915:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../components/color/attributes\"),a=t(\"../../plots/cartesian/layout_attributes\"),o=t(\"../../plot_api/edit_types\").overrideAll;e.exports={color:{valType:\"color\",editType:\"calc\"},smoothing:{valType:\"number\",dflt:1,min:0,max:1.3,editType:\"calc\"},title:{valType:\"string\",editType:\"calc\"},titlefont:n({editType:\"calc\"}),titleoffset:{valType:\"number\",dflt:10,editType:\"calc\"},type:{valType:\"enumerated\",values:[\"-\",\"linear\",\"date\",\"category\"],dflt:\"-\",editType:\"calc\"},autorange:{valType:\"enumerated\",values:[!0,!1,\"reversed\"],dflt:!0,editType:\"calc\"},rangemode:{valType:\"enumerated\",values:[\"normal\",\"tozero\",\"nonnegative\"],dflt:\"normal\",editType:\"calc\"},range:{valType:\"info_array\",editType:\"calc\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}]},fixedrange:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cheatertype:{valType:\"enumerated\",values:[\"index\",\"value\"],dflt:\"value\",editType:\"calc\"},tickmode:{valType:\"enumerated\",values:[\"linear\",\"array\"],dflt:\"array\",editType:\"calc\"},nticks:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},tickvals:{valType:\"data_array\",editType:\"calc\"},ticktext:{valType:\"data_array\",editType:\"calc\"},showticklabels:{valType:\"enumerated\",values:[\"start\",\"end\",\"both\",\"none\"],dflt:\"start\",editType:\"calc\"},tickfont:n({editType:\"calc\"}),tickangle:{valType:\"angle\",dflt:\"auto\",editType:\"calc\"},tickprefix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showtickprefix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},ticksuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showticksuffix:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},showexponent:{valType:\"enumerated\",values:[\"all\",\"first\",\"last\",\"none\"],dflt:\"all\",editType:\"calc\"},exponentformat:{valType:\"enumerated\",values:[\"none\",\"e\",\"E\",\"power\",\"SI\",\"B\"],dflt:\"B\",editType:\"calc\"},separatethousands:{valType:\"boolean\",dflt:!1,editType:\"calc\"},tickformat:{valType:\"string\",dflt:\"\",editType:\"calc\"},tickformatstops:o(a.tickformatstops,\"calc\",\"from-root\"),categoryorder:{valType:\"enumerated\",values:[\"trace\",\"category ascending\",\"category descending\",\"array\"],dflt:\"trace\",editType:\"calc\"},categoryarray:{valType:\"data_array\",editType:\"calc\"},labelpadding:{valType:\"integer\",dflt:10,editType:\"calc\"},labelprefix:{valType:\"string\",editType:\"calc\"},labelsuffix:{valType:\"string\",dflt:\"\",editType:\"calc\"},showline:{valType:\"boolean\",dflt:!1,editType:\"calc\"},linecolor:{valType:\"color\",dflt:i.defaultLine,editType:\"calc\"},linewidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},gridcolor:{valType:\"color\",editType:\"calc\"},gridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},showgrid:{valType:\"boolean\",dflt:!0,editType:\"calc\"},minorgridcount:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},minorgridwidth:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},minorgridcolor:{valType:\"color\",dflt:i.lightLine,editType:\"calc\"},startline:{valType:\"boolean\",editType:\"calc\"},startlinecolor:{valType:\"color\",editType:\"calc\"},startlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endline:{valType:\"boolean\",editType:\"calc\"},endlinewidth:{valType:\"number\",dflt:1,editType:\"calc\"},endlinecolor:{valType:\"color\",editType:\"calc\"},tick0:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},dtick:{valType:\"number\",min:0,dflt:1,editType:\"calc\"},arraytick0:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},arraydtick:{valType:\"integer\",min:1,dflt:1,editType:\"calc\"},editType:\"calc\"}},{\"../../components/color/attributes\":617,\"../../plot_api/edit_types\":773,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/font_attributes\":816}],916:[function(t,e,r){\"use strict\";var n=t(\"./attributes\"),i=t(\"../../components/color\").addOpacity,a=t(\"../../registry\"),o=t(\"../../lib\"),s=t(\"../../plots/cartesian/tick_value_defaults\"),l=t(\"../../plots/cartesian/tick_label_defaults\"),c=t(\"../../plots/cartesian/category_order_defaults\"),u=t(\"../../plots/cartesian/set_convert\"),f=t(\"../../plots/cartesian/ordered_categories\"),h=t(\"../../plots/cartesian/axis_autotype\");e.exports=function(t,e,r){function d(r,n){return o.coerce(t,e,v,r,n)}function p(r,n){return o.coerce2(t,e,v,r,n)}var m=r.letter,g=r.font||{},v=n[m+\"axis\"];r.noHover=!0,r.name&&(e._name=r.name,e._id=r.name);var y=d(\"type\");if(\"-\"===y&&(r.data&&function(t,e){if(\"-\"===t.type){var r=t[t._id.charAt(0)+\"calendar\"];t.type=h(e,r)}}(e,r.data),\"-\"===e.type?e.type=\"linear\":y=t.type=e.type),d(\"smoothing\"),d(\"cheatertype\"),d(\"showticklabels\"),d(\"labelprefix\",m+\" = \"),d(\"labelsuffix\"),d(\"showtickprefix\"),d(\"showticksuffix\"),d(\"separatethousands\"),d(\"tickformat\"),d(\"exponentformat\"),d(\"showexponent\"),d(\"categoryorder\"),d(\"tickmode\"),d(\"tickvals\"),d(\"ticktext\"),d(\"tick0\"),d(\"dtick\"),\"array\"===e.tickmode&&(d(\"arraytick0\"),d(\"arraydtick\")),d(\"labelpadding\"),e._hovertitle=m,\"date\"===y){a.getComponentMethod(\"calendars\",\"handleDefaults\")(t,e,\"calendar\",r.calendar)}u(e,r.fullLayout);var x=d(\"color\",r.dfltColor),b=x===t.color?x:g.color;d(\"title\"),o.coerceFont(d,\"titlefont\",{family:g.family,size:Math.round(1.2*g.size),color:b}),d(\"titleoffset\"),d(\"tickangle\");d(\"autorange\",!e.isValidRange(t.range))&&d(\"rangemode\"),d(\"range\"),e.cleanRange(),d(\"fixedrange\"),s(t,e,d,y),l(t,e,d,y,r),c(t,e,d);var _=p(\"gridcolor\",i(x,.3)),w=p(\"gridwidth\"),M=d(\"showgrid\");M||(delete e.gridcolor,delete e.gridwidth);var k=p(\"startlinecolor\",x),A=p(\"startlinewidth\",w);d(\"startline\",e.showgrid||!!k||!!A)||(delete e.startlinecolor,delete e.startlinewidth);var T=p(\"endlinecolor\",x),S=p(\"endlinewidth\",w);return d(\"endline\",e.showgrid||!!T||!!S)||(delete e.endlinecolor,delete e.endlinewidth),M?(d(\"minorgridcount\"),d(\"minorgridwidth\",w),d(\"minorgridcolor\",i(_,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridWidth),e._initialCategories=\"category\"===y?f(m,e.categoryorder,e.categoryarray,r.data):[],\"none\"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,d(\"tickmode\"),(!e.title||e.title&&0===e.title.length)&&(delete e.titlefont,delete e.titleoffset),e}},{\"../../components/color\":618,\"../../lib\":743,\"../../plots/cartesian/axis_autotype\":790,\"../../plots/cartesian/category_order_defaults\":793,\"../../plots/cartesian/ordered_categories\":804,\"../../plots/cartesian/set_convert\":808,\"../../plots/cartesian/tick_label_defaults\":809,\"../../plots/cartesian/tick_value_defaults\":811,\"../../registry\":873,\"./attributes\":913}],917:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./cheater_basis\"),a=t(\"./array_minmax\"),o=t(\"./map_2d_array\"),s=t(\"./calc_gridlines\"),l=t(\"./calc_labels\"),c=t(\"./calc_clippath\"),u=t(\"../heatmap/clean_2d_array\"),f=t(\"./smooth_fill_2d_array\");e.exports=function(t,e){var r,h=n.getFromId(t,e.xaxis||\"x\"),d=n.getFromId(t,e.yaxis||\"y\"),p=e.aaxis,m=e.baxis,g=e._a=e.a,v=e._b=e.b,y={},x=e.y;if(e._cheater){var b=\"index\"===p.cheatertype?g.length:g,_=\"index\"===m.cheatertype?v.length:v;e.x=r=i(b,_,e.cheaterslope)}else r=e.x;e._x=e.x=r=u(r),e._y=e.y=x=u(x),f(r,g,v),f(x,g,v),e.setScale(),y.xp=e.xp=o(e.xp,r,h.c2p),y.yp=e.yp=o(e.yp,x,d.c2p);var w=a(r),M=a(x),k=.5*(w[1]-w[0]),A=.5*(w[1]+w[0]),T=.5*(M[1]-M[0]),S=.5*(M[1]+M[0]);return w=[A-1.3*k,A+1.3*k],M=[S-1.3*T,S+1.3*T],n.expand(h,w,{padded:!0}),n.expand(d,M,{padded:!0}),s(e,y,\"a\",\"b\"),s(e,y,\"b\",\"a\"),l(e,p),l(e,m),y.clipsegments=c(e.xctrl,e.yctrl,p,m),y.x=r,y.y=x,y.a=g,y.b=v,[y]}},{\"../../plots/cartesian/axes\":789,\"../heatmap/clean_2d_array\":979,\"./array_minmax\":912,\"./calc_clippath\":918,\"./calc_gridlines\":919,\"./calc_labels\":920,\"./cheater_basis\":922,\"./map_2d_array\":934,\"./smooth_fill_2d_array\":938}],918:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=u;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][u],o[i]=e[i][u];for(s.push({x:a,y:o,bicubic:c}),i=u,a=[],o=[];i>=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],919:[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,c,u,f,h,d,p,g,v=[],y=[],x={};if(\"b\"===r)for(i=t.b2j(e),o=Math.floor(Math.max(0,Math.min(P-2,i))),s=i-o,x.length=P,x.crossLength=I,x.xy=function(e){return t.evalxy([],e,i)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},n=0;n<I;n++)c=Math.min(I-2,n),u=n-c,f=t.evalxy([],n,i),E.smoothing&&n>0&&(h=t.dxydi([],n-1,o,0,s),v.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),d=t.dxydi([],n-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(n=t.a2i(e),c=Math.floor(Math.max(0,Math.min(I-2,n))),u=n-c,x.length=I,x.crossLength=P,x.xy=function(e){return t.evalxy([],n,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},i=0;i<P;i++)o=Math.min(P-2,i),s=i-o,f=t.evalxy([],n,i),E.smoothing&&i>0&&(p=t.dxydj([],c,i-1,u,0),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),g=t.dxydj([],c,i-1,u,1),v.push(f[0]-g[0]/3),y.push(f[1]-g[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=r,x.axis=M,x.crossAxis=E,x.value=e,x.constvar=a,x.index=m,x.x=v,x.y=y,x.smoothing=E.smoothing,x}function s(e){var n,i,o,s,l,c=[],u=[],f={};if(f.length=w.length,f.crossLength=S.length,\"b\"===r)for(o=Math.max(0,Math.min(P-2,e)),l=Math.min(1,Math.max(0,e-o)),f.xy=function(r){return t.evalxy([],r,e)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},n=0;n<z;n++)c[n]=L[e*O][n],u[n]=C[e*O][n];else for(i=Math.max(0,Math.min(I-2,e)),s=Math.min(1,Math.max(0,e-i)),f.xy=function(r){return t.evalxy([],e,r)},f.dxy=function(e,r){return t.dxydj([],i,e,s,r)},n=0;n<D;n++)c[n]=L[n][e*O],u[n]=C[n][e*O];return f.axisLetter=r,f.axis=M,f.crossAxis=E,f.value=w[e],f.constvar=a,f.index=e,f.x=c,f.y=u,f.smoothing=E.smoothing,f}var l,c,u,f,h,d,p,m,g,v,y,x,b,_,w=t[r],M=t[r+\"axis\"],k=M._gridlines=[],A=M._minorgridlines=[],T=M._boundarylines=[],S=t[a],E=t[a+\"axis\"];if(\"array\"===M.tickmode)for(M.tickvals=[],l=0;l<w.length;l++)M.tickvals.push(w[l]);var L=t.xctrl,C=t.yctrl,z=L[0].length,D=L.length,I=t.a.length,P=t.b.length;n.calcTicks(M);var O=M.smoothing?3:1;if(\"array\"===M.tickmode){for(f=5e-15,d=(h=[Math.floor((w.length-1-M.arraytick0)/M.arraydtick*(1+f)),Math.ceil(-M.arraytick0/M.arraydtick/(1+f))].sort(function(t,e){return t-e}))[0]-1,p=h[1]+1,m=d;m<p;m++)(c=M.arraytick0+M.arraydtick*m)<0||c>w.length-1||k.push(i(s(c),{color:M.gridcolor,width:M.gridwidth}));for(m=d;m<p;m++)if(u=M.arraytick0+M.arraydtick*m,y=Math.min(u+M.arraydtick,w.length-1),!(u<0||u>w.length-1||y<0||y>w.length-1))for(x=w[u],b=w[y],l=0;l<M.minorgridcount;l++)(_=y-u)<=0||(v=x+(b-x)*(l+1)/(M.minorgridcount+1)*(M.arraydtick/_))<w[0]||v>w[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(f=5e-15,d=(h=[Math.floor((w[w.length-1]-M.tick0)/M.dtick*(1+f)),Math.ceil((w[0]-M.tick0)/M.dtick/(1+f))].sort(function(t,e){return t-e}))[0],p=h[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;m<p+1;m++)for(g=M.tick0+M.dtick*m,l=0;l<M.minorgridcount;l++)(v=g+M.dtick*(l+1)/(M.minorgridcount+1))<w[0]||v>w[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\":732,\"../../plots/cartesian/axes\":789}],920:[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;r<l.length;r++)o=l[r],-1!==[\"start\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==[\"end\",\"both\"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},{\"../../lib/extend\":732,\"../../plots/cartesian/axes\":789}],921:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=c*(l+c)*3,d=l*(l+c)*3;return[[e[0]+(h&&u/h),e[1]+(h&&f/h)],[e[0]-(d&&u/d),e[1]-(d&&f/d)]]}},{}],922:[function(t,e,r){\"use strict\";var n=t(\"../../lib\").isArray;e.exports=function(t,e,r){var i,a,o,s,l,c=[],u=n(t)?t.length:t,f=n(e)?e.length:e,h=n(t)?t:null,d=n(e)?e:null;h&&(o=(h.length-1)/(h[h.length-1]-h[0])/(u-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var p,m=1/0,g=-1/0;for(a=0;a<f;a++)for(c[a]=[],l=d?(d[a]-d[0])*s:a/(f-1),i=0;i<u;i++)p=(h?(h[i]-h[0])*o:i/(u-1))-l*r,m=Math.min(p,m),g=Math.max(p,g),c[a][i]=p;var v=1/(g-m),y=-m*v;for(a=0;a<f;a++)for(i=0;i<u;i++)c[a][i]=v*c[a][i]+y;return c}},{\"../../lib\":743}],923:[function(t,e,r){\"use strict\";function n(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}var i=t(\"./catmull_rom\"),a=t(\"../../lib\").ensureArray;e.exports=function(t,e,r,o,s,l){var c,u,f,h,d,p,m,g,v,y,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=a(t,w),e=a(e,w),f=0;f<w;f++)t[f]=a(t[f],_),e[f]=a(e[f],_);for(u=0,h=0;u<b;u++,h+=l?3:1)for(d=t[h],p=e[h],m=r[u],g=o[u],c=0,f=0;c<x;c++,f+=s?3:1)d[f]=m[c],p[f]=g[c];if(s)for(u=0,h=0;u<b;u++,h+=l?3:1){for(c=1,f=3;c<x-1;c++,f+=3)v=i([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),t[h][f-1]=v[0][0],e[h][f-1]=v[0][1],t[h][f+1]=v[1][0],e[h][f+1]=v[1][1];y=n([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=y[0],e[h][1]=y[1],y=n([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=y[0],e[h][_-2]=y[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)v=i([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=v[0][0],e[h-1][f]=v[0][1],t[h+1][f]=v[1][0],e[h+1][f]=v[1][1];y=n([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=y[0],e[1][f]=y[1],y=n([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=y[0],e[w-2][f]=y[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)v=i([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+v[0][0]),e[h][f-1]=.5*(e[h][f-1]+v[0][1]),t[h][f+1]=.5*(t[h][f+1]+v[1][0]),e[h][f+1]=.5*(e[h][f+1]+v[1][1]);y=n([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+y[0]),e[h][1]=.5*(e[h][1]+y[1]),y=n([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+y[0]),e[h][_-2]=.5*(e[h][_-2]+y[1])}return[t,e]}},{\"../../lib\":743,\"./catmull_rom\":921}],924:[function(t,e,r){\"use strict\";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],925:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3,n*=3;var h=i*i,d=1-i,p=d*d,m=d*i*2,g=-3*p,v=3*(p-m),y=3*(m-h),x=3*h,b=a*a,_=b*a,w=1-a,M=w*w,k=M*w;for(f=0;f<t.length;f++)o=g*(u=t[f])[n][r]+v*u[n][r+1]+y*u[n][r+2]+x*u[n][r+3],s=g*u[n+1][r]+v*u[n+1][r+1]+y*u[n+1][r+2]+x*u[n+1][r+3],l=g*u[n+2][r]+v*u[n+2][r+1]+y*u[n+2][r+2]+x*u[n+2][r+3],c=g*u[n+3][r]+v*u[n+3][r+1]+y*u[n+3][r+2]+x*u[n+3][r+3],e[f]=k*o+3*(M*a*s+w*b*l)+_*c;return e}:e?function(e,r,n,i,a){e||(e=[]);var o,s,l,c;r*=3;var u=i*i,f=1-i,h=f*f,d=f*i*2,p=-3*h,m=3*(h-d),g=3*(d-u),v=3*u,y=1-a;for(l=0;l<t.length;l++)o=p*(c=t[l])[n][r]+m*c[n][r+1]+g*c[n][r+2]+v*c[n][r+3],s=p*c[n+1][r]+m*c[n+1][r+1]+g*c[n+1][r+2]+v*c[n+1][r+3],e[l]=y*o+a*s;return e}:r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;n*=3;var h=a*a,d=h*a,p=1-a,m=p*p,g=m*p;for(u=0;u<t.length;u++)o=(f=t[u])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],c=f[n+3][r+1]-f[n+3][r],e[u]=g*o+3*(m*a*s+p*h*l)+d*c;return e}:function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u=1-a;for(l=0;l<t.length;l++)o=(c=t[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],e[l]=u*o+a*s;return e}}},{}],926:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3,n*=3;var h=i*i,d=h*i,p=1-i,m=p*p,g=m*p,v=a*a,y=1-a,x=y*y,b=y*a*2,_=-3*x,w=3*(x-b),M=3*(b-v),k=3*v;for(f=0;f<t.length;f++)o=_*(u=t[f])[n][r]+w*u[n+1][r]+M*u[n+2][r]+k*u[n+3][r],s=_*u[n][r+1]+w*u[n+1][r+1]+M*u[n+2][r+1]+k*u[n+3][r+1],l=_*u[n][r+2]+w*u[n+1][r+2]+M*u[n+2][r+2]+k*u[n+3][r+2],c=_*u[n][r+3]+w*u[n+1][r+3]+M*u[n+2][r+3]+k*u[n+3][r+3],e[f]=g*o+3*(m*i*s+p*h*l)+d*c;return e}:e?function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u,f;r*=3;var h=a*a,d=h*a,p=1-a,m=p*p,g=m*p;for(u=0;u<t.length;u++)o=(f=t[u])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],c=f[n+1][r+3]-f[n][r+3],e[u]=g*o+3*(m*a*s+p*h*l)+d*c;return e}:r?function(e,r,n,i,a){e||(e=[]);var o,s,l,c;n*=3;var u=1-i,f=a*a,h=1-a,d=h*h,p=h*a*2,m=-3*d,g=3*(d-p),v=3*(p-f),y=3*f;for(l=0;l<t.length;l++)o=m*(c=t[l])[n][r]+g*c[n+1][r]+v*c[n+2][r]+y*c[n+3][r],s=m*c[n][r+1]+g*c[n+1][r+1]+v*c[n+2][r+1]+y*c[n+3][r+1],e[l]=u*o+i*s;return e}:function(e,r,n,i,a){e||(e=[]);var o,s,l,c,u=1-i;for(l=0;l<t.length;l++)o=(c=t[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],e[l]=u*o+i*s;return e}}},{}],927:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));h*=3,d*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,_=m*m,w=_*m,M=1-m,k=M*M,A=k*M;for(f=0;f<t.length;f++)i=b*(u=t[f])[d][h]+3*(x*p*u[d][h+1]+y*g*u[d][h+2])+v*u[d][h+3],s=b*u[d+1][h]+3*(x*p*u[d+1][h+1]+y*g*u[d+1][h+2])+v*u[d+1][h+3],l=b*u[d+2][h]+3*(x*p*u[d+2][h+1]+y*g*u[d+2][h+2])+v*u[d+2][h+3],c=b*u[d+3][h]+3*(x*p*u[d+3][h+1]+y*g*u[d+3][h+2])+v*u[d+3][h+3],e[f]=A*i+3*(k*m*s+M*_*l)+w*c;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));h*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,_=1-m;for(u=0;u<t.length;u++)i=_*(f=t[u])[d][h]+m*f[d+1][h],s=_*f[d][h+1]+m*f[d+1][h+1],l=_*f[d][h+2]+m*f[d+1][h+1],c=_*f[d][h+3]+m*f[d+1][h+1],e[u]=b*i+3*(x*p*s+y*g*l)+v*c;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,c,u,f,h=Math.max(0,Math.min(Math.floor(r),a)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-h)),m=Math.max(0,Math.min(1,n-d));d*=3;var g=m*m,v=g*m,y=1-m,x=y*y,b=x*y,_=1-p;for(u=0;u<t.length;u++)i=_*(f=t[u])[d][h]+p*f[d][h+1],s=_*f[d+1][h]+p*f[d+1][h+1],l=_*f[d+2][h]+p*f[d+2][h+1],c=_*f[d+3][h]+p*f[d+3][h+1],e[u]=b*i+3*(x*m*s+y*g*l)+v*c;return e}:function(e,r,n){e||(e=[]);var i,s,l,c,u=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-u)),d=Math.max(0,Math.min(1,n-f)),p=1-d,m=1-h;for(l=0;l<t.length;l++)i=m*(c=t[l])[f][u]+h*c[f][u+1],s=m*c[f+1][u]+h*c[f+1][u+1],e[l]=p*i+d*s;return e}}},{}],928:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./xy_defaults\"),a=t(\"./ab_defaults\"),o=t(\"./set_convert\"),s=t(\"./attributes\"),l=t(\"../../components/color/attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,s,r,i)}e._clipPathId=\"clip\"+e.uid+\"carpet\";var f=u(\"color\",l.defaultLine);if(n.coerceFont(u,\"font\"),u(\"carpet\"),a(t,e,c,u,f),e.a&&e.b){e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0);var h=i(t,e,u);o(e),e._cheater&&u(\"cheaterslope\"),h||(e.visible=!1)}else e.visible=!1}},{\"../../components/color/attributes\":617,\"../../lib\":743,\"./ab_defaults\":911,\"./attributes\":913,\"./set_convert\":937,\"./xy_defaults\":939}],929:[function(t,e,r){\"use strict\";e.exports=function(t){return Array.isArray(t[0])}},{}],930:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.plot=t(\"./plot\"),n.calc=t(\"./calc\"),n.animatable=!0,n.moduleType=\"trace\",n.name=\"carpet\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"carpet\",\"carpetAxis\",\"notLegendIsolatable\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":913,\"./calc\":917,\"./defaults\":928,\"./plot\":936}],931:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&(\"carpet\"===a.type&&(r||(r=a),a.carpet===e.carpet)))return a}return r}},{}],932:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){if(0===t.length)return\"\";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+\",\"+e[n]),r&&n<t.length-a&&(i.push(\"C\"),i.push([t[n+1]+\",\"+e[n+1],t[n+2]+\",\"+e[n+2]+\" \"].join(\" \")));return i.join(r?\"\":\"L\")}},{}],933:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n;for(Array.isArray(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],n=0;n<e.length;n++)t[n]=r(e[n]);return t}},{}],934:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n,i;for(Array.isArray(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],n=0;n<e.length;n++)for(Array.isArray(t[n])?t[n].length>e.length&&(t[n]=t[n].slice(0,e.length)):t[n]=[],i=0;i<e[0].length;i++)t[n][i]=r(e[n][i]);return t}},{}],935:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,c=1;if(a){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/u/f;c=Math.max(0,h)}var d=180*Math.atan2(s,o)/Math.PI;return d<-90?(d+=180,l=-l):d>90&&(d-=180,l=-l),{angle:d,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],936:[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],l=r[0].trace,c=e.xaxis,d=e.yaxis,m=l.aaxis,g=l.baxis,v=t._fullLayout,y=e.plot.selectAll(\".carpetlayer\"),x=v._clips,b=n(y,\"g\",\"carpet\"+l.uid).classed(\"trace\",!0),_=n(b,\"g\",\"minorlayer\"),w=n(b,\"g\",\"majorlayer\"),M=n(b,\"g\",\"boundarylayer\"),k=n(b,\"g\",\"labellayer\");b.style(\"opacity\",l.opacity),a(c,d,w,m,\"a\",m._gridlines),a(c,d,w,g,\"b\",g._gridlines),a(c,d,_,m,\"a\",m._minorgridlines),a(c,d,_,g,\"b\",g._minorgridlines),a(c,d,M,m,\"a-boundary\",m._boundarylines),a(c,d,M,g,\"b-boundary\",g._boundarylines);!function(t,e,r,n,i,a,o,l){var c,u,f,d;c=.5*(r.a[0]+r.a[r.a.length-1]),u=r.b[0],f=r.ab2xy(c,u,!0),d=r.dxyda_rough(c,u),void 0===o.angle&&p.extendFlat(o,h(r,i,a,f,r.dxydb_rough(c,u)));s(t,e,r,n,f,d,r.aaxis,i,a,o,\"a-title\"),c=r.a[0],u=.5*(r.b[0]+r.b[r.b.length-1]),f=r.ab2xy(c,u,!0),d=r.dxydb_rough(c,u),void 0===l.angle&&p.extendFlat(l,h(r,i,a,f,r.dxyda_rough(c,u)));s(t,e,r,n,f,d,r.baxis,i,a,l,\"b-title\")}(t,k,l,i,c,d,o(t,c,d,l,i,k,m._labels,\"a-label\"),o(t,c,d,l,i,k,g._labels,\"b-label\")),function(t,e,r,i,a){var o,s,l,c,h=r.select(\"#\"+t._clipPathId);h.size()||(h=r.append(\"clipPath\").classed(\"carpetclip\",!0));var d=n(h,\"path\",\"carpetboundary\"),p=e.clipsegments,m=[];for(c=0;c<p.length;c++)o=p[c],s=u([],o.x,i.c2p),l=u([],o.y,a.c2p),m.push(f(s,l,o.bicubic));var g=\"M\"+m.join(\"L\")+\"Z\";h.attr(\"id\",t._clipPathId),d.attr(\"d\",g)}(l,i,x,c,d)}function a(t,e,r,n,i,a){var o=\"const-\"+i+\"-lines\",s=r.selectAll(\".\"+o).data(a);s.enter().append(\"path\").classed(o,!0).style(\"vector-effect\",\"non-scaling-stroke\"),s.each(function(r){var n=r,i=n.x,a=n.y,o=u([],i,t.c2p),s=u([],a,e.c2p),c=\"M\"+f(o,s,n.smoothing);l.select(this).attr(\"d\",c).style(\"stroke-width\",n.width).style(\"stroke\",n.color).style(\"fill\",\"none\")}),s.exit().remove()}function o(t,e,r,n,i,a,o,s){var u=a.selectAll(\"text.\"+s).data(o);u.enter().append(\"text\").classed(s,!0);var f=0,p={};return u.each(function(i,a){var o;if(\"auto\"===i.axis.tickangle)o=h(n,e,r,i.xy,i.dxy);else{var s=(i.axis.tickangle+180)*Math.PI/180;o=h(n,e,r,i.xy,[Math.cos(s),Math.sin(s)])}a||(p={angle:o.angle,flip:o.flip});var u=(i.endAnchor?-1:1)*o.flip,m=l.select(this).attr({\"text-anchor\":u>0?\"start\":\"end\",\"data-notex\":1}).call(c.font,i.font).text(i.text).call(d.convertToTspans,t),g=c.bBox(this);m.attr(\"transform\",\"translate(\"+o.p[0]+\",\"+o.p[1]+\") rotate(\"+o.angle+\")translate(\"+i.axis.labelpadding*u+\",\"+.3*g.height+\")\"),f=Math.max(f,g.width+i.axis.labelpadding)}),u.exit().remove(),p.maxExtent=f,p}function s(t,e,r,n,i,a,o,s,u,f,p){var m=[];o.title&&m.push(o.title);var y=e.selectAll(\"text.\"+p).data(m),x=f.maxExtent;y.enter().append(\"text\").classed(p,!0),y.each(function(){var e=h(r,s,u,i,a);-1===[\"start\",\"both\"].indexOf(o.showticklabels)&&(x=0);var n=o.titlefont.size;x+=n+o.titleoffset;var p=(f.angle+(f.flip<0?180:0)-e.angle+450)%360,m=p>90&&p<270,y=l.select(this);y.text(o.title||\"\").call(d.convertToTspans,t),m&&(x=(-d.lineCount(y)+v)*g*n-x),y.attr(\"transform\",\"translate(\"+e.p[0]+\",\"+e.p[1]+\") rotate(\"+e.angle+\") translate(0,\"+x+\")\").classed(\"user-select-none\",!0).attr(\"text-anchor\",\"middle\").call(c.font,o.titlefont)}),y.exit().remove()}var l=t(\"d3\"),c=t(\"../../components/drawing\"),u=t(\"./map_1d_array\"),f=t(\"./makepath\"),h=t(\"./orient_text\"),d=t(\"../../lib/svg_text_utils\"),p=t(\"../../lib\"),m=t(\"../../constants/alignment\");e.exports=function(t,e,r){for(var n=0;n<r.length;n++)i(t,e,r[n])};var g=m.LINE_SPACING,v=(1-m.MID_SHIFT)/g+1},{\"../../components/drawing\":643,\"../../constants/alignment\":716,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"./makepath\":932,\"./map_1d_array\":933,\"./orient_text\":935,d3:128}],937:[function(t,e,r){\"use strict\";var n=t(\"./constants\"),i=t(\"../../lib/search\").findBin,a=t(\"./compute_control_points\"),o=t(\"./create_spline_evaluator\"),s=t(\"./create_i_derivative_evaluator\"),l=t(\"./create_j_derivative_evaluator\");e.exports=function(t){var e=t.a,r=t.b,c=t.a.length,u=t.b.length,f=t.aaxis,h=t.baxis,d=e[0],p=e[c-1],m=r[0],g=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;d-=x,p+=x,m-=b,g+=b,t.isVisible=function(t,e){return t>d&&t<p&&e>m&&e<g},t.isOccluded=function(t,e){return t<d||t>p||e<m||e>g},f.c2p=function(t){return t},h.c2p=function(t){return t},t.setScale=function(){var e=t.x,r=t.y,n=a(t.xctrl,t.yctrl,e,r,f.smoothing,h.smoothing);t.xctrl=n[0],t.yctrl=n[1],t.evalxy=o([t.xctrl,t.yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t.xctrl,t.yctrl],f.smoothing,h.smoothing),t.dxydj=l([t.xctrl,t.yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-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]),c-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),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-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&&(n<e[0]||n>e[c-1]|i<r[0]||i>r[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,d,p,m=0,g=0,v=[];n<e[0]?(f=0,h=0,m=(n-e[0])/(e[1]-e[0])):n>e[c-1]?(f=c-2,h=1,m=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),i<r[0]?(d=0,p=0,g=(i-r[0])/(r[1]-r[0])):i>r[u-1]?(d=u-2,p=1,g=(i-r[u-1])/(r[u-1]-r[u-2])):p=s-(d=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(t.dxydi(v,f,d,h,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(t.dxydj(v,f,d,h,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\":761,\"./compute_control_points\":923,\"./constants\":924,\"./create_i_derivative_evaluator\":925,\"./create_j_derivative_evaluator\":926,\"./create_spline_evaluator\":927}],938:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){function i(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e<u-1&&void 0!==(n=t[r][e+1])&&(a++,i+=n),r>0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r<f-1&&void 0!==(n=t[r+1][e])&&(a++,i+=n),i/Math.max(1,a)}var a,o,s,l=[],c=[],u=t[0].length,f=t.length,h=0;for(a=0;a<u;a++)for(o=0;o<f;o++)void 0===t[o][a]&&(l.push(a),c.push(o),t[o][a]=i(a,o)),h=Math.max(h,Math.abs(t[o][a]));if(!l.length)return t;var d,p,m,g,v,y,x,b,_,w,M,k=0,A=0,T=l.length;do{for(k=0,s=0;s<T;s++){a=l[s],o=c[s];var S,E,L,C,z,D,I=0,P=0;0===a?(L=e[z=Math.min(u-1,2)],C=e[1],S=t[o][z],P+=(E=t[o][1])+(E-S)*(e[0]-C)/(C-L),I++):a===u-1&&(L=e[z=Math.max(0,u-3)],C=e[u-2],S=t[o][z],P+=(E=t[o][u-2])+(E-S)*(e[u-1]-C)/(C-L),I++),(0===a||a===u-1)&&o>0&&o<f-1&&(d=r[o+1]-r[o],P+=((p=r[o]-r[o-1])*t[o+1][a]+d*t[o-1][a])/(p+d),I++),0===o?(L=r[D=Math.min(f-1,2)],C=r[1],S=t[D][a],P+=(E=t[1][a])+(E-S)*(r[0]-C)/(C-L),I++):o===f-1&&(L=r[D=Math.max(0,f-3)],C=r[f-2],S=t[D][a],P+=(E=t[f-2][a])+(E-S)*(r[f-1]-C)/(C-L),I++),(0===o||o===f-1)&&a>0&&a<u-1&&(d=e[a+1]-e[a],P+=((p=e[a]-e[a-1])*t[o][a+1]+d*t[o][a-1])/(p+d),I++),I?P/=I:(m=e[a+1]-e[a],g=e[a]-e[a-1],b=(v=r[o+1]-r[o])*(y=r[o]-r[o-1])*(v+y),P=((x=m*g*(m+g))*(y*t[o+1][a]+v*t[o-1][a])+b*(g*t[o][a+1]+m*t[o][a-1]))/(b*(g+m)+x*(y+v))),k+=(w=(_=P-t[o][a])/h)*w,M=I?0:.85,t[o][a]+=_*(1+M)}k=Math.sqrt(k)}while(A++<100&&k>1e-5);return n.log(\"Smoother converged to\",k,\"after\",A,\"iterations\"),t}},{\"../../lib\":743}],939:[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\":981,\"./has_columns\":929}],940:[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\"),l=s.extendFlat,c=s.extendDeepAll,u=n.marker.line;e.exports=l({locations:{valType:\"data_array\",editType:\"calc\"},locationmode:n.locationmode,z:{valType:\"data_array\",editType:\"calc\"},text:l({},n.text,{}),marker:{line:{color:u.color,width:l({},u.width,{dflt:1}),editType:\"calc\"},opacity:{valType:\"number\",arrayOk:!0,min:0,max:1,dflt:1,editType:\"style\"},editType:\"calc\"},selected:{marker:{opacity:n.selected.marker.opacity,editType:\"plot\"},editType:\"plot\"},unselected:{marker:{opacity:n.unselected.marker.opacity,editType:\"plot\"},editType:\"plot\"},hoverinfo:l({},o.hoverinfo,{editType:\"calc\",flags:[\"location\",\"z\",\"text\",\"name\"]})},c({},i,{zmax:{editType:\"calc\"},zmin:{editType:\"calc\"}}),{colorbar:a})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scattergeo/attributes\":1104}],941:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../components/colorscale/calc\"),o=t(\"../scatter/arrays_to_calcdata\"),s=t(\"../scatter/calc_selection\");e.exports=function(t,e){for(var r=e.locations.length,l=new Array(r),c=0;c<r;c++){var u=l[c]={},f=e.locations[c],h=e.z[c];u.loc=\"string\"==typeof f?f:null,u.z=n(h)?h:i}return o(l,e),a(e,e.z,\"\",\"z\"),s(l,e),l}},{\"../../components/colorscale/calc\":625,\"../../constants/numerical\":721,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc_selection\":1068,\"fast-isnumeric\":140}],942:[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,c=s(\"locations\");if(c&&(l=c.length),c&&l){var u=s(\"z\");Array.isArray(u)?(u.length>l&&(e.z=u.slice(0,l)),s(\"locationmode\"),s(\"text\"),s(\"marker.line.color\"),s(\"marker.line.width\"),s(\"marker.opacity\"),i(t,e,o,s,{prefix:\"\",cLetter:\"z\"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"./attributes\":940}],943:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.location=e.location,t.z=e.z,t}},{}],944:[function(t,e,r){\"use strict\";var n=t(\"../../plots/cartesian/axes\"),i=t(\"./attributes\"),a=t(\"../scatter/fill_hover_text\");e.exports=function(t,e,r){var o,s,l,c,u=t.cd,f=u[0].trace,h=t.subplot;for(s=0;s<u.length;s++)if(o=u[s],c=!1,o._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains([e,r])&&(c=!c),o._polygons[l].contains([e+360,r])&&(c=!c);if(c)break}if(c&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,function(t,e,r,o){var s=r.hi||e.hoverinfo,l=\"all\"===s?i.hoverinfo.flags:s.split(\"+\"),c=-1!==l.indexOf(\"name\"),u=-1!==l.indexOf(\"location\"),f=-1!==l.indexOf(\"z\"),h=-1!==l.indexOf(\"text\"),d=[];!c&&u?t.nameOverride=r.loc:(c&&(t.nameOverride=e.name),u&&d.push(r.loc)),f&&d.push(function(t){return n.tickText(o,o.c2l(t),\"hover\").text}(r.z)),h&&a(r,e,d),t.extraText=d.join(\"<br>\")}(t,f,o,h.mockAxis),[t]}},{\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074,\"./attributes\":940}],945:[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.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"choropleth\",n.basePlotModule=t(\"../../plots/geo\"),n.categories=[\"geo\",\"noOpacity\"],n.meta={},e.exports=n},{\"../../plots/geo\":820,\"../heatmap/colorbar\":980,\"./attributes\":940,\"./calc\":941,\"./defaults\":942,\"./event_data\":943,\"./hover\":944,\"./plot\":946,\"./select\":947,\"./style\":948}],946:[function(t,e,r){\"use strict\";function n(t,e){for(var r=t[0].trace,n=t.length,i=s(r,e),a=0;a<n;a++){var c=t[a],u=l(r.locationmode,c.loc,i);u?(c.geojson=u,c.ct=u.properties.ct,c.index=a,c._polygons=function(t){function e(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}var r,n,i,a,s=t.geometry,l=s.coordinates,c=t.id,u=[];r=\"RUS\"===c||\"FJI\"===c?function(t){var r;if(null===e(t))r=t;else for(r=new Array(t.length),a=0;a<t.length;a++)r[a]=[t[a][0]<0?t[a][0]+360:t[a][0],t[a][1]];u.push(o.tester(r))}:\"ATA\"===c?function(t){var r=e(t);if(null===r)return u.push(o.tester(t));var n=new Array(t.length+1),i=0;for(a=0;a<t.length;a++)a>r?n[i++]=[t[a][0]+360,t[a][1]]:a===r?(n[i++]=t[a],n[i++]=[t[a][0],-90]):n[i++]=t[a];var s=o.tester(n);s.pts.pop(),u.push(s)}:function(t){u.push(o.tester(t))};switch(s.type){case\"MultiPolygon\":for(n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)r(l[n][i]);break;case\"Polygon\":for(n=0;n<l.length;n++)r(l[n])}return u}(u)):c.geojson=null}}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../lib/polygon\"),s=t(\"../../lib/topojson_utils\").getTopojsonFeatures,l=t(\"../../lib/geo_location_utils\").locationToFeature,c=t(\"./style\");e.exports=function(t,e,r){for(var o=0;o<r.length;o++)n(r[o],e.topojson);var s=e.layers.backplot.select(\".choroplethlayer\").selectAll(\"g.trace.choropleth\").data(r,function(t){return t[0].trace.uid});s.enter().append(\"g\").attr(\"class\",\"trace choropleth\"),s.exit().remove(),s.each(function(e){var r=(e[0].node3=i.select(this)).selectAll(\"path.choroplethlocation\").data(a.identity);r.enter().append(\"path\").classed(\"choroplethlocation\",!0),r.exit().remove(),c(t,e)})}},{\"../../lib\":743,\"../../lib/geo_location_utils\":735,\"../../lib/polygon\":755,\"../../lib/topojson_utils\":769,\"./style\":948,d3:128}],947:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=c.c2p(i),e.contains([a,o])?(u.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return u}},{}],948:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../../components/drawing\"),o=t(\"../../components/colorscale\");e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,s=e[0].node3.selectAll(\".choroplethlocation\"),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFunc(o.extractScale(r.colorscale,r.zmin,r.zmax));s.each(function(t){n.select(this).attr(\"fill\",u(t.z)).call(i.stroke,t.mlc||c.color).call(a.dashLine,\"\",t.mlw||c.width||0).style(\"opacity\",l.opacity)}),a.selectedPointStyle(s,r)}(0,e)}},{\"../../components/color\":618,\"../../components/colorscale\":633,\"../../components/drawing\":643,d3:128}],949:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../components/drawing/attributes\").dash,l=t(\"../../plots/font_attributes\"),c=t(\"../../lib/extend\").extendFlat,u=i.line;e.exports=c({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,connectgaps:n.connectgaps,autocontour:{valType:\"boolean\",dflt:!0,editType:\"calc\",impliedEdits:{\"contours.start\":void 0,\"contours.end\":void 0,\"contours.size\":void 0}},ncontours:{valType:\"integer\",dflt:15,min:1,editType:\"calc\"},contours:{start:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},end:{valType:\"number\",dflt:null,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},size:{valType:\"number\",dflt:null,min:0,editType:\"plot\",impliedEdits:{\"^autocontour\":!1}},coloring:{valType:\"enumerated\",values:[\"fill\",\"heatmap\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:{valType:\"boolean\",dflt:!0,editType:\"plot\"},showlabels:{valType:\"boolean\",dflt:!1,editType:\"plot\"},labelfont:l({editType:\"plot\",colorEditType:\"style\"}),labelformat:{valType:\"string\",dflt:\"\",editType:\"plot\"},editType:\"calc\",impliedEdits:{autocontour:!1}},line:{color:c({},u.color,{editType:\"style+colorbars\"}),width:c({},u.width,{editType:\"style+colorbars\"}),dash:s,smoothing:c({},u.smoothing,{}),editType:\"plot\"}},a,{autocolorscale:c({},a.autocolorscale,{dflt:!1}),zmin:c({},a.zmin,{editType:\"calc\"}),zmax:c({},a.zmax,{editType:\"calc\"})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"../heatmap/attributes\":977,\"../scatter/attributes\":1066}],950:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"linear\",range:[t,e]};return i.autoTicks(n,(e-t)/(r||15)),n}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\").extendFlat,o=t(\"../heatmap/calc\");e.exports=function(t,e){var r=o(t,e),s=e.contours;if(!1!==e.autocontour){var l=n(e.zmin,e.zmax,e.ncontours);s.size=l.dtick,s.start=i.tickFirst(l),l.range.reverse(),s.end=i.tickFirst(l),s.start===e.zmin&&(s.start+=s.size),s.end===e.zmax&&(s.end-=s.size),s.start>s.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 c=s.start,u=s.end,f=e._input.contours;if(c>u&&(s.start=f.start=u,u=s.end=f.end=c,c=s.start),!(s.size>0)){var h;h=c===u?1:n(c,u,e.ncontours).dtick,f.size=s.size=h}}return r}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../heatmap/calc\":978}],951:[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){var l=i(t,s);e[0].t.cb=l;var c=r.contours,u=r.line,f=c.size||1,h=c.coloring,d=a(r,{isColorbar:!0});\"heatmap\"===h&&l.filllevels({start:r.zmin,end:r.zmax,size:(r.zmax-r.zmin)/254}),l.fillcolor(\"fill\"===h||\"heatmap\"===h?d:\"\").line({color:\"lines\"===h?d:u.color,width:!1!==c.showlines?u.width:0,dash:u.dash}).levels({start:c.start,end:o(c),size:f}).options(r.colorbar)()}else n.autoMargin(t,s)}},{\"../../components/colorbar/draw\":622,\"../../plots/plots\":852,\"./end_plus\":955,\"./make_color_map\":959}],952:[function(t,e,r){\"use strict\";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],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]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],953:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\");e.exports=function(t,e,r){var a=n.coerce2(t,e,i,\"contours.start\"),o=n.coerce2(t,e,i,\"contours.end\"),s=!1===a||!1===o,l=r(\"contours.size\");!(s?e.autocontour=!0:r(\"autocontour\",!1))&&l||r(\"ncontours\")}},{\"../../lib\":743,\"./attributes\":949}],954:[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,c){function u(r,i){return n.coerce(t,e,l,r,i)}a(t,e,u,c)?(u(\"text\"),u(\"connectgaps\",i(e)),o(t,e,u),s(t,e,u,c)):e.visible=!1}},{\"../../lib\":743,\"../heatmap/has_columns\":984,\"../heatmap/xyz_defaults\":993,\"./attributes\":949,\"./contours_defaults\":953,\"./style_defaults\":963}],955:[function(t,e,r){\"use strict\";e.exports=function(t){return t.end+t.size/1e6}},{}],956:[function(t,e,r){\"use strict\";function n(t,e,r,n){return Math.abs(t[0]-e[0])<r&&Math.abs(t[1]-e[1])<n}function i(t,e){var r=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+n*n)}function a(t,e,r,a,c){function u(t){return g[t%g.length]}var f,h=e.join(\",\"),d=h,p=t.crossings[d],m=function(t,e,r){var n=0,i=0;t>20&&e?208===t||1114===t?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==l.BOTTOMSTART.indexOf(t)?i=1:-1!==l.LEFTSTART.indexOf(t)?n=1:-1!==l.TOPSTART.indexOf(t)?i=-1:n=-1;return[n,i]}(p,r,e),g=[o(t,e,[-m[0],-m[1]])],v=m.join(\",\"),y=t.z.length,x=t.z[0].length;for(f=0;f<1e4;f++){if(p>20?(p=l.CHOOSESADDLE[p][(m[0]||m[1])<0?0:1],t.crossings[d]=l.SADDLEREMAINDER[p]):delete t.crossings[d],!(m=l.NEWDELTA[p])){s.log(\"Found bad marching index:\",p,e,t.level);break}g.push(o(t,e,m)),e[0]+=m[0],e[1]+=m[1],n(g[g.length-1],g[g.length-2],a,c)&&g.pop(),d=e.join(\",\");var b=m[0]&&(e[0]<0||e[0]>x-2)||m[1]&&(e[1]<0||e[1]>y-2);if(d===h&&m.join(\",\")===v||r&&b)break;p=t.crossings[d]}1e4===f&&s.log(\"Infinite loop in contour?\");var _,w,M,k,A,T,S,E,L,C,z,D=n(g[0],g[g.length-1],a,c),I=0,P=.2*t.smoothing,O=[],F=0;for(f=1;f<g.length;f++)I+=S=i(g[f],g[f-1]),O.push(S);var R=I/O.length*P;for(f=g.length-2;f>=F;f--)if((_=O[f])<R){for(M=0,w=f-1;w>=F&&_+O[w]<R;w--)_+=O[w];if(D&&f===g.length-2)for(M=0;M<w&&_+O[M]<R;M++)_+=O[M];A=f-w+M+1,T=Math.floor((f+w+M+2)/2),k=D||f!==g.length-2?D||-1!==w?A%2?u(T):[(u(T)[0]+u(T+1)[0])/2,(u(T)[1]+u(T+1)[1])/2]:g[0]:g[g.length-1],g.splice(w+1,f-w+1,k),f=w+1,M&&(F=M),D&&(f===g.length-2?g[M]=g[g.length-1]:0===f&&(g[g.length-1]=g[0]))}for(g.splice(0,F),f=0;f<g.length;f++)g[f].length=2;if(!(g.length<2))if(D)g.pop(),t.paths.push(g);else{r||s.log(\"Unclosed interior contour?\",t.level,h,g.join(\"L\"));var N=!1;for(E=0;E<t.edgepaths.length;E++)if(C=t.edgepaths[E],!N&&n(C[0],g[g.length-1],a,c)){g.pop(),N=!0;var j=!1;for(L=0;L<t.edgepaths.length;L++)if(z=t.edgepaths[L],n(z[z.length-1],g[0],a,c)){j=!0,g.shift(),t.edgepaths.splice(E,1),L===E?t.paths.push(g.concat(z)):(L>E&&L--,t.edgepaths[L]=z.concat(g,C));break}j||(t.edgepaths[E]=g.concat(C))}for(E=0;E<t.edgepaths.length&&!N;E++)n((C=t.edgepaths[E])[C.length-1],g[0],a,c)&&(g.shift(),t.edgepaths[E]=C.concat(g),N=!0);N||t.edgepaths.push(g)}}function o(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),n+l,i]}var c=(t.level-a)/(t.z[i+1][n]-a);return[o.c2p(t.x[n],!0),s.c2p((1-c)*t.y[i]+c*t.y[i+1],!0),n,i+c]}var s=t(\"../../lib\"),l=t(\"./constants\");e.exports=function(t,e,r){var n,i,o,l;for(e=e||.01,r=r||.01,i=0;i<t.length;i++){for(o=t[i],l=0;l<o.starts.length;l++)a(o,o.starts[l],\"edge\",e,r);for(n=0;Object.keys(o.crossings).length&&n<1e4;)n++,a(o,Object.keys(o.crossings)[0].split(\",\").map(Number),void 0,e,r);1e4===n&&s.log(\"Infinite loop in contour?\")}}},{\"../../lib\":743,\"./constants\":952}],957:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/hover\");e.exports=function(t,e,r,i,a){return n(t,e,r,i,a,!0)}},{\"../heatmap/hover\":985}],958:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.plot=t(\"./plot\").plot,n.style=t(\"./style\"),n.colorbar=t(\"./colorbar\"),n.hoverPoints=t(\"./hover\"),n.moduleType=\"trace\",n.name=\"contour\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"contour\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":949,\"./calc\":950,\"./colorbar\":951,\"./defaults\":954,\"./hover\":957,\"./plot\":961,\"./style\":962}],959:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/colorscale\"),a=t(\"./end_plus\");e.exports=function(t){var e=t.contours,r=e.start,o=a(e),s=e.size||1,l=Math.floor((o-r)/s)+1,c=\"lines\"===e.coloring?0:1;isFinite(s)||(s=1,l=1);var u,f,h=t.colorscale,d=h.length,p=new Array(d),m=new Array(d);if(\"heatmap\"===e.coloring){for(t.zauto&&!1===t.autocontour&&(t.zmin=r-s/2,t.zmax=t.zmin+l*s),f=0;f<d;f++)u=h[f],p[f]=u[0]*(t.zmax-t.zmin)+t.zmin,m[f]=u[1];var g=n.extent([t.zmin,t.zmax,e.start,e.start+s*(l-1)]),v=g[t.zmin<t.zmax?0:1],y=g[t.zmin<t.zmax?1:0];v!==t.zmin&&(p.splice(0,0,v),m.splice(0,0,Range[0])),y!==t.zmax&&(p.push(y),m.push(m[m.length-1]))}else for(f=0;f<d;f++)u=h[f],p[f]=(u[0]*(l+c-1)-c/2)*s+r,m[f]=u[1];return i.makeColorScaleFunc({domain:p,range:m},{noNumericCheck:!0})}},{\"../../components/colorscale\":633,\"./end_plus\":955,d3:128}],960:[function(t,e,r){\"use strict\";var n=t(\"./constants\");e.exports=function(t){var e,r,i,a,o,s,l,c,u,f=t[0].z,h=f.length,d=f[0].length,p=2===h||2===d;for(r=0;r<h-1;r++)for(a=[],0===r&&(a=a.concat(n.BOTTOMSTART)),r===h-2&&(a=a.concat(n.TOPSTART)),e=0;e<d-1;e++)for(i=a.slice(),0===e&&(i=i.concat(n.LEFTSTART)),e===d-2&&(i=i.concat(n.RIGHTSTART)),o=e+\",\"+r,s=[[f[r][e],f[r][e+1]],[f[r+1][e],f[r+1][e+1]]],u=0;u<t.length;u++)(l=function(t,e){var r=(e[0][0]>t?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}((c=t[u]).level,s))&&(c.crossings[o]=l,-1!==i.indexOf(l)&&(c.starts.push([e,r]),p&&-1!==i.indexOf(l,i.indexOf(l)+1)&&c.starts.push([e,r])))}},{\"./constants\":952}],961:[function(t,e,r){\"use strict\";function n(t,e,n){var l=n[0].trace,c=n[0].x,u=n[0].y,g=l.contours,v=l.uid,y=e.xaxis,x=e.yaxis,b=t._fullLayout,_=\"contour\"+v,w=function(t,e,r){for(var n=t.size,i=[],a=p(t),s=t.start;s<a;s+=n)if(i.push({level:s,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:r.x,y:r.y,z:r.z,smoothing:r.trace.line.smoothing}),i.length>1e3){o.warn(\"Too many contours, clipping at 1000\",t);break}return i}(g,e,n[0]);if(!0!==l.visible)return b._paper.selectAll(\".\"+_+\",.hm\"+v).remove(),void b._infolayer.selectAll(\".cb\"+v).remove();\"heatmap\"===g.coloring?(l.zauto&&!1===l.autocontour&&(l._input.zmin=l.zmin=g.start-g.size/2,l._input.zmax=l.zmax=l.zmin+w.length*g.size),f(t,e,[n])):(b._paper.selectAll(\".hm\"+v).remove(),b._infolayer.selectAll(\"g.rangeslider-container\").selectAll(\".hm\"+v).remove()),h(w),d(w);var M=y.c2p(c[0],!0),k=y.c2p(c[c.length-1],!0),A=x.c2p(u[0],!0),T=x.c2p(u[u.length-1],!0),S=[[M,T],[k,T],[k,A],[M,A]],E=r.makeContourGroup(e,n,_);!function(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\")}(E,S,g),function(t,e,r,n){var o=t.selectAll(\"g.contourfill\").data([0]);o.enter().append(\"g\").classed(\"contourfill\",!0);var s=o.selectAll(\"path\").data(\"fill\"===n.coloring?e:[]);s.enter().append(\"path\"),s.exit().remove(),s.each(function(t){var e=i(t,r);e?a.select(this).attr(\"d\",e).style(\"stroke\",\"none\"):a.select(this).remove()})}(E,w,S,g),function(t,e,n,i,l,c){var u=t.selectAll(\"g.contourlines\").data([0]);u.enter().append(\"g\").classed(\"contourlines\",!0);var f=!1!==l.showlines,h=l.showlabels,d=f&&h,p=r.createLines(u,f||h,e),g=r.createLineClip(u,d,n._fullLayout._clips,i.trace.uid),v=t.selectAll(\"g.contourlabels\").data(h?[0]:[]);if(v.exit().remove(),v.enter().append(\"g\").classed(\"contourlabels\",!0),h){var y=[c],x=[];o.clearLocationCache();var b=r.labelFormatter(l,i.t.cb,n._fullLayout),_=s.tester.append(\"text\").attr(\"data-notex\",1).call(s.font,l.labelfont),w=e[0].xaxis._length,M=e[0].yaxis._length,k={left:Math.max(c[0][0],0),right:Math.min(c[2][0],w),top:Math.max(c[0][1],0),bottom:Math.min(c[2][1],M)};k.middle=(k.top+k.bottom)/2,k.center=(k.left+k.right)/2;var A=Math.sqrt(w*w+M*M),T=m.LABELDISTANCE*A/Math.max(1,e.length/m.LABELINCREASE);p.each(function(t){var e=r.calcTextOpts(t.level,b,_,n);a.select(this).selectAll(\"path\").each(function(){var t=o.getVisibleSegment(this,k,e.height/2);if(t&&!(t.len<(e.width+e.height)*m.LABELMIN))for(var n=Math.min(Math.ceil(t.len/T),m.LABELMAX),i=0;i<n;i++){var a=r.findBestTextLocation(this,t,e,x,k);if(!a)break;r.addLabelData(a,e,x,y)}})}),_.remove(),r.drawLabels(v,x,n,g,d?y:null)}h&&!f&&p.remove()}(E,w,t,n[0],g,S),function(t,e,r,n,a){var o=\"clip\"+n.trace.uid,l=r.selectAll(\"#\"+o).data(n.trace.connectgaps?[]:[0]);if(l.enter().append(\"clipPath\").classed(\"contourclip\",!0).attr(\"id\",o),l.exit().remove(),!1===n.trace.connectgaps){var c={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:e.xaxis,yaxis:e.yaxis,x:n.x,y:n.y,z:function(t){var e,r,n=t.trace._emptypoints,i=[],a=t.z.length,o=t.z[0].length,s=[];for(e=0;e<o;e++)s.push(1);for(e=0;e<a;e++)i.push(s.slice());for(e=0;e<n.length;e++)r=n[e],i[r[0]][r[1]]=0;return t.zmask=i,i}(n),smoothing:0};h([c]),d([c]);var u=i(c,a),f=l.selectAll(\"path\").data([0]);f.enter().append(\"path\"),f.attr(\"d\",u)}else o=null;t.call(s.setClipUrl,o),e.plot.selectAll(\".hm\"+n.trace.uid).call(s.setClipUrl,o)}(E,e,b._clips,n[0],S)}function i(t,e){function r(t){return Math.abs(t[1]-e[0][1])<.01}function n(t){return Math.abs(t[1]-e[2][1])<.01}function i(t){return Math.abs(t[0]-e[0][0])<.01}function a(t){return Math.abs(t[0]-e[2][0])<.01}for(var l,c,u,f,h,d,p=Math.min(t.z[0][0],t.z[0][1]),m=t.edgepaths.length||p<=t.level?\"\":\"M\"+e.join(\"L\")+\"Z\",g=0,v=t.edgepaths.map(function(t,e){return e}),y=!0;v.length;){for(d=s.smoothopen(t.edgepaths[g],t.smoothing),m+=y?d:d.replace(/^M/,\"L\"),v.splice(v.indexOf(g),1),l=t.edgepaths[g][t.edgepaths[g].length-1],f=-1,u=0;u<4;u++){if(!l){o.log(\"Missing end?\",g,t);break}for(r(l)&&!a(l)?c=e[1]:i(l)?c=e[0]:n(l)?c=e[3]:a(l)&&(c=e[2]),h=0;h<t.edgepaths.length;h++){var x=t.edgepaths[h][0];Math.abs(l[0]-c[0])<.01?Math.abs(l[0]-x[0])<.01&&(x[1]-l[1])*(c[1]-x[1])>=0&&(c=x,f=h):Math.abs(l[1]-c[1])<.01?Math.abs(l[1]-x[1])<.01&&(x[0]-l[0])*(c[0]-x[0])>=0&&(c=x,f=h):o.log(\"endpt to newendpt is not vert. or horz.\",l,c,x)}if(l=c,f>=0)break;m+=\"L\"+c}if(f===t.edgepaths.length){o.log(\"unclosed perimeter path\");break}g=f,(y=-1===v.indexOf(g))&&(g=v[0],m+=\"Z\")}for(g=0;g<t.paths.length;g++)m+=s.smoothclosed(t.paths[g],t.smoothing);return m}var a=t(\"d3\"),o=t(\"../../lib\"),s=t(\"../../components/drawing\"),l=t(\"../../lib/svg_text_utils\"),c=t(\"../../plots/cartesian/axes\"),u=t(\"../../plots/cartesian/set_convert\"),f=t(\"../heatmap/plot\"),h=t(\"./make_crossings\"),d=t(\"./find_all_paths\"),p=t(\"./end_plus\"),m=t(\"./constants\"),g=m.LABELOPTIMIZER;r.plot=function(t,e,r){for(var i=0;i<r.length;i++)n(t,e,r[i])},r.makeContourGroup=function(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},r.createLines=function(t,e,r){var n=r[0].smoothing,i=t.selectAll(\"g.contourlevel\").data(e?r:[]);if(i.exit().remove(),i.enter().append(\"g\").classed(\"contourlevel\",!0),e){var a=i.selectAll(\"path.openline\").data(function(t){return t.pedgepaths||t.edgepaths});a.exit().remove(),a.enter().append(\"path\").classed(\"openline\",!0),a.attr(\"d\",function(t){return s.smoothopen(t,n)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\");var o=i.selectAll(\"path.closedline\").data(function(t){return t.ppaths||t.paths});o.exit().remove(),o.enter().append(\"path\").classed(\"closedline\",!0),o.attr(\"d\",function(t){return s.smoothclosed(t,n)}).style(\"stroke-miterlimit\",1).style(\"vector-effect\",\"non-scaling-stroke\")}return i},r.createLineClip=function(t,e,r,n){var i=e?\"clipline\"+n:null,a=r.selectAll(\"#\"+i).data(e?[0]:[]);return a.exit().remove(),a.enter().append(\"clipPath\").classed(\"contourlineclip\",!0).attr(\"id\",i),s.setClipUrl(t,i),a},r.labelFormatter=function(t,e,r){if(t.labelformat)return r._d3locale.numberFormat(t.labelformat);var n;return e?n=e.axis:(n={type:\"linear\",_id:\"ycontour\",nticks:(t.end-t.start)/t.size,showexponent:\"all\",range:[t.start,t.end]},u(n,r),c.calcTicks(n),n._tmin=null,n._tmax=null),function(t){return c.tickText(n,t).text}},r.calcTextOpts=function(t,e,r,n){var i=e(t);r.text(i).call(l.convertToTspans,n);var a=s.bBox(r.node(),!0);return{text:i,width:a.width,height:a.height,level:t,dy:(a.top+a.bottom)/2}},r.findBestTextLocation=function(t,e,r,n,i){var a,s,l,c,u,f=r.width;e.isClosed?(s=e.len/g.INITIALSEARCHPOINTS,a=e.min+s/2,l=e.max):(s=(e.len-f)/(g.INITIALSEARCHPOINTS+1),a=e.min+s+f/2,l=e.max-(s+f)/2);for(var h=1/0,d=0;d<g.ITERATIONS;d++){for(var p=a;p<l;p+=s){var m=o.getTextLocation(t,e.total,p,f),v=function(t,e,r,n){var i=e.width/2,a=e.height/2,s=t.x,l=t.y,c=t.theta,u=Math.cos(c)*i,f=Math.sin(c)*i,h=(s>n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*a)),d=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*a);if(h<1||d<1)return 1/0;var p=g.EDGECOST*(1/(h-1)+1/(d-1));p+=g.ANGLECOST*c*c;for(var m=s-u,v=l-f,y=s+u,x=l+f,b=0;b<r.length;b++){var _=r[b],w=Math.cos(_.theta)*_.width/2,M=Math.sin(_.theta)*_.width/2,k=2*o.segmentDistance(m,v,y,x,_.x-w,_.y-M,_.x+w,_.y+M)/(e.height+_.height),A=_.level===e.level,T=A?g.SAMELEVELDISTANCE:1;if(k<=T)return 1/0;p+=g.NEIGHBORCOST*(A?g.SAMELEVELFACTOR:1)/(k-T)}return p}(m,r,n,i);v<h&&(h=v,u=m,c=p)}if(h>2*g.MAXCOST)break;d&&(s/=2),l=(a=c-s/2)+1.5*s}if(h<=g.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.width/2,a=e.height/2,o=t.x,s=t.y,l=t.theta,c=Math.sin(l),u=Math.cos(l),f=i*u,h=a*c,d=i*c,p=-a*u,m=[[o-f-h,s-d-p],[o+f-h,s+d-p],[o+f+h,s+d+p],[o-f+h,s-d+p]];r.push({text:e.text,x:o,y:s,dy:e.dy,theta:l,level:e.level,width:e.width,height:e.height}),n.push(m)},r.drawLabels=function(t,e,r,n,i){var o=t.selectAll(\"text\").data(e,function(t){return t.text+\",\"+t.x+\",\"+t.y+\",\"+t.theta});if(o.exit().remove(),o.enter().append(\"text\").attr({\"data-notex\":1,\"text-anchor\":\"middle\"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,n=t.y-Math.cos(t.theta)*t.dy;a.select(this).text(t.text).attr({x:e,y:n,transform:\"rotate(\"+180*t.theta/Math.PI+\" \"+e+\" \"+n+\")\"}).call(l.convertToTspans,r)}),i){for(var s=\"\",c=0;c<i.length;c++)s+=\"M\"+i[c].join(\"L\")+\"Z\";var u=n.selectAll(\"path\").data([0]);u.enter().append(\"path\"),u.attr(\"d\",s)}}},{\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/svg_text_utils\":766,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/set_convert\":808,\"../heatmap/plot\":990,\"./constants\":952,\"./end_plus\":955,\"./find_all_paths\":956,\"./make_crossings\":960,d3:128}],962:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../heatmap/style\"),o=t(\"./make_color_map\");e.exports=function(t){var e=n.select(t).selectAll(\"g.contour\");e.style(\"opacity\",function(t){return t.trace.opacity}),e.each(function(t){var e=n.select(this),r=t.trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u=\"constraint\"===a.type,f=!u&&\"lines\"===a.coloring,h=!u&&\"fill\"===a.coloring,d=f||h?o(r):null;e.selectAll(\"g.contourlevel\").each(function(t){n.select(this).selectAll(\"path\").call(i.lineGroupStyle,s.width,f?d(t.level):s.color,s.dash)});var p=a.labelfont;if(e.selectAll(\"g.contourlabels text\").each(function(t){i.font(n.select(this),{family:p.family,size:p.size,color:p.color||(f?d(t.level):s.color)})}),u)e.selectAll(\"g.contourfill path\").style(\"fill\",r.fillcolor);else if(h){var m;e.selectAll(\"g.contourfill path\").style(\"fill\",function(t){return void 0===m&&(m=t.level),d(t.level+.5*l)}),void 0===m&&(m=c),e.selectAll(\"g.contourbg path\").style(\"fill\",d(m-.5*l))}}),a(t)}},{\"../../components/drawing\":643,\"../heatmap/style\":991,\"./make_color_map\":959,d3:128}],963:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/defaults\"),i=t(\"../../lib\");e.exports=function(t,e,r,a,o){o||(o={});var s,l=r(\"contours.coloring\"),c=\"\";\"fill\"===l&&(s=r(\"contours.showlines\")),!1!==s&&(\"lines\"!==l&&(c=r(\"line.color\",o.defaultColor||\"#000\")),r(\"line.width\",void 0===o.defaultWidth?.5:o.defaultWidth),r(\"line.dash\")),r(\"line.smoothing\"),\"none\"!==l&&n(t,e,a,r,{prefix:\"\",cLetter:\"z\"});if(r(\"contours.showlabels\")){var u=a.font;i.coerceFont(r,\"contours.labelfont\",{family:u.family,size:u.size,color:c}),r(\"contours.labelformat\")}!1!==o.hasHover&&r(\"zhoverformat\")}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743}],964:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/attributes\"),i=t(\"../contour/attributes\"),a=i.contours,o=t(\"../scatter/attributes\"),s=t(\"../../components/colorscale/attributes\"),l=t(\"../../components/colorbar/attributes\"),c=t(\"../../lib/extend\").extendFlat,u=o.line,f=t(\"./constants\");e.exports=c({},{carpet:{valType:\"string\",editType:\"calc\"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,transpose:n.transpose,atype:n.xtype,btype:n.ytype,mode:{valType:\"flaglist\",flags:[\"lines\",\"fill\"],extras:[\"none\"],editType:\"calc\"},connectgaps:n.connectgaps,fillcolor:{valType:\"color\",editType:\"calc\"},autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:{valType:\"enumerated\",values:[\"levels\",\"constraint\"],dflt:\"levels\",editType:\"calc\"},start:a.start,end:a.end,size:a.size,coloring:{valType:\"enumerated\",values:[\"fill\",\"lines\",\"none\"],dflt:\"fill\",editType:\"calc\"},showlines:a.showlines,showlabels:a.showlabels,labelfont:a.labelfont,labelformat:a.labelformat,operation:{valType:\"enumerated\",values:[].concat(f.INEQUALITY_OPS).concat(f.INTERVAL_OPS).concat(f.SET_OPS),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},editType:\"calc\"},line:{color:c({},u.color,{}),width:u.width,dash:u.dash,smoothing:c({},u.smoothing,{}),editType:\"plot\"}},s,{autocolorscale:c({},s.autocolorscale,{dflt:!1})},{colorbar:l})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../contour/attributes\":949,\"../heatmap/attributes\":977,\"../scatter/attributes\":1066,\"./constants\":967}],965:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"linear\",range:[t,e]};return i.autoTicks(n,(e-t)/(r||15)),n}var i=t(\"../../plots/cartesian/axes\"),a=t(\"../../lib\").extendFlat,o=t(\"../../components/colorscale/calc\"),s=t(\"../heatmap/has_columns\"),l=t(\"../heatmap/convert_column_xyz\"),c=t(\"../heatmap/clean_2d_array\"),u=t(\"../heatmap/max_row_length\"),f=t(\"../heatmap/interp2d\"),h=t(\"../heatmap/find_empties\"),d=t(\"../heatmap/make_bound_array\"),p=t(\"./defaults\"),m=t(\"../carpet/lookup_carpetid\");e.exports=function(t,e){var r=e.carpetTrace=m(t,e);if(r&&r.visible&&\"legendonly\"!==r.visible){if(!e.a||!e.b){var g=t.data[r.index],v=t.data[e.index];v.a||(v.a=g.a),v.b||(v.b=g.b),p(v,e,e._defaultColor,t._fullLayout)}var y=function(t,e){var r,n,i,a,p,m,g,v=e.carpetTrace,y=v.aaxis,x=v.baxis;y._minDtick=0,x._minDtick=0,s(e)&&l(e,y,x,\"a\",\"b\",[\"z\"]),r=e.a?y.makeCalcdata(e,\"a\"):[],a=e.b?x.makeCalcdata(e,\"b\"):[],n=e.a0||0,i=e.da||1,p=e.b0||0,m=e.db||1,g=c(e.z,e.transpose),e._emptypoints=h(g),e._interpz=f(g,e._emptypoints,e._interpz);var b=u(g),_=\"scaled\"===e.xtype?\"\":r,w=d(e,_,n,i,b,y),M=\"scaled\"===e.ytype?\"\":a,k={a:w,b:d(e,M,p,m,g.length,x),z:g};return\"levels\"===e.contours.type&&o(e,g,\"\",\"z\"),[k]}(0,e),x=e.contours;if(!0===e.autocontour){var b=n(e.zmin,e.zmax,e.ncontours);x.size=b.dtick,x.start=i.tickFirst(b),b.range.reverse(),x.end=i.tickFirst(b),x.start===e.zmin&&(x.start+=x.size),x.end===e.zmax&&(x.end-=x.size),x.start>x.end&&(x.start=x.end=(x.start+x.end)/2),e._input.contours=a({},x)}else{var _=x.start,w=x.end,M=e._input.contours;if(_>w&&(x.start=M.start=w,w=x.end=M.end=_,_=x.start),!(x.size>0)){var k;k=_===w?1:n(_,w,e.ncontours).dtick,M.size=x.size=k}}return y}}},{\"../../components/colorscale/calc\":625,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../carpet/lookup_carpetid\":931,\"../heatmap/clean_2d_array\":979,\"../heatmap/convert_column_xyz\":981,\"../heatmap/find_empties\":983,\"../heatmap/has_columns\":984,\"../heatmap/interp2d\":987,\"../heatmap/make_bound_array\":988,\"../heatmap/max_row_length\":989,\"./defaults\":971}],966:[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,c=n.z,u=-1/0,f=1/0;for(i=0;i<l;i++)f=Math.min(f,c[i][0]),f=Math.min(f,c[i][s-1]),u=Math.max(u,c[i][0]),u=Math.max(u,c[i][s-1]);for(i=1;i<s-1;i++)f=Math.min(f,c[0][i]),f=Math.min(f,c[l-1][i]),u=Math.max(u,c[0][i]),u=Math.max(u,c[l-1][i]);switch(e){case\">\":case\">=\":n.contours.value>u&&(t[0].prefixBoundary=!0);break;case\"<\":case\"<=\":n.contours.value<f&&(t[0].prefixBoundary=!0);break;case\"[]\":case\"()\":a=Math.min.apply(null,n.contours.value),(o=Math.max.apply(null,n.contours.value))<f&&(t[0].prefixBoundary=!0),a>u&&(t[0].prefixBoundary=!0);break;case\"][\":case\")(\":a=Math.min.apply(null,n.contours.value),o=Math.max.apply(null,n.contours.value),a<f&&o>u&&(t[0].prefixBoundary=!0)}}},{}],967:[function(t,e,r){\"use strict\";e.exports={INEQUALITY_OPS:[\"=\",\"<\",\">=\",\">\",\"<=\"],INTERVAL_OPS:[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],SET_OPS:[\"{}\",\"}{\"]}},{}],968:[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-1!==o.INEQUALITY_OPS.indexOf(t)?n=r(i?e[0]:e):-1!==o.INTERVAL_OPS.indexOf(t)?n=i?[r(e[0]),r(e[1])]:[r(e),r(e)]:-1!==o.SET_OPS.indexOf(t)&&(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\":967,\"fast-isnumeric\":140}],969:[function(t,e,r){\"use strict\";var n=t(\"./constraint_mapping\"),i=t(\"fast-isnumeric\");e.exports=function(t,e){var r;-1===[\"=\",\"<\",\"<=\",\">\",\">=\"].indexOf(e.operation)?(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\":968,\"fast-isnumeric\":140}],970:[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<i.edgepaths.length;r++)i.edgepaths[r]=o(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=o(i.paths[r]);for(;a.edgepaths.length;)i.edgepaths.push(s(a.edgepaths.shift()));for(;a.paths.length;)i.paths.push(s(a.paths.shift()));t.pop();break;case\">=\":case\">\":if(1!==t.length)return void n.warn(\"Contour data invalid for the specified inequality operation.\");for(i=t[0],r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=o(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=o(i.paths[r])}}},{\"../../lib\":743}],971:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../heatmap/xyz_defaults\"),a=t(\"./attributes\"),o=t(\"../contour/style_defaults\"),s=t(\"../scatter/fillcolor_defaults\"),l=t(\"../../plots/attributes\"),c=t(\"./constraint_value_defaults\"),u=t(\"../../components/color\").addOpacity;e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}if(h(\"carpet\"),t.a&&t.b){var d,p,m;if(!i(t,e,h,f,\"a\",\"b\"))return void(e.visible=!1);h(\"text\"),h(\"contours.type\");var g=e.contours;if(\"constraint\"===g.type){h(\"contours.operation\"),c(h,g),n.coerce(t,e,l,\"showlegend\",!0),h(\"contours.coloring\",\"=\"===g.operation?\"lines\":\"fill\"),h(\"contours.showlines\",!0),\"=\"===g.operation&&(g.coloring=\"lines\"),s(t,e,r,h);var v=e.fillcolor?u(e.fillcolor,1):r;o(t,e,h,f,{hasHover:!1,defaultColor:v,defaultWidth:2}),\"=\"===g.operation&&(h(\"line.color\",r),\"fill\"===g.coloring&&(g.coloring=\"lines\"),\"lines\"===g.coloring&&delete e.fillcolor),delete e.showscale,delete e.autocontour,delete e.autocolorscale,delete e.colorscale,delete e.ncontours,delete e.colorbar,e.line&&(delete e.line.autocolorscale,delete e.line.colorscale,delete e.line.mincolor,delete e.line.maxcolor)}else n.coerce(t,e,l,\"showlegend\",!1),p=n.coerce2(t,e,a,\"contours.start\"),m=n.coerce2(t,e,a,\"contours.end\"),d=h(\"contours.size\"),h(\"contours.coloring\"),!(!1===p||!1===m?e.autocontour=!0:h(\"autocontour\",!1))&&d||h(\"ncontours\"),o(t,e,h,f,{hasHover:!1}),delete e.value,delete e.operation}else e._defaultColor=r}},{\"../../components/color\":618,\"../../lib\":743,\"../../plots/attributes\":787,\"../contour/style_defaults\":963,\"../heatmap/xyz_defaults\":993,\"../scatter/fillcolor_defaults\":1075,\"./attributes\":964,\"./constraint_value_defaults\":969}],972:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r){for(var i=t.size,a=[],o=r.trace.carpetTrace,s=t.start;s<t.end+i/10;s+=i)if(a.push({level:s,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:o.aaxis,yaxis:o.baxis,x:r.a,y:r.b,z:r.z,smoothing:r.trace.line.smoothing}),a.length>1e3){n.warn(\"Too many contours, clipping at 1000\",t);break}return a}},{\"../../lib\":743}],973:[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(\"../contour/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\":800,\"../contour/colorbar\":951,\"../contour/style\":962,\"./attributes\":964,\"./calc\":965,\"./defaults\":971,\"./plot\":976}],974:[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,c,u){function f(t){return Math.abs(t[1]-r[0][1])<S}function h(t){return Math.abs(t[1]-r[2][1])<S}function d(t){return Math.abs(t[0]-r[0][0])<T}function p(t){return Math.abs(t[0]-r[2][0])<T}function m(t,e){var r,n,a,o,m=\"\";for(f(t)&&!p(t)||h(t)&&!d(t)?(o=s.aaxis,a=i(s,l,[t[0],e[0]],.5*(t[1]+e[1]))):(o=s.baxis,a=i(s,l,.5*(t[0]+e[0]),[t[1],e[1]])),r=1;r<a.length;r++)for(m+=o.smoothing?\"C\":\"L\",n=0;n<a[r].length;n++){var g=a[r][n];m+=[c.c2p(g[0]),u.c2p(g[1])]+\" \"}return m}var g,v,y,x,b,_,w,M=\"\",k=e.edgepaths.map(function(t,e){return e}),A=!0,T=1e-4*Math.abs(r[0][0]-r[2][0]),S=1e-4*Math.abs(r[0][1]-r[2][1]);for(g=0,v=null;k.length;){var E=e.edgepaths[g][0];for(v&&(M+=m(v,E)),w=n.smoothopen(e.edgepaths[g].map(o),e.smoothing),M+=A?w:w.replace(/^M/,\"L\"),k.splice(k.indexOf(g),1),v=e.edgepaths[g][e.edgepaths[g].length-1],b=-1,x=0;x<4;x++){if(!v){a.log(\"Missing end?\",g,e);break}for(f(v)&&!p(v)?y=r[1]:d(v)?y=r[0]:h(v)?y=r[3]:p(v)&&(y=r[2]),_=0;_<e.edgepaths.length;_++){var L=e.edgepaths[_][0];Math.abs(v[0]-y[0])<T?Math.abs(v[0]-L[0])<T&&(L[1]-v[1])*(y[1]-L[1])>=0&&(y=L,b=_):Math.abs(v[1]-y[1])<S?Math.abs(v[1]-L[1])<S&&(L[0]-v[0])*(y[0]-L[0])>=0&&(y=L,b=_):a.log(\"endpt to newendpt is not vert. or horz.\",v,y,L)}if(b>=0)break;M+=m(v,y),v=y}if(b===e.edgepaths.length){a.log(\"unclosed perimeter path\");break}g=b,(A=-1===k.indexOf(g))&&(g=k[0],M+=m(v,y)+\"Z\",v=null)}for(g=0;g<e.paths.length;g++)M+=n.smoothclosed(e.paths[g].map(o),e.smoothing);return M}},{\"../../components/drawing\":643,\"../../lib\":743,\"../carpet/axis_aligned_line\":914}],975:[function(t,e,r){\"use strict\";e.exports=function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r<t.length;r++){for(o=(a=t[r]).pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(u=a.edgepaths[n],l=[],i=0;i<u.length;i++)l[i]=e(u[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(u=a.paths[n],c=[],i=0;i<u.length;i++)c[i]=e(u[i]);s.push(c)}}}},{}],976:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t){var e=M.ab2xy(t[0],t[1],!0);return[L.c2p(e[0]),C.c2p(e[1])]}var w=r[0].trace,M=w.carpetTrace=b(t,w),k=t.calcdata[M.index][0];if(M.visible&&\"legendonly\"!==M.visible){var A=r[0].a,T=r[0].b,S=w.contours,E=w.uid,L=e.xaxis,C=e.yaxis,z=t._fullLayout,D=\"contour\"+E,I=y(S,e,r[0]),P=\"constraint\"===w.contours.type;if(!0===w.visible){var O=[[A[0],T[T.length-1]],[A[A.length-1],T[T.length-1]],[A[A.length-1],T[0]],[A[0],T[0]]];h(I);var F=1e-8*(A[A.length-1]-A[0]),R=1e-8*(T[T.length-1]-T[0]);d(I,F,R),\"constraint\"===w.contours.type&&(g(I,w.contours.operation),_(I,w.contours.operation,O,w)),x(I,n);var N,j,B,U,V=p.makeContourGroup(e,r,D),q=[];for(U=k.clipsegments.length-1;U>=0;U--)N=k.clipsegments[U],j=l([],N.x,L.c2p),B=l([],N.y,C.c2p),j.reverse(),B.reverse(),q.push(c(j,B,N.bicubic));var H=\"M\"+q.join(\"L\")+\"Z\";!function(t,e,r,n,i,a){var o,s,u,f,h=t.selectAll(\"g.contourbg\").data([0]);h.enter().append(\"g\").classed(\"contourbg\",!0);var d=h.selectAll(\"path\").data(\"fill\"!==a||i?[]:[0]);d.enter().append(\"path\"),d.exit().remove();var p=[];for(f=0;f<e.length;f++)o=e[f],s=l([],o.x,r.c2p),u=l([],o.y,n.c2p),p.push(c(s,u,o.bicubic));d.attr(\"d\",\"M\"+p.join(\"L\")+\"Z\").style(\"stroke\",\"none\")}(V,k.clipsegments,L,C,P,S.coloring),function(t,e,r,n,i,a,o,l,c,u,f){var h=e.selectAll(\"g.contourfill\").data([0]);h.enter().append(\"g\").classed(\"contourfill\",!0);var d=h.selectAll(\"path\").data(\"fill\"===u?i:[]);d.enter().append(\"path\"),d.exit().remove(),d.each(function(e){var i=v(t,e,a,o,l,c,r,n);e.prefixBoundary&&(i=f+i),i?s.select(this).attr(\"d\",i).style(\"stroke\",\"none\"):s.select(this).remove()})}(w,V,L,C,I,O,n,M,k,S.coloring,H),function(t,e,r,n,l,c,h){var d=t.selectAll(\"g.contourlines\").data([0]);d.enter().append(\"g\").classed(\"contourlines\",!0);var g=!1!==l.showlines,v=l.showlabels,y=g&&v,x=p.createLines(d,g||v,e),b=p.createLineClip(d,y,r._fullLayout._defs,n.trace.uid),_=t.selectAll(\"g.contourlabels\").data(v?[0]:[]);if(_.exit().remove(),_.enter().append(\"g\").classed(\"contourlabels\",!0),v){var w=c.xaxis,M=c.yaxis,k=w._length,A=M._length,T=[[[0,0],[k,0],[k,A],[0,A]]],S=[];f.clearLocationCache();var E=p.labelFormatter(l,n.t.cb,r._fullLayout),L=u.tester.append(\"text\").attr(\"data-notex\",1).call(u.font,l.labelfont),C={left:0,right:k,center:k/2,top:0,bottom:A,middle:A/2},z=Math.sqrt(k*k+A*A),D=m.LABELDISTANCE*z/Math.max(1,e.length/m.LABELINCREASE);x.each(function(t){var e=p.calcTextOpts(t.level,E,L,r);s.select(this).selectAll(\"path\").each(function(r){var n=f.getVisibleSegment(this,C,e.height/2);if(n&&(function(t,e,r,n,s,l){function c(t,e){var r,n=0;return(Math.abs(t[0]-h)<.1||Math.abs(t[0]-d)<.1)&&(r=a(s.dxydb_rough(t[0],t[1],.1)),n=Math.max(n,l*o(e,r)/2)),(Math.abs(t[1]-p)<.1||Math.abs(t[1]-m)<.1)&&(r=a(s.dxyda_rough(t[0],t[1],.1)),n=Math.max(n,l*o(e,r)/2)),n}for(var u,f=0;f<r.pedgepaths.length;f++)e===r.pedgepaths[f]&&(u=r.edgepaths[f]);if(!u)return;var h=s.a[0],d=s.a[s.a.length-1],p=s.b[0],m=s.b[s.b.length-1];var g=i(t,0,1),v=i(t,n.total,n.total-1),y=c(u[0],g),x=n.total-c(u[u.length-1],v);n.min<y&&(n.min=y);n.max>x&&(n.max=x);n.len=n.max-n.min}(this,r,t,n,h,e.height),!(n.len<(e.width+e.height)*m.LABELMIN)))for(var s=Math.min(Math.ceil(n.len/D),m.LABELMAX),l=0;l<s;l++){var c=p.findBestTextLocation(this,n,e,S,C);if(!c)break;p.addLabelData(c,e,S,T)}})}),L.remove(),p.drawLabels(_,S,r,b,y?T:null)}v&&!g&&x.remove()}(V,I,t,r[0],S,e,M),u.setClipUrl(V,M._clipPathId)}else z._infolayer.selectAll(\".cb\"+E).remove()}}function i(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function a(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function o(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}var s=t(\"d3\"),l=t(\"../carpet/map_1d_array\"),c=t(\"../carpet/makepath\"),u=t(\"../../components/drawing\"),f=t(\"../../lib\"),h=t(\"../contour/make_crossings\"),d=t(\"../contour/find_all_paths\"),p=t(\"../contour/plot\"),m=t(\"../contour/constants\"),g=t(\"./convert_to_constraints\"),v=t(\"./join_all_paths\"),y=t(\"./empty_pathinfo\"),x=t(\"./map_pathinfo\"),b=t(\"../carpet/lookup_carpetid\"),_=t(\"./close_boundaries\");e.exports=function(t,e,r){for(var i=0;i<r.length;i++)n(t,e,r[i])}},{\"../../components/drawing\":643,\"../../lib\":743,\"../carpet/lookup_carpetid\":931,\"../carpet/makepath\":932,\"../carpet/map_1d_array\":933,\"../contour/constants\":952,\"../contour/find_all_paths\":956,\"../contour/make_crossings\":960,\"../contour/plot\":961,\"./close_boundaries\":966,\"./convert_to_constraints\":970,\"./empty_pathinfo\":972,\"./join_all_paths\":974,\"./map_pathinfo\":975,d3:128}],977:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../../lib/extend\").extendFlat;e.exports=o({},{z:{valType:\"data_array\",editType:\"calc\"},x:o({},n.x,{impliedEdits:{xtype:\"array\"}}),x0:o({},n.x0,{impliedEdits:{xtype:\"scaled\"}}),dx:o({},n.dx,{impliedEdits:{xtype:\"scaled\"}}),y:o({},n.y,{impliedEdits:{ytype:\"array\"}}),y0:o({},n.y0,{impliedEdits:{ytype:\"scaled\"}}),dy:o({},n.dy,{impliedEdits:{ytype:\"scaled\"}}),text:{valType:\"data_array\",editType:\"calc\"},transpose:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xtype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},ytype:{valType:\"enumerated\",values:[\"array\",\"scaled\"],editType:\"calc+clearAxisTypes\"},zsmooth:{valType:\"enumerated\",values:[\"fast\",\"best\",!1],dflt:!1,editType:\"calc\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},xgap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},ygap:{valType:\"number\",dflt:0,min:0,editType:\"plot\"},zhoverformat:{valType:\"string\",dflt:\"\",editType:\"none\"}},i,{autocolorscale:o({},i.autocolorscale,{dflt:!1})},{colorbar:a})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../scatter/attributes\":1066}],978:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../histogram2d/calc\"),s=t(\"../../components/colorscale/calc\"),l=t(\"./has_columns\"),c=t(\"./convert_column_xyz\"),u=t(\"./max_row_length\"),f=t(\"./clean_2d_array\"),h=t(\"./interp2d\"),d=t(\"./find_empties\"),p=t(\"./make_bound_array\");e.exports=function(t,e){function r(t){L=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: \"fast\": '+t)}var m,g,v,y,x,b,_,w,M,k=a.getFromId(t,e.xaxis||\"x\"),A=a.getFromId(t,e.yaxis||\"y\"),T=n.traceIs(e,\"contour\"),S=n.traceIs(e,\"histogram\"),E=n.traceIs(e,\"gl2d\"),L=T?\"best\":e.zsmooth;if(k._minDtick=0,A._minDtick=0,S?(m=(M=o(t,e)).x,g=M.x0,v=M.dx,y=M.y,x=M.y0,b=M.dy,_=M.z):(l(e)?(c(e,k,A,\"x\",\"y\",[\"z\"]),m=e.x,y=e.y):(m=e.x?k.makeCalcdata(e,\"x\"):[],y=e.y?A.makeCalcdata(e,\"y\"):[]),g=e.x0||0,v=e.dx||1,x=e.y0||0,b=e.dy||1,_=f(e.z,e.transpose),(T||e.connectgaps)&&(e._emptypoints=d(_),e._interpz=h(_,e._emptypoints,e._interpz))),\"fast\"===L)if(\"log\"===k.type||\"log\"===A.type)r(\"log axis found\");else if(!S){if(m.length){var C=(m[m.length-1]-m[0])/(m.length-1),z=Math.abs(C/100);for(w=0;w<m.length-1;w++)if(Math.abs(m[w+1]-m[w]-C)>z){r(\"x scale is not linear\");break}}if(y.length&&\"fast\"===L){var D=(y[y.length-1]-y[0])/(y.length-1),I=Math.abs(D/100);for(w=0;w<y.length-1;w++)if(Math.abs(y[w+1]-y[w]-D)>I){r(\"y scale is not linear\");break}}}var P=u(_),O=\"scaled\"===e.xtype?\"\":m,F=p(e,O,g,v,P,k),R=\"scaled\"===e.ytype?\"\":y,N=p(e,R,x,b,_.length,A);E||(a.expand(k,F),a.expand(A,N));var j={x:F,y:N,z:_,text:e.text};if(O&&O.length===F.length-1&&(j.xCenter=O),R&&R.length===N.length-1&&(j.yCenter=R),S&&(j.xRanges=M.xRanges,j.yRanges=M.yRanges,j.pts=M.pts),s(e,_,\"\",\"z\"),T&&e.contours&&\"heatmap\"===e.contours.coloring){var B={type:\"contour\"===e.type?\"heatmap\":\"histogram2d\",xcalendar:e.xcalendar,ycalendar:e.ycalendar};j.xfill=p(B,O,g,v,P,k),j.yfill=p(B,R,x,b,_.length,A)}return[j]}},{\"../../components/colorscale/calc\":625,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../registry\":873,\"../histogram2d/calc\":1010,\"./clean_2d_array\":979,\"./convert_column_xyz\":981,\"./find_empties\":983,\"./has_columns\":984,\"./interp2d\":987,\"./make_bound_array\":988,\"./max_row_length\":989}],979:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t,e){function r(t){if(n(t))return+t}var i,a,o,s,l,c;if(e){for(i=0,l=0;l<t.length;l++)i=Math.max(i,t[l].length);if(0===i)return!1;o=function(t){return t.length},s=function(t,e,r){return t[r][e]}}else i=t.length,o=function(t,e){return t[e].length},s=function(t,e,r){return t[e][r]};var u=new Array(i);for(l=0;l<i;l++)for(a=o(t,l),u[l]=new Array(a),c=0;c<a;c++)u[l][c]=r(s(t,l,c));return u}},{\"fast-isnumeric\":140}],980:[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=\"cb\"+r.uid,c=r.zmin,u=r.zmax;if(n(c)||(c=i.aggNums(Math.min,null,r.z)),n(u)||(u=i.aggNums(Math.max,null,r.z)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var f=e[0].t.cb=s(t,l),h=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});f.fillcolor(h).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],981:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r,a,o,s){a=a||\"x\",o=o||\"y\",s=s||[\"z\"];var l,c,u,f=t[a].slice(),h=t[o].slice(),d=t.text,p=Math.min(f.length,h.length),m=void 0!==d&&!Array.isArray(d[0]),g=t[a+\"calendar\"],v=t[o+\"calendar\"];for(l=0;l<s.length;l++)(u=t[s[l]])&&(p=Math.min(p,u.length));for(p<f.length&&(f=f.slice(0,p)),p<h.length&&(h=h.slice(0,p)),l=0;l<p;l++)f[l]=e.d2c(f[l],0,g),h[l]=r.d2c(h[l],0,v);var y=n.distinctVals(f),x=y.vals,b=n.distinctVals(h),_=b.vals,w=[];for(l=0;l<s.length;l++)w[l]=n.init2dArray(_.length,x.length);var M,k,A;for(m&&(A=n.init2dArray(_.length,x.length)),l=0;l<p;l++)if(f[l]!==i&&h[l]!==i){for(M=n.findBin(f[l]+y.minDiff/2,x),k=n.findBin(h[l]+b.minDiff/2,_),c=0;c<s.length;c++)u=t[s[c]],w[c][k][M]=u[l];m&&(A[k][M]=d[l])}for(t[a]=x,t[o]=_,c=0;c<s.length;c++)t[s[c]]=w[c];m&&(t.text=A)}},{\"../../constants/numerical\":721,\"../../lib\":743}],982:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./has_columns\"),a=t(\"./xyz_defaults\"),o=t(\"./style_defaults\"),s=t(\"../../components/colorscale/defaults\"),l=t(\"./attributes\");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,l,r,i)}a(t,e,u,c)?(u(\"text\"),o(t,e,u,c),u(\"connectgaps\",i(e)&&!1!==e.zsmooth),s(t,e,c,u,{prefix:\"\",cLetter:\"z\"})):e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"./attributes\":977,\"./has_columns\":984,\"./style_defaults\":992,\"./xyz_defaults\":993}],983:[function(t,e,r){\"use strict\";var n=t(\"./max_row_length\");e.exports=function(t){var e,r,i,a,o,s,l,c,u=[],f={},h=[],d=t[0],p=[],m=[0,0,0],g=n(t);for(r=0;r<t.length;r++)for(e=p,p=d,d=t[r+1]||[],i=0;i<g;i++)void 0===p[i]&&((s=(void 0!==p[i-1]?1:0)+(void 0!==p[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==d[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===p.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),u.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},c=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||m)[2]+(f[[r+1,i]]||m)[2]+(f[[r,i-1]]||m)[2]+(f[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw\"findEmpties iterated with no new neighbors\";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort(function(t,e){return e[2]-t[2]})}},{\"./max_row_length\":989}],984:[function(t,e,r){\"use strict\";e.exports=function(t){return!Array.isArray(t.z[0])}},{}],985:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../lib\"),a=t(\"../../plots/cartesian/axes\"),o=n.constants.MAXDIST;e.exports=function(t,e,r,s,l,c){if(!(t.distance<o)){var u,f,h,d,p=t.cd[0],m=p.trace,g=t.xa,v=t.ya,y=p.x,x=p.y,b=p.z,_=p.xCenter,w=p.yCenter,M=p.zmask,k=[m.zmin,m.zmax],A=m.zhoverformat,T=y,S=x;if(!1!==t.index){try{h=Math.round(t.index[1]),d=Math.round(t.index[0])}catch(e){return void i.error(\"Error hovering on heatmap, pointNumber must be [row,col], found:\",t.index)}if(h<0||h>=b[0].length||d<0||d>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1])>o||n.inbox(r-x[0],r-x[x.length-1])>o)return;if(c){var E;for(T=[2*y[0]-y[1]],E=1;E<y.length;E++)T.push((y[E]+y[E-1])/2);for(T.push([2*y[y.length-1]-y[y.length-2]]),S=[2*x[0]-x[1]],E=1;E<x.length;E++)S.push((x[E]+x[E-1])/2);S.push([2*x[x.length-1]-x[x.length-2]])}h=Math.max(0,Math.min(T.length-2,i.findBin(e,T))),d=Math.max(0,Math.min(S.length-2,i.findBin(r,S)))}var L=g.c2p(y[h]),C=g.c2p(y[h+1]),z=v.c2p(x[d]),D=v.c2p(x[d+1]);c?(C=L,u=y[h],D=z,f=x[d]):(u=_?_[h]:(y[h]+y[h+1])/2,f=w?w[d]:(x[d]+x[d+1])/2,m.zsmooth&&(L=C=g.c2p(u),z=D=v.c2p(f)));var I=b[d][h];M&&!M[d][h]&&(I=void 0);var P;Array.isArray(p.text)&&Array.isArray(p.text[d])&&(P=p.text[d][h]);var O,F={type:\"linear\",range:k,hoverformat:A,_separators:g._separators,_numFormat:g._numFormat};return O=a.tickText(F,I,\"hover\").text,[i.extendFlat(t,{index:[d,h],distance:o+10,x0:L,x1:C,y0:z,y1:D,xLabelVal:u,yLabelVal:f,zLabelVal:I,zLabel:O,text:P})]}}},{\"../../components/fx\":660,\"../../lib\":743,\"../../plots/cartesian/axes\":789}],986:[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.style=t(\"./style\"),n.hoverPoints=t(\"./hover\"),n.moduleType=\"trace\",n.name=\"heatmap\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./attributes\":977,\"./calc\":978,\"./colorbar\":980,\"./defaults\":982,\"./hover\":985,\"./plot\":990,\"./style\":991}],987:[function(t,e,r){\"use strict\";function n(t){return.5-.25*Math.min(1,.5*t)}function i(t,e,r){var n,i,a,s,l,c,u,f,h,d,p,m,g,v=0;for(s=0;s<e.length;s++){for(i=(n=e[s])[0],a=n[1],p=t[i][a],d=0,h=0,l=0;l<4;l++)(u=t[i+(c=o[l])[0]])&&void 0!==(f=u[a+c[1]])&&(0===d?m=g=f:(m=Math.min(m,f),g=Math.max(g,f)),h++,d+=f);if(0===h)throw\"iterateInterp2d order is wrong: no defined neighbors\";t[i][a]=d/h,void 0===p?h<4&&(v=1):(t[i][a]=(1+r)*t[i][a]-r*p,g>m&&(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<e.length;o++)t[(s=e[o])[0]][s[1]]=r[s[0]][s[1]];else i(t,e);for(o=0;o<e.length&&!(e[o][2]<4);o++);for(e=e.slice(o),o=0;o<100&&l>.01;o++)l=i(t,e,n(l));return l>.01&&a.log(\"interp2d didn't converge quickly\",l),t}},{\"../../lib\":743}],988:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i,a,o){var s,l,c,u=[],f=n.traceIs(t,\"contour\"),h=n.traceIs(t,\"histogram\"),d=n.traceIs(t,\"gl2d\");if(Array.isArray(e)&&e.length>1&&!h&&\"category\"!==o.type){var p=e.length;if(!(p<=a))return f?e.slice(0,a):e.slice(0,a+1);if(f||d)u=e.slice(0,a);else if(1===a)u=[e[0]-.5,e[0]+.5];else{for(u=[1.5*e[0]-.5*e[1]],c=1;c<p;c++)u.push(.5*(e[c-1]+e[c]));u.push(1.5*e[p-1]-.5*e[p-2])}if(p<a){var m=u[u.length-1],g=m-u[u.length-2];for(c=p;c<a;c++)m+=g,u.push(m)}}else{l=i||1;var v=t[o._id.charAt(0)+\"calendar\"];for(s=h||\"category\"===o.type?o.r2c(r,0,v)||0:Array.isArray(e)&&1===e.length?e[0]:void 0===r?0:o.d2c(r,0,v),c=f||d?0:-.5;c<a;c++)u.push(s+l*c)}return u}},{\"../../registry\":873}],989:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0,r=0;r<t.length;r++)e=Math.max(e,t[r].length);return e}},{}],990:[function(t,e,r){\"use strict\";function n(t,e){var r=e.length-2,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=e[n+1],o=l.constrain(n+(t-i)/(a-i)-.5,0,r),s=Math.round(o),c=Math.abs(o-s);return o&&o!==r&&c?{bin0:s,frac:c,bin1:Math.round(s+c/(o-s))}:{bin0:s,bin1:s,frac:0}}function i(t,e){var r=e.length-1,n=l.constrain(l.findBin(t,e),0,r),i=e[n],a=(t-i)/(e[n+1]-i)||0;return a<=0?{bin0:n,bin1:n,frac:0}:a<.5?{bin0:n,bin1:n+1,frac:a}:{bin0:n+1,bin1:n,frac:1-a}}function a(t,e,r){t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=Math.round(255*r[3])}var o=t(\"tinycolor2\"),s=t(\"../../registry\"),l=t(\"../../lib\"),c=t(\"../../components/colorscale\"),u=t(\"../../constants/xmlns_namespaces\"),f=t(\"./max_row_length\");e.exports=function(t,e,r){for(var h=0;h<r.length;h++)!function(t,e,r){function h(t,e){if(void 0!==t){var r=Z(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),at+=e,ot+=r[0]*e,st+=r[1]*e,lt+=r[2]*e,r}return[0,0,0,0]}function d(t,e,r,n){var i=t[r.bin0];if(void 0===i)return h(void 0,1);var a,o=t[r.bin1],s=e[r.bin0],l=e[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,h(i+r.frac*c+n.frac*(u+r.frac*a))}var p=r[0],m=p.trace,g=m.uid,v=e.xaxis,y=e.yaxis,x=t._fullLayout,b=\"hm\"+g;if(x._paper.selectAll(\".contour\"+g).remove(),x._infolayer.selectAll(\"g.rangeslider-container\").selectAll(\".contour\"+g).remove(),!0!==m.visible)return x._paper.selectAll(\".\"+b).remove(),void x._infolayer.selectAll(\".cb\"+g).remove();var _,w,M,k,A,T,S=p.z,E=p.x,L=p.y,C=p.xCenter,z=p.yCenter,D=s.traceIs(m,\"contour\"),I=D?\"best\":m.zsmooth,P=S.length,O=f(S),F=!1,R=!1;for(T=0;void 0===_&&T<E.length-1;)_=v.c2p(E[T]),T++;for(T=E.length-1;void 0===w&&T>0;)w=v.c2p(E[T]),T--;for(w<_&&(M=w,w=_,_=M,F=!0),T=0;void 0===k&&T<L.length-1;)k=y.c2p(L[T]),T++;for(T=L.length-1;void 0===A&&T>0;)A=y.c2p(L[T]),T--;if(A<k&&(M=k,k=A,A=M,R=!0),D&&(C=E,z=L,E=p.xfill,L=p.yfill),\"fast\"!==I){var N=\"best\"===I?0:.5;_=Math.max(-N*v._length,_),w=Math.min((1+N)*v._length,w),k=Math.max(-N*y._length,k),A=Math.min((1+N)*y._length,A)}var j=Math.round(w-_),B=Math.round(A-k),U=j<=0||B<=0,V=e.plot.select(\".imagelayer\").selectAll(\"g.hm.\"+b).data(U?[]:[0]);if(V.enter().append(\"g\").classed(\"hm\",!0).classed(b,!0),V.exit().remove(),!U){var q,H;\"fast\"===I?(q=O,H=P):(q=j,H=B);var G=document.createElement(\"canvas\");G.width=q,G.height=H;var Y,W,X=G.getContext(\"2d\"),Z=c.makeColorScaleFunc(c.extractScale(m.colorscale,m.zmin,m.zmax),{noNumericCheck:!0,returnArray:!0});\"fast\"===I?(Y=F?function(t){return O-1-t}:l.identity,W=R?function(t){return P-1-t}:l.identity):(Y=function(t){return l.constrain(Math.round(v.c2p(E[t])-_),0,j)},W=function(t){return l.constrain(Math.round(y.c2p(L[t])-k),0,B)});var J,K,Q,$,tt,et=W(0),rt=[et,et],nt=F?0:1,it=R?0:1,at=0,ot=0,st=0,lt=0;if(I){var ct,ut=0;try{ct=new Uint8Array(j*B*4)}catch(t){ct=new Array(j*B*4)}if(\"best\"===I){var ft,ht,dt,pt=C||E,mt=z||L,gt=new Array(pt.length),vt=new Array(mt.length),yt=new Array(j),xt=C?i:n,bt=z?i:n;for(T=0;T<pt.length;T++)gt[T]=Math.round(v.c2p(pt[T])-_);for(T=0;T<mt.length;T++)vt[T]=Math.round(y.c2p(mt[T])-k);for(T=0;T<j;T++)yt[T]=xt(T,gt);for(K=0;K<B;K++)for(ht=S[(ft=bt(K,vt)).bin0],dt=S[ft.bin1],T=0;T<j;T++,ut+=4)a(ct,ut,tt=d(ht,dt,yt[T],ft))}else for(K=0;K<P;K++)for($=S[K],rt=W(K),T=0;T<j;T++)tt=h($[T],1),a(ct,ut=4*(rt*j+Y(T)),tt);var _t=X.createImageData(j,B);try{_t.data.set(ct)}catch(t){var wt=_t.data,Mt=wt.length;for(K=0;K<Mt;K++)wt[K]=ct[K]}X.putImageData(_t,0,0)}else{var kt=m.xgap,At=m.ygap,Tt=Math.floor(kt/2),St=Math.floor(At/2);for(K=0;K<P;K++)if($=S[K],rt.reverse(),rt[it]=W(K+1),rt[0]!==rt[1]&&void 0!==rt[0]&&void 0!==rt[1])for(J=[Q=Y(0),Q],T=0;T<O;T++)J.reverse(),J[nt]=Y(T+1),J[0]!==J[1]&&void 0!==J[0]&&void 0!==J[1]&&(tt=h($[T],(J[1]-J[0])*(rt[1]-rt[0])),X.fillStyle=\"rgba(\"+tt.join(\",\")+\")\",X.fillRect(J[0]+Tt,rt[0]+St,J[1]-J[0]-kt,rt[1]-rt[0]-At))}ot=Math.round(ot/at),st=Math.round(st/at),lt=Math.round(lt/at);var Et=o(\"rgb(\"+ot+\",\"+st+\",\"+lt+\")\");t._hmpixcount=(t._hmpixcount||0)+at,t._hmlumcount=(t._hmlumcount||0)+at*Et.getLuminance();var Lt=V.selectAll(\"image\").data(r);Lt.enter().append(\"svg:image\").attr({xmlns:u.svg,preserveAspectRatio:\"none\"}),Lt.attr({height:B,width:j,x:_,y:k,\"xlink:href\":G.toDataURL(\"image/png\")}),Lt.exit().remove()}}(t,e,r[h])}},{\"../../components/colorscale\":633,\"../../constants/xmlns_namespaces\":723,\"../../lib\":743,\"../../registry\":873,\"./max_row_length\":989,tinycolor2:546}],991:[function(t,e,r){\"use strict\";var n=t(\"d3\");e.exports=function(t){n.select(t).selectAll(\".hm image\").style(\"opacity\",function(t){return t.trace.opacity})}},{d3:128}],992:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){!1===r(\"zsmooth\")&&(r(\"xgap\"),r(\"ygap\")),r(\"zhoverformat\")}},{}],993:[function(t,e,r){\"use strict\";function n(t,e){var r=e(t);return\"scaled\"===(r?e(t+\"type\",\"array\"):\"scaled\")&&(e(t+\"0\"),e(\"d\"+t)),r}var i=t(\"fast-isnumeric\"),a=t(\"../../registry\"),o=t(\"./has_columns\");e.exports=function(t,e,r,s,l,c){var u=r(\"z\");l=l||\"x\",c=c||\"y\";var f,h;if(void 0===u||!u.length)return 0;if(o(t)){if(f=r(l),h=r(c),!f||!h)return 0}else{if(f=n(l,r),h=n(c,r),!function(t){for(var e,r=!0,n=!1,a=!1,o=0;o<t.length;o++){if(e=t[o],!Array.isArray(e)){r=!1;break}e.length>0&&(n=!0);for(var s=0;s<e.length;s++)if(i(e[s])){a=!0;break}}return r&&n&&a}(u))return 0;r(\"transpose\")}return a.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[l,c],s),e.z.length}},{\"../../registry\":873,\"./has_columns\":984,\"fast-isnumeric\":140}],994:[function(t,e,r){\"use strict\";for(var n=t(\"../heatmap/attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=[\"z\",\"x\",\"x0\",\"dx\",\"y\",\"y0\",\"dy\",\"text\",\"transpose\",\"xtype\",\"ytype\"],c={},u=0;u<l.length;u++){var f=l[u];c[f]=n[f]}o(c,i,{autocolorscale:o({},i.autocolorscale,{dflt:!1})},{colorbar:a}),e.exports=s(c,\"calc\",\"nested\")},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../heatmap/attributes\":977}],995:[function(t,e,r){\"use strict\";function n(t,e){this.scene=t,this.uid=e,this.type=\"heatmapgl\",this.name=\"\",this.hoverinfo=\"all\",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=i(t.glplot,this.options),this.heatmap._trace=this}var i=t(\"gl-heatmap2d\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib/str2rgbarray\"),s=n.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var i=n[0].length,s=n.length;this.options.shape=[i,s],this.options.x=r.x,this.options.y=r.y;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,a=new Array(i),s=new Array(4*i),l=0;l<i;l++){var c=e[l],u=o(c[1]);a[l]=r+c[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=u[f]}return{colorLevels:a,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options),a.expand(this.scene.xaxis,r.x),a.expand(this.scene.yaxis,r.y)},s.dispose=function(){this.heatmap.dispose()},e.exports=function(t,e,r){var i=new n(t,e.uid);return i.update(e,r),i}},{\"../../lib/str2rgbarray\":765,\"../../plots/cartesian/axes\":789,\"gl-heatmap2d\":173}],996:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"../heatmap/defaults\"),n.colorbar=t(\"../heatmap/colorbar\"),n.calc=t(\"../heatmap/calc\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"heatmapgl\",n.basePlotModule=t(\"../../plots/gl2d\"),n.categories=[\"gl\",\"gl2d\",\"2dMap\"],n.meta={},e.exports=n},{\"../../plots/gl2d\":829,\"../heatmap/calc\":978,\"../heatmap/colorbar\":980,\"../heatmap/defaults\":982,\"./attributes\":994,\"./convert\":995}],997:[function(t,e,r){\"use strict\";function n(t){var e={};e[\"autobin\"+t]=!1;var r={};return r[\"^autobin\"+t]=!1,{start:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},end:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},size:{valType:\"any\",dflt:null,editType:\"calc\",impliedEdits:r},editType:\"calc\",impliedEdits:e}}var i=t(\"../bar/attributes\");e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},text:i.text,orientation:i.orientation,histfunc:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"min\",\"max\"],dflt:\"count\",editType:\"calc\"},histnorm:{valType:\"enumerated\",values:[\"\",\"percent\",\"probability\",\"density\",\"probability density\"],dflt:\"\",editType:\"calc\"},cumulative:{enabled:{valType:\"boolean\",dflt:!1,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"increasing\",\"decreasing\"],dflt:\"increasing\",editType:\"calc\"},currentbin:{valType:\"enumerated\",values:[\"include\",\"exclude\",\"half\"],dflt:\"include\",editType:\"calc\"},editType:\"calc\"},autobinx:{valType:\"boolean\",dflt:null,editType:\"calc\",impliedEdits:{\"xbins.start\":void 0,\"xbins.end\":void 0,\"xbins.size\":void 0}},nbinsx:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},xbins:n(\"x\"),autobiny:{valType:\"boolean\",dflt:null,editType:\"calc\",impliedEdits:{\"ybins.start\":void 0,\"ybins.end\":void 0,\"ybins.size\":void 0}},nbinsy:{valType:\"integer\",min:0,dflt:0,editType:\"calc\"},ybins:n(\"y\"),marker:i.marker,selected:i.selected,unselected:i.unselected,error_y:i.error_y,error_x:i.error_x,_deprecated:{bardir:i._deprecated.bardir}}},{\"../bar/attributes\":883}],998:[function(t,e,r){\"use strict\";e.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},{}],999:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){return r(\"histnorm\"),n.forEach(function(t){r(t+\"bins.start\"),r(t+\"bins.end\"),r(t+\"bins.size\"),r(\"autobin\"+t),r(\"nbins\"+t)}),e}},{}],1e3:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min: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]>a){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]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},{\"fast-isnumeric\":140}],1001:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(t*e<=0)return 1/0;for(var o=Math.abs(e-t),l=\"date\"===r.type,u=i(o,l),f=0;f<10;f++){var h=i(80*u,l);if(u===h)break;if(!function(t,e,r,n,i,o){if(n&&t>c){var l=a(e,i,o),u=a(r,i,o),f=t===s?0:1;return l[f]!==u[f]}return Math.floor(r/t)-Math.floor(e/t)>.1}(h,t,e,l,r,n))break;u=h}return u}function i(t,e){return e&&t>h?t>c?t>1.1*s?s:t>1.1*l?l:c:t>u?u:t>f?f:h:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function a(t,e,r){var n=e.c2d(t,s,r).split(\"-\");return\"\"===n[0]&&(n.unshift(),n[0]=\"-\"+n[0]),n}var o=t(\"../../constants/numerical\"),s=o.ONEAVGYEAR,l=o.ONEAVGMONTH,c=o.ONEDAY,u=o.ONEHOUR,f=o.ONEMIN,h=o.ONESEC,d=t(\"../../plots/cartesian/axes\").tickIncrement;e.exports=function(t,e,r,i,a){var o,l,u=-1.1*e,f=-.1*e,h=t-f,p=r[0],m=r[1],g=Math.min(n(p+f,p+h,i,a),n(m+f,m+h,i,a)),v=Math.min(n(p+u,p+f,i,a),n(m+u,m+f,i,a));if(g>v&&v<Math.abs(m-p)/4e3?(o=g,l=!1):(o=Math.min(g,v),l=!0),\"date\"===i.type&&o>c){var y=o===s?1:6,x=o===s?\"M12\":\"M1\";return function(e,r){var n=i.c2d(e,s,a),o=n.indexOf(\"-\",y);o>0&&(n=n.substr(0,o));var c=i.d2c(n,0,a);if(c<e){var u=d(c,x,!1,a);(c+u)/2<e+t&&(c=u)}return r&&l?d(c,x,!0,a):c}}return function(e,r){var n=o*Math.round(e/o);return n+o/10<e&&n+.9*o<e+t&&(n+=o),r&&l&&(n-=o),n}}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789}],1002:[function(t,e,r){\"use strict\";function n(t,e,r,c,u){var f,h,d,p,m,g=c+\"bins\",v=\"overlay\"===t._fullLayout.barmode;if(e._autoBinFinished)delete e._autoBinFinished;else{var y=v?[e]:i(t,e),x=[],b=1/0,_=1/0,w=-1/0,M=\"autobin\"+c;for(f=0;f<y.length;f++){m=(h=y[f])._pos0=r.makeCalcdata(h,c);var k=h[g];if(h[M]||!k||null===k.start||null===k.end){d=h[c+\"calendar\"];var A=h.cumulative;if(k=l.autoBin(m,r,h[\"nbins\"+c],!1,d),v&&1===k._count&&\"category\"!==r.type){if(u)return[k,m,!0];k=function(t,e,r,a,o){var l,c,u=i(t,e),f=!1,h=1/0,d=[e];for(l=0;l<u.length;l++)if((c=u[l])===e)f=!0;else if(f){var p=n(t,c,r,a,!0),m=p[0],g=p[2];c._autoBinFinished=1,c._pos0=p[1],g?d.push(c):h=Math.min(h,m.size)}else h=Math.min(h,c[o].size);var v=new Array(d.length);for(l=0;l<d.length;l++)for(var y=d[l]._pos0,x=0;x<y.length;x++)if(void 0!==y[x]){v[l]=y[x];break}isFinite(h)||(h=s.distinctVals(v).minDiff);for(l=0;l<d.length;l++){var b=(c=d[l])[a+\"calendar\"];c._input[o]=c[o]={start:r.c2r(v[l]-h/2,0,b),end:r.c2r(v[l]+h/2,0,b),size:h}}return e[o]}(t,e,r,c,g)}A.enabled&&\"include\"!==A.currentbin&&(\"decreasing\"===A.direction?_=Math.min(_,r.r2c(k.start,0,d)-k.size):w=Math.max(w,r.r2c(k.end,0,d)+k.size)),x.push(h)}else p||(p={size:k.size,start:r.r2c(k.start,0,d),end:r.r2c(k.end,0,d)});b=function(t,e){if(t===1/0)return e;var r=a(t);return a(e)<r?e:t}(b,k.size),_=Math.min(_,r.r2c(k.start,0,d)),w=Math.max(w,r.r2c(k.end,0,d)),f&&(h._autoBinFinished=1)}if(p&&o(p.size)&&o(b)){b=b>p.size/1.9?p.size:p.size/Math.ceil(p.size/b);var T=p.start+(p.size-b)/2;_=T-b*Math.ceil((T-_)/b)}for(f=0;f<x.length;f++)d=(h=x[f])[c+\"calendar\"],h._input[g]=h[g]={start:r.c2r(_,0,d),end:r.c2r(w,0,d),size:b},h._input[M]=h[M]}return m=e._pos0,delete e._pos0,[e[g],m]}function i(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];\"histogram\"===l.type&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}function a(t){return o(t)?t:\"string\"==typeof t&&\"M\"===t.charAt(0)?p*+t.substr(1):1/0}var o=t(\"fast-isnumeric\"),s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../bar/arrays_to_calcdata\"),u=t(\"./bin_functions\"),f=t(\"./norm_functions\"),h=t(\"./average\"),d=t(\"./clean_bins\"),p=t(\"../../constants/numerical\").ONEAVGMONTH,m=t(\"./bin_label_vals\");e.exports=function(t,e){if(!0===e.visible){var r,i=[],a=[],p=l.getFromId(t,\"h\"===e.orientation?e.yaxis||\"y\":e.xaxis||\"x\"),g=\"h\"===e.orientation?\"y\":\"x\",v={x:\"y\",y:\"x\"}[g],y=e[g+\"calendar\"],x=e.cumulative;d(e,p,g);var b,_,w,M=n(t,e,p,g),k=M[0],A=M[1],T=\"string\"==typeof k.size,S=[],E=T?S:k,L=[],C=[],z=[],D=0,I=e.histnorm,P=e.histfunc,O=-1!==I.indexOf(\"density\");x.enabled&&O&&(I=I.replace(/ ?density$/,\"\"),O=!1);var F,R=\"max\"===P||\"min\"===P?null:0,N=u.count,j=f[I],B=!1,U=function(t){return p.r2c(t,0,y)};for(Array.isArray(e[v])&&\"count\"!==P&&(F=e[v],B=\"avg\"===P,N=u[P]),r=U(k.start),_=U(k.end)+(r-l.tickIncrement(r,k.size,!1,y))/1e6;r<_&&i.length<1e6&&(b=l.tickIncrement(r,k.size,!1,y),i.push((r+b)/2),a.push(R),z.push([]),S.push(r),O&&L.push(1/(b-r)),B&&C.push(0),!(b<=r));)r=b;S.push(r),T||\"date\"!==p.type||(E={start:U(E.start),end:U(E.end),size:E.size});var V=a.length,q=!0,H=1/0,G=1/0,Y={};for(r=0;r<A.length;r++){var W=A[r];(w=s.findBin(W,E))>=0&&w<V&&(D+=N(w,r,a,F,C),q&&z[w].length&&W!==A[z[w][0]]&&(q=!1),z[w].push(r),Y[r]=w,H=Math.min(H,W-S[w]),G=Math.min(G,S[w+1]-W))}var X;q||(X=m(H,G,S,p,y)),B&&(D=h(a,C)),j&&j(a,D,L),x.enabled&&function(t,e,r){function n(e){s=t[e],t[e]/=2}function i(e){o=t[e],t[e]=s+o/2,s+=o}var a,o,s;if(\"half\"===r)if(\"increasing\"===e)for(n(0),a=1;a<t.length;a++)i(a);else for(n(t.length-1),a=t.length-2;a>=0;a--)i(a);else if(\"increasing\"===e){for(a=1;a<t.length;a++)t[a]+=t[a-1];\"exclude\"===r&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];\"exclude\"===r&&(t.push(0),t.shift())}}(a,x.direction,x.currentbin);var Z=Math.min(i.length,a.length),J=[],K=0,Q=Z-1;for(r=0;r<Z;r++)if(a[r]){K=r;break}for(r=Z-1;r>=K;r--)if(a[r]){Q=r;break}for(r=K;r<=Q;r++)if(o(i[r])&&o(a[r])){var $={p:i[r],s:a[r],b:0};x.enabled||($.pts=z[r],q?$.p0=$.p1=z[r].length?A[z[r][0]]:i[r]:($.p0=X(S[r]),$.p1=X(S[r+1],!0))),J.push($)}return 1===J.length&&(J[0].width1=l.tickIncrement(J[0].p,k.size,!1,y)-J[0].p),c(J,e),Array.isArray(e.selectedpoints)&&s.tagSelected(J,e,Y),J}}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../bar/arrays_to_calcdata\":882,\"./average\":998,\"./bin_functions\":1e3,\"./bin_label_vals\":1001,\"./clean_bins\":1003,\"./norm_functions\":1008,\"fast-isnumeric\":140}],1003:[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\",c=t[l];c||(c=t[l]={});var u=\"date\"===a?function(t){return t||0===t?i(t,s,c.calendar):null}:function(t){return n(t)?Number(t):null};c.start=u(c.start),c.end=u(c.end);var f=\"date\"===a?o:1,h=c.size;if(n(h))c.size=h>0?Number(h):f;else if(\"string\"!=typeof h)c.size=f;else{var d=h.charAt(0),p=h.substr(1);((p=n(p)?Number(p):0)<=0||\"date\"!==a||\"M\"!==d||p!==Math.round(p))&&(c.size=f)}var m=\"autobin\"+r;\"boolean\"!=typeof t[m]&&(t[m]=!((c.start||0===c.start)&&(c.end||0===c.end))),t[m]||delete t[\"nbins\"+r]}},{\"../../constants/numerical\":721,\"../../lib\":743,\"fast-isnumeric\":140}],1004:[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\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,n){return i.coerce(t,e,c,r,n)}var h=f(\"x\"),d=f(\"y\");f(\"cumulative.enabled\")&&(f(\"cumulative.direction\"),f(\"cumulative.currentbin\")),f(\"text\");var p=f(\"orientation\",d&&!h?\"h\":\"v\"),m=e[\"v\"===p?\"x\":\"y\"];if(m&&m.length){n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],u);e[\"h\"===p?\"x\":\"y\"]&&f(\"histfunc\");o(t,e,f,\"h\"===p?[\"y\"]:[\"x\"]),s(t,e,f,r,u),l(t,e,a.defaultLine,{axis:\"y\"}),l(t,e,a.defaultLine,{axis:\"x\",inherit:\"y\"}),i.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../components/color\":618,\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../../registry\":873,\"../bar/style_defaults\":895,\"./attributes\":997,\"./bin_defaults\":999}],1005:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(t.x=\"xVal\"in e?e.xVal:e.x,t.y=\"yVal\"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),!(r.cumulative||{}).enabled){var a=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;t.pointNumbers=a,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var o;if(r._indexToPoints){o=[];for(var s=0;s<a.length;s++)o=o.concat(r._indexToPoints[a[s]])}else o=a;t.pointIndices=o}return t}},{}],1006:[function(t,e,r){\"use strict\";var n=t(\"../bar/hover\"),i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a){var o=n(t,e,r,a);if(o){var s=(t=o[0]).cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var c=\"h\"===l.orientation?\"y\":\"x\";t[c+\"Label\"]=i(t[c+\"a\"],s.p0,s.p1)}return o}}},{\"../../plots/cartesian/axes\":789,\"../bar/hover\":886}],1007:[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(\"./hover\"),n.selectPoints=t(\"../bar/select\"),n.eventData=t(\"./event_data\"),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\":800,\"../bar/layout_attributes\":888,\"../bar/layout_defaults\":889,\"../bar/plot\":890,\"../bar/select\":891,\"../bar/set_positions\":892,\"../bar/style\":894,\"../scatter/colorbar\":1070,\"./attributes\":997,\"./calc\":1002,\"./defaults\":1004,\"./event_data\":1005,\"./hover\":1006}],1008:[function(t,e,r){\"use strict\";e.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},\"probability density\":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},{}],1009:[function(t,e,r){\"use strict\";var n=t(\"../histogram/attributes\"),i=t(\"../heatmap/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({},{x:n.x,y:n.y,z:{valType:\"data_array\",editType:\"calc\"},marker:{color:{valType:\"data_array\",editType:\"calc\"},editType:\"calc\"},histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,zhoverformat:i.zhoverformat},a,{autocolorscale:s({},a.autocolorscale,{dflt:!1})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../heatmap/attributes\":977,\"../histogram/attributes\":997}],1010:[function(t,e,r){\"use strict\";function n(t,e,r,n,i,a,o){var s=e+\"bins\",c=\"autobin\"+e,u=t[s];h(t,n,e),!t[c]&&u&&null!==u.start&&null!==u.end||(u=l.autoBin(r,n,t[\"nbins\"+e],\"2d\",o),\"histogram2dcontour\"===t.type&&(u.start=a(l.tickIncrement(i(u.start),u.size,!0,o)),u.end=a(l.tickIncrement(i(u.end),u.size,!1,o))),t._input[s]=t[s]=u,t._input[c]=t[c])}function i(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function a(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function o(t,e,r,n,i,a){var o,s=t.length-1,l=new Array(s);if(e)for(o=0;o<s;o++)l[o]=[e[o],e[o]];else{var c=d(r,n,t,i,a);for(o=0;o<s;o++)l[o]=[c(t[o]),c(t[o+1],!0)]}return l}var s=t(\"../../lib\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../histogram/bin_functions\"),u=t(\"../histogram/norm_functions\"),f=t(\"../histogram/average\"),h=t(\"../histogram/clean_bins\"),d=t(\"../histogram/bin_label_vals\");e.exports=function(t,e){var r,h,d,p,m=l.getFromId(t,e.xaxis||\"x\"),g=e.x?m.makeCalcdata(e,\"x\"):[],v=l.getFromId(t,e.yaxis||\"y\"),y=e.y?v.makeCalcdata(e,\"y\"):[],x=e.xcalendar,b=e.ycalendar,_=function(t){return m.r2c(t,0,x)},w=function(t){return v.r2c(t,0,b)},M=function(t){return m.c2r(t,0,x)},k=function(t){return v.c2r(t,0,b)},A=Math.min(g.length,y.length);g.length>A&&g.splice(A,g.length-A),y.length>A&&y.splice(A,y.length-A),n(e,\"x\",g,m,_,M,x),n(e,\"y\",y,v,w,k,b);var T=[],S=[],E=[],L=\"string\"==typeof e.xbins.size,C=\"string\"==typeof e.ybins.size,z=[],D=[],I=L?z:e.xbins,P=C?D:e.ybins,O=0,F=[],R=[],N=e.histnorm,j=e.histfunc,B=-1!==N.indexOf(\"density\"),U=\"max\"===j||\"min\"===j?null:0,V=c.count,q=u[N],H=!1,G=[],Y=[],W=\"z\"in e?e.z:\"marker\"in e&&Array.isArray(e.marker.color)?e.marker.color:\"\";W&&\"count\"!==j&&(H=\"avg\"===j,V=c[j]);var X=e.xbins,Z=_(X.start),J=_(X.end)+(Z-l.tickIncrement(Z,X.size,!1,x))/1e6;for(r=Z;r<J;r=l.tickIncrement(r,X.size,!1,x))S.push(U),z.push(r),H&&E.push(0);z.push(r);var K=S.length,Q=_(e.xbins.start),$=(r-Q)/K,tt=M(Q+$/2);for(Z=w((X=e.ybins).start),J=w(X.end)+(Z-l.tickIncrement(Z,X.size,!1,b))/1e6,r=Z;r<J;r=l.tickIncrement(r,X.size,!1,b)){T.push(S.slice()),D.push(r);var et=new Array(K);for(h=0;h<K;h++)et[h]=[];R.push(et),H&&F.push(E.slice())}D.push(r);var rt=T.length,nt=w(e.ybins.start),it=(r-nt)/rt,at=k(nt+it/2);B&&(G=i(S.length,I,$,L),Y=i(T.length,P,it,C)),L||\"date\"!==m.type||(I=a(_,I)),C||\"date\"!==v.type||(P=a(w,P));var ot=!0,st=!0,lt=new Array(K),ct=new Array(rt),ut=1/0,ft=1/0,ht=1/0,dt=1/0;for(r=0;r<A;r++){var pt=g[r],mt=y[r];d=s.findBin(pt,I),p=s.findBin(mt,P),d>=0&&d<K&&p>=0&&p<rt&&(O+=V(d,r,T[p],W,F[p]),R[p][d].push(r),ot&&(void 0===lt[d]?lt[d]=pt:lt[d]!==pt&&(ot=!1)),st&&(void 0===ct[d]?ct[d]=mt:ct[d]!==mt&&(st=!1)),ut=Math.min(ut,pt-z[d]),ft=Math.min(ft,z[d+1]-pt),ht=Math.min(ht,mt-D[p]),dt=Math.min(dt,D[p+1]-mt))}if(H)for(p=0;p<rt;p++)O+=f(T[p],F[p]);if(q)for(p=0;p<rt;p++)q(T[p],O,G,Y[p]);return{x:g,xRanges:o(z,ot&<,ut,ft,m,x),x0:tt,dx:$,y:y,yRanges:o(D,st&&ct,ht,dt,v,b),y0:at,dy:it,z:T,pts:R}}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../histogram/average\":998,\"../histogram/bin_functions\":1e3,\"../histogram/bin_label_vals\":1001,\"../histogram/clean_bins\":1003,\"../histogram/norm_functions\":1008}],1011:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./sample_defaults\"),a=t(\"../heatmap/style_defaults\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c,l),o(t,e,l,c,{prefix:\"\",cLetter:\"z\"}))}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../heatmap/style_defaults\":992,\"./attributes\":1009,\"./sample_defaults\":1014}],1012:[function(t,e,r){\"use strict\";var n=t(\"../heatmap/hover\"),i=t(\"../../plots/cartesian/axes\").hoverLabelText;e.exports=function(t,e,r,a,o,s){var l=n(t,e,r,a,o,s);if(l){var c=(t=l[0]).index,u=c[0],f=c[1],h=t.cd[0],d=h.xRanges[f],p=h.yRanges[u];return t.xLabel=i(t.xa,d[0],d[1]),t.yLabel=i(t.ya,p[0],p[1]),l}}},{\"../../plots/cartesian/axes\":789,\"../heatmap/hover\":985}],1013:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"../heatmap/calc\"),n.plot=t(\"../heatmap/plot\"),n.colorbar=t(\"../heatmap/colorbar\"),n.style=t(\"../heatmap/style\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"../histogram/event_data\"),n.moduleType=\"trace\",n.name=\"histogram2d\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"histogram\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../heatmap/calc\":978,\"../heatmap/colorbar\":980,\"../heatmap/plot\":990,\"../heatmap/style\":991,\"../histogram/event_data\":1005,\"./attributes\":1009,\"./defaults\":1011,\"./hover\":1012}],1014:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../histogram/bin_defaults\");e.exports=function(t,e,r,a){var o=r(\"x\"),s=r(\"y\");if(o&&o.length&&s&&s.length){n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],a);(r(\"z\")||r(\"marker.color\"))&&r(\"histfunc\");i(t,e,r,[\"x\",\"y\"])}else e.visible=!1}},{\"../../registry\":873,\"../histogram/bin_defaults\":999}],1015:[function(t,e,r){\"use strict\";var n=t(\"../histogram2d/attributes\"),i=t(\"../contour/attributes\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,autobinx:n.autobinx,nbinsx:n.nbinsx,xbins:n.xbins,autobiny:n.autobiny,nbinsy:n.nbinsy,ybins:n.ybins,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:i.line,zhoverformat:n.zhoverformat},a,{zmin:s({},a.zmin,{editType:\"calc\"}),zmax:s({},a.zmax,{editType:\"calc\"})},{colorbar:o})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../contour/attributes\":949,\"../histogram2d/attributes\":1009}],1016:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../histogram2d/sample_defaults\"),a=t(\"../contour/contours_defaults\"),o=t(\"../contour/style_defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,s,r,i)}i(t,e,c,l),!1!==e.visible&&(a(t,e,c),o(t,e,c,l))}},{\"../../lib\":743,\"../contour/contours_defaults\":953,\"../contour/style_defaults\":963,\"../histogram2d/sample_defaults\":1014,\"./attributes\":1015}],1017:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"../contour/calc\"),n.plot=t(\"../contour/plot\").plot,n.style=t(\"../contour/style\"),n.colorbar=t(\"../contour/colorbar\"),n.hoverPoints=t(\"../contour/hover\"),n.moduleType=\"trace\",n.name=\"histogram2dcontour\",n.basePlotModule=t(\"../../plots/cartesian\"),n.categories=[\"cartesian\",\"2dMap\",\"contour\",\"histogram\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"../contour/calc\":950,\"../contour/colorbar\":951,\"../contour/hover\":957,\"../contour/plot\":961,\"../contour/style\":962,\"./attributes\":1015,\"./defaults\":1016}],1018:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/color_attributes\"),i=t(\"../../components/colorscale/attributes\"),a=t(\"../../components/colorbar/attributes\"),o=t(\"../surface/attributes\"),s=t(\"../../lib/extend\").extendFlat;e.exports=s(n(\"\",\"calc\",!1),{x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},z:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},i:{valType:\"data_array\",editType:\"calc\"},j:{valType:\"data_array\",editType:\"calc\"},k:{valType:\"data_array\",editType:\"calc\"},delaunayaxis:{valType:\"enumerated\",values:[\"x\",\"y\",\"z\"],dflt:\"z\",editType:\"calc\"},alphahull:{valType:\"number\",dflt:-1,editType:\"calc\"},intensity:{valType:\"data_array\",editType:\"calc\"},color:{valType:\"color\",editType:\"calc\"},vertexcolor:{valType:\"data_array\",editType:\"calc\"},facecolor:{valType:\"data_array\",editType:\"calc\"},opacity:o.opacity,flatshading:{valType:\"boolean\",dflt:!1,editType:\"calc\"},contour:{show:s({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:\"calc\"},showscale:i.showscale,colorbar:a,lightposition:{x:s({},o.lightposition.x,{dflt:1e5}),y:s({},o.lightposition.y,{dflt:1e5}),z:s({},o.lightposition.z,{dflt:0}),editType:\"calc\"},lighting:s({vertexnormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-12,editType:\"calc\"},facenormalsepsilon:{valType:\"number\",min:0,max:1,dflt:1e-6,editType:\"calc\"},editType:\"calc\"},o.lighting)})},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../components/colorscale/color_attributes\":626,\"../../lib/extend\":732,\"../surface/attributes\":1140}],1019:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.intensity&&n(e,e.intensity,\"\",\"c\")}},{\"../../components/colorscale/calc\":625}],1020:[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=\"cb\"+r.uid,c=r.cmin,u=r.cmax,f=r.intensity||[];if(n(c)||(c=i.aggNums(Math.min,null,f)),n(u)||(u=i.aggNums(Math.max,null,f)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var h=e[0].t.cb=s(t,l),d=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});h.fillcolor(d).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1021:[function(t,e,r){\"use strict\";function n(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name=\"\",this.color=\"#fff\",this.data=null,this.showContour=!1}function i(t){return t.map(f)}function a(t,e,r){for(var n=new Array(t.length),i=0;i<t.length;++i)n[i]=[t[i],e[i],r[i]];return n}var o=t(\"gl-mesh3d\"),s=t(\"tinycolor2\"),l=t(\"delaunay-triangulate\"),c=t(\"alpha-shape\"),u=t(\"convex-hull\"),f=t(\"../../lib/str2rgbarray\"),h=n.prototype;h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;return t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},h.update=function(t){function e(t,e,r,n){return e.map(function(e){return t.d2l(e,0,n)*r})}var r=this.scene,n=r.fullSceneLayout;this.data=t;var o,h=a(e(n.xaxis,t.x,r.dataScale[0],t.xcalendar),e(n.yaxis,t.y,r.dataScale[1],t.ycalendar),e(n.zaxis,t.z,r.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k)o=a(t.i,t.j,t.k);else if(0===t.alphahull)o=u(h);else if(t.alphahull>0)o=c(t.alphahull,h);else{var d=[\"x\",\"y\",\"z\"].indexOf(t.delaunayaxis);o=l(h.map(function(t){return[t[(d+1)%3],t[(d+2)%3]]}))}var p={positions:h,cells:o,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:f(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};t.intensity?(this.color=\"#fff\",p.vertexIntensity=t.intensity,p.vertexIntensityBounds=[t.cmin,t.cmax],p.colormap=function(t){return t.map(function(t){var e=t[0],r=s(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,1]}})}(t.colorscale)):t.vertexcolor?(this.color=t.vertexcolor[0],p.vertexColors=i(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],p.cellColors=i(t.facecolor)):(this.color=t.color,p.meshColor=f(t.color)),this.mesh.update(p)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=o({gl:r}),a=new n(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},{\"../../lib/str2rgbarray\":765,\"alpha-shape\":47,\"convex-hull\":109,\"delaunay-triangulate\":130,\"gl-mesh3d\":210,tinycolor2:546}],1022:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../../components/colorscale/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function c(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 u=c([\"x\",\"y\",\"z\"]),f=c([\"i\",\"j\",\"k\"]);if(u){f&&f.forEach(function(t){for(var e=0;e<t.length;++e)t[e]|=0});n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],s),[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lighting.vertexnormalsepsilon\",\"lighting.facenormalsepsilon\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"contour.show\",\"contour.color\",\"contour.width\",\"colorscale\",\"reversescale\",\"flatshading\",\"alphahull\",\"delaunayaxis\",\"opacity\"].forEach(function(t){l(t)}),\"intensity\"in t?(l(\"intensity\"),a(t,e,s,l,{prefix:\"\",cLetter:\"c\"})):(e.showscale=!1,\"facecolor\"in t?l(\"facecolor\"):\"vertexcolor\"in t?l(\"vertexcolor\"):l(\"color\",r))}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../../registry\":873,\"./attributes\":1018}],1023:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.calc=t(\"./calc\"),n.colorbar=t(\"./colorbar\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"mesh3d\",n.basePlotModule=t(\"../../plots/gl3d\"),n.categories=[\"gl3d\"],n.meta={},e.exports=n},{\"../../plots/gl3d\":832,\"./attributes\":1018,\"./calc\":1019,\"./colorbar\":1020,\"./convert\":1021,\"./defaults\":1022}],1024:[function(t,e,r){\"use strict\";function n(t){return{name:{valType:\"string\",editType:\"style\"},showlegend:{valType:\"boolean\",dflt:!0,editType:\"style\"},line:{color:i({},s.color,{dflt:t}),width:s.width,dash:o,editType:\"style\"},editType:\"style\"}}var i=t(\"../../lib\").extendFlat,a=t(\"../scatter/attributes\"),o=t(\"../../components/drawing/attributes\").dash,s=a.line;e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},open:{valType:\"data_array\",dflt:[],editType:\"calc\"},high:{valType:\"data_array\",dflt:[],editType:\"calc\"},low:{valType:\"data_array\",dflt:[],editType:\"calc\"},close:{valType:\"data_array\",dflt:[],editType:\"calc\"},line:{width:i({},s.width,{}),dash:i({},o,{}),editType:\"style\"},increasing:n(\"#3D9970\"),decreasing:n(\"#FF4136\"),text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},tickwidth:{valType:\"number\",min:0,max:.5,dflt:.3,editType:\"calcIfAutorange\"}}},{\"../../components/drawing/attributes\":642,\"../../lib\":743,\"../scatter/attributes\":1066}],1025:[function(t,e,r){\"use strict\";function n(t,e,r,n){o(t,e,r,n),r(n+\".line.color\"),r(n+\".line.width\",e.line.width),r(n+\".line.dash\",e.line.dash)}var i=t(\"../../lib\"),a=t(\"./ohlc_defaults\"),o=t(\"./direction_defaults\"),s=t(\"./attributes\"),l=t(\"./helpers\");e.exports=function(t,e,r,o){function c(r,n){return i.coerce(t,e,s,r,n)}l.pushDummyTransformOpts(t,e);0!==a(t,e,c,o)?(c(\"line.width\"),c(\"line.dash\"),n(t,e,c,\"increasing\"),n(t,e,c,\"decreasing\"),c(\"text\"),c(\"tickwidth\")):e.visible=!1}},{\"../../lib\":743,\"./attributes\":1024,\"./direction_defaults\":1026,\"./helpers\":1027,\"./ohlc_defaults\":1029}],1026:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n){r(n+\".showlegend\"),!1===t.showlegend&&(e[n].showlegend=!1);r(n+\".name\",e.name+\" - \"+n)}},{}],1027:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../lib\");r.pushDummyTransformOpts=function(t,e){var r={type:e.type,_ephemeral:!0};Array.isArray(t.transforms)?t.transforms.push(r):t.transforms=[r]},r.clearEphemeralTransformOpts=function(t){var e=t.transforms;if(Array.isArray(e)){for(var r=0;r<e.length;r++)e[r]._ephemeral&&e.splice(r,1);0===e.length&&delete t.transforms}},r.copyOHLC=function(t,e){t.open&&(e.open=t.open),t.high&&(e.high=t.high),t.low&&(e.low=t.low),t.close&&(e.close=t.close)},r.makeTransform=function(t,e,r){var n=i.extendFlat([],t.transforms);return n[e.transformIndex]={type:t.type,direction:r,open:t.open,high:t.high,low:t.low,close:t.close},n},r.getFilterFn=function(t){return new function(t){function e(t,e){return t===e?e>i?r=!0:e<i&&(r=!1):r=t<e,i=e,r}var r=!0,i=null;return\"increasing\"===t?function(t,r){return n(t)&&n(r)&&e(+t,+r)}:function(t,r){return n(t)&&n(r)&&!e(+t,+r)}}(t)},r.addRangeSlider=function(t,e){for(var r=!1,n=0;n<t.length;n++)if(!0===t[n].visible){r=!0;break}r&&(e.xaxis||(e.xaxis={}),e.xaxis.rangeslider||(e.xaxis.rangeslider={}))}},{\"../../lib\":743,\"fast-isnumeric\":140}],1028:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/register\");e.exports={moduleType:\"trace\",name:\"ohlc\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"showLegend\"],meta:{},attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\")},n(t(\"../scatter\")),n(t(\"./transform\"))},{\"../../plot_api/register\":779,\"../../plots/cartesian\":800,\"../scatter\":1078,\"./attributes\":1024,\"./defaults\":1025,\"./transform\":1030}],1029:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i){var a,o=r(\"x\"),s=r(\"open\"),l=r(\"high\"),c=r(\"low\"),u=r(\"close\");return n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\"],i),a=Math.min(s.length,l.length,c.length,u.length),o&&(a=Math.min(a,o.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.open=s.slice(0,a)),a<l.length&&(e.high=l.slice(0,a)),a<c.length&&(e.low=c.slice(0,a)),a<u.length&&(e.close=u.slice(0,a)),a}},{\"../../registry\":873}],1030:[function(t,e,r){\"use strict\";function n(t,e,r){var n={type:\"scatter\",mode:\"lines\",connectgaps:!1,visible:t.visible,opacity:t.opacity,xaxis:t.xaxis,yaxis:t.yaxis,hoverinfo:function(t){var e=t.hoverinfo;if(\"all\"===e)return\"x+text+name\";var r=e.split(\"+\"),n=r.indexOf(\"y\"),i=r.indexOf(\"text\");-1!==n&&(r.splice(n,1),-1===i&&r.push(\"text\"));return r.join(\"+\")}(t),transforms:s.makeTransform(t,e,r)},i=t[r];return i&&a.extendFlat(n,{x:t.x||[0],xcalendar:t.xcalendar,y:[].concat(t.low).concat(t.high),text:t.text,name:i.name,showlegend:i.showlegend,line:i.line}),n}var i=t(\"fast-isnumeric\"),a=t(\"../../lib\"),o=a._,s=t(\"./helpers\"),l=t(\"../../plots/cartesian/axes\"),c=t(\"../../plots/cartesian/axis_ids\");r.moduleType=\"transform\",r.name=\"ohlc\",r.attributes={},r.supplyDefaults=function(t,e,r,n){return s.clearEphemeralTransformOpts(n),s.copyOHLC(t,e),t},r.transform=function(t,e){for(var r=[],i=0;i<t.length;i++){var a=t[i];\"ohlc\"===a.type?r.push(n(a,e,\"increasing\"),n(a,e,\"decreasing\")):r.push(a)}return s.addRangeSlider(r,e.layout),r},r.calcTransform=function(t,e,r){var n,u=r.direction,f=s.getFilterFn(u),h=c.getFromTrace(t,e,\"x\"),d=c.getFromTrace(t,e,\"y\"),p=function(t,e,r){var n=r._fullInput,i=n.tickwidth,o=n._minDiff;if(!o){var s=t._fullData,l=[];o=1/0;var c;for(c=0;c<s.length;c++){var u=s[c]._fullInput;if(\"ohlc\"===u.type&&!0===u.visible&&u.xaxis===e._id&&(l.push(u),u.x&&u.x.length>1)){var f=a.simpleMap(u.x,e.d2c,0,r.xcalendar),h=a.distinctVals(f).minDiff;o=Math.min(o,h)}}for(o===1/0&&(o=1),c=0;c<l.length;c++)l[c]._minDiff=o}return o*i}(t,h,e),m=e.open,g=e.high,v=e.low,y=e.close,x=e.text,b=o(t,\"open:\")+\" \",_=o(t,\"high:\")+\" \",w=o(t,\"low:\")+\" \",M=o(t,\"close:\")+\" \",k=m.length,A=[],T=[],S=[];n=e._fullInput.x?function(t){var r=e.x[t],n=e.xcalendar,i=h.d2c(r,0,n);A.push(h.c2d(i-p,0,n),r,r,r,r,h.c2d(i+p,0,n),null)}:function(t){A.push(t-p,t,t,t,t,t+p,null)};for(var E=function(t,e,r,n){T.push(t,t,e,r,n,n,null)},L=function(t,e){return l.tickText(t,t.c2l(e),\"hover\").text},C=e._fullInput.hoverinfo,z=C.split(\"+\"),D=\"all\"===C,I=D||-1!==z.indexOf(\"y\"),P=D||-1!==z.indexOf(\"text\"),O=Array.isArray(x)?function(t){return x[t]||\"\"}:function(){return x},F=function(t,e,r,n,i){var a=[];I&&(a.push(b+L(d,e)),a.push(_+L(d,r)),a.push(w+L(d,n)),a.push(M+L(d,i))),P&&a.push(O(t));var o=a.join(\"<br>\");S.push(o,o,o,o,o,o,null)},R=0;R<k;R++)f(m[R],y[R])&&i(g[R])&&i(v[R])&&(n(R),E(m[R],g[R],v[R],y[R]),F(R,m[R],g[R],v[R],y[R]));e.x=A,e.y=T,e.text=S}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../../plots/cartesian/axis_ids\":792,\"./helpers\":1027,\"fast-isnumeric\":140}],1031:[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(\"../../plots/font_attributes\"),l=t(\"../../plots/domain_attributes\"),c=t(\"../../lib/extend\"),u=c.extendDeepAll,f=c.extendFlat;e.exports={domain:l({name:\"parcoords\",trace:!0,editType:\"calc\"}),labelfont:s({editType:\"calc\"}),tickfont:s({editType:\"calc\"}),rangefont:s({editType:\"calc\"}),dimensions:{_isLinkedToArray:\"dimension\",label:{valType:\"string\",editType:\"calc\"},tickvals:f({},o.tickvals,{editType:\"calc\"}),ticktext:f({},o.ticktext,{editType:\"calc\"}),tickformat:{valType:\"string\",dflt:\"3s\",editType:\"calc\"},visible:{valType:\"boolean\",dflt:!0,editType:\"calc\"},range:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},constraintrange:{valType:\"info_array\",items:[{valType:\"number\",editType:\"calc\"},{valType:\"number\",editType:\"calc\"}],editType:\"calc\"},values:{valType:\"data_array\",dflt:[],editType:\"calc\"},editType:\"calc\"},line:f(u(n(\"line\",\"calc\"),{colorscale:{dflt:a.Viridis},autocolorscale:{dflt:!1}}),{showscale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},colorbar:i,editType:\"calc\"})}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/colorscale/scales\":637,\"../../lib/extend\":732,\"../../plots/cartesian/layout_attributes\":801,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1032:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../constants/xmlns_namespaces\");r.name=\"parcoords\",r.plot=function(t){var e=i(t.calcdata,\"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\").remove(),n._glimages.selectAll(\"*\").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(\".svg-container\");r.filter(function(t,e){return e===r.size()-1}).selectAll(\".gl-canvas-context, .gl-canvas-focus\").each(function(){var t=this.toDataURL(\"image/png\");e.append(\"svg:image\").attr({xmlns:o.svg,\"xlink:href\":t,preserveAspectRatio:\"none\",x:0,y:0,width:this.width,height:this.height})}),window.setTimeout(function(){n.selectAll(\"#filterBarPattern\").attr(\"id\",\"filterBarPattern\")},60)}},{\"../../constants/xmlns_namespaces\":723,\"../../plots/get_data\":826,\"./plot\":1040,d3:128}],1033:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/has_colorscale\"),i=t(\"../../components/colorscale/calc\"),a=t(\"../../lib\"),o=t(\"../../lib/gup\").wrap;e.exports=function(t,e){var r=!!e.line.colorscale&&a.isArray(e.line.color),s=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}),l=r?e.line.colorscale:[[0,e.line.color],[1,e.line.color]];return n(e,\"line\")&&i(e,e.line.color,\"line\",\"c\"),o({lineColor:s,cscale:l})}},{\"../../components/colorscale/calc\":625,\"../../components/colorscale/has_colorscale\":632,\"../../lib\":743,\"../../lib/gup\":740}],1034:[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,c=\"cb\"+r.uid;if(t._fullLayout._infolayer.selectAll(\".\"+c).remove(),void 0!==l&&l.showscale){var u=l.color,f=l.cmin,h=l.cmax;n(f)||(f=i.aggNums(Math.min,null,u)),n(h)||(h=i.aggNums(Math.max,null,u));var d=e[0].t.cb=s(t,c),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,f,h),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:f,end:h,size:(h-f)/254}).options(l.colorbar)()}else a.autoMargin(t,c)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1035:[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},cn:{axisExtentText:\"axis-extent-text\",parcoordsLineLayers:\"parcoords-line-layers\",parcoordsLineLayer:\"parcoords-lines\",parcoords:\"parcoords\",parcoordsControlView:\"parcoords-control-view\",yAxis:\"y-axis\",axisOverlays:\"axis-overlays\",axis:\"axis\",axisHeading:\"axis-heading\",axisTitle:\"axis-title\",axisExtent:\"axis-extent\",axisExtentTop:\"axis-extent-top\",axisExtentTopText:\"axis-extent-top-text\",axisExtentBottom:\"axis-extent-bottom\",axisExtentBottomText:\"axis-extent-bottom-text\",axisBrush:\"axis-brush\"},id:{filterBarPattern:\"filter-bar-pattern\"}}},{}],1036:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/colorscale/has_colorscale\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./constants\").maxDimensionCount;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=function(t,e){function r(t,e){return n.coerce(a,o,i.dimensions,t,e)}var a,o,l,c=t.dimensions||[],u=e.dimensions=[],f=1/0;for(c.length>s&&(n.log(\"parcoords traces support up to \"+s+\" dimensions at the moment\"),c.splice(s)),l=0;l<c.length;l++)a=c[l],o={},n.isPlainObject(a)&&(r(\"visible\",r(\"values\").length>0)&&(r(\"label\"),r(\"tickvals\"),r(\"ticktext\"),r(\"tickformat\"),r(\"range\"),r(\"constraintrange\"),f=Math.min(f,o.values.length)),o._index=l,u.push(o));if(isFinite(f))for(l=0;l<u.length;l++)(o=u[l]).visible&&o.values.length>f&&(o.values=o.values.slice(0,f));return u}(t,e);!function(t,e,r,i,s){s(\"line.color\",r),a(t,\"line\")&&n.isArray(t.line.color)?(s(\"line.colorscale\"),o(t,e,i,s,{prefix:\"line.\",cLetter:\"c\"})):s(\"line.color\",r)}(t,e,r,l,c),c(\"domain.x\"),c(\"domain.y\"),Array.isArray(u)&&u.length||(e.visible=!1);var f={family:l.font.family,size:Math.round(l.font.size*(10/12)),color:l.font.color};n.coerceFont(c,\"labelfont\",f),n.coerceFont(c,\"tickfont\",f),n.coerceFont(c,\"rangefont\",f)}},{\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632,\"../../lib\":743,\"./attributes\":1031,\"./constants\":1035}],1037:[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\",\"regl\",\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1031,\"./base_plot\":1032,\"./calc\":1033,\"./colorbar\":1034,\"./defaults\":1036,\"./plot\":1040}],1038:[function(t,e,r){\"use strict\";function n(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 i(t,e,r,i,a,o){function s(c){var u;u=Math.min(i,a-c*i),o.offset=h*c*i,o.count=h*u,0===c&&(window.cancelAnimationFrame(r.currentRafs[l]),delete r.currentRafs[l],n(t,o.scissorX,o.scissorY,o.scissorWidth,o.viewBoxSize[1])),r.clearOnly||(e(o),c*i+u<a&&(r.currentRafs[l]=window.requestAnimationFrame(function(){s(c+1)})),r.drawCompleted=!1)}var l=o.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:m})}(t),r.drawCompleted=!0),s(0)}function a(t){return Math.max(u,Math.min(1-u,t))}function o(t,e){return(t>>>8*e)%256/255}function s(t,e){var r={};return[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15].map(function(r){return function(t,e,r){var n,i,a,o=[];for(i=0;i<t;i++)for(a=0;a<h;a++)for(n=0;n<d;n++)o.push(e[i*f+r*d+n]),r*d+n===f-1&&a%2==0&&(o[o.length-1]*=-1);return o}(t,e,r)}).forEach(function(t,e){r[\"p\"+e.toString(16)]=t}),r}function l(t,e,r){return t+e<=r}var c=t(\"./constants\"),u=1e-6,f=64,h=2,d=4,p=[119,119,119],m=new Uint8Array(4),g=new Uint8Array(4);e.exports=function(t,e,r){function u(t,e,r,n,i,a,o,s,u,f,d){var p,g,v,b,_=[t,e],w=c.verticalPadding/a,k=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})}),A=[0,1].map(function(){return[0,1,2,3].map(function(){return new Float32Array(16)})});for(p=0;p<2;p++)for(b=_[p],g=0;g<4;g++)for(v=0;v<16;v++){var S=v+16*g;k[p][g][v]=v+16*g===b?1:0,A[p][g][v]=(!M&&l(v,16*g,I)?T[0===S?0:1+(S-1)%(T.length-1)].filter[p]:p)+(2*p-1)*w}return{key:o,resolution:[y,x],viewBoxPosition:[r+D,n],viewBoxSize:[i,a],i:t,ii:e,dim1A:k[0][0],dim1B:k[0][1],dim1C:k[0][2],dim1D:k[0][3],dim2A:k[1][0],dim2B:k[1][1],dim2C:k[1][2],dim2D:k[1][3],loA:A[0][0],loB:A[0][1],loC:A[0][2],loD:A[0][3],hiA:A[1][0],hiB:A[1][1],hiC:A[1][2],hiD:A[1][3],colorClamp:j,scatter:s||0,scissorX:(u===f?0:r+D)+(h.pad.l-D)+h.layoutWidth*m.x[0],scissorWidth:(u===d?y-r+D:i+.5)+(u===f?r+D:0),scissorY:n+h.pad.b+h.layoutHeight*m.y[0],scissorHeight:a,viewportX:h.pad.l-D+h.layoutWidth*m.x[0],viewportY:h.pad.b+h.layoutHeight*m.y[0],viewportWidth:y,viewportHeight:x}}var h=e.model,d=e.viewModel,m=h.domain,v=h.lines,y=h.canvasWidth,x=h.canvasHeight,b=d.dimensions,_=d.panels,w=h.unitToColor,M=e.context,k=e.pick,A={currentRafs:{},drawCompleted:!0,clearOnly:!1},T=b.slice(),S=T.length,E=T[0]?T[0].values.length:0,L=M,C=k?v.color.map(function(t,e){return e/v.color.length}):v.color,z=Math.max(1/255,Math.pow(1/C.length,1/3)),D=v.canvasOverdrag,I=_.length,P=function(t,e,r,n){for(var i=[],s=0;s<t;s++)for(var l=0;l<f;l++)i.push(l<e?r[l].paddedUnitValues[s]:l===f-1?a(n[s]):l>=f-4?o(s,f-2-l):.5);return i}(E,S,T,C),O=s(E,P),F=e.regl,R=F.texture({shape:[256,1],format:\"rgba\",type:\"uint8\",mag:\"nearest\",min:\"nearest\",data:function(t,e,r){for(var n=[],i=0;i<256;i++){var a=t(i/255);n.push((e?p:a).concat(r))}return n}(w,M,Math.round(255*(M?z:1)))}),N=F({profile:!1,blend:{enable:L,func:{srcRGB:\"src alpha\",dstRGB:\"one minus src alpha\",srcAlpha:1,dstAlpha:1},equation:{rgb:\"add\",alpha:\"add\"},color:[0,0,0,0]},depth:{enable:!L,mask:!0,func:\"less\",range:[0,1]},cull:{enable:!0,face:\"back\"},scissor:{enable:!0,box:{x:F.prop(\"scissorX\"),y:F.prop(\"scissorY\"),width:F.prop(\"scissorWidth\"),height:F.prop(\"scissorHeight\")}},viewport:{x:F.prop(\"viewportX\"),y:F.prop(\"viewportY\"),width:F.prop(\"viewportWidth\"),height:F.prop(\"viewportHeight\")},dither:!1,vert:k?\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 p0, p1, p2, p3,\\n p4, p5, p6, p7,\\n p8, p9, pa, pb,\\n pc, pd, pe;\\n\\nattribute vec4 pf;\\n\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution,\\n viewBoxPosition,\\n viewBoxSize;\\n\\nuniform sampler2D palette;\\n\\nuniform vec2 colorClamp;\\n\\nuniform float scatter;\\n\\nvarying vec4 fragColor;\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit = vec4(1, 1, 1, 1);\\nvec2 xyProjection = vec2(1, 1);\\n\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\n return mat4(clamp(m[0], lo[0], hi[0]),\\n clamp(m[1], lo[1], hi[1]),\\n clamp(m[2], lo[2], hi[2]),\\n clamp(m[3], lo[3], hi[3]));\\n}\\n\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\n return mclamp(p, lo, hi) == p;\\n}\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * unit, unit);\\n}\\n\\nvoid main() {\\n\\n float x = 0.5 * sign(pf[3]) + 0.5;\\n float prominence = abs(pf[3]);\\n float depth = 1.0 - prominence;\\n\\n mat4 pA = mat4(p0, p1, p2, p3);\\n mat4 pB = mat4(p4, p5, p6, p7);\\n mat4 pC = mat4(p8, p9, pa, pb);\\n mat4 pD = mat4(pc, pd, pe, abs(pf));\\n\\n float show = float(mshow(pA, loA, hiA) &&\\n mshow(pB, loB, hiB) &&\\n mshow(pC, loC, hiC) &&\\n mshow(pD, loD, hiD));\\n\\n vec2 yy = show * vec2(val(pA, dim2A) + val(pB, dim2B) + val(pC, dim2C) + val(pD, dim2D),\\n val(pA, dim1A) + val(pB, dim1B) + val(pC, dim1C) + val(pD, dim1D));\\n\\n vec2 dimensionToggle = vec2(x, 1.0 - x);\\n\\n vec2 scatterToggle = vec2(scatter, 1.0 - scatter);\\n\\n float y = dot(yy, dimensionToggle);\\n mat2 xy = mat2(viewBoxSize * yy + dimensionToggle, viewBoxSize * vec2(x, y));\\n\\n vec2 viewBoxXY = viewBoxPosition + xy * scatterToggle;\\n\\n float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n gl_Position = vec4(\\n xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n depthOrHide,\\n 1.0\\n );\\n\\n // pick coloring\\n fragColor = vec4(pf.rgb, 1.0);\\n}\\n\":\"precision highp float;\\n#define GLSLIFY 1\\n\\nattribute vec4 p0, p1, p2, p3,\\n p4, p5, p6, p7,\\n p8, p9, pa, pb,\\n pc, pd, pe;\\n\\nattribute vec4 pf;\\n\\nuniform mat4 dim1A, dim2A, dim1B, dim2B, dim1C, dim2C, dim1D, dim2D,\\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\\n\\nuniform vec2 resolution,\\n viewBoxPosition,\\n viewBoxSize;\\n\\nuniform sampler2D palette;\\n\\nuniform vec2 colorClamp;\\n\\nuniform float scatter;\\n\\nvarying vec4 fragColor;\\n\\nvec4 zero = vec4(0, 0, 0, 0);\\nvec4 unit = vec4(1, 1, 1, 1);\\nvec2 xyProjection = vec2(1, 1);\\n\\nmat4 mclamp(mat4 m, mat4 lo, mat4 hi) {\\n return mat4(clamp(m[0], lo[0], hi[0]),\\n clamp(m[1], lo[1], hi[1]),\\n clamp(m[2], lo[2], hi[2]),\\n clamp(m[3], lo[3], hi[3]));\\n}\\n\\nbool mshow(mat4 p, mat4 lo, mat4 hi) {\\n return mclamp(p, lo, hi) == p;\\n}\\n\\nfloat val(mat4 p, mat4 v) {\\n return dot(matrixCompMult(p, v) * unit, unit);\\n}\\n\\nvoid main() {\\n\\n float x = 0.5 * sign(pf[3]) + 0.5;\\n float prominence = abs(pf[3]);\\n float depth = 1.0 - prominence;\\n\\n mat4 pA = mat4(p0, p1, p2, p3);\\n mat4 pB = mat4(p4, p5, p6, p7);\\n mat4 pC = mat4(p8, p9, pa, pb);\\n mat4 pD = mat4(pc, pd, pe, abs(pf));\\n\\n float show = float(mshow(pA, loA, hiA) &&\\n mshow(pB, loB, hiB) &&\\n mshow(pC, loC, hiC) &&\\n mshow(pD, loD, hiD));\\n\\n vec2 yy = show * vec2(val(pA, dim2A) + val(pB, dim2B) + val(pC, dim2C) + val(pD, dim2D),\\n val(pA, dim1A) + val(pB, dim1B) + val(pC, dim1C) + val(pD, dim1D));\\n\\n vec2 dimensionToggle = vec2(x, 1.0 - x);\\n\\n vec2 scatterToggle = vec2(scatter, 1.0 - scatter);\\n\\n float y = dot(yy, dimensionToggle);\\n mat2 xy = mat2(viewBoxSize * yy + dimensionToggle, viewBoxSize * vec2(x, y));\\n\\n vec2 viewBoxXY = viewBoxPosition + xy * scatterToggle;\\n\\n float depthOrHide = depth + 2.0 * (1.0 - show);\\n\\n gl_Position = vec4(\\n xyProjection * (2.0 * viewBoxXY / resolution - 1.0),\\n depthOrHide,\\n 1.0\\n );\\n\\n // visible coloring\\n float clampedColorIndex = clamp((prominence - colorClamp[0]) / (colorClamp[1] - colorClamp[0]), 0.0, 1.0);\\n fragColor = texture2D(palette, vec2((clampedColorIndex * 255.0 + 0.5) / 256.0, 0.5));\\n}\\n\",frag:\"precision lowp float;\\n#define GLSLIFY 1\\n\\nvarying vec4 fragColor;\\n\\nvoid main() {\\n gl_FragColor = fragColor;\\n}\\n\",primitive:\"lines\",lineWidth:1,attributes:O,uniforms:{resolution:F.prop(\"resolution\"),viewBoxPosition:F.prop(\"viewBoxPosition\"),viewBoxSize:F.prop(\"viewBoxSize\"),dim1A:F.prop(\"dim1A\"),dim2A:F.prop(\"dim2A\"),dim1B:F.prop(\"dim1B\"),dim2B:F.prop(\"dim2B\"),dim1C:F.prop(\"dim1C\"),dim2C:F.prop(\"dim2C\"),dim1D:F.prop(\"dim1D\"),dim2D:F.prop(\"dim2D\"),loA:F.prop(\"loA\"),hiA:F.prop(\"hiA\"),loB:F.prop(\"loB\"),hiB:F.prop(\"hiB\"),loC:F.prop(\"loC\"),hiC:F.prop(\"hiC\"),loD:F.prop(\"loD\"),hiD:F.prop(\"hiD\"),palette:R,colorClamp:F.prop(\"colorClamp\"),scatter:F.prop(\"scatter\")},offset:F.prop(\"offset\"),count:F.prop(\"count\")}),j=[0,1],B=[];return{setColorDomain:function(t){j[0]=t[0],j[1]=t[1]},render:function(t,e,a){var o,s,l,c=1/0,f=-1/0;for(o=0;o<I;o++)t[o].dim2.canvasX>f&&(f=t[o].dim2.canvasX,l=o),t[o].dim1.canvasX<c&&(c=t[o].dim1.canvasX,s=o);for(0===I&&n(F,0,0,y,x),o=0;o<I;o++){var h=t[o],d=h.dim1,p=d.crossfilterDimensionIndex,m=h.canvasX,g=h.canvasY,b=h.dim2.crossfilterDimensionIndex,_=h.panelSizeX,w=h.panelSizeY,M=m+_;if(e||!B[p]||B[p][0]!==m||B[p][1]!==M){B[p]=[m,M];var k=u(p,b,m,g,_,w,d.crossfilterDimensionIndex,r||d.scatter?1:0,o,s,l);A.clearOnly=a,i(F,N,A,e?v.blockLineCount:E,E,k)}}},readPixel:function(t,e){return F.read({x:t,y:e,width:1,height:1,data:g}),g},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return F.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){t.style[\"pointer-events\"]=\"none\",R.destroy()}}}},{\"./constants\":1035}],1039:[function(t,e,r){\"use strict\";function n(t){return!(\"visible\"in t)||t.visible}function i(t){var e=t.range?t.range[0]:d.min(t.values),r=t.range?t.range[1]:d.max(t.values);return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(r)&&isFinite(r)||(r=0),e===r&&(void 0===e?(e=0,r=1):0===e?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function a(t,e){var r,n,i,a,o;for(r=0,i=1/0,a=(n=t.range())[0];r<n.length;r++){if((o=Math.abs(n[r]-e))>i)return a;i=o,a=n[r]}return n[n.length-1]}function o(t){return d.scale.linear().domain(i(t))}function s(t,e,r){var i=v(e),a=i.trace,s=i.lineColor,l=i.cscale,c=a.line,u=a.domain,p=a.dimensions,m=t.width,g=a.labelfont,y=a.tickfont,x=a.rangefont,b=h.extendDeep({},c,{color:s.map(o({values:s,range:[c.cmin,c.cmax]})),blockLineCount:f.blockLineCount,canvasOverdrag:f.overdrag*f.canvasPixelRatio}),_=Math.floor(m*(u.x[1]-u.x[0])),w=Math.floor(t.height*(u.y[1]-u.y[0])),M=t.margin||{l:80,r:80,t:100,b:80},k=_,A=w;return{key:r,colCount:p.filter(n).length,dimensions:p,tickDistance:f.tickDistance,unitToColor:function(t){var e=t.map(function(t){return t[0]}),r=t.map(function(t){return t[1]}).map(function(t){return d.rgb(t)}),n=\"rgb\".split(\"\").map(function(t){return d.scale.linear().clamp(!0).domain(e).range(r.map(function(t){return function(e){return e[t]}}(t)))});return function(t){return n.map(function(e){return e(t)})}}(l),lines:b,labelFont:g,tickFont:y,rangeFont:x,layoutWidth:m,layoutHeight:t.height,domain:u,translateX:u.x[0]*m,translateY:t.height-u.y[1]*t.height,pad:M,canvasWidth:k*f.canvasPixelRatio+2*b.canvasOverdrag,canvasHeight:A*f.canvasPixelRatio,width:k,height:A,canvasPixelRatio:f.canvasPixelRatio}}function l(t){var e=t.width,r=t.height,a=t.dimensions,s=t.canvasPixelRatio,l=function(r){return e*r/Math.max(1,t.colCount-1)},c=f.verticalPadding/(r*s),u=1-2*c,h=function(t){return c+u*t},p={key:t.key,xScale:l,model:t},m={};return p.dimensions=a.filter(n).map(function(e,n){var a=o(e),c=m[e.label];m[e.label]=(c||0)+1;return{key:e.label+(c?\"__\"+c:\"\"),label:e.label,tickFormat:e.tickformat,tickvals:e.tickvals,ticktext:e.ticktext,ordinal:!!e.tickvals,scatter:f.scatter||e.scatter,xIndex:n,crossfilterDimensionIndex:n,visibleIndex:e._index,height:r,values:e.values,paddedUnitValues:e.values.map(a).map(h),xScale:l,x:l(n),canvasX:l(n)*s,unitScale:function(t,e){return d.scale.linear().range([t-e,e])}(r,f.verticalPadding),domainScale:function(t,e,r){var n=i(r),a=r.ticktext;return r.tickvals?d.scale.ordinal().domain(r.tickvals.map(function(t,e){return function(r,n){if(e){var i=e[n];return null===i||void 0===i?t(r):i}return t(r)}}(d.format(r.tickformat),a))).range(r.tickvals.map(function(t){return(t-n[0])/(n[1]-n[0])}).map(function(r){return t-e+r*(e-(t-e))})):d.scale.linear().domain(n).range([t-e,e])}(r,f.verticalPadding,e),ordinalScale:function(t){var e=i(t);return t.tickvals&&d.scale.ordinal().domain(t.tickvals).range(t.tickvals.map(function(t){return(t-e[0])/(e[1]-e[0])}))}(e),domainToUnitScale:a,filter:e.constraintrange?e.constraintrange.map(a):[0,1],parent:p,model:t}}),p}function c(t){t.classed(f.cn.axisExtentText,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"default\").style(\"user-select\",\"none\")}var u=t(\"./lines\"),f=t(\"./constants\"),h=t(\"../../lib\"),d=t(\"d3\"),p=t(\"../../components/drawing\"),m=t(\"../../lib/gup\").keyFun,g=t(\"../../lib/gup\").repeat,v=t(\"../../lib/gup\").unwrap;e.exports=function(t,e,r,n,i,o){function y(t){return t.dimensions.some(function(t){return 0!==t.filter[0]||1!==t.filter[1]})}function x(t,e){return(f.scatter?function(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=i,o=0;o<i;o++)for(var s=0;s<i;s++){var l=r[s+o*i]||(r[s+o*i]={}),c=n[s],u=n[s+1];l.dim1=n[o+1],l.dim2=u,l.canvasX=c.canvasX,l.panelSizeX=u.canvasX-c.canvasX,l.panelSizeY=e.model.canvasHeight/a,l.y=o*l.panelSizeY,l.canvasY=e.model.canvasHeight-l.y-l.panelSizeY}}:function(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<i;o++){var s=r[o+a*i]||(r[o+a*i]={}),l=n[o],c=n[o+1];s.dim1=l,s.dim2=c,s.canvasX=l.canvasX,s.panelSizeX=c.canvasX-l.canvasX,s.panelSizeY=e.model.canvasHeight/1,s.y=a*s.panelSizeY,s.canvasY=e.model.canvasHeight-s.y-s.panelSizeY}})(t,e)}function b(t){return t.ordinal?function(){return\"\"}:d.format(t.tickFormat)}function _(){H=!0,k=!0}function w(t){A=!1;var e=t.parent,r=t.brush.extent(),n=e.dimensions,i=n[t.xIndex].filter,a=H&&r[0]===r[1];a&&(t.brush.clear(),d.select(this).select(\"rect.extent\").attr(\"y\",-100));var o=a?[0,1]:r.slice();if(o[0]!==i[0]||o[1]!==i[1]){n[t.xIndex].filter=o,e.focusLayer&&e.focusLayer.render(e.panels,!0);var s=y(e);!G&&s?(e.contextLayer&&e.contextLayer.render(e.panels,!0),G=!0):G&&!s&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),G=!1)}H=!1}function M(t){var e=t.parent,r=t.brush.extent(),n=r[0]===r[1],i=e.dimensions[t.xIndex].filter;if(!n&&t.ordinal&&(i[0]=a(t.ordinalScale,i[0]),i[1]=a(t.ordinalScale,i[1]),i[0]===i[1]&&(i[0]=Math.max(0,i[0]-.05),i[1]=Math.min(1,i[1]+.05)),d.select(this).transition().duration(150).call(t.brush.extent(i)),e.focusLayer.render(e.panels,!0)),e.pickLayer&&e.pickLayer.render(e.panels,!0),A=!0,k=\"ending\",o&&o.filterChanged){var s=t.domainToUnitScale.invert,l=i.map(s);o.filterChanged(e.key,t.visibleIndex,l)}}var k=!1,A=!0,T=n.filter(function(t){return v(t).trace.visible}).map(s.bind(0,i)).map(l);r.each(function(t,e){return h.extendFlat(t,T[e])});var S=r.selectAll(\".gl-canvas\").each(function(t){t.viewModel=T[0],t.model=t.viewModel?t.viewModel.model:null}),E={renderers:[],dimensions:[]},L=null;S.filter(function(t){return t.pick}).style(\"pointer-events\",\"auto\").on(\"mousemove\",function(t){if(A&&t.lineLayer&&o&&o.hover){var e=d.event,r=this.width,n=this.height,i=d.mouse(this),a=i[0],s=i[1];if(a<0||s<0||a>=r||s>=n)return;var l=t.lineLayer.readPixel(a,n-1-s),c=0!==l[3],u=c?l[2]+256*(l[1]+256*l[0]):null,f={x:a,y:s,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:u};u!==L&&(c?o.hover(f):o.unhover&&o.unhover(f),L=u)}}),S.style(\"opacity\",function(t){return t.pick?.01:1}),e.style(\"background\",\"rgba(255, 255, 255, 0)\");var C=e.selectAll(\".\"+f.cn.parcoords).data(T,m);C.exit().remove(),C.enter().append(\"g\").classed(f.cn.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(function(t){var e=t.selectAll(\"defs\").data(g,m);e.enter().append(\"defs\");var r=e.selectAll(\"#\"+f.id.filterBarPattern).data(g,m);r.enter().append(\"pattern\").attr(\"id\",f.id.filterBarPattern).attr(\"patternUnits\",\"userSpaceOnUse\"),r.attr(\"x\",-f.bar.width).attr(\"width\",f.bar.capturewidth).attr(\"height\",function(t){return t.model.height});var n=r.selectAll(\"rect\").data(g,m);n.enter().append(\"rect\").attr(\"shape-rendering\",\"crispEdges\"),n.attr(\"height\",function(t){return t.model.height}).attr(\"width\",f.bar.width).attr(\"x\",f.bar.width/2).attr(\"fill\",f.bar.fillcolor).attr(\"fill-opacity\",f.bar.fillopacity).attr(\"stroke\",f.bar.strokecolor).attr(\"stroke-opacity\",f.bar.strokeopacity).attr(\"stroke-width\",f.bar.strokewidth)}),C.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 z=C.selectAll(\".\"+f.cn.parcoordsControlView).data(g,m);z.enter().append(\"g\").classed(f.cn.parcoordsControlView,!0).style(\"box-sizing\",\"content-box\"),z.attr(\"transform\",function(t){return\"translate(\"+t.model.pad.l+\",\"+t.model.pad.t+\")\"});var D=z.selectAll(\".\"+f.cn.yAxis).data(function(t){return t.dimensions},m);D.enter().append(\"g\").classed(f.cn.yAxis,!0).each(function(t){E.dimensions.push(t)}),z.each(function(t){x(D,t)}),S.filter(function(t){return!!t.viewModel}).each(function(t){t.lineLayer=u(this,t,f.scatter),t.viewModel[t.key]=t.lineLayer,E.renderers.push(function(){t.lineLayer.render(t.viewModel.panels,!0)}),t.lineLayer.render(t.viewModel.panels,!t.context)}),D.attr(\"transform\",function(t){return\"translate(\"+t.xScale(t.xIndex)+\", 0)\"}),D.call(d.behavior.drag().origin(function(t){return t}).on(\"drag\",function(t){var e=t.parent;A=!1,k||(t.x=Math.max(-f.overdrag,Math.min(t.model.width+f.overdrag,d.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,D.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}),x(D,e),D.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr(\"transform\",function(t){return\"translate(\"+t.xScale(t.xIndex)+\", 0)\"}),d.select(this).attr(\"transform\",\"translate(\"+t.x+\", 0)\"),D.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!y(e)),e.focusLayer.render&&e.focusLayer.render(e.panels))}).on(\"dragend\",function(t){var e=t.parent;k?\"ending\"===k&&(k=!1):(t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,x(D,e),d.select(this).attr(\"transform\",function(t){return\"translate(\"+t.x+\", 0)\"}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!y(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),A=!0,o&&o.axesMoved&&o.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex})))})),D.exit().remove();var I=D.selectAll(\".\"+f.cn.axisOverlays).data(g,m);I.enter().append(\"g\").classed(f.cn.axisOverlays,!0),I.selectAll(\".\"+f.cn.axis).remove();var P=I.selectAll(\".\"+f.cn.axis).data(g,m);P.enter().append(\"g\").classed(f.cn.axis,!0),P.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,n=r.domain();d.select(this).call(d.svg.axis().orient(\"left\").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?n:null).tickFormat(t.ordinal?function(t){return t}:null).scale(r)),p.font(P.selectAll(\"text\"),t.model.tickFont)}),P.selectAll(\".domain, .tick>line\").attr(\"fill\",\"none\").attr(\"stroke\",\"black\").attr(\"stroke-opacity\",.25).attr(\"stroke-width\",\"1px\"),P.selectAll(\"text\").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 O=I.selectAll(\".\"+f.cn.axisHeading).data(g,m);O.enter().append(\"g\").classed(f.cn.axisHeading,!0);var F=O.selectAll(\".\"+f.cn.axisTitle).data(g,m);F.enter().append(\"text\").classed(f.cn.axisTitle,!0).attr(\"text-anchor\",\"middle\").style(\"cursor\",\"ew-resize\").style(\"user-select\",\"none\").style(\"pointer-events\",\"auto\"),F.attr(\"transform\",\"translate(0,\"+-f.axisTitleOffset+\")\").text(function(t){return t.label}).each(function(t){p.font(F,t.model.labelFont)});var R=I.selectAll(\".\"+f.cn.axisExtent).data(g,m);R.enter().append(\"g\").classed(f.cn.axisExtent,!0);var N=R.selectAll(\".\"+f.cn.axisExtentTop).data(g,m);N.enter().append(\"g\").classed(f.cn.axisExtentTop,!0),N.attr(\"transform\",\"translate(0,\"+-f.axisExtentOffset+\")\");var j=N.selectAll(\".\"+f.cn.axisExtentTopText).data(g,m);j.enter().append(\"text\").classed(f.cn.axisExtentTopText,!0).call(c),j.text(function(t){return b(t)(t.domainScale.domain().slice(-1)[0])}).each(function(t){p.font(j,t.model.rangeFont)});var B=R.selectAll(\".\"+f.cn.axisExtentBottom).data(g,m);B.enter().append(\"g\").classed(f.cn.axisExtentBottom,!0),B.attr(\"transform\",function(t){return\"translate(0,\"+(t.model.height+f.axisExtentOffset)+\")\"});var U=B.selectAll(\".\"+f.cn.axisExtentBottomText).data(g,m);U.enter().append(\"text\").classed(f.cn.axisExtentBottomText,!0).attr(\"dy\",\"0.75em\").call(c),U.text(function(t){return b(t)(t.domainScale.domain()[0])}).each(function(t){p.font(U,t.model.rangeFont)});var V=I.selectAll(\".\"+f.cn.axisBrush).data(g,m),q=V.enter().append(\"g\").classed(f.cn.axisBrush,!0);V.each(function(t){t.brush||(t.brush=d.svg.brush().y(t.unitScale).on(\"brushstart\",_).on(\"brush\",w).on(\"brushend\",M),0===t.filter[0]&&1===t.filter[1]||t.brush.extent(t.filter),d.select(this).call(t.brush))}),q.selectAll(\"rect\").attr(\"x\",-f.bar.capturewidth/2).attr(\"width\",f.bar.capturewidth),q.selectAll(\"rect.extent\").attr(\"fill\",\"url(#\"+f.id.filterBarPattern+\")\").style(\"cursor\",\"ns-resize\").filter(function(t){return 0===t.filter[0]&&1===t.filter[1]}).attr(\"y\",-100),q.selectAll(\".resize rect\").attr(\"height\",f.bar.handleheight).attr(\"opacity\",0).style(\"visibility\",\"visible\"),q.selectAll(\".resize.n rect\").style(\"cursor\",\"n-resize\").attr(\"y\",f.bar.handleoverlap-f.bar.handleheight),q.selectAll(\".resize.s rect\").style(\"cursor\",\"s-resize\").attr(\"y\",f.bar.handleoverlap);var H=!1,G=!1;return E}},{\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"./constants\":1035,\"./lines\":1038,d3:128}],1040:[function(t,e,r){(function(r){\"use strict\";var n=t(\"./parcoords\"),i=t(\"regl\");e.exports=function(t,e){var a=t._fullLayout,o=a._toppaper,s=a._paperdiv,l=a._glcontainer;a._glcanvas.each(function(e){e.regl||(e.regl=i({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio}))});var c={},u={},f=a._size;e.forEach(function(e,r){c[r]=t.data[r].dimensions,u[r]=t.data[r].dimensions.slice()});n(s,o,l,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,r,n){var i=u[e][r],a=i.constraintrange;a&&2===a.length||(a=i.constraintrange=[]),a[0]=n[0],a[1]=n[1],t.emit(\"plotly_restyle\")},hover:function(e){t.emit(\"plotly_hover\",e)},unhover:function(e){t.emit(\"plotly_unhover\",e)},axesMoved: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)}}(u[e].filter(n));c[e].sort(a),u[e].filter(function(t){return!n(t)}).sort(function(t){return u[e].indexOf(t)}).forEach(function(t){c[e].splice(c[e].indexOf(t),1),c[e].splice(u[e].indexOf(t),0,t)}),t.emit(\"plotly_restyle\")}})}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./parcoords\":1039,regl:506}],1041:[function(t,e,r){\"use strict\";var n=t(\"../../components/color/attributes\"),i=t(\"../../plots/font_attributes\"),a=t(\"../../plots/attributes\"),o=t(\"../../plots/domain_attributes\"),s=t(\"../../lib/extend\").extendFlat,l=i({editType:\"calc\",colorEditType:\"style\"});e.exports={labels:{valType:\"data_array\",editType:\"calc\"},label0:{valType:\"number\",dflt:0,editType:\"calc\"},dlabel:{valType:\"number\",dflt:1,editType:\"calc\"},values:{valType:\"data_array\",editType:\"calc\"},marker:{colors:{valType:\"data_array\",editType:\"calc\"},line:{color:{valType:\"color\",dflt:n.defaultLine,arrayOk:!0,editType:\"style\"},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},editType:\"calc\"},text:{valType:\"data_array\",editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},textinfo:{valType:\"flaglist\",flags:[\"label\",\"text\",\"value\",\"percent\"],extras:[\"none\"],editType:\"calc\"},hoverinfo:s({},a.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),textposition:{valType:\"enumerated\",values:[\"inside\",\"outside\",\"auto\",\"none\"],dflt:\"auto\",arrayOk:!0,editType:\"calc\"},textfont:s({},l,{}),insidetextfont:s({},l,{}),outsidetextfont:s({},l,{}),domain:o({name:\"pie\",trace:!0,editType:\"calc\"}),hole:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},sort:{valType:\"boolean\",dflt:!0,editType:\"calc\"},direction:{valType:\"enumerated\",values:[\"clockwise\",\"counterclockwise\"],dflt:\"counterclockwise\",editType:\"calc\"},rotation:{valType:\"number\",min:-360,max:360,dflt:0,editType:\"calc\"},pull:{valType:\"number\",min:0,max:1,dflt:0,arrayOk:!0,editType:\"calc\"}}},{\"../../components/color/attributes\":617,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1042:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");r.name=\"pie\",r.plot=function(t){var e=n.getModule(\"pie\"),r=function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a._module===e&&!0===a.visible&&r.push(i)}return r}(t.calcdata,e);r.length&&e.plot(t,r)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"pie\"),a=e._has&&e._has(\"pie\");i&&!a&&n._pielayer.selectAll(\"g.trace\").remove()}},{\"../../registry\":873}],1043:[function(t,e,r){\"use strict\";function n(t){var e,r=t.slice();for(e=0;e<t.length;e++)r.push(a(t[e]).lighten(20).toHexString());for(e=0;e<t.length;e++)r.push(a(t[e]).darken(20).toHexString());return r}var i=t(\"fast-isnumeric\"),a=t(\"tinycolor2\"),o=t(\"../../components/color\"),s=t(\"./helpers\");e.exports=function(t,e){function r(t,e){return!!t&&(!!(t=a(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),_[e]||(_[e]=t),t))}var c,u,f,h,d,p=e.values,m=Array.isArray(p)&&p.length,g=e.labels,v=e.marker.colors,y=[],x=t._fullLayout,b=x.colorway,_=x._piecolormap,w={},M=0,k=x.hiddenlabels||[];if(x._piecolorway||b===o.defaults||(x._piecolorway=n(b)),e.dlabel)for(g=new Array(p.length),c=0;c<p.length;c++)g[c]=String(e.label0+c*e.dlabel);var A=(m?p:g).length;for(c=0;c<A;c++){if(m){if(u=p[c],!i(u))continue;if((u=+u)<0)continue}else u=1;void 0!==(f=g[c])&&\"\"!==f||(f=c);var T=w[f=String(f)];void 0===T?(w[f]=y.length,(h=-1!==k.indexOf(f))||(M+=u),y.push({v:u,label:f,color:r(v[c]),i:c,pts:[c],hidden:h})):((d=y[T]).v+=u,d.pts.push(c),d.hidden||(M+=u),!1===d.color&&v[c]&&(d.color=r(v[c],f)))}for(e.sort&&y.sort(function(t,e){return e.v-t.v}),c=0;c<y.length;c++)!1===(d=y[c]).color&&(_[d.label]?d.color=_[d.label]:(_[d.label]=d.color=function(t,e){if(!l){var r=o.defaults;l=n(r)}var i=e||l;return i[t%i.length]}(x._piedefaultcolorcount,x._piecolorway),x._piedefaultcolorcount++));if(y[0]&&(y[0].vTotal=M),e.textinfo&&\"none\"!==e.textinfo){var S,E=-1!==e.textinfo.indexOf(\"label\"),L=-1!==e.textinfo.indexOf(\"text\"),C=-1!==e.textinfo.indexOf(\"value\"),z=-1!==e.textinfo.indexOf(\"percent\"),D=x.separators;for(c=0;c<y.length;c++){if(d=y[c],S=E?[d.label]:[],L){var I=s.getFirstFilled(e.text,d.pts);I&&S.push(I)}C&&S.push(s.formatPieValue(d.v,D)),z&&S.push(s.formatPiePercent(d.v/M,D)),d.text=S.join(\"<br>\")}}return y};var l},{\"../../components/color\":618,\"./helpers\":1046,\"fast-isnumeric\":140,tinycolor2:546}],1044:[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\"),c=o(\"labels\");if(!Array.isArray(c)){if(!Array.isArray(l)||!l.length)return void(e.visible=!1);o(\"label0\"),o(\"dlabel\")}o(\"marker.line.width\")&&o(\"marker.line.color\");var u=o(\"marker.colors\");Array.isArray(u)||(e.marker.colors=[]),o(\"scalegroup\");var f=o(\"text\"),h=o(\"textinfo\",Array.isArray(f)?\"text+percent\":\"percent\");if(o(\"hovertext\"),h&&\"none\"!==h){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\":743,\"./attributes\":1041}],1045:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx/helpers\").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),r}},{\"../../components/fx/helpers\":657}],1046:[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)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r<e.length;r++){var n=t[e[r]];if(n||0===n)return n}},r.castOption=function(t,e){return Array.isArray(t)?r.getFirstFilled(t,e):t||void 0}},{\"../../lib\":743}],1047:[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\":1041,\"./base_plot\":1042,\"./calc\":1043,\"./defaults\":1044,\"./layout_attributes\":1048,\"./layout_defaults\":1049,\"./plot\":1050,\"./style\":1051,\"./style_one\":1052}],1048:[function(t,e,r){\"use strict\";e.exports={hiddenlabels:{valType:\"data_array\",editType:\"calc\"}}},{}],1049:[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\":743,\"./layout_attributes\":1048}],1050:[function(t,e,r){\"use strict\";function n(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 i(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}}var a=t(\"d3\"),o=t(\"../../components/fx\"),s=t(\"../../components/color\"),l=t(\"../../components/drawing\"),c=t(\"../../lib/svg_text_utils\"),u=t(\"./helpers\"),f=t(\"./event_data\");e.exports=function(t,e){var r=t._fullLayout;!function(t,e){var r,n,i,a,o,s,l,c,u,f=[];for(i=0;i<t.length;i++){if(o=t[i][0],s=o.trace,r=e.w*(s.domain.x[1]-s.domain.x[0]),n=e.h*(s.domain.y[1]-s.domain.y[0]),l=s.pull,Array.isArray(l))for(l=0,a=0;a<s.pull.length;a++)s.pull[a]>l&&(l=s.pull[a]);o.r=Math.min(r,n)/(2+2*l),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===f.indexOf(s.scalegroup)&&f.push(s.scalegroup)}for(a=0;a<f.length;a++){for(u=1/0,c=f[a],i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(u=Math.min(u,o.r*o.r/o.vTotal));for(i=0;i<t.length;i++)(o=t[i][0]).trace.scalegroup===c&&(o.r=Math.sqrt(u*o.vTotal))}}(e,r._size);var h=r._pielayer.selectAll(\"g.trace\").data(e);h.enter().append(\"g\").attr({\"stroke-linejoin\":\"round\",class:\"trace\"}),h.exit().remove(),h.order(),h.each(function(e){var h=a.select(this),d=e[0],p=d.trace;!function(t){function e(t){return[a.r*Math.sin(t),-a.r*Math.cos(t)]}var r,n,i,a=t[0],o=a.trace,s=o.rotation*Math.PI/180,l=2*Math.PI/a.vTotal,c=\"px0\",u=\"px1\";if(\"counterclockwise\"===o.direction){for(r=0;r<t.length&&t[r].hidden;r++);if(r===t.length)return;s+=l*t[r].v,l*=-1,c=\"px1\",u=\"px0\"}for(i=e(s),r=0;r<t.length;r++)(n=t[r]).hidden||(n[c]=i,s+=l*n.v/2,n.pxmid=e(s),n.midangle=s,i=e(s+=l*n.v/2),n[u]=i,n.largeArc=n.v>a.vTotal/2?1:0)}(e),h.each(function(){var h=a.select(this).selectAll(\"g.slice\").data(e);h.enter().append(\"g\").classed(\"slice\",!0),h.exit().remove();var m=[[[],[]],[[],[]]],g=!1;h.each(function(e){function s(t,r,n,i){return\"a\"+i*d.r+\",\"+i*d.r+\" 0 \"+e.largeArc+(n?\" 1 \":\" 0 \")+i*(r[0]-t[0])+\",\"+i*(r[1]-t[1])}if(e.hidden)a.select(this).selectAll(\"path,g\").remove();else{e.pointNumber=e.i,e.curveNumber=p.index,m[e.pxmid[1]<0?0:1][e.pxmid[0]<0?0:1].push(e);var h=d.cx,v=d.cy,y=a.select(this),x=y.selectAll(\"path.surface\").data([e]),b=!1,_=!1;if(x.enter().append(\"path\").classed(\"surface\",!0).style({\"pointer-events\":\"all\"}),y.select(\"path.textline\").remove(),y.on(\"mouseover\",function(){var i=t._fullLayout,s=t._fullData[p.index];if(!t._dragging&&!1!==i.hovermode){var l=s.hoverinfo;if(Array.isArray(l)&&(l=o.castHoverinfo({hoverinfo:[u.castOption(l,e.pts)],_module:p._module},i,0)),\"all\"===l&&(l=\"label+text+value+percent+name\"),\"none\"!==l&&\"skip\"!==l&&l){var c=n(e,d),m=h+e.pxmid[0]*(1-c),g=v+e.pxmid[1]*(1-c),y=r.separators,x=[];if(-1!==l.indexOf(\"label\")&&x.push(e.label),-1!==l.indexOf(\"text\")){var w=u.castOption(s.hovertext||s.text,e.pts);w&&x.push(w)}-1!==l.indexOf(\"value\")&&x.push(u.formatPieValue(e.v,y)),-1!==l.indexOf(\"percent\")&&x.push(u.formatPiePercent(e.v/d.vTotal,y));var M=p.hoverlabel,k=M.font;o.loneHover({x0:m-c*d.r,x1:m+c*d.r,y:g,text:x.join(\"<br>\"),name:-1!==l.indexOf(\"name\")?s.name:void 0,idealAlign:e.pxmid[0]<0?\"left\":\"right\",color:u.castOption(M.bgcolor,e.pts)||e.color,borderColor:u.castOption(M.bordercolor,e.pts),fontFamily:u.castOption(k.family,e.pts),fontSize:u.castOption(k.size,e.pts),fontColor:u.castOption(k.color,e.pts)},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t}),b=!0}t.emit(\"plotly_hover\",{points:[f(e,s)],event:a.event}),_=!0}}).on(\"mouseout\",function(r){var n=t._fullLayout,i=t._fullData[p.index];_&&(r.originalEvent=a.event,t.emit(\"plotly_unhover\",{points:[f(e,i)],event:a.event}),_=!1),b&&(o.loneUnhover(n._hoverlayer.node()),b=!1)}).on(\"click\",function(){var r=t._fullLayout,n=t._fullData[p.index];t._dragging||!1===r.hovermode||(t._hoverdata=[f(e,n)],o.click(t,a.event))}),p.pull){var w=+u.castOption(p.pull,e.pts)||0;w>0&&(h+=w*e.pxmid[0],v+=w*e.pxmid[1])}e.cxFinal=h,e.cyFinal=v;var M=p.hole;if(e.v===d.vTotal){var k=\"M\"+(h+e.px0[0])+\",\"+(v+e.px0[1])+s(e.px0,e.pxmid,!0,1)+s(e.pxmid,e.px0,!0,1)+\"Z\";M?x.attr(\"d\",\"M\"+(h+M*e.px0[0])+\",\"+(v+M*e.px0[1])+s(e.px0,e.pxmid,!1,M)+s(e.pxmid,e.px0,!1,M)+\"Z\"+k):x.attr(\"d\",k)}else{var A=s(e.px0,e.px1,!0,1);if(M){var T=1-M;x.attr(\"d\",\"M\"+(h+M*e.px1[0])+\",\"+(v+M*e.px1[1])+s(e.px1,e.px0,!1,M)+\"l\"+T*e.px0[0]+\",\"+T*e.px0[1]+A+\"Z\")}else x.attr(\"d\",\"M\"+h+\",\"+v+\"l\"+e.px0[0]+\",\"+e.px0[1]+A+\"Z\")}var S=u.castOption(p.textposition,e.pts),E=y.selectAll(\"g.slicetext\").data(e.text&&\"none\"!==S?[0]:[]);E.enter().append(\"g\").classed(\"slicetext\",!0),E.exit().remove(),E.each(function(){var r=a.select(this).selectAll(\"text\").data([0]);r.enter().append(\"text\").attr(\"data-notex\",1),r.exit().remove(),r.text(e.text).attr({class:\"slicetext\",transform:\"\",\"text-anchor\":\"middle\"}).call(l.font,\"outside\"===S?p.outsidetextfont:p.insidetextfont).call(c.convertToTspans,t);var o,s=l.bBox(r.node());\"outside\"===S?o=i(s,e):(o=function(t,e,r){var i=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=n(e,r),c={scale:l*r.r*2/i,rCenter:1-l,rotate:0};if(c.scale>=1)return c;var u=a+1/(2*Math.tan(o)),f=r.r*Math.min(1/(Math.sqrt(u*u+.5)+u),s/(Math.sqrt(a*a+s/2)+a)),h={scale:2*f/t.height,rCenter:Math.cos(f/r.r)-f*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>h.scale?g:h;return c.scale<1&&v.scale>c.scale?v:c}(s,e,d),\"auto\"===S&&o.scale<1&&(r.call(l.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(s=l.bBox(r.node())),o=i(s,e)));var u=h+e.pxmid[0]*o.rCenter+(o.x||0),f=v+e.pxmid[1]*o.rCenter+(o.y||0);o.outside&&(e.yLabelMin=f-s.height/2,e.yLabelMid=f,e.yLabelMax=f+s.height/2,e.labelExtraX=0,e.labelExtraY=0,g=!0),r.attr(\"transform\",\"translate(\"+u+\",\"+f+\")\"+(o.scale<1?\"scale(\"+o.scale+\")\":\"\")+(o.rotate?\"rotate(\"+o.rotate+\")\":\"\")+\"translate(\"+-(s.left+s.right)/2+\",\"+-(s.top+s.bottom)/2+\")\")})}}),g&&function(t,e){function r(t,e){return t.pxmid[1]-e.pxmid[1]}function n(t,e){return e.pxmid[1]-t.pxmid[1]}function i(t,r){r||(r={});var n,i,a,s,d=r.labelExtraY+(o?r.yLabelMax:r.yLabelMin),p=o?t.yLabelMin:t.yLabelMax,g=o?t.yLabelMax:t.yLabelMin,v=t.cyFinal+c(t.px0[1],t.px1[1]),y=d-p;if(y*h>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(i=0;i<m.length;i++)(a=m[i])===t||(u.castOption(e.pull,t.pts)||0)>=(u.castOption(e.pull,a.pts)||0)||((t.pxmid[1]-a.pxmid[1])*h>0?(y=a.cyFinal+c(a.px0[1],a.px1[1])-p-t.labelExtraY)*h>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*h>0&&(n=3*f*Math.abs(i-m.indexOf(t)),(s=a.cxFinal+l(a.px0[0],a.px1[0])+n-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*f>0&&(t.labelExtraX+=s)))}var a,o,s,l,c,f,h,d,p,m,g,v,y;for(o=0;o<2;o++)for(s=o?r:n,c=o?Math.max:Math.min,h=o?1:-1,a=0;a<2;a++){for(l=a?Math.max:Math.min,f=a?1:-1,(d=t[o][a]).sort(s),p=t[1-o][a],m=p.concat(d),v=[],g=0;g<d.length;g++)void 0!==d[g].yLabelMid&&v.push(d[g]);for(y=!1,g=0;o&&g<p.length;g++)if(void 0!==p[g].yLabelMid){y=p[g];break}for(g=0;g<v.length;g++){var x=g&&v[g-1];y&&!g&&(x=y),i(v[g],x)}}}(m,p),h.each(function(t){if(t.labelExtraX||t.labelExtraY){var e=a.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=\"M\"+n+\",\"+(t.cyFinal+t.pxmid[1]),o=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var l=t.labelExtraX*t.pxmid[1]/t.pxmid[0],c=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(l)>Math.abs(c)?i+=\"l\"+c*t.pxmid[0]/t.pxmid[1]+\",\"+c+\"H\"+(n+t.labelExtraX+o):i+=\"l\"+t.labelExtraX+\",\"+l+\"v\"+(c-l)+\"h\"+o}else i+=\"V\"+(t.yLabelMid+t.labelExtraY)+\"h\"+o;e.append(\"path\").classed(\"textline\",!0).call(s.stroke,p.outsidetextfont.color).attr({\"stroke-width\":Math.min(2,p.outsidetextfont.size/8),d:i,fill:\"none\"})}})})}),setTimeout(function(){h.selectAll(\"tspan\").each(function(){var t=a.select(this);t.attr(\"dy\")&&t.attr(\"dy\",t.attr(\"dy\"))})},0)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../components/fx\":660,\"../../lib/svg_text_utils\":766,\"./event_data\":1045,\"./helpers\":1046,d3:128}],1051:[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].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll(\"path.surface\").each(function(t){n.select(this).call(i,t,e)})})}},{\"./style_one\":1052,d3:128}],1052:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./helpers\").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style({\"stroke-width\":s}).call(n.fill,e.color).call(n.stroke,o)}},{\"../../components/color\":618,\"./helpers\":1046}],1053:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\");e.exports={x:n.x,y:n.y,xy:{valType:\"data_array\",editType:\"calc\"},indices:{valType:\"data_array\",editType:\"calc\"},xbounds:{valType:\"data_array\",editType:\"calc\"},ybounds:{valType:\"data_array\",editType:\"calc\"},text:n.text,marker:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},opacity:{valType:\"number\",min:0,max:1,dflt:1,arrayOk:!1,editType:\"calc\"},blend:{valType:\"boolean\",dflt:null,editType:\"calc\"},sizemin:{valType:\"number\",min:.1,max:2,dflt:.5,editType:\"calc\"},sizemax:{valType:\"number\",min:.1,dflt:20,editType:\"calc\"},border:{color:{valType:\"color\",arrayOk:!1,editType:\"calc\"},arearatio:{valType:\"number\",min:0,max:1,dflt:0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"}}},{\"../scatter/attributes\":1066}],1054:[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=i(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var i=t(\"gl-pointcloud2d\"),a=t(\"../../lib/str2rgbarray\"),o=t(\"../scatter/get_trace_color\"),s=[\"xaxis\",\"yaxis\"],l=n.prototype;l.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}},l.update=function(t){this.index=t.index,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=o(t,{})},l.updateFast=function(t){var e,r,n,i,o,s,l=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,u=this.pickXYData=t.xy,f=t.xbounds&&t.ybounds,h=t.indices,d=this.bounds;if(u){if(n=u,e=u.length>>>1,f)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(s=0;s<e;s++)i=n[2*s],o=n[2*s+1],i<d[0]&&(d[0]=i),i>d[2]&&(d[2]=i),o<d[1]&&(d[1]=o),o>d[3]&&(d[3]=o);if(h)r=h;else for(r=new Int32Array(e),s=0;s<e;s++)r[s]=s}else for(e=l.length,n=new Float32Array(2*e),r=new Int32Array(e),s=0;s<e;s++)i=l[s],o=c[s],r[s]=s,n[2*s]=i,n[2*s+1]=o,i<d[0]&&(d[0]=i),i>d[2]&&(d[2]=i),o<d[1]&&(d[1]=o),o>d[3]&&(d[3]=o);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var p=a(t.marker.color),m=a(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||c.length<100}this.pointcloudOptions.blend=v,m[3]*=g,this.pointcloudOptions.borderColor=m;var y=t.marker.sizemin,x=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=y,this.pointcloudOptions.sizeMax=x,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions),this.expandAxesFast(d,x/2)},l.expandAxesFast=function(t,e){for(var r,n,i,a=e||.5,o=0;o<2;o++)(n=(r=this.scene[s[o]])._min)||(n=[]),n.push({val:t[o],pad:a}),(i=r._max)||(i=[]),i.push({val:t[o+2],pad:a})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new n(t,e.uid);return r.update(e),r}},{\"../../lib/str2rgbarray\":765,\"../scatter/get_trace_color\":1076,\"gl-pointcloud2d\":235}],1055:[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\":743,\"./attributes\":1053}],1056:[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=[\"gl\",\"gl2d\",\"showLegend\"],n.meta={},e.exports=n},{\"../../plots/gl2d\":829,\"../scatter3d/calc\":1092,\"./attributes\":1053,\"./convert\":1054,\"./defaults\":1055}],1057:[function(t,e,r){\"use strict\";var n=t(\"../../plots/font_attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/color/attributes\"),o=t(\"../../components/fx/attributes\"),s=t(\"../../plots/domain_attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll;e.exports=c({hoverinfo:l({},i.hoverinfo,{flags:[\"label\",\"text\",\"value\",\"percent\",\"name\"]}),hoverlabel:o.hoverlabel,domain:s({name:\"sankey\",trace:!0}),orientation:{valType:\"enumerated\",values:[\"v\",\"h\"],dflt:\"h\"},valueformat:{valType:\"string\",dflt:\".3s\"},valuesuffix:{valType:\"string\",dflt:\"\"},arrangement:{valType:\"enumerated\",values:[\"snap\",\"perpendicular\",\"freeform\",\"fixed\"],dflt:\"snap\"},textfont:n({}),node:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:.5,arrayOk:!0}},pad:{valType:\"number\",arrayOk:!1,min:0,dflt:20},thickness:{valType:\"number\",arrayOk:!1,min:1,dflt:20}},link:{label:{valType:\"data_array\",dflt:[]},color:{valType:\"color\",arrayOk:!0},line:{color:{valType:\"color\",dflt:a.defaultLine,arrayOk:!0},width:{valType:\"number\",min:0,dflt:0,arrayOk:!0}},source:{valType:\"data_array\",dflt:[]},target:{valType:\"data_array\",dflt:[]},value:{valType:\"data_array\",dflt:[]}}},\"calc\",\"nested\")},{\"../../components/color/attributes\":617,\"../../components/fx/attributes\":652,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1058:[function(t,e,r){\"use strict\";var n=t(\"../../plot_api/edit_types\").overrideAll,i=t(\"../../plots/get_data\").getModuleCalcData,a=t(\"./plot\"),o=t(\"../../components/fx/layout_attributes\");r.name=\"sankey\",r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},\"plot\",\"nested\"),r.plot=function(t){var e=i(t.calcdata,\"sankey\");a(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()}},{\"../../components/fx/layout_attributes\":661,\"../../plot_api/edit_types\":773,\"../../plots/get_data\":826,\"./plot\":1063}],1059:[function(t,e,r){\"use strict\";var n=t(\"strongly-connected-components\"),i=t(\"../../lib\"),a=t(\"../../lib/gup\").wrap;e.exports=function(t,e){return function(t,e,r){for(var i=t.map(function(){return[]}),a=0;a<Math.min(e.length,r.length);a++){if(e[a]===r[a])return!0;i[e[a]].push(r[a])}return n(i).components.some(function(t){return t.length>1})}(e.node.label,e.link.source,e.link.target)&&(i.error(\"Circularity is present in the Sankey data. Removing all nodes and links.\"),e.link.label=[],e.link.source=[],e.link.target=[],e.link.value=[],e.link.color=[],e.node.label=[],e.node.color=[]),a({link:e.link,node:e.node})}},{\"../../lib\":743,\"../../lib/gup\":740,\"strongly-connected-components\":537}],1060:[function(t,e,r){\"use strict\";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:\"cubic-in-out\",cn:{sankey:\"sankey\",sankeyLinks:\"sankey-links\",sankeyLink:\"sankey-link\",sankeyNodeSet:\"sankey-node-set\",sankeyNode:\"sankey-node\",nodeRect:\"node-rect\",nodeCapture:\"node-capture\",nodeCentered:\"node-entered\",nodeLabelGuide:\"node-label-guide\",nodeLabel:\"node-label\",nodeLabelTextPath:\"node-label-text-path\"}}},{}],1061:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./attributes\"),a=t(\"../../components/color\"),o=t(\"tinycolor2\");e.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}l(\"node.label\"),l(\"node.pad\"),l(\"node.thickness\"),l(\"node.line.color\"),l(\"node.line.width\");var c=s.colorway;l(\"node.color\",e.node.label.map(function(t,e){return a.addOpacity(function(t){return c[t%c.length]}(e),.8)})),l(\"link.label\"),l(\"link.source\"),l(\"link.target\"),l(\"link.value\"),l(\"link.line.color\"),l(\"link.line.width\"),l(\"link.color\",e.link.value.map(function(){return o(s.paper_bgcolor).getLuminance()<.333?\"rgba(255, 255, 255, 0.6)\":\"rgba(0, 0, 0, 0.2)\"})),l(\"domain.x\"),l(\"domain.y\"),l(\"orientation\"),l(\"valueformat\"),l(\"valuesuffix\"),l(\"arrangement\"),n.coerceFont(l,\"textfont\",n.extendFlat({},s.font));e.node.label.some(function(t,r){return-1===e.link.source.indexOf(r)&&-1===e.link.target.indexOf(r)})&&n.warn(\"Some of the nodes are neither sources nor targets, they will not be displayed.\")}},{\"../../components/color\":618,\"../../lib\":743,\"./attributes\":1057,tinycolor2:546}],1062:[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.moduleType=\"trace\",n.name=\"sankey\",n.basePlotModule=t(\"./base_plot\"),n.categories=[\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1057,\"./base_plot\":1058,\"./calc\":1059,\"./defaults\":1061,\"./plot\":1063}],1063:[function(t,e,r){\"use strict\";function n(t){return\"\"!==t}function i(t,e){return t.filter(function(t){return t.key===e.traceId})}function a(t,e){p.select(t).select(\"path\").style(\"fill-opacity\",e),p.select(t).select(\"rect\").style(\"fill-opacity\",e)}function o(t){p.select(t).select(\"text.name\").style(\"fill\",\"black\")}function s(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function l(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function c(t,e,r){e&&r&&i(r,e).selectAll(\".\"+x.sankeyLink).filter(s(e)).call(f.bind(0,e,r,!1))}function u(t,e,r){e&&r&&i(r,e).selectAll(\".\"+x.sankeyLink).filter(s(e)).call(h.bind(0,e,r,!1))}function f(t,e,r,n){var a=n.datum().link.label;n.style(\"fill-opacity\",.4),a&&i(e,t).selectAll(\".\"+x.sankeyLink).filter(function(t){return t.link.label===a}).style(\"fill-opacity\",.4),r&&i(e,t).selectAll(\".\"+x.sankeyNode).filter(l(t)).call(c)}function h(t,e,r,n){var a=n.datum().link.label;n.style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),a&&i(e,t).selectAll(\".\"+x.sankeyLink).filter(function(t){return t.link.label===a}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),r&&i(e,t).selectAll(x.sankeyNode).filter(l(t)).call(u)}function d(t,e){var r=t.hoverlabel||{},n=y.nestedProperty(r,e).get();return!Array.isArray(n)&&n}var p=t(\"d3\"),m=t(\"./render\"),g=t(\"../../components/fx\"),v=t(\"../../components/color\"),y=t(\"../../lib\"),x=t(\"./constants\").cn,b=y._;e.exports=function(t,e){var r=t._fullLayout,i=r._paper,s=r._size,l=b(t,\"source:\")+\" \",y=b(t,\"target:\")+\" \",_=b(t,\"incoming flow count:\")+\" \",w=b(t,\"outgoing flow count:\")+\" \";m(i,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},{linkEvents:{hover:function(e,r,n){p.select(e).call(f.bind(0,r,n,!0)),t.emit(\"plotly_hover\",{event:p.event,points:[r.link]})},follow:function(e,i){var s=i.link.trace,c=t._fullLayout._paperdiv.node().getBoundingClientRect(),u=e.getBoundingClientRect(),f=u.left+u.width/2,h=u.top+u.height/2,m=g.loneHover({x:f-c.left,y:h-c.top,name:p.format(i.valueFormat)(i.link.value)+i.valueSuffix,text:[i.link.label||\"\",l+i.link.source.label,y+i.link.target.label].filter(n).join(\"<br>\"),color:d(s,\"bgcolor\")||v.addOpacity(i.tinyColorHue,1),borderColor:d(s,\"bordercolor\"),fontFamily:d(s,\"font.family\"),fontSize:d(s,\"font.size\"),fontColor:d(s,\"font.color\"),idealAlign:p.event.x<f?\"right\":\"left\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});a(m,.65),o(m)},unhover:function(e,n,i){p.select(e).call(h.bind(0,n,i,!0)),t.emit(\"plotly_unhover\",{event:p.event,points:[n.link]}),g.loneUnhover(r._hoverlayer.node())},select:function(e,r){var n=r.link;n.originalEvent=p.event,t._hoverdata=[n],g.click(t,{target:!0})}},nodeEvents:{hover:function(e,r,n){p.select(e).call(c,r,n),t.emit(\"plotly_hover\",{event:p.event,points:[r.node]})},follow:function(e,i){var s=i.node.trace,l=p.select(e).select(\".\"+x.nodeRect),c=t._fullLayout._paperdiv.node().getBoundingClientRect(),u=l.node().getBoundingClientRect(),f=u.left-2-c.left,h=u.right+2-c.left,m=u.top+u.height/4-c.top,v=g.loneHover({x0:f,x1:h,y:m,name:p.format(i.valueFormat)(i.node.value)+i.valueSuffix,text:[i.node.label,_+i.node.targetLinks.length,w+i.node.sourceLinks.length].filter(n).join(\"<br>\"),color:d(s,\"bgcolor\")||i.tinyColorHue,borderColor:d(s,\"bordercolor\"),fontFamily:d(s,\"font.family\"),fontSize:d(s,\"font.size\"),fontColor:d(s,\"font.color\"),idealAlign:\"left\"},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});a(v,.85),o(v)},unhover:function(e,n,i){p.select(e).call(u,n,i),t.emit(\"plotly_unhover\",{event:p.event,points:[n.node]}),g.loneUnhover(r._hoverlayer.node())},select:function(e,r,n){var i=r.node;i.originalEvent=p.event,t._hoverdata=[i],p.select(e).call(u,r,n),g.click(t,{target:!0})}}})}},{\"../../components/color\":618,\"../../components/fx\":660,\"../../lib\":743,\"./constants\":1060,\"./render\":1064,d3:128}],1064:[function(t,e,r){\"use strict\";function n(t){t.lastDraggedX=t.x,t.lastDraggedY=t.y}function i(t){return function(e){return e.node.originalX===t.node.originalX}}function a(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y+t[e].dy/2}function o(t){t.attr(\"transform\",function(t){return\"translate(\"+t.node.x.toFixed(3)+\", \"+(t.node.y-t.node.dy/2).toFixed(3)+\")\"})}function s(t){var e=t.sankey.nodes();!function(t){for(var e=0;e<t.length;e++)t[e].y=t[e].y-t[e].dy/2}(e);var r=t.sankey.link()(t.link);return a(e),r}function l(t){t.call(o)}function c(t,e){t.call(l),e.attr(\"d\",s)}function u(t){t.attr(\"width\",function(t){return t.visibleWidth}).attr(\"height\",function(t){return t.visibleHeight})}function f(t){return t.link.dy>1||t.linkLineWidth>0}function h(t){return\"translate(\"+t.translateX+\",\"+t.translateY+\")\"+(t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\")}function d(t){return\"translate(\"+(t.horizontal?0:t.labelY)+\" \"+(t.horizontal?t.labelY:0)+\")\"}function p(t){return w.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+_.nodeTextOffsetHorizontal:_.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-_.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-_.nodeTextOffsetHorizontal,0]])}function m(t){return t.horizontal?\"matrix(1 0 0 1 0 0)\":\"matrix(0 1 1 0 0 0)\"}function g(t){return t.horizontal?\"scale(1 1)\":\"scale(-1 1)\"}function v(t){return t.darkBackground&&!t.horizontal?\"rgb(255,255,255)\":\"rgb(0,0,0)\"}function y(t){return t.horizontal&&t.left?\"100%\":\"0%\"}function x(t,e,r){t.on(\".basic\",null).on(\"mouseover.basic\",function(t){t.interactionState.dragInProgress||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on(\"mousemove.basic\",function(t){t.interactionState.dragInProgress||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on(\"mouseout.basic\",function(t){t.interactionState.dragInProgress||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on(\"click.basic\",function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||r.select(this,t,e)})}function b(t,e,r){var a=w.behavior.drag().origin(function(t){return t.node}).on(\"dragstart\",function(a){if(\"fixed\"!==a.arrangement&&(E.raiseToTop(this),a.interactionState.dragInProgress=a.node,n(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),\"snap\"===a.arrangement)){var o=a.traceId+\"|\"+Math.floor(a.node.originalX);a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r){var n=r.sankey.nodes().filter(function(t){return t.originalX===r.node.originalX});r.forceLayouts[e]=S.forceSimulation(n).alphaDecay(0).force(\"collide\",S.forceCollide().radius(function(t){return t.dy/2+r.nodePad/2}).strength(1).iterations(_.forceIterations)).force(\"constrain\",function(t,e,r,n){return function(){for(var t=0,i=0;i<r.length;i++){var a=r[i];a===n.interactionState.dragInProgress?(a.x=a.lastDraggedX,a.y=a.lastDraggedY):(a.vx=(a.originalX-a.x)/_.forceTicksPerFrame,a.y=Math.min(n.size-a.dy/2,Math.max(a.dy/2,a.y))),t=Math.max(t,Math.abs(a.vx),Math.abs(a.vy))}!n.interactionState.dragInProgress&&t<.1&&n.forceLayouts[e].alpha()>0&&n.forceLayouts[e].alpha(0)}}(0,e,n,r)).stop()}(0,o,a),function(t,e,r,n){window.requestAnimationFrame(function a(){for(var o=0;o<_.forceTicksPerFrame;o++)r.forceLayouts[n].tick();r.sankey.relayout(),c(t.filter(i(r)),e),r.forceLayouts[n].alpha()>0&&window.requestAnimationFrame(a)})}(t,e,a,o)}}).on(\"drag\",function(r){if(\"fixed\"!==r.arrangement){var a=w.event.x,o=w.event.y;\"snap\"===r.arrangement?(r.node.x=a,r.node.y=o):(\"freeform\"===r.arrangement&&(r.node.x=a),r.node.y=Math.max(r.node.dy/2,Math.min(r.size-r.node.dy/2,o))),n(r.node),\"snap\"!==r.arrangement&&(r.sankey.relayout(),c(t.filter(i(r)),e))}}).on(\"dragend\",function(t){t.interactionState.dragInProgress=!1});t.on(\".drag\",null).call(a)}var _=t(\"./constants\"),w=t(\"d3\"),M=t(\"tinycolor2\"),k=t(\"../../components/color\"),A=t(\"../../components/drawing\"),T=t(\"@plotly/d3-sankey\").sankey,S=t(\"d3-force\"),E=t(\"../../lib\"),L=t(\"../../lib/gup\").keyFun,C=t(\"../../lib/gup\").repeat,z=t(\"../../lib/gup\").unwrap;e.exports=function(t,e,r,n){var i=t.selectAll(\".\"+_.cn.sankey).data(e.filter(function(t){return z(t).trace.visible}).map(function(t,e,r){for(var n,i=z(e).trace,o=i.domain,s=i.node,l=i.link,c=i.arrangement,u=\"h\"===i.orientation,f=i.node.pad,h=i.node.thickness,d=i.node.line.color,p=i.node.line.width,m=i.link.line.color,g=i.link.line.width,v=i.valueformat,y=i.valuesuffix,x=i.textfont,b=t.width*(o.x[1]-o.x[0]),w=t.height*(o.y[1]-o.y[0]),M=s.label.map(function(t,e){return{pointNumber:e,label:t,color:E.isArray(s.color)?s.color[e]:s.color}}),k=l.value.map(function(t,e){return{pointNumber:e,label:l.label[e],color:E.isArray(l.color)?l.color[e]:l.color,source:l.source[e],target:l.target[e],value:t}}),A=T().size(u?[b,w]:[w,b]).nodeWidth(h).nodePadding(f).nodes(M).links(k).layout(_.sankeyIterations),S=A.nodes(),L=0;L<S.length;L++)(n=S[L]).width=b,n.height=w;return a(M),{key:r,trace:i,guid:Math.floor(1e12*(1+Math.random())),horizontal:u,width:b,height:w,nodePad:f,nodeLineColor:d,nodeLineWidth:p,linkLineColor:m,linkLineWidth:g,valueFormat:v,valueSuffix:y,textFont:x,translateX:o.x[0]*b+t.margin.l,translateY:t.height-o.y[1]*t.height+t.margin.t,dragParallel:u?w:b,dragPerpendicular:u?b:w,nodes:M,links:k,arrangement:c,sankey:A,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}.bind(null,r)),L);i.exit().remove(),i.enter().append(\"g\").classed(_.cn.sankey,!0).style(\"box-sizing\",\"content-box\").style(\"position\",\"absolute\").style(\"left\",0).style(\"shape-rendering\",\"geometricPrecision\").style(\"pointer-events\",\"auto\").style(\"box-sizing\",\"content-box\").attr(\"transform\",h),i.transition().ease(_.ease).duration(_.duration).attr(\"transform\",h);var l=i.selectAll(\".\"+_.cn.sankeyLinks).data(C,L);l.enter().append(\"g\").classed(_.cn.sankeyLinks,!0).style(\"fill\",\"none\");var c=l.selectAll(\".\"+_.cn.sankeyLink).data(function(t){return t.sankey.links().filter(function(t){return t.value}).map(function(t,e,r){var n=M(r.color),i=r.source.label+\"|\"+r.target.label,a=t[i];t[i]=(a||0)+1;var o=i+\"__\"+t[i];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:o,traceId:e.key,link:r,tinyColorHue:k.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,interactionState:e.interactionState}}.bind(null,{},t))},L);c.enter().append(\"path\").classed(_.cn.sankeyLink,!0).attr(\"d\",s).call(x,i,n.linkEvents),c.style(\"stroke\",function(t){return f(t)?k.tinyRGB(M(t.linkLineColor)):t.tinyColorHue}).style(\"stroke-opacity\",function(t){return f(t)?k.opacity(t.linkLineColor):t.tinyColorAlpha}).style(\"stroke-width\",function(t){return f(t)?t.linkLineWidth:1}).style(\"fill\",function(t){return t.tinyColorHue}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),c.transition().ease(_.ease).duration(_.duration).attr(\"d\",s),c.exit().transition().ease(_.ease).duration(_.duration).style(\"opacity\",0).remove();var w=i.selectAll(\".\"+_.cn.sankeyNodeSet).data(C,L);w.enter().append(\"g\").classed(_.cn.sankeyNodeSet,!0),w.style(\"cursor\",function(t){switch(t.arrangement){case\"fixed\":return\"default\";case\"perpendicular\":return\"ns-resize\";default:return\"move\"}});var S=w.selectAll(\".\"+_.cn.sankeyNode).data(function(t){var e=t.sankey.nodes();return function(t){var e,r=[];for(e=0;e<t.length;e++)t[e].originalX=t[e].x,t[e].originalY=t[e].y,-1===r.indexOf(t[e].x)&&r.push(t[e].x);for(r.sort(function(t,e){return t-e}),e=0;e<t.length;e++)t[e].originalLayerIndex=r.indexOf(t[e].originalX),t[e].originalLayer=t[e].originalLayerIndex/(r.length-1)}(e),e.filter(function(t){return t.value}).map(function(t,e,r){var n=M(r.color),i=_.nodePadAcross,a=e.nodePad/2,o=r.dx,s=Math.max(.5,r.dy),l=r.label,c=t[l];t[l]=(c||0)+1;var u=l+\"__\"+t[l];return r.trace=e.trace,r.curveNumber=e.trace.index,{key:u,traceId:e.key,node:r,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(o),visibleHeight:s,zoneX:-i,zoneY:-a,zoneWidth:o+2*i,zoneHeight:s+2*a,labelY:e.horizontal?r.dy/2+1:r.dx/2+1,left:1===r.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:k.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,u].join(\" \"),interactionState:e.interactionState}}.bind(null,{},t))},L);S.enter().append(\"g\").classed(_.cn.sankeyNode,!0).call(o).call(x,i,n.nodeEvents),S.call(b,c,n),S.transition().ease(_.ease).duration(_.duration).call(o),S.exit().transition().ease(_.ease).duration(_.duration).style(\"opacity\",0).remove();var D=S.selectAll(\".\"+_.cn.nodeRect).data(C);D.enter().append(\"rect\").classed(_.cn.nodeRect,!0).call(u),D.style(\"stroke-width\",function(t){return t.nodeLineWidth}).style(\"stroke\",function(t){return k.tinyRGB(M(t.nodeLineColor))}).style(\"stroke-opacity\",function(t){return k.opacity(t.nodeLineColor)}).style(\"fill\",function(t){return t.tinyColorHue}).style(\"fill-opacity\",function(t){return t.tinyColorAlpha}),D.transition().ease(_.ease).duration(_.duration).call(u);var I=S.selectAll(\".\"+_.cn.nodeCapture).data(C);I.enter().append(\"rect\").classed(_.cn.nodeCapture,!0).style(\"fill-opacity\",0),I.attr(\"x\",function(t){return t.zoneX}).attr(\"y\",function(t){return t.zoneY}).attr(\"width\",function(t){return t.zoneWidth}).attr(\"height\",function(t){return t.zoneHeight});var P=S.selectAll(\".\"+_.cn.nodeCentered).data(C);P.enter().append(\"g\").classed(_.cn.nodeCentered,!0).attr(\"transform\",d),P.transition().ease(_.ease).duration(_.duration).attr(\"transform\",d);var O=P.selectAll(\".\"+_.cn.nodeLabelGuide).data(C);O.enter().append(\"path\").classed(_.cn.nodeLabelGuide,!0).attr(\"id\",function(t){return t.uniqueNodeLabelPathId}).attr(\"d\",p).attr(\"transform\",m),O.transition().ease(_.ease).duration(_.duration).attr(\"d\",p).attr(\"transform\",m);var F=P.selectAll(\".\"+_.cn.nodeLabel).data(C);F.enter().append(\"text\").classed(_.cn.nodeLabel,!0).attr(\"transform\",g).style(\"user-select\",\"none\").style(\"cursor\",\"default\").style(\"fill\",\"black\"),F.style(\"text-shadow\",function(t){return t.horizontal?\"-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff\":\"none\"}).each(function(t){A.font(F,t.textFont)}),F.transition().ease(_.ease).duration(_.duration).attr(\"transform\",g);var R=F.selectAll(\".\"+_.cn.nodeLabelTextPath).data(C);R.enter().append(\"textPath\").classed(_.cn.nodeLabelTextPath,!0).attr(\"alignment-baseline\",\"middle\").attr(\"xlink:href\",function(t){return\"#\"+t.uniqueNodeLabelPathId}).attr(\"startOffset\",y).style(\"fill\",v),R.text(function(t){return t.horizontal||t.node.dy>5?t.node.label:\"\"}).attr(\"text-anchor\",function(t){return t.horizontal&&t.left?\"end\":\"start\"}),R.transition().ease(_.ease).duration(_.duration).attr(\"startOffset\",y).style(\"fill\",v)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"./constants\":1060,\"@plotly/d3-sankey\":41,d3:128,\"d3-force\":124,tinycolor2:546}],1065:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;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 i=e.marker;if(i){n.mergeArray(i.size,t,\"ms\"),n.mergeArray(i.opacity,t,\"mo\"),n.mergeArray(i.symbol,t,\"mx\"),n.mergeArray(i.color,t,\"mc\");var a=i.line;i.line&&(n.mergeArray(a.color,t,\"mlc\"),n.mergeArray(a.width,t,\"mlw\"));var o=i.gradient;o&&\"none\"!==o.type&&(n.mergeArray(o.type,t,\"mgt\"),n.mergeArray(o.color,t,\"mgc\"))}}},{\"../../lib\":743}],1066:[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(\"../../plots/font_attributes\"),s=t(\"../../components/drawing/attributes\").dash,l=t(\"../../components/drawing\"),c=(t(\"./constants\"),t(\"../../lib/extend\").extendFlat);e.exports={x:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},x0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dx:{valType:\"number\",dflt:1,editType:\"calc\"},y:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},y0:{valType:\"any\",dflt:0,editType:\"calc+clearAxisTypes\"},dy:{valType:\"number\",dflt:1,editType:\"calc\"},text:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"calc\"},hovertext:{valType:\"string\",dflt:\"\",arrayOk:!0,editType:\"style\"},mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\",\"text\"],extras:[\"none\"],editType:\"calc\"},hoveron:{valType:\"flaglist\",flags:[\"points\",\"fills\"],editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},shape:{valType:\"enumerated\",values:[\"linear\",\"spline\",\"hv\",\"vh\",\"hvh\",\"vhv\"],dflt:\"linear\",editType:\"plot\"},smoothing:{valType:\"number\",min:0,max:1.3,dflt:1,editType:\"plot\"},dash:c({},s,{editType:\"style\"}),simplify:{valType:\"boolean\",dflt:!0,editType:\"plot\"},editType:\"plot\"},connectgaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},cliponaxis:{valType:\"boolean\",dflt:!0,editType:\"plot\"},fill:{valType:\"enumerated\",values:[\"none\",\"tozeroy\",\"tozerox\",\"tonexty\",\"tonextx\",\"toself\",\"tonext\"],dflt:\"none\",editType:\"calc\"},fillcolor:{valType:\"color\",editType:\"style\"},marker:c({symbol:{valType:\"enumerated\",values:l.symbolList,dflt:\"circle\",arrayOk:!0,editType:\"style\"},opacity:{valType:\"number\",min:0,max:1,arrayOk:!0,editType:\"style\"},size:{valType:\"number\",min:0,dflt:6,arrayOk:!0,editType:\"calcIfAutorange\"},maxdisplayed:{valType:\"number\",min:0,dflt:0,editType:\"plot\"},sizeref:{valType:\"number\",dflt:1,editType:\"calc\"},sizemin:{valType:\"number\",min:0,dflt:0,editType:\"calc\"},sizemode:{valType:\"enumerated\",values:[\"diameter\",\"area\"],dflt:\"diameter\",editType:\"calc\"},showscale:{valType:\"boolean\",dflt:!1,editType:\"calc\"},colorbar:a,line:c({width:{valType:\"number\",min:0,arrayOk:!0,editType:\"style\"},editType:\"calc\"},n(\"marker.line\")),gradient:{type:{valType:\"enumerated\",values:[\"radial\",\"horizontal\",\"vertical\",\"none\"],arrayOk:!0,dflt:\"none\",editType:\"calc\"},color:{valType:\"color\",arrayOk:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},n(\"marker\")),selected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},unselected:{marker:{opacity:{valType:\"number\",min:0,max:1,editType:\"style\"},color:{valType:\"color\",editType:\"style\"},size:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},textfont:{color:{valType:\"color\",editType:\"style\"},editType:\"style\"},editType:\"style\"},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,editType:\"calc\"},textfont:o({editType:\"calc\",colorEditType:\"style\",arrayOk:!0}),r:{valType:\"data_array\",editType:\"calc\"},t:{valType:\"data_array\",editType:\"calc\"},error_y:i,error_x:i}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/drawing\":643,\"../../components/drawing/attributes\":642,\"../../components/errorbars/attributes\":645,\"../../lib/extend\":732,\"../../plots/font_attributes\":816,\"./constants\":1072}],1067:[function(t,e,r){\"use strict\";function n(t,e){if(s.hasMarkers(t)){var r,n=t.marker,i=1.6*(t.marker.sizeref||1);if(r=\"area\"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/i),3)}:function(t){return Math.max((t||0)/i,3)},Array.isArray(n.size)){var o={type:\"linear\"};a.setConvert(o);var l=o.makeCalcdata(t.marker,\"size\");return l.length>e&&l.splice(e,l.length-e),l.map(r)}return r(n.size)}}var i=t(\"fast-isnumeric\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../constants/numerical\").BADNUM,s=t(\"./subtypes\"),l=t(\"./colorscale_calc\"),c=t(\"./arrays_to_calcdata\"),u=t(\"./calc_selection\");e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis||\"x\"),f=a.getFromId(t,e.yaxis||\"y\"),h=r.makeCalcdata(e,\"x\"),d=f.makeCalcdata(e,\"y\"),p=Math.min(h.length,d.length);r._minDtick=0,f._minDtick=0,h.length>p&&h.splice(p,h.length-p),d.length>p&&d.splice(p,d.length-p);var m={padded:!0},g={padded:!0},v=n(e,p);v&&(m.ppad=g.ppad=v),!(\"tozerox\"===e.fill||\"tonextx\"===e.fill&&t.firstscatter)||h[0]===h[p-1]&&d[0]===d[p-1]?e.error_y.visible||-1===[\"tonexty\",\"tozeroy\"].indexOf(e.fill)&&(s.hasMarkers(e)||s.hasText(e))||(m.padded=!1,m.ppad=0):m.tozero=!0,!(\"tozeroy\"===e.fill||\"tonexty\"===e.fill&&t.firstscatter)||h[0]===h[p-1]&&d[0]===d[p-1]?-1!==[\"tonextx\",\"tozerox\"].indexOf(e.fill)&&(g.padded=!1):g.tozero=!0,a.expand(r,h,m),a.expand(f,d,g);for(var y=new Array(p),x=0;x<p;x++)y[x]=i(h[x])&&i(d[x])?{x:h[x],y:d[x]}:{x:o,y:o},e.ids&&(y[x].id=String(e.ids[x]));return c(y,e),l(e),u(y,e),t.firstscatter=!1,y},calcMarkerSize:n}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"./arrays_to_calcdata\":1065,\"./calc_selection\":1068,\"./colorscale_calc\":1071,\"./subtypes\":1088,\"fast-isnumeric\":140}],1068:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e){Array.isArray(e.selectedpoints)&&n.tagSelected(t,e)}},{\"../../lib\":743}],1069:[function(t,e,r){\"use strict\";e.exports=function(t){for(var e=0;e<t.length;e++){var r=t[e];if(\"scatter\"===r.type){var n=r.fill;if(\"none\"!==n&&\"toself\"!==n&&(r.opacity=void 0,\"tonexty\"===n||\"tonextx\"===n))for(var i=e-1;i>=0;i--){var a=t[i];if(\"scatter\"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1070:[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,c=\"cb\"+r.uid;if(t._fullLayout._infolayer.selectAll(\".\"+c).remove(),void 0!==l&&l.showscale){var u=l.color,f=l.cmin,h=l.cmax;n(f)||(f=i.aggNums(Math.min,null,u)),n(h)||(h=i.aggNums(Math.max,null,u));var d=e[0].t.cb=s(t,c),p=o.makeColorScaleFunc(o.extractScale(l.colorscale,f,h),{noNumericCheck:!0});d.fillcolor(p).filllevels({start:f,end:h,size:(h-f)/254}).options(l.colorbar)()}else a.autoMargin(t,c)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1071:[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\":625,\"../../components/colorscale/has_colorscale\":632,\"./subtypes\":1088}],1072:[function(t,e,r){\"use strict\";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20}},{}],1073:[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\"),c=t(\"./line_defaults\"),u=t(\"./line_shape_defaults\"),f=t(\"./text_defaults\"),h=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=g<a.PTS_LINESONLY?\"lines+markers\":\"lines\";if(g){m(\"text\"),m(\"hovertext\"),m(\"mode\",v),o.hasLines(e)&&(c(t,e,r,p,m),u(t,e,m),m(\"connectgaps\"),m(\"line.simplify\")),o.hasMarkers(e)&&l(t,e,r,p,m,{gradient:!0}),o.hasText(e)&&f(t,e,p,m);var y=[];(o.hasMarkers(e)||o.hasText(e))&&(m(\"cliponaxis\"),m(\"marker.maxdisplayed\"),y.push(\"points\")),m(\"fill\"),\"none\"!==e.fill&&(h(t,e,r,m),o.hasLines(e)||u(t,e,m)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||y.push(\"fills\"),m(\"hoveron\",y.join(\"+\")||\"points\"),d(t,e,r,{axis:\"y\"}),d(t,e,r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,m)}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"./attributes\":1066,\"./constants\":1072,\"./fillcolor_defaults\":1075,\"./line_defaults\":1079,\"./line_shape_defaults\":1081,\"./marker_defaults\":1084,\"./subtypes\":1088,\"./text_defaults\":1089,\"./xy_defaults\":1090}],1074:[function(t,e,r){\"use strict\";function n(t){return t||0===t}var i=t(\"../../lib\");e.exports=function(t,e,r){var a=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},o=i.extractOption(t,e,\"htx\",\"hovertext\");if(n(o))return a(o);var s=i.extractOption(t,e,\"tx\",\"text\");return n(s)?a(s):void 0}},{\"../../lib\":743}],1075:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\");e.exports=function(t,e,r,i){var a=!1;if(e.marker){var o=e.marker.color,s=(e.marker.line||{}).color;o&&!Array.isArray(o)?a=o:s&&!Array.isArray(s)&&(a=s)}i(\"fillcolor\",n.addOpacity((e.line||{}).color||a||r,.5))}},{\"../../components/color\":618}],1076:[function(t,e,r){\"use strict\";var n=t(\"../../components/color\"),i=t(\"./subtypes\");e.exports=function(t,e){var r,a;if(\"lines\"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if(\"none\"===t.mode)return t.fill?t.fillcolor:\"\";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:\"\")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},{\"../../components/color\":618,\"./subtypes\":1088}],1077:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/fx\"),a=t(\"../../components/errorbars\"),o=t(\"./get_trace_color\"),s=t(\"../../components/color\"),l=t(\"./fill_hover_text\"),c=i.constants.MAXDIST;e.exports=function(t,e,r,u){var f=t.cd,h=f[0].trace,d=t.xa,p=t.ya,m=d.c2p(e),g=p.c2p(r),v=[m,g],y=h.hoveron||\"\",x=-1!==h.mode.indexOf(\"markers\")?3:.5;if(-1!==y.indexOf(\"points\")){var b=function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(d.c2p(t.x)-m);return n<e?r*n/e:n-e+r},_=function(t){var e=Math.max(3,t.mrc||0),r=1-1/e,n=Math.abs(p.c2p(t.y)-g);return n<e?r*n/e:n-e+r},w=function(t){var e=Math.max(x,t.mrc||0),r=d.c2p(t.x)-m,n=p.c2p(t.y)-g;return Math.max(Math.sqrt(r*r+n*n)-e,1-x/e)},M=i.getDistanceFunction(u,b,_,w);if(i.getClosest(f,M,t),!1!==t.index){var k=f[t.index],A=d.c2p(k.x,!0),T=p.c2p(k.y,!0),S=k.mrc||1;return n.extendFlat(t,{color:o(h,k),x0:A-S,x1:A+S,xLabelVal:k.x,y0:T-S,y1:T+S,yLabelVal:k.y,kink:Math.max(x,k.mrc||0)}),l(k,h,t),a.hoverInfo(k,h,t),[t]}}if(-1!==y.indexOf(\"fills\")&&h._polygons){var E,L,C,z,D,I,P,O,F,R=h._polygons,N=[],j=!1,B=1/0,U=-1/0,V=1/0,q=-1/0;for(E=0;E<R.length;E++)(C=R[E]).contains(v)&&(j=!j,N.push(C),V=Math.min(V,C.ymin),q=Math.max(q,C.ymax));if(j){var H=((V=Math.max(V,0))+(q=Math.min(q,p._length)))/2;for(E=0;E<N.length;E++)for(z=N[E].pts,L=1;L<z.length;L++)(O=z[L-1][1])>H!=(F=z[L][1])>=H&&(I=z[L-1][0],P=z[L][0],F-O&&(D=I+(P-I)*(H-O)/(F-O),B=Math.min(B,D),U=Math.max(U,D)));B=Math.max(B,0),U=Math.min(U,d._length);var G=s.defaultLine;return s.opacity(h.fillcolor)?G=h.fillcolor:s.opacity((h.line||{}).color)&&(G=h.line.color),n.extendFlat(t,{distance:c+10,x0:B,x1:U,y0:H,y1:H,color:G}),delete t.index,h.text&&!Array.isArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}}},{\"../../components/color\":618,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../../lib\":743,\"./fill_hover_text\":1074,\"./get_trace_color\":1076}],1078:[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\").calc,n.arraysToCalcdata=t(\"./arrays_to_calcdata\"),n.plot=t(\"./plot\"),n.colorbar=t(\"./colorbar\"),n.style=t(\"./style\").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\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/cartesian\":800,\"./arrays_to_calcdata\":1065,\"./attributes\":1066,\"./calc\":1067,\"./clean_data\":1069,\"./colorbar\":1070,\"./defaults\":1073,\"./hover\":1077,\"./plot\":1085,\"./select\":1086,\"./style\":1087,\"./subtypes\":1088}],1079:[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\":628,\"../../components/colorscale/has_colorscale\":632}],1080:[function(t,e,r){\"use strict\";var n=t(\"../../constants/numerical\").BADNUM,i=t(\"../../lib\"),a=i.segmentsIntersect,o=i.constrain,s=t(\"./constants\");e.exports=function(t,e){function r(e){var r=t[e],i=P.c2p(r.x),a=O.c2p(r.y);return i===n||a===n?r.intoCenter||!1:[i,a]}function l(t){var e=t[0]/P._length,r=t[1]/O._length;return(1+s.toleranceGrowth*Math.max(0,-e,e-1,-r,r-1))*N}function c(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function u(t,e){for(var r=[],n=0,i=0;i<4;i++){var o=nt[i],s=a(t[0],t[1],e[0],e[1],o[0],o[1],o[2],o[3]);s&&(!n||Math.abs(s.x-r[0][0])>1||Math.abs(s.y-r[0][1])>1)&&(s=[s.x,s.y],n&&c(s,t)<c(r[0],t)?r.unshift(s):r.push(s),n++)}return r}function f(t){if(t[0]<$||t[0]>tt||t[1]<et||t[1]>rt)return[o(t[0],$,tt),o(t[1],et,rt)]}function h(t,e){return t[0]===e[0]&&(t[0]===$||t[0]===tt)||(t[1]===e[1]&&(t[1]===et||t[1]===rt)||void 0)}function d(t,e){var r=[],n=f(t),i=f(e);return n&&i&&h(n,i)?r:(n&&r.push(n),i&&r.push(i),r)}function p(t,e,r){return function(n,a){var o=f(n),s=f(a),l=[];if(o&&s&&h(o,s))return l;o&&l.push(o),s&&l.push(s);var c=2*i.constrain((n[t]+a[t])/2,e,r)-((o||n)[t]+(s||a)[t]);if(c){(o&&s?c>0==o[t]>s[t]?o:s:o||s)[t]+=c}return l}}function m(t){var e=t[0],r=t[1],n=e===q[H-1][0],i=r===q[H-1][1];if(!n||!i)if(H>1){var a=e===q[H-2][0],o=r===q[H-2][1];n&&(e===$||e===tt)&&a?o?H--:q[H-1]=t:i&&(r===et||r===rt)&&o?a?H--:q[H-1]=t:q[H++]=t}else q[H++]=t}function g(t){q[H-1][0]!==t[0]&&q[H-1][1]!==t[1]&&m([W,X]),m(t),Z=null,W=X=0}function v(t){if(G=t[0]<$?$:t[0]>tt?tt:0,Y=t[1]<et?et:t[1]>rt?rt:0,G||Y){if(H)if(Z){var e=K(Z,t);e.length>1&&(g(e[0]),q[H++]=e[1])}else J=K(q[H-1],t)[0],q[H++]=J;else q[H++]=[G||t[0],Y||t[1]];var r=q[H-1];G&&Y&&(r[0]!==G||r[1]!==Y)?(Z&&(W!==G&&X!==Y?m(W&&X?function(t,e){var r=e[0]-t[0],n=(e[1]-t[1])/r;return(t[1]*e[0]-e[1]*t[0])/r>0?[n>0?$:tt,rt]:[n>0?tt:$,et]}(Z,t):[W||G,X||Y]):W&&X&&m([W,X])),m([G,Y])):W-G&&X-Y&&m([G||W,Y||X]),Z=t,W=G,X=Y}else Z&&g(K(Z,t)[0]),q[H++]=t}var y,x,b,_,w,M,k,A,T,S,E,L,C,z,D,I,P=e.xaxis,O=e.yaxis,F=e.simplify,R=e.connectGaps,N=e.baseTolerance,j=e.shape,B=\"linear\"===j,U=[],V=s.minTolerance,q=new Array(t.length),H=0;F||(N=V=-1);var G,Y,W,X,Z,J,K,Q=s.maxScreensAway,$=-P._length*Q,tt=P._length*(1+Q),et=-O._length*Q,rt=O._length*(1+Q),nt=[[$,et,tt,et],[tt,et,tt,rt],[tt,rt,$,rt],[$,rt,$,et]];for(\"linear\"===j||\"spline\"===j?K=u:\"hv\"===j||\"vh\"===j?K=d:\"hvh\"===j?K=p(0,$,tt):\"vhv\"===j&&(K=p(1,et,rt)),y=0;y<t.length;y++)if(x=r(y)){for(H=0,Z=null,v(x),y++;y<t.length;y++){if(!(_=r(y))){if(R)continue;break}if(B){if(!((S=c(_,x))<l(_)*V)){for(A=[(_[0]-x[0])/S,(_[1]-x[1])/S],w=x,E=S,L=z=D=0,k=!1,b=_,y++;y<t.length;y++){if(!(M=r(y))){if(R)continue;break}if(T=[M[0]-x[0],M[1]-x[1]],I=T[0]*A[1]-T[1]*A[0],z=Math.min(z,I),(D=Math.max(D,I))-z>l(M))break;b=M,(C=T[0]*A[0]+T[1]*A[1])>E?(E=C,_=M,k=!1):C<L&&(L=C,w=M,k=!0)}if(k?(v(_),b!==w&&v(w)):(w!==x&&v(w),b!==_&&v(_)),v(b),y>=t.length||!M)break;v(M),x=M}}else v(_)}Z&&m([W||Z[0],X||Z[1]]),U.push(q.slice(0,H))}return U}},{\"../../constants/numerical\":721,\"../../lib\":743,\"./constants\":1072}],1081:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){\"spline\"===r(\"line.shape\")&&r(\"line.smoothing\")}},{}],1082:[function(t,e,r){\"use strict\";e.exports=function(t,e,r){var n,i,a=null;for(i=0;i<r.length;++i)!0===(n=r[i][0].trace).visible?(n._nexttrace=null,-1!==[\"tonextx\",\"tonexty\",\"tonext\"].indexOf(n.fill)&&(n._prevtrace=a,a&&(a._nexttrace=n)),a=n):n._prevtrace=n._nexttrace=null}},{}],1083:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\");e.exports=function(t){var e=t.marker,r=e.sizeref||1,i=e.sizemin||0,a=\"area\"===e.sizemode?function(t){return Math.sqrt(t/r)}:function(t){return t/r};return function(t){var e=a(t/2);return n(e)&&e>0?Math.max(e,i):0}}},{\"fast-isnumeric\":140}],1084:[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,c){var u=o.isBubble(t),f=(t.line||{}).color;if(c=c||{},f&&(r=f),l(\"marker.symbol\"),l(\"marker.opacity\",u?.7:1),l(\"marker.size\"),l(\"marker.color\",r),i(t,\"marker\")&&a(t,e,s,l,{prefix:\"marker.\",cLetter:\"c\"}),c.noSelect||(l(\"selected.marker.color\"),l(\"unselected.marker.color\"),l(\"selected.marker.size\"),l(\"unselected.marker.size\")),c.noLine||(l(\"marker.line.color\",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,\"marker.line\")&&a(t,e,s,l,{prefix:\"marker.line.\",cLetter:\"c\"}),l(\"marker.line.width\",u?1:0)),u&&(l(\"marker.sizeref\"),l(\"marker.sizemin\"),l(\"marker.sizemode\")),c.gradient){\"none\"!==l(\"marker.gradient.type\")&&l(\"marker.gradient.color\")}}},{\"../../components/color\":618,\"../../components/colorscale/defaults\":628,\"../../components/colorscale/has_colorscale\":632,\"./subtypes\":1088}],1085:[function(t,e,r){\"use strict\";function n(t,e,r,n,u,h,d){function p(t){return w?t.transition():t}function m(t){p(t).attr(\"d\",\"M0,0Z\")}function g(t){return t.filter(function(t){return t.vis})}function v(t){return t.id}function y(){return!1}function x(e){var n,s,c=e[0].trace,u=i.select(this),f=l.hasMarkers(c),h=l.hasText(c),d=function(t){if(t.ids)return v}(c),m=y,x=y;f&&(m=c.marker.maxdisplayed||c._needsCull?g:a.identity),h&&(x=c.marker.maxdisplayed||c._needsCull?g:a.identity);var b=(n=u.selectAll(\"path.point\").data(m,d)).enter().append(\"path\").classed(\"point\",!0);w&&b.call(o.pointStyle,c,t).call(o.translatePoints,M,k).style(\"opacity\",0).transition().style(\"opacity\",1);var _=f&&o.tryColorscale(c.marker,\"\"),A=f&&o.tryColorscale(c.marker,\"line\");n.order(),n.each(function(e){var n=i.select(this),a=p(n);(s=o.translatePoint(e,a,M,k))?(o.singlePointStyle(e,a,c,_,A,t),r.layerClipId&&o.hideOutsideRangePoint(e,a,M,k,c.xcalendar,c.ycalendar),c.customdata&&n.classed(\"plotly-customdata\",null!==e.data&&void 0!==e.data)):a.remove()}),w?n.exit().transition().style(\"opacity\",0).remove():n.exit().remove(),(n=u.selectAll(\"g\").data(x,d)).enter().append(\"g\").classed(\"textpoint\",!0).append(\"text\"),n.order(),n.each(function(t){var e=i.select(this),n=p(e.select(\"text\"));(s=o.translatePoint(t,n,M,k))?r.layerClipId&&o.hideOutsideRangePoint(t,e,M,k,c.xcalendar,c.ycalendar):e.remove()}),n.selectAll(\"text\").call(o.textPointStyle,c,t).each(function(t){var e=M.c2p(t.x),r=k.c2p(t.y);i.select(this).selectAll(\"tspan.line\").each(function(){p(i.select(this)).attr({x:e,y:r})})}),n.exit().remove()}var b,_;!function(t,e,r,n,o){var s=r.xaxis,c=r.yaxis,u=i.extent(a.simpleMap(s.range,s.r2c)),f=i.extent(a.simpleMap(c.range,c.r2c)),h=n[0].trace;if(!l.hasMarkers(h))return;var d=h.marker.maxdisplayed;if(0===d)return;var p=n.filter(function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]}),m=Math.ceil(p.length/d),g=0;o.forEach(function(t,r){var n=t[0].trace;l.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&g++});var v=Math.round(g*m/3+Math.floor(g/3)*m/7.1);n.forEach(function(t){delete t.vis}),p.forEach(function(t,e){0===Math.round((e+v)%m)&&(t.vis=!0)})}(0,e,r,n,u);var w=!!d&&d.duration>0,M=r.xaxis,k=r.yaxis,A=n[0].trace,T=A.line,S=i.select(h);if(S.call(s.plot,r,d),!0===A.visible){p(S).style(\"opacity\",A.opacity);var E,L,C=A.fill.charAt(A.fill.length-1);\"x\"!==C&&\"y\"!==C&&(C=\"\"),n[0].node3=S;var z=\"\",D=[],I=A._prevtrace;I&&(z=I._prevRevpath||\"\",L=I._nextFill,D=I._polygons);var P,O,F,R,N,j,B,U,V,q=\"\",H=\"\",G=[],Y=a.noop;if(E=A._ownFill,l.hasLines(A)||\"none\"!==A.fill){for(L&&L.datum(n),-1!==[\"hv\",\"vh\",\"hvh\",\"vhv\"].indexOf(T.shape)?(F=o.steps(T.shape),R=o.steps(T.shape.split(\"\").reverse().join(\"\"))):F=R=\"spline\"===T.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?o.smoothclosed(t.slice(1),T.smoothing):o.smoothopen(t,T.smoothing)}:function(t){return\"M\"+t.join(\"L\")},N=function(t){return R(t.reverse())},G=c(n,{xaxis:M,yaxis:k,connectGaps:A.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,simplify:T.simplify}),V=A._polygons=new Array(G.length),_=0;_<G.length;_++)A._polygons[_]=f(G[_]);G.length&&(j=G[0][0],U=(B=G[G.length-1])[B.length-1]),Y=function(t){return function(e){if(P=F(e),O=N(e),q?C?(q+=\"L\"+P.substr(1),H=O+\"L\"+H.substr(1)):(q+=\"Z\"+P,H=O+\"Z\"+H):(q=P,H=O),l.hasLines(A)&&e.length>1){var r=i.select(this);if(r.datum(n),t)p(r.style(\"opacity\",0).attr(\"d\",P).call(o.lineGroupStyle)).style(\"opacity\",1);else{var a=p(r);a.attr(\"d\",P),o.singleLineStyle(n,a)}}}}}var W=S.selectAll(\".js-line\").data(G);p(W.exit()).style(\"opacity\",0).remove(),W.each(Y(!1)),W.enter().append(\"path\").classed(\"js-line\",!0).style(\"vector-effect\",\"non-scaling-stroke\").call(o.lineGroupStyle).each(Y(!0)),o.setClipUrl(W,r.layerClipId),G.length?(E?j&&U&&(C?(\"y\"===C?j[1]=U[1]=k.c2p(0,!0):\"x\"===C&&(j[0]=U[0]=M.c2p(0,!0)),p(E).attr(\"d\",\"M\"+U+\"L\"+j+\"L\"+q.substr(1)).call(o.singleFillStyle)):p(E).attr(\"d\",q+\"Z\").call(o.singleFillStyle)):L&&(\"tonext\"===A.fill.substr(0,6)&&q&&z?(\"tonext\"===A.fill?p(L).attr(\"d\",q+\"Z\"+z+\"Z\").call(o.singleFillStyle):p(L).attr(\"d\",q+\"L\"+z.substr(1)+\"Z\").call(o.singleFillStyle),A._polygons=A._polygons.concat(D)):(m(L),A._polygons=null)),A._prevRevpath=H,A._prevPolygons=V):(E?m(E):L&&m(L),A._polygons=A._prevRevpath=A._prevPolygons=null);var X=S.selectAll(\".points\");b=X.data([n]),X.each(x),b.enter().append(\"g\").classed(\"points\",!0).each(x),b.exit().remove(),b.each(function(t){var e=!1===t[0].trace.cliponaxis;o.setClipUrl(i.select(this),e?null:r.layerClipId)})}}var i=t(\"d3\"),a=t(\"../../lib\"),o=t(\"../../components/drawing\"),s=t(\"../../components/errorbars\"),l=t(\"./subtypes\"),c=t(\"./line_points\"),u=t(\"./link_traces\"),f=t(\"../../lib/polygon\").tester;e.exports=function(t,e,r,a,s){var l,c,f,h,d=e.plot.select(\"g.scatterlayer\"),p=!a,m=!!a&&a.duration>0;for((f=d.selectAll(\"g.trace\").data(r,function(t){return t[0].trace.uid})).enter().append(\"g\").attr(\"class\",function(t){return\"trace scatter trace\"+t[0].trace.uid}).style(\"stroke-miterlimit\",2),u(t,e,r),function(t,e,r){var n;e.selectAll(\"g.trace\").each(function(t){var e=i.select(this);if((n=t[0].trace)._nexttrace){if(n._nextFill=e.select(\".js-fill.js-tonext\"),!n._nextFill.size()){var a=\":first-child\";e.select(\".js-fill.js-tozero\").size()&&(a+=\" + *\"),n._nextFill=e.insert(\"path\",a).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),e.selectAll(\".js-fill\").call(o.setClipUrl,r.layerClipId)})}(0,d,e),l=0,c={};l<r.length;l++)c[r[l][0].trace.uid]=l;if(d.selectAll(\"g.trace\").sort(function(t,e){return c[t[0].trace.uid]>c[e[0].trace.uid]?1:-1}),m){s&&(h=s());i.transition().duration(a.duration).ease(a.easing).each(\"end\",function(){h&&h()}).each(\"interrupt\",function(){h&&h()}).each(function(){d.selectAll(\"g.trace\").each(function(i,o){n(t,o,e,i,r,this,a)})})}else d.selectAll(\"g.trace\").each(function(i,o){n(t,o,e,i,r,this,a)});p&&f.exit().remove(),d.selectAll(\"path:not([d])\").remove()}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../lib\":743,\"../../lib/polygon\":755,\"./line_points\":1080,\"./link_traces\":1082,\"./subtypes\":1088,d3:128}],1086:[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,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=c.c2p(i.y),e.contains([a,o])?(u.push({pointNumber:r,x:l.c2d(i.x),y:c.c2d(i.y)}),i.selected=1):i.selected=0;return u}},{\"./subtypes\":1088}],1087:[function(t,e,r){\"use strict\";function n(t,e,r){var n=t.selectAll(\"path.point\"),i=t.selectAll(\"text\");a.pointStyle(n,e,r),a.textPointStyle(i,e,r),a.selectedPointStyle(n,e),a.selectedTextStyle(i,e)}var i=t(\"d3\"),a=t(\"../../components/drawing\"),o=t(\"../../components/errorbars\");e.exports={style:function(t,e){var r=e?e[0].node3:i.select(t).selectAll(\"g.trace.scatter\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.selectAll(\"g.points\").each(function(e){n(i.select(this),e.trace||e[0].trace,t)}),r.selectAll(\"g.trace path.js-line\").call(a.lineGroupStyle),r.selectAll(\"g.trace path.js-fill\").call(a.fillGroupStyle),r.call(o.style)},stylePoints:n}},{\"../../components/drawing\":643,\"../../components/errorbars\":649,d3:128}],1088:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"lines\")},hasMarkers:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"markers\")},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf(\"text\")},isBubble:function(t){return n.isPlainObject(t.marker)&&Array.isArray(t.marker.size)}}},{\"../../lib\":743}],1089:[function(t,e,r){\"use strict\";var n=t(\"../../lib\");e.exports=function(t,e,r,i,a){a=a||{},i(\"textposition\"),n.coerceFont(i,\"textfont\",r.font),a.noSelect||(i(\"selected.textfont.color\"),i(\"unselected.textfont.color\"))}},{\"../../lib\":743}],1090:[function(t,e,r){\"use strict\";var n=t(\"../../registry\");e.exports=function(t,e,r,i){var a,o=i(\"x\"),s=i(\"y\");if(n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\"],r),o)s?((a=Math.min(o.length,s.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.y=s.slice(0,a))):(a=o.length,i(\"y0\"),i(\"dy\"));else{if(!s)return 0;a=e.y.length,i(\"x0\"),i(\"dx\")}return a}},{\"../../registry\":873}],1091:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../components/errorbars/attributes\"),o=t(\"../../constants/gl3d_dashes\"),s=t(\"../../constants/gl3d_markers\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll,u=n.line,f=n.marker,h=f.line,d=e.exports=c({x:n.x,y:n.y,z:{valType:\"data_array\"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),mode:l({},n.mode,{dflt:\"lines+markers\"}),surfaceaxis:{valType:\"enumerated\",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:\"color\"},projection:{x:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},y:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}},z:{show:{valType:\"boolean\",dflt:!1},opacity:{valType:\"number\",min:0,max:1,dflt:1},scale:{valType:\"number\",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:l({width:u.width,dash:{valType:\"enumerated\",values:Object.keys(o),dflt:\"solid\"},showscale:{valType:\"boolean\",dflt:!1}},i(\"line\")),marker:l({symbol:{valType:\"enumerated\",values:Object.keys(s),dflt:\"circle\",arrayOk:!0},size:l({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:l({},f.opacity,{arrayOk:!1}),showscale:f.showscale,colorbar:f.colorbar,line:l({width:l({},h.width,{arrayOk:!1})},i(\"marker.line\"))},i(\"marker\")),textposition:l({},n.textposition,{dflt:\"top center\"}),textfont:n.textfont,error_x:a,error_y:a,error_z:a},\"calc\",\"nested\");d.x.editType=d.y.editType=d.z.editType=\"calc+clearAxisTypes\"},{\"../../components/colorscale/color_attributes\":626,\"../../components/errorbars/attributes\":645,\"../../constants/gl3d_dashes\":718,\"../../constants/gl3d_markers\":719,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../scatter/attributes\":1066}],1092:[function(t,e,r){\"use strict\";var n=t(\"../scatter/arrays_to_calcdata\"),i=t(\"../scatter/colorscale_calc\");e.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(e),r}},{\"../scatter/arrays_to_calcdata\":1065,\"../scatter/colorscale_calc\":1071}],1093:[function(t,e,r){\"use strict\";function n(t,e,r){if(!e||!e.visible)return null;for(var n=i(e),a=new Array(t.length),o=0;o<t.length;o++){var s=n(+t[o],o);a[o]=[-s[0]*r,s[1]*r]}return a}var i=t(\"../../components/errorbars/compute_error\");e.exports=function(t,e){var r=[n(t.x,t.error_x,e[0]),n(t.y,t.error_y,e[1]),n(t.z,t.error_z,e[2])],i=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(r);if(0===i)return null;for(var a=new Array(i),o=0;o<i;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(r[l])for(var c=0;c<2;c++)s[c][l]=r[l][o][c];a[o]=s}return a}},{\"../../components/errorbars/compute_error\":647}],1094:[function(t,e,r){\"use strict\";function n(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode=\"\",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}function i(t,e){return e(4*t)}function a(t){return x[t]}function o(t,e,r,n,i){var a=null;if(Array.isArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,p.identity);return a}function s(t,e){var r,n,s,l,c,u,f=[],h=t.fullSceneLayout,d=t.dataScale,y=h.xaxis,x=h.yaxis,_=h.zaxis,w=e.marker,M=e.line,k=e.x||[],A=e.y||[],T=e.z||[],S=k.length,E=e.xcalendar,L=e.ycalendar,C=e.zcalendar;for(n=0;n<S;n++)s=y.d2l(k[n],0,E)*d[0],l=x.d2l(A[n],0,L)*d[1],c=_.d2l(T[n],0,C)*d[2],f[n]=[s,l,c];if(Array.isArray(e.text))u=e.text;else if(void 0!==e.text)for(u=new Array(S),n=0;n<S;n++)u[n]=e.text;if(r={position:f,mode:e.mode,text:u},\"line\"in e&&(r.lineColor=g(M,1,S),r.lineWidth=M.width,r.lineDashes=M.dash),\"marker\"in e){var z=v(e);r.scatterColor=g(w,1,S),r.scatterSize=o(w.size,S,i,20,z),r.scatterMarker=o(w.symbol,S,a,\"\\u25cf\"),r.scatterLineWidth=w.line.width,r.scatterLineColor=g(w.line,1,S),r.scatterAngle=0}\"textposition\"in e&&(r.textOffset=function(t){var e=[0,0];return Array.isArray(t)?[0,-1]:(t.indexOf(\"bottom\")>=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)}(e.textposition),r.textColor=g(e.textfont,1,S),r.textSize=o(e.textfont.size,S,p.identity,12),r.textFont=e.textfont.family,r.textAngle=0);var D=[\"x\",\"y\",\"z\"];for(r.project=[!1,!1,!1],r.projectScale=[1,1,1],r.projectOpacity=[1,1,1],n=0;n<3;++n){var I=e.projection[D[n]];(r.project[n]=I.show)&&(r.projectOpacity[n]=I.opacity,r.projectScale[n]=I.scale)}r.errorBounds=b(e,d);var P=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[0,0,0],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&(a=t[2]),a&&(e[i]=a.width/2,r[i]=m(a.color),n=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return r.errorColor=P.color,r.errorLineWidth=P.lineWidth,r.errorCapSize=P.capSize,r.delaunayAxis=e.surfaceaxis,r.delaunayColor=m(e.surfacecolor),r}function l(t){if(Array.isArray(t)){var e=t[0];return Array.isArray(e)&&(t=e),\"rgb(\"+t.slice(0,3).map(function(t){return Math.round(255*t)})+\")\"}return null}var c=t(\"gl-line3d\"),u=t(\"gl-scatter3d\"),f=t(\"gl-error3d\"),h=t(\"gl-mesh3d\"),d=t(\"delaunay-triangulate\"),p=t(\"../../lib\"),m=t(\"../../lib/str2rgbarray\"),g=t(\"../../lib/gl_format_color\"),v=t(\"../scatter/make_bubble_size_func\"),y=t(\"../../constants/gl3d_dashes\"),x=t(\"../../constants/gl3d_markers\"),b=t(\"./calc_errors\"),_=n.prototype;_.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),this.textLabels?void 0!==this.textLabels[t.data.index]?t.textLabel=this.textLabels[t.data.index]:t.textLabel=this.textLabels:t.textLabel=\"\";var e=t.index=t.data.index;return t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},_.update=function(t){var e,r,n,i,a=this.scene.glplot.gl,o=y.solid;this.data=t;var p=s(this.scene,t);\"mode\"in p&&(this.mode=p.mode),\"lineDashes\"in p&&p.lineDashes in y&&(o=y[p.lineDashes]),this.color=l(p.scatterColor)||l(p.lineColor),this.dataPoints=p.position,e={gl:a,position:p.position,color:p.lineColor,lineWidth:p.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf(\"lines\")?this.linePlot?this.linePlot.update(e):(this.linePlot=c(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var m=t.opacity;if(t.marker&&t.marker.opacity&&(m*=t.marker.opacity),r={gl:a,position:p.position,color:p.scatterColor,size:p.scatterSize,glyph:p.scatterMarker,opacity:m,orthographic:!0,lineWidth:p.scatterLineWidth,lineColor:p.scatterLineColor,project:p.project,projectScale:p.projectScale,projectOpacity:p.projectOpacity},-1!==this.mode.indexOf(\"markers\")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=u(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),i={gl:a,position:p.position,glyph:p.text,color:p.textColor,size:p.textSize,angle:p.textAngle,alignment:p.textOffset,font:p.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf(\"text\")?this.textMarkers?this.textMarkers.update(i):(this.textMarkers=u(i),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),n={gl:a,position:p.position,color:p.errorColor,error:p.errorBounds,lineWidth:p.errorLineWidth,capSize:p.errorCapSize,opacity:t.opacity},this.errorBars?p.errorBounds?this.errorBars.update(n):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):p.errorBounds&&(this.errorBars=f(n),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),p.delaunayAxis>=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],s=[];for(n=0;n<t.length;++n){var l=t[n];!isNaN(l[i])&&isFinite(l[i])&&!isNaN(l[a])&&isFinite(l[a])&&(o.push([l[i],l[a]]),s.push(n))}var c=d(o);for(n=0;n<c.length;++n)for(var u=c[n],f=0;f<u.length;++f)u[f]=s[u[f]];return{positions:t,cells:c,meshColor:e}}(p.position,p.delaunayColor,p.delaunayAxis);g.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(g):(g.gl=a,this.delaunayMesh=h(g),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)},_.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=function(t,e){var r=new n(t,e.uid);return r.update(e),r}},{\"../../constants/gl3d_dashes\":718,\"../../constants/gl3d_markers\":719,\"../../lib\":743,\"../../lib/gl_format_color\":739,\"../../lib/str2rgbarray\":765,\"../scatter/make_bubble_size_func\":1083,\"./calc_errors\":1093,\"delaunay-triangulate\":130,\"gl-error3d\":168,\"gl-line3d\":177,\"gl-mesh3d\":210,\"gl-scatter3d\":239}],1095:[function(t,e,r){\"use strict\";var n=t(\"../../registry\"),i=t(\"../../lib\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/marker_defaults\"),s=t(\"../scatter/line_defaults\"),l=t(\"../scatter/text_defaults\"),c=t(\"../../components/errorbars/defaults\"),u=t(\"./attributes\");e.exports=function(t,e,r,f){function h(r,n){return i.coerce(t,e,u,r,n)}if(function(t,e,r,i){var a=0,o=r(\"x\"),s=r(\"y\"),l=r(\"z\");return n.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],i),o&&s&&l&&((a=Math.min(o.length,s.length,l.length))<o.length&&(e.x=o.slice(0,a)),a<s.length&&(e.y=s.slice(0,a)),a<l.length&&(e.z=l.slice(0,a))),a}(t,e,h,f)){h(\"text\"),h(\"hovertext\"),h(\"mode\"),a.hasLines(e)&&(h(\"connectgaps\"),s(t,e,r,f,h)),a.hasMarkers(e)&&o(t,e,r,f,h,{noSelect:!0}),a.hasText(e)&&l(t,e,f,h,{noSelect:!0});var d=(e.line||{}).color,p=(e.marker||{}).color;h(\"surfaceaxis\")>=0&&h(\"surfacecolor\",d||p);for(var m=[\"x\",\"y\",\"z\"],g=0;g<3;++g){var v=\"projection.\"+m[g];h(v+\".show\")&&(h(v+\".opacity\"),h(v+\".scale\"))}c(t,e,r,{axis:\"z\"}),c(t,e,r,{axis:\"y\",inherit:\"z\"}),c(t,e,r,{axis:\"x\",inherit:\"z\"})}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../../registry\":873,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1091}],1096:[function(t,e,r){\"use strict\";var n={};n.plot=t(\"./convert\"),n.attributes=t(\"./attributes\"),n.markerSymbols=t(\"../../constants/gl3d_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/gl3d_markers\":719,\"../../plots/gl3d\":832,\"../scatter/colorbar\":1070,\"./attributes\":1091,\"./calc\":1092,\"./convert\":1094,\"./defaults\":1095}],1097:[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,c=n.line,u=l.line;e.exports={carpet:{valType:\"string\",editType:\"calc\"},a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},mode:s({},n.mode,{dflt:\"markers\"}),text:s({},n.text,{}),line:{color:c.color,width:c.width,dash:c.dash,shape:s({},c.shape,{values:[\"linear\",\"spline\"]}),smoothing:c.smoothing,editType:\"calc\"},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:u.width,editType:\"calc\"},a(\"marker\".line)),gradient:l.gradient,editType:\"calc\"},a(\"marker\"),{showscale:l.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\"a\",\"b\",\"text\",\"name\"]}),hoveron:n.hoveron}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1098:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,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 c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e.a.length,d=new Array(h),p=!1;for(c=0;c<h;c++)if(u=e.a[c],f=e.b[c],n(u)&&n(f)){var m=r.ab2xy(+u,+f,!0),g=r.isVisible(+u,+f);g||(p=!0),d[c]={x:m[0],y:m[1],a:u,b:f,vis:g}}else d[c]={x:!1,y:!1};return e._needsCull=p,d[0].carpet=r,d[0].trace=e,s(e,h),i(e),a(d,e),o(d,e),d}}},{\"../carpet/lookup_carpetid\":931,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1099:[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\"),c=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,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)){m&&p<m.length&&(e.a=m.slice(0,p)),g&&p<g.length&&(e.b=g.slice(0,p)),d(\"text\");d(\"mode\",p<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,d),l(t,e,d),d(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,d,{gradient:!0}),a.hasText(e)&&c(t,e,h,d);var v=[];(a.hasMarkers(e)||a.hasText(e))&&(d(\"marker.maxdisplayed\"),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,d),a.hasLines(e)||l(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1097}],1100:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){var a=n[i];return t.a=a.a,t.b=a.b,t}},{}],1101:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\");e.exports=function(t,e,r,i){function a(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,\"\"):t._hovertitle,g.push(r+\": \"+e.toFixed(3)+t.labelsuffix)}var o=n(t,e,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/t.ya._length,c=t.xa._length,u=c*l/2,f=c-u;return s.x0=Math.max(Math.min(s.x0,f),u),s.x1=Math.max(Math.min(s.x1,f),u),o}var h=s.cd[s.index];s.a=h.a,s.b=h.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var d=s.trace,p=d._carpet,m=(h.hi||d.hoverinfo).split(\"+\"),g=[];-1!==m.indexOf(\"all\")&&(m=[\"a\",\"b\"]),-1!==m.indexOf(\"a\")&&a(p.aaxis,h.a),-1!==m.indexOf(\"b\")&&a(p.baxis,h.b);var v=p.ab2ij([h.a,h.b]),y=Math.floor(v[0]),x=v[0]-y,b=Math.floor(v[1]),_=v[1]-b,w=p.evalxy([],y,b,x,_);return g.push(\"y: \"+w[1].toFixed(3)),s.extraText=g.join(\"<br>\"),o}}},{\"../scatter/hover\":1077}],1102:[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(\"../scatter/style\").style,n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"../scatter/select\"),n.eventData=t(\"./event_data\"),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\":800,\"../scatter/colorbar\":1070,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1097,\"./calc\":1098,\"./defaults\":1099,\"./event_data\":1100,\"./hover\":1101,\"./plot\":1103}],1103:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../components/drawing\");e.exports=function(t,e,r){var o,s,l,c=r[0][0].carpet,u={xaxis:i.getFromId(t,c.xaxis||\"x\"),yaxis:i.getFromId(t,c.yaxis||\"y\"),plot:e.plot};for(n(t,u,r),o=0;o<r.length;o++)s=r[o][0].trace,l=u.plot.selectAll(\"g.trace\"+s.uid+\" .js-line\"),a.setClipUrl(l,c._clipPathId)}},{\"../../components/drawing\":643,\"../../plots/cartesian/axes\":789,\"../scatter/plot\":1085}],1104:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../plots/attributes\"),a=t(\"../../components/colorscale/color_attributes\"),o=t(\"../../components/drawing/attributes\").dash,s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll,c=n.marker,u=n.line,f=c.line;e.exports=l({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:s({},n.mode,{dflt:\"markers\"}),text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),textfont:n.textfont,textposition:n.textposition,line:{color:u.color,width:u.width,dash:o},connectgaps:n.connectgaps,marker:s({symbol:c.symbol,opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,showscale:c.showscale,colorbar:c.colorbar,line:s({width:f.width},a(\"marker.line\")),gradient:c.gradient},a(\"marker\")),fill:{valType:\"enumerated\",values:[\"none\",\"toself\"],dflt:\"none\"},fillcolor:n.fillcolor,selected:n.selected,unselected:n.unselected,hoverinfo:s({},i.hoverinfo,{flags:[\"lon\",\"lat\",\"location\",\"text\",\"name\"]})},\"calc\",\"nested\")},{\"../../components/colorscale/color_attributes\":626,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1105:[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\"),s=t(\"../scatter/calc_selection\"),l=t(\"../../lib\")._;e.exports=function(t,e){for(var r=Array.isArray(e.locations),c=r?e.locations.length:e.lon.length,u=new Array(c),f=0;f<c;f++){var h=u[f]={};if(r){var d=e.locations[f];h.loc=\"string\"==typeof d?d:null}else{var p=e.lon[f],m=e.lat[f];n(p)&&n(m)?h.lonlat=[+p,+m]:h.lonlat=[i,i]}}return o(u,e),a(e),s(u,e),c&&(u[0].t={labels:{lat:l(t,\"lat:\")+\" \",lon:l(t,\"lon:\")+\" \"}}),u}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1106:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}!function(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))<n.length&&(e.lon=n.slice(0,a)),a<i.length&&(e.lat=i.slice(0,a)),a)}(0,e,f)?e.visible=!1:(f(\"text\"),f(\"hovertext\"),f(\"mode\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,u,f,{gradient:!0}),i.hasText(e)&&s(t,e,u,f),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f))}},{\"../../lib\":743,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1104}],1107:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.location=e.loc?e.loc:null,t}},{}],1108:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../../constants/numerical\").BADNUM,o=t(\"../scatter/get_trace_color\"),s=t(\"../scatter/fill_hover_text\"),l=t(\"./attributes\");e.exports=function(t,e,r){var c=t.cd,u=c[0].trace,f=t.xa,h=t.ya,d=t.subplot,p=d.projection.isLonLatOverEdges,m=d.project;if(n.getClosest(c,function(t){var n=t.lonlat;if(n[0]===a)return 1/0;if(p(n))return 1/0;var i=m(n),o=m([e,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)},t),!1!==t.index){var g=c[t.index],v=g.lonlat,y=[f.c2p(v),h.c2p(v)],x=g.mrc||1;return t.x0=y[0]-x,t.x1=y[0]+x,t.y0=y[1]-x,t.y1=y[1]+x,t.loc=g.loc,t.lon=v[0],t.lat=v[1],t.color=o(u,g),t.extraText=function(t,e,r,n){function a(t){return i.tickText(r,r.c2l(t),\"hover\").text+\"\\xb0\"}var o=e.hi||t.hoverinfo,c=\"all\"===o?l.hoverinfo.flags:o.split(\"+\"),u=-1!==c.indexOf(\"location\")&&Array.isArray(t.locations),f=-1!==c.indexOf(\"lon\"),h=-1!==c.indexOf(\"lat\"),d=-1!==c.indexOf(\"text\"),p=[];return u?p.push(e.loc):f&&h?p.push(\"(\"+a(e.lonlat[0])+\", \"+a(e.lonlat[1])+\")\"):f?p.push(n.lon+a(e.lonlat[0])):h&&p.push(n.lat+a(e.lonlat[1])),d&&s(e,t,p),p.join(\"<br>\")}(u,g,d.mockAxis,c[0].t.labels),[t]}}},{\"../../components/fx\":660,\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076,\"./attributes\":1104}],1109:[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.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.moduleType=\"trace\",n.name=\"scattergeo\",n.basePlotModule=t(\"../../plots/geo\"),n.categories=[\"geo\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/geo\":820,\"../scatter/colorbar\":1070,\"./attributes\":1104,\"./calc\":1105,\"./defaults\":1106,\"./event_data\":1107,\"./hover\":1108,\"./plot\":1110,\"./select\":1111,\"./style\":1112}],1110:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../constants/numerical\").BADNUM,o=t(\"../../lib/topojson_utils\").getTopojsonFeatures,s=t(\"../../lib/geo_location_utils\").locationToFeature,l=t(\"../../lib/geojson_utils\"),c=t(\"../scatter/subtypes\"),u=t(\"./style\");e.exports=function(t,e,r){function f(t,e){t.lonlat[0]===a&&n.select(e).remove()}for(var h=0;h<r.length;h++)!function(t,e){var r=t[0].trace;if(Array.isArray(r.locations))for(var n=o(r,e),i=r.locationmode,l=0;l<t.length;l++){var c=t[l],u=s(i,c.loc,n);c.lonlat=u?u.properties.ct:[a,a]}}(r[h],e.topojson);var d=e.layers.frontplot.select(\".scatterlayer\").selectAll(\"g.trace.scattergeo\").data(r,function(t){return t[0].trace.uid});d.enter().append(\"g\").attr(\"class\",\"trace scattergeo\"),d.exit().remove(),d.selectAll(\"*\").remove(),d.each(function(e){var r=e[0].node3=n.select(this),a=e[0].trace;if(c.hasLines(a)||\"none\"!==a.fill){var o=l.calcTraceToLineCoords(e),s=\"none\"!==a.fill?l.makePolygon(o):l.makeLine(o);r.selectAll(\"path.js-line\").data([{geojson:s,trace:a}]).enter().append(\"path\").classed(\"js-line\",!0).style(\"stroke-miterlimit\",2)}c.hasMarkers(a)&&r.selectAll(\"path.point\").data(i.identity).enter().append(\"path\").classed(\"point\",!0).each(function(t){f(t,this)}),c.hasText(a)&&r.selectAll(\"g\").data(i.identity).enter().append(\"g\").append(\"text\").each(function(t){f(t,this)}),u(t,e)})}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/geo_location_utils\":735,\"../../lib/geojson_utils\":736,\"../../lib/topojson_utils\":769,\"../scatter/subtypes\":1088,\"./style\":1112,d3:128}],1111:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\");e.exports=function(t,e){var r,i,a,o,s,l=t.cd,c=t.xaxis,u=t.yaxis,f=[],h=l[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(s=0;s<l.length;s++)l[s].selected=0;else for(s=0;s<l.length;s++)i=(r=l[s]).lonlat,a=c.c2p(i),o=u.c2p(i),e.contains([a,o])?(f.push({pointNumber:s,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0;return f}},{\"../scatter/subtypes\":1088}],1112:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/drawing\"),a=t(\"../../components/color\"),o=t(\"../scatter/style\").stylePoints;e.exports=function(t,e){e&&function(t,e){var r=e[0].trace,s=e[0].node3;s.style(\"opacity\",e[0].trace.opacity),o(s,r,t),s.selectAll(\"path.js-line\").style(\"fill\",\"none\").each(function(t){var e=n.select(this),r=t.trace,o=r.line||{};e.call(a.stroke,o.color).call(i.dashLine,o.dash||\"\",o.width||0),\"none\"!==r.fill&&e.call(a.fill,r.fillcolor)})}(t,e)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../scatter/style\":1087,d3:128}],1113:[function(t,e,r){\"use strict\";var n=t(\"../scatter/attributes\"),i=t(\"../../components/colorscale/color_attributes\"),a=t(\"../../constants/gl2d_dashes\"),o=t(\"../../lib/extend\").extendFlat,s=t(\"../../plot_api/edit_types\").overrideAll,l=n.line,c=n.marker,u=c.line,f=e.exports=s({x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:o({},n.text,{}),mode:{valType:\"flaglist\",flags:[\"lines\",\"markers\"],extras:[\"none\"]},line:{color:l.color,width:l.width,dash:{valType:\"enumerated\",values:Object.keys(a),dflt:\"solid\"}},marker:o({},i(\"marker\"),{symbol:c.symbol,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,opacity:c.opacity,showscale:c.showscale,colorbar:c.colorbar,line:o({},i(\"marker.line\"),{width:u.width})}),connectgaps:n.connectgaps,fill:n.fill,fillcolor:n.fillcolor,hoveron:n.hoveron,selected:{marker:n.selected.marker},unselected:{marker:n.unselected.marker},error_y:n.error_y,error_x:n.error_x},\"calc\",\"nested\");f.x.editType=f.y.editType=f.x0.editType=f.y0.editType=\"calc+clearAxisTypes\"},{\"../../components/colorscale/color_attributes\":626,\"../../constants/gl2d_dashes\":717,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../scatter/attributes\":1066}],1114:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/constants\"),a=t(\"../scatter/subtypes\"),o=t(\"../scatter/xy_defaults\"),s=t(\"../scatter/marker_defaults\"),l=t(\"../scatter/line_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),u=t(\"../../components/errorbars/defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,r,i)}var p=!!t.marker&&/-open/.test(t.marker.symbol),m=a.isBubble(t),g=o(t,e,h,d);if(g){d(\"text\"),d(\"mode\",g<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(d(\"connectgaps\"),l(t,e,r,h,d));var v=[];a.hasMarkers(e)&&(s(t,e,r,h,d),d(\"marker.line.width\",p||m?1:0),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&c(t,e,r,d),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),u(t,e,r,{axis:\"y\"}),u(t,e,r,{axis:\"x\",inherit:\"y\"}),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../components/errorbars/defaults\":648,\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/xy_defaults\":1090,\"./attributes\":1113}],1115:[function(t,e,r){(function(r){\"use strict\";function n(t,e,r,n){function i(t){var e,n,i,o={},s=Array.isArray(t.symbol);if(s||(n=/-open/.test(t.symbol)),s||Array.isArray(t.color)||Array.isArray(t.line.color)||Array.isArray(t.line)||Array.isArray(t.opacity)){o.colors=new Array(_),o.borderColors=new Array(_);var l=y(t,t.opacity,_),c=y(t.line,t.opacity,_);if(!Array.isArray(c[0])){var u=c;for(c=Array(_),e=0;e<_;e++)c[e]=u}if(!Array.isArray(l[0])){var f=l;for(l=Array(_),e=0;e<_;e++)l[e]=f}for(o.colors=l,o.borderColors=c,e=0;e<_;e++)s&&(i=t.symbol[e],n=/-open/.test(i)),n&&(c[e]=l[e].slice(),l[e]=l[e].slice(),l[e][3]=0);o.opacity=r.opacity}else n?(o.color=M(t.color,\"uint8\"),o.color[3]=0,o.borderColor=M(t.color,\"uint8\")):(o.color=M(t.color,\"uint8\"),o.borderColor=M(t.line.color,\"uint8\")),o.opacity=r.opacity*t.opacity;if(Array.isArray(t.symbol))for(o.markers=new Array(_),e=0;e<_;++e)o.markers[e]=a(t.symbol[e]);else o.marker=a(t.symbol);var h,d,p=t&&(Array.isArray(t.size)||Array.isArray(t.line.width)),m=g(r);if(p){d=o.sizes=new Array(_);var v=o.borderSizes=new Array(_);if(Array.isArray(t.size))for(e=0;e<_;++e)d[e]=m(t.size[e]);else for(h=m(t.size),e=0;e<_;++e)d[e]=h;if(Array.isArray(t.line.width))for(e=0;e<_;++e)v[e]=m(t.line.width[e]);else for(h=m(t.line.width),e=0;e<_;++e)v[e]=h}else h=o.size=m(t&&t.size||10),o.borderSizes=m(t.line.width);return o}var o,s,f,h,p,m,x,b=t._fullLayout,_=n.length/2,w=r.marker,k=0,A=0,T=u.getFromId(t,r.xaxis),S=u.getFromId(t,r.yaxis);!0!==r.visible?(s=!1,f=!1,h=!1,m=!1,x=!1):(s=d.hasLines(r)&&n.length>1,f=r.error_x&&!0===r.error_x.visible,h=r.error_y&&!0===r.error_y.visible,p=f||h,m=d.hasMarkers(r),x=!!r.fill&&\"none\"!==r.fill);var E,L,C,z,D,I,O,F,R=p?l.calcFromTrace(r,b):null;if(f){(C={}).positions=n;var N=new Float64Array(4*_);if(\"log\"===T.type)for(o=0;o<_;++o)N[k++]=n[2*o]-T.d2l(R[o].xs)||0,N[k++]=T.d2l(R[o].xh)-n[2*o]||0,N[k++]=0,N[k++]=0;else for(o=0;o<_;++o)N[k++]=n[2*o]-R[o].xs||0,N[k++]=R[o].xh-n[2*o]||0,N[k++]=0,N[k++]=0;r.error_x.copy_ystyle&&(r.error_x=r.error_y),C.errors=N,C.capSize=2*r.error_x.width,C.lineWidth=r.error_x.thickness,C.color=r.error_x.color}if(h){(z={}).positions=n;var j=new Float64Array(4*_);if(\"log\"===S.type)for(o=0;o<_;++o)j[A++]=0,j[A++]=0,j[A++]=n[2*o+1]-S.d2l(R[o].ys)||0,j[A++]=S.d2l(R[o].yh)-n[2*o+1]||0;else for(o=0;o<_;++o)j[A++]=0,j[A++]=0,j[A++]=n[2*o+1]-R[o].ys||0,j[A++]=R[o].yh-n[2*o+1]||0;z.errors=j,z.capSize=2*r.error_y.width,z.lineWidth=r.error_y.thickness,z.color=r.error_y.color}if(s){(E={}).thickness=r.line.width,E.color=r.line.color,E.opacity=r.opacity,E.overlay=!0;var B=(v[r.line.dash]||[1]).slice();for(o=0;o<B.length;++o)B[o]*=E.thickness;if(E.dashes=B,\"hv\"===r.line.shape){for(F=[],o=0;o<Math.floor(n.length/2)-1;o++)isNaN(n[2*o])||isNaN(n[2*o+1])?(F.push(NaN),F.push(NaN),F.push(NaN),F.push(NaN)):(F.push(n[2*o]),F.push(n[2*o+1]),F.push(n[2*o+2]),F.push(n[2*o+1]));F.push(n[n.length-2]),F.push(n[n.length-1])}else if(\"vh\"===r.line.shape){for(F=[],o=0;o<Math.floor(n.length/2)-1;o++)isNaN(n[2*o])||isNaN(n[2*o+1])?(F.push(NaN),F.push(NaN),F.push(NaN),F.push(NaN)):(F.push(n[2*o]),F.push(n[2*o+1]),F.push(n[2*o]),F.push(n[2*o+3]));F.push(n[n.length-2]),F.push(n[n.length-1])}else F=n;var U=!1;for(o=0;o<F.length;o++)if(isNaN(F[o])){U=!0;break}if(E.join=U||F.length>P?\"rect\":m?\"rect\":\"round\",U&&r.connectgaps){var V=F[0],q=F[1];for(o=0;o<F.length;o+=2)isNaN(F[o])||isNaN(F[o+1])?(F[o]=V,F[o+1]=q):(V=F[o],q=F[o+1])}E.positions=F}return x&&((D={}).fill=r.fillcolor,D.thickness=0,D.closed=!0),m&&(L=i(w),I=r.selected?i(c({},w,r.selected.marker)):L,O=r.unselected?i(c({},w,r.unselected.marker)):L,L.positions=n),{line:E,marker:L,errorX:C,errorY:z,fill:D,selected:I,unselected:O}}function i(t,e){var r=e._scene,n=t._fullLayout;return e._scene||((r=e._scene={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],selectedOptions:[],unselectedOptions:[],errorXOptions:[],errorYOptions:[],selectBatch:null,unselectBatch:null,fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,select2d:null}).update=function(t){for(var e=Array(r.count),n=0;n<r.count;n++)e[n]=t;r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.draw()},r.draw=function(){var t;for(t=0;t<r.count;t++)r.fill2d&&r.fill2d.draw(t);for(t=0;t<r.count;t++)r.line2d&&r.line2d.draw(t),r.error2d&&(r.error2d.draw(t),r.error2d.draw(t+r.count)),r.scatter2d&&!r.selectBatch&&r.scatter2d.draw(t);r.select2d&&r.selectBatch&&(r.select2d.draw(r.selectBatch),r.scatter2d.draw(r.unselectBatch)),r.dirty=!1},r.clear=function(){var t,i,a=n._size,o=n.width,s=n.height,l=e.xaxis,c=e.yaxis;t=l&&l.domain&&c&&c.domain?[a.l+l.domain[0]*a.w,a.b+c.domain[0]*a.h,o-a.r-(1-l.domain[1])*a.w,s-a.t-(1-c.domain[1])*a.h]:[a.l,a.b,o-a.r,s-a.t],r.select2d&&((i=r.select2d.regl._gl).enable(i.SCISSOR_TEST),i.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT)),r.scatter2d&&((i=r.scatter2d.regl._gl).enable(i.SCISSOR_TEST),i.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT))},r.clearSelect=function(){r.selectBatch&&(r.selectBatch=null,r.unselectBatch=null,r.scatter2d.update(r.markerOptions),r.clear(),r.draw())},r.destroy=function(){r.fill2d&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy(),r.line2d&&r.line2d.destroy(),r.select2d&&r.select2d.destroy(),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.selectedOptions=null,r.unselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.selectBatch=null,r.unselectBatch=null,delete e._scene}),r.dirty||(r.dirty=!0,r.count=0,r.lineOptions=[],r.fillOptions=[],r.markerOptions=[],r.selectedOptions=[],r.unselectedOptions=[],r.errorXOptions=[],r.errorYOptions=[]),r}function a(t){if(\"circle\"===t)return null;var e,r,n=m.symbolNumber(t),i=m.symbolFuncs[n%100],a=!!m.symbolNoDot[n%100],o=!!m.symbolNoFill[n%100],s=O.test(t);return D[t]?D[t]:(e=s&&!a?i(1.1*C)+I:i(C),r=k(e,{w:L,h:L,viewBox:[-C,-C,C,C],stroke:o?z:-z}),D[t]=r,r||null)}var o=t(\"../../lib\"),s=t(\"../scatter/get_trace_color\"),l=t(\"../../components/errorbars\"),c=t(\"object-assign\"),u=t(\"../../plots/cartesian/axes\"),f=t(\"kdgrass\"),h=t(\"../../components/fx\"),d=t(\"../scatter/subtypes\"),p=t(\"../scatter/colorscale_calc\"),m=t(\"../../components/drawing\"),g=t(\"../scatter/make_bubble_size_func\"),v=t(\"../../constants/gl2d_dashes\"),y=t(\"../../lib/gl_format_color\"),x=t(\"../scatter/link_traces\"),b=t(\"regl-scatter2d\"),_=t(\"regl-line2d\"),w=t(\"regl-error2d\"),M=t(\"color-normalize\"),k=t(\"svg-path-sdf\"),A=t(\"regl\"),T=t(\"../scatter/fill_hover_text\"),S=t(\"fast-isnumeric\"),E=h.constants.MAXDIST,L=200,C=20,z=C/20,D={},I=m.symbolFuncs[0](.05*C),P=1e5,O=/-dot/;e.exports={moduleType:\"trace\",name:\"scattergl\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"gl\",\"regl\",\"cartesian\",\"symbols\",\"errorBarsOK\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),cleanData:t(\"../scatter/clean_data\"),colorbar:t(\"../scatter/colorbar\"),calc:function(t,e){var r,a,o,s,l,c=t._fullLayout,h={},d=u.getFromId(t,e.xaxis),m=u.getFromId(t,e.yaxis),g=c._plots[e.xaxis+e.yaxis],v=\"linear\"===d.type?e.x:d.makeCalcdata(e,\"x\"),y=\"linear\"===m.type?e.y:m.makeCalcdata(e,\"y\"),x=(v||y).length;if(!v)for(v=Array(x),a=0;a<x;a++)v[a]=a;if(!y)for(y=Array(x),a=0;a<x;a++)y[a]=a;var b,_;if(\"log\"===d.type)for(b=Array(v.length),a=0,o=v.length;a<o;a++)b[a]=v[a],v[a]=d.d2l(v[a]);else for(b=v,a=0,o=v.length;a<o;a++)v[a]=parseFloat(v[a]);if(\"log\"===m.type)for(_=Array(y.length),a=0,o=y.length;a<o;a++)_[a]=y[a],y[a]=m.d2l(y[a]);else for(_=y,a=0,o=y.length;a<o;a++)y[a]=parseFloat(y[a]);for(r=new Array(2*x),a=0;a<x;a++)s=S(v[a])?+v[a]:NaN,l=S(y[a])?+y[a]:NaN,r[2*a]=s,r[2*a+1]=l;if(\"log\"!==d.type&&\"log\"!==m.type)h.tree=f(r,512);else{var w=h.ids=Array(x);for(a=0;a<x;a++)w[a]=a}p(e);var M=n(t,0,e,r);if(M.markers)if(Array.isArray(M.markers.sizes)){var k=M.markers.sizes;u.expand(d,b,{padded:!0,ppad:k}),u.expand(m,_,{padded:!0,ppad:k})}else{var A=[1/0,-1/0],T=[1/0,-1/0],E=M.markers.size;for(a=0;a<x;a++)s=v[a],l=y[a],A[0]>s&&(A[0]=s),A[1]<s&&(A[1]=s),T[0]>l&&(T[0]=l),T[1]<l&&(T[1]=l);x<P?(u.expand(d,b,{padded:!0,ppad:E}),u.expand(m,_,{padded:!0,ppad:E})):(d._min&&d._min.push({val:A[0],pad:E}),d._max&&d._max.push({val:A[1],pad:E}),m._min&&m._min.push({val:T[0],pad:E}),m._max&&m._max.push({val:T[1],pad:E}))}else u.expand(d,b,{padded:!0}),u.expand(m,_,{padded:!0});var L=i(t,g);return M.fill&&!L.fill2d&&(L.fill2d=!0),M.marker&&!L.scatter2d&&(L.scatter2d=!0),M.line&&!L.line2d&&(L.line2d=!0),!M.errorX&&!M.errorY||L.error2d||(L.error2d=!0),L.lineOptions.push(M.line),L.errorXOptions.push(M.errorX),L.errorYOptions.push(M.errorY),L.fillOptions.push(M.fill),L.markerOptions.push(M.marker),L.selectedOptions.push(M.selected),L.unselectedOptions.push(M.unselected),L.count++,h.scene=L,h.index=L.count-1,h.x=v,h.y=y,h.rawx=b,h.rawy=_,h.positions=r,h.count=x,[{x:!1,y:!1,t:h,trace:e}]},plot:function(t,e,n){if(n.length){var i=t._fullLayout,a=n[0][0].t.scene;if(a){var o=i._size,s=i.width,l=i.height;i._glcanvas.each(function(e){e.regl||e.pick||(e.regl=A({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},extensions:[\"ANGLE_instanced_arrays\",\"OES_element_index_uint\"],pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio}))});var c=i._glcanvas.data()[0].regl;if(x(t,e,n),a.dirty){if(!0===a.error2d&&(a.error2d=w(c)),!0===a.line2d&&(a.line2d=_(c)),!0===a.scatter2d&&(a.scatter2d=b(c)),!0===a.fill2d&&(a.fill2d=_(c)),a.line2d&&a.line2d.update(a.lineOptions),a.error2d){var f=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(f)}a.scatter2d&&(a.selectBatch?(a.scatter2d.update(a.unselectedOptions),a.select2d.update(a.selectedOptions)):a.scatter2d.update(a.markerOptions)),a.fill2d&&(a.fillOptions.forEach(function(t,e){var r=n[e];if(t&&r&&r[0]&&r[0].trace){var i,o,s=r[0],l=s.trace,c=s.t,u=a.lineOptions[e],f=[],h=u&&u.positions||c.positions;if(\"tozeroy\"===l.fill)(f=(f=[h[0],0]).concat(h)).push(h[h.length-2]),f.push(0);else if(\"tozerox\"===l.fill)(f=(f=[0,h[1]]).concat(h)).push(0),f.push(h[h.length-1]);else if(\"toself\"===l.fill||\"tonext\"===l.fill){for(f=[],i=0,o=0;o<h.length;o+=2)(isNaN(h[o])||isNaN(h[o+1]))&&((f=f.concat(h.slice(i,o))).push(h[i],h[i+1]),i=o+2);f=f.concat(h.slice(i)),i&&f.push(h[i],h[i+1])}else{var d=l._nexttrace;if(d){var p=a.lineOptions[e+1];if(p){var m=p.positions;if(\"tonexty\"===l.fill){for(f=h.slice(),e=Math.floor(m.length/2);e--;){var g=m[2*e],v=m[2*e+1];isNaN(g)||isNaN(v)||(f.push(g),f.push(v))}t.fill=d.fillcolor}}}}if(l._prevtrace&&\"tonext\"===l._prevtrace.fill){var y=a.lineOptions[e-1].positions,x=f.length/2,b=[i=x];for(o=0;o<y.length;o+=2)(isNaN(y[o])||isNaN(y[o+1]))&&(b.push(o/2+x+1),i=o+2);f=f.concat(y),t.hole=b}t.opacity=l.opacity,t.positions=f}}),a.fill2d.update(a.fillOptions))}var h=i.dragmode;\"lasso\"!==h&&\"select\"!==h||a.select2d&&a.selectBatch&&a.scatter2d.update(a.unselectedOptions);var d=n.map(function(r){if(r&&r[0]&&r[0].trace){var n,c=r[0],f=c.trace,d=c.t,p=d.rawx,m=d.rawy,g=e.xaxis||u.getFromId(t,f.xaxis||\"x\"),v=e.yaxis||u.getFromId(t,f.yaxis||\"y\"),y=[(g._rl||g.range)[0],(v._rl||v.range)[0],(g._rl||g.range)[1],(v._rl||v.range)[1]],x=[o.l+g.domain[0]*o.w,o.b+v.domain[0]*o.h,s-o.r-(1-g.domain[1])*o.w,l-o.t-(1-v.domain[1])*o.h];if(f.selectedpoints||\"lasso\"===h||\"select\"===h){if(!a.select2d&&a.scatter2d){var _=i._glcanvas.data()[1].regl;a.select2d=b(_,{clone:a.scatter2d}),a.select2d.update(a.selectedOptions),f.selectedpoints&&!a.selectBatch&&(a.selectBatch=Array(a.count),a.unselectBatch=Array(a.count),a.scatter2d.update(a.unselectedOptions))}else a.select2d.update(a.selectedOptions);if(f.selectedpoints&&!a.unselectBatch[d.index]){a.selectBatch[d.index]=f.selectedpoints;var w=f.selectedpoints,M={};for(n=0;n<w.length;n++)M[w[n]]=!0;var k=[];for(n=0;n<d.count;n++)M[n]||k.push(n);a.unselectBatch[d.index]=k}var A=Array(d.count),T=Array(d.count);for(n=0;n<d.count;n++)A[n]=g.c2p(p[n]),T[n]=v.c2p(m[n]);d.xpx=A,d.ypx=T}else d.xpx=d.ypx=null;return f.visible?{viewport:x,range:y}:null}});a.fill2d&&a.fill2d.update(d),a.line2d&&a.line2d.update(d),a.error2d&&a.error2d.update(d.concat(d)),a.scatter2d&&a.scatter2d.update(d),a.select2d&&a.select2d.update(d),a.draw()}}},hoverPoints:function(t,e,r,n){var i,a=t.cd,c=a[0].t,u=a[0].trace,f=t.xa,h=t.ya,d=c.rawx,p=c.rawy,m=f.c2p(e),g=h.c2p(r);if(c.tree){var v=f.p2c(m-E),y=f.p2c(m+E),x=h.p2c(g-E),b=h.p2c(g+E);i=\"x\"===n?c.tree.range(Math.min(v,y),Math.min(h._rl[0],h._rl[1]),Math.max(v,y),Math.max(h._rl[0],h._rl[1])):c.tree.range(Math.min(v,y),Math.min(x,b),Math.max(v,y),Math.max(x,b))}else{if(!c.ids)return[t];i=c.ids}var _,w,M,k,A,S,L,C=E;if(\"x\"===n)for(k=0;k<i.length;k++)w=d[i[k]],(A=Math.abs(f.c2p(w)-m))<C&&(C=A,_=i[k]);else for(k=0;k<i.length;k++)w=d[i[k]],M=p[i[k]],A=f.c2p(w)-m,S=h.c2p(M)-g,(L=Math.sqrt(A*A+S*S))<C&&(C=L,_=i[k]);if(t.index=_,void 0===_)return[t];var z={pointNumber:_,x:d[_],y:p[_]};z.tx=Array.isArray(u.text)?u.text[_]:u.text,z.htx=Array.isArray(u.hovertext)?u.hovertext[_]:u.hovertext,z.data=Array.isArray(u.customdata)?u.customdata[_]:u.customdata,z.tp=Array.isArray(u.textposition)?u.textposition[_]:u.textposition;var D=u.textfont;D&&(z.ts=Array.isArray(D.size)?D.size[_]:D.size,z.tc=Array.isArray(D.color)?D.color[_]:D.color,z.tf=Array.isArray(D.family)?D.family[_]:D.family);var I=u.marker;I&&(z.ms=Array.isArray(I.size)?I.size[_]:I.size,z.mo=Array.isArray(I.opacity)?I.opacity[_]:I.opacity,z.mx=Array.isArray(I.symbol)?I.symbol[_]:I.symbol,z.mc=Array.isArray(I.color)?I.color[_]:I.color);var P=I&&I.line;P&&(z.mlc=Array.isArray(P.color)?P.color[_]:P.color,z.mlw=Array.isArray(P.width)?P.width[_]:P.width);var O=I&&I.gradient;O&&\"none\"!==O.type&&(z.mgt=Array.isArray(O.type)?O.type[_]:O.type,z.mgc=Array.isArray(O.color)?O.color[_]:O.color);var F=f.c2p(z.x,!0),R=h.c2p(z.y,!0),N=z.mrc||1,j=u.hoverlabel;j&&(z.hbg=Array.isArray(j.bgcolor)?j.bgcolor[_]:j.bgcolor,z.hbc=Array.isArray(j.bordercolor)?j.bordercolor[_]:j.bordercolor,z.hts=Array.isArray(j.font.size)?j.font.size[_]:j.font.size,z.htc=Array.isArray(j.font.color)?j.font.color[_]:j.font.color,z.htf=Array.isArray(j.font.family)?j.font.family[_]:j.font.family,z.hnl=Array.isArray(j.namelength)?j.namelength[_]:j.namelength);var B=u.hoverinfo;B&&(z.hi=Array.isArray(B)?B[_]:B);var U={};return U[t.index]=z,o.extendFlat(t,{color:s(u,z),x0:F-N,x1:F+N,xLabelVal:z.x,y0:R-N,y1:R+N,yLabelVal:z.y,cd:U}),z.htx?t.text=z.htx:z.tx?t.text=z.tx:u.text&&(t.text=u.text),T(z,u,t),l.hoverInfo(z,u,t),[t]},style:function(t,e){if(e){var r=e[0].t.scene;r.clear(),r.draw()}},selectPoints:function(t,e){var r=t.cd,n=[],i=r[0].trace,a=r[0].t,o=a.x,s=a.y,l=a.rawx,c=a.rawy,u=a.scene;if(!u)return n;var f=!d.hasMarkers(i)&&!d.hasText(i);if(!0!==i.visible||f)return n;var h,p=null,m=null;if(!1===e||e.degenerate)for(m=Array(a.count),h=0;h<a.count;h++)m[h]=h;else for(p=[],m=[],h=0;h<a.count;h++)e.contains([a.xpx[h],a.ypx[h]])?(p.push(h),n.push({pointNumber:h,x:l?l[h]:o[h],y:c?c[h]:s[h]})):m.push(h);return u.selectBatch||(u.selectBatch=Array(u.count),u.unselectBatch=Array(u.count),u.scatter2d.update(u.unselectedOptions)),u.selectBatch[a.index]=p,u.unselectBatch[a.index]=m,n},sceneOptions:n,sceneUpdate:i,meta:{}}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../../components/drawing\":643,\"../../components/errorbars\":649,\"../../components/fx\":660,\"../../constants/gl2d_dashes\":717,\"../../lib\":743,\"../../lib/gl_format_color\":739,\"../../plots/cartesian\":800,\"../../plots/cartesian/axes\":789,\"../scatter/clean_data\":1069,\"../scatter/colorbar\":1070,\"../scatter/colorscale_calc\":1071,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076,\"../scatter/link_traces\":1082,\"../scatter/make_bubble_size_func\":1083,\"../scatter/subtypes\":1088,\"./attributes\":1113,\"./defaults\":1114,\"color-normalize\":99,\"fast-isnumeric\":140,kdgrass:292,\"object-assign\":462,regl:506,\"regl-error2d\":500,\"regl-line2d\":501,\"regl-scatter2d\":503,\"svg-path-sdf\":544}],1116:[function(t,e,r){\"use strict\";var n=t(\"../scattergeo/attributes\"),i=t(\"../scatter/attributes\"),a=t(\"../../plots/mapbox/layout_attributes\"),o=t(\"../../plots/attributes\"),s=t(\"../../components/colorbar/attributes\"),l=t(\"../../lib/extend\").extendFlat,c=t(\"../../plot_api/edit_types\").overrideAll,u=n.line,f=n.marker;e.exports=c({lon:n.lon,lat:n.lat,mode:l({},i.mode,{dflt:\"markers\"}),text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),line:{color:u.color,width:u.width},connectgaps:i.connectgaps,marker:{symbol:{valType:\"string\",dflt:\"circle\",arrayOk:!0},opacity:f.opacity,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,color:f.color,colorscale:f.colorscale,cauto:f.cauto,cmax:f.cmax,cmin:f.cmin,autocolorscale:f.autocolorscale,reversescale:f.reversescale,showscale:f.showscale,colorbar:s},fill:n.fill,fillcolor:i.fillcolor,textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,selected:{marker:{opacity:i.selected.marker.opacity}},unselected:{marker:{opacity:i.unselected.marker.opacity}},hoverinfo:l({},o.hoverinfo,{flags:[\"lon\",\"lat\",\"text\",\"name\"]})},\"calc\",\"nested\")},{\"../../components/colorbar/attributes\":619,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/attributes\":787,\"../../plots/mapbox/layout_attributes\":848,\"../scatter/attributes\":1066,\"../scattergeo/attributes\":1104}],1117:[function(t,e,r){\"use strict\";function n(){return{geojson:f.makeBlank(),layout:{visibility:\"none\"},paint:{}}}function i(t){return Array.isArray(t)?function(t){return t}:t?function(){return t}:a}function a(){return\"\"}function o(t,e){return t[0]-e[0]}function s(t){return t[0]===u}var l=t(\"fast-isnumeric\"),c=t(\"../../lib\"),u=t(\"../../constants/numerical\").BADNUM,f=t(\"../../lib/geojson_utils\"),h=t(\"../../components/colorscale\"),d=t(\"../scatter/make_bubble_size_func\"),p=t(\"../scatter/subtypes\"),m=t(\"../../plots/mapbox/convert_text_opts\"),g=t(\"../../constants/interactions\").DESELECTDIM,v=\"circle-color\",y=\"circle-radius\",x=\"circle-opacity\";e.exports=function(t){var e=t[0].trace,r=!0===e.visible,u=\"none\"!==e.fill,b=p.hasLines(e),_=p.hasMarkers(e),w=p.hasText(e),M=_&&\"circle\"===e.marker.symbol,k=_&&\"circle\"!==e.marker.symbol,A=n(),T=n(),S=n(),E=n(),L={fill:A,line:T,circle:S,symbol:E};if(!r)return L;var C;if((u||b)&&(C=f.calcTraceToLineCoords(t)),u&&(A.geojson=f.makePolygon(C),A.layout.visibility=\"visible\",c.extendFlat(A.paint,{\"fill-color\":e.fillcolor})),b&&(T.geojson=f.makeLine(C),T.layout.visibility=\"visible\",c.extendFlat(T.paint,{\"line-width\":e.line.width,\"line-color\":e.line.color,\"line-opacity\":e.opacity})),M){var z={};z[v]={},z[y]={},z[x]={},S.geojson=function(t,e){function r(t,r,n,i){void 0===e[r][n]&&(e[r][n]=i),t[r]=e[r][n]}var n,i=t[0].trace,a=i.marker;h.hasColorscale(i,\"marker\")?n=h.makeColorScaleFunc(h.extractScale(a.colorscale,a.cmin,a.cmax)):Array.isArray(a.color)&&(n=c.identity);var o;p.isBubble(i)&&(o=d(i));var u;u=i.selectedpoints?function(t,e){return i.opacity*e*(t.selected?1:g)}:function(t,e){return i.opacity*e};var f;Array.isArray(a.opacity)?f=function(t){var e=l(t.mo)?+c.constrain(t.mo,0,1):0;return u(t,e)}:i.selectedpoints&&(f=function(t){return u(t,a.opacity)});for(var m=[],b=0;b<t.length;b++){var _=t[b],w=_.lonlat;if(!s(w)){var M={};if(n){var k=_.mcc=n(_.mc);r(M,v,k,b)}o&&r(M,y,o(_.ms),b),f&&r(M,x,f(_),b),m.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:w},properties:M})}}return{type:\"FeatureCollection\",features:m}}(t,z),S.layout.visibility=\"visible\",c.extendFlat(S.paint,{\"circle-opacity\":function(t,e){var r,n=t.marker;if(Array.isArray(n.opacity)||t.selectedpoints){for(var i=Object.keys(e[x]),a=[],s=0;s<i.length;s++){var l=i[s];a.push([e[x][l],+l])}r={property:x,stops:a.sort(o)}}else r=t.opacity*n.opacity;return r}(e,z),\"circle-color\":function(t,e){var r,n=t.marker;if(Array.isArray(n.color)){for(var i=Object.keys(e[v]),a=[],o=0;o<i.length;o++){var s=i[o];a.push([e[v][s],s])}r={property:v,stops:a}}else r=n.color;return r}(e,z),\"circle-radius\":function(t,e){var r,n=t.marker;if(Array.isArray(n.size)){for(var i=Object.keys(e[y]),a=[],s=0;s<i.length;s++){var l=i[s];a.push([e[y][l],+l])}r={property:y,stops:a.sort(o)}}else r=n.size/2;return r}(e,z)})}if((k||w)&&(E.geojson=function(t){for(var e=t[0].trace,r=(e.marker||{}).symbol,n=e.text,o=\"circle\"!==r?i(r):a,l=p.hasText(e)?i(n):a,c=[],u=0;u<t.length;u++){var f=t[u];s(f.lonlat)||c.push({type:\"Feature\",geometry:{type:\"Point\",coordinates:f.lonlat},properties:{symbol:o(f.mx),text:l(f.tx)}})}return{type:\"FeatureCollection\",features:c}}(t),c.extendFlat(E.layout,{visibility:\"visible\",\"icon-image\":\"{symbol}-15\",\"text-field\":\"{text}\"}),k&&(c.extendFlat(E.layout,{\"icon-size\":e.marker.size/10}),c.extendFlat(E.paint,{\"icon-opacity\":e.opacity*e.marker.opacity,\"icon-color\":e.marker.color})),w)){var D=(e.marker||{}).size,I=m(e.textposition,D);c.extendFlat(E.layout,{\"text-size\":e.textfont.size,\"text-anchor\":I.anchor,\"text-offset\":I.offset}),c.extendFlat(E.paint,{\"text-color\":e.textfont.color,\"text-opacity\":e.opacity})}return L}},{\"../../components/colorscale\":633,\"../../constants/interactions\":720,\"../../constants/numerical\":721,\"../../lib\":743,\"../../lib/geojson_utils\":736,\"../../plots/mapbox/convert_text_opts\":845,\"../scatter/make_bubble_size_func\":1083,\"../scatter/subtypes\":1088,\"fast-isnumeric\":140}],1118:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/text_defaults\"),l=t(\"../scatter/fillcolor_defaults\"),c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}if(function(t,e,r){var n=r(\"lon\")||[],i=r(\"lat\")||[],a=Math.min(n.length,i.length);return a<n.length&&(e.lon=n.slice(0,a)),a<i.length&&(e.lat=i.slice(0,a)),a}(0,e,f)){if(f(\"text\"),f(\"hovertext\"),f(\"mode\"),i.hasLines(e)&&(o(t,e,r,u,f,{noDash:!0}),f(\"connectgaps\")),i.hasMarkers(e)){a(t,e,r,u,f,{noLine:!0,noSelect:!0});var h=e.marker;h.line={width:0},\"circle\"!==h.symbol&&(Array.isArray(h.size)&&(h.size=h.size[0]),Array.isArray(h.color)&&(h.color=h.color[0]))}i.hasText(e)&&s(t,e,u,f,{noSelect:!0}),f(\"fill\"),\"none\"!==e.fill&&l(t,e,r,f),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1116}],1119:[function(t,e,r){\"use strict\";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},{}],1120:[function(t,e,r){\"use strict\";var n=t(\"../../components/fx\"),i=t(\"../scatter/get_trace_color\"),a=t(\"../scatter/fill_hover_text\"),o=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){var s=t.cd,l=s[0].trace,c=t.xa,u=t.ya,f=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),h=e-f;if(n.getClosest(s,function(t){var e=t.lonlat;if(e[0]===o)return 1/0;var n=Math.abs(c.c2p(e)-c.c2p([h,e[1]])),i=Math.abs(u.c2p(e)-u.c2p([e[0],r])),a=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(n*n+i*i)-a,1-3/a)},t),!1!==t.index){var d=s[t.index],p=d.lonlat,m=[p[0]+f,p[1]],g=c.c2p(m),v=u.c2p(m),y=d.mrc||1;return t.x0=g-y,t.x1=g+y,t.y0=v-y,t.y1=v+y,t.color=i(l,d),t.extraText=function(t,e,r){function n(t){return t+\"\\xb0\"}var i=(e.hi||t.hoverinfo).split(\"+\"),o=-1!==i.indexOf(\"all\"),s=-1!==i.indexOf(\"lon\"),l=-1!==i.indexOf(\"lat\"),c=e.lonlat,u=[];return o||s&&l?u.push(\"(\"+n(c[0])+\", \"+n(c[1])+\")\"):s?u.push(r.lon+n(c[0])):l&&u.push(r.lat+n(c[1])),(o||-1!==i.indexOf(\"text\"))&&a(e,t,u),u.join(\"<br>\")}(l,d,s[0].t.labels),[t]}}},{\"../../components/fx\":660,\"../../constants/numerical\":721,\"../scatter/fill_hover_text\":1074,\"../scatter/get_trace_color\":1076}],1121:[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.plot=t(\"./plot\"),n.hoverPoints=t(\"./hover\"),n.eventData=t(\"./event_data\"),n.selectPoints=t(\"./select\"),n.style=function(t,e){if(e){e[0].trace._glTrace.update(e)}},n.moduleType=\"trace\",n.name=\"scattermapbox\",n.basePlotModule=t(\"../../plots/mapbox\"),n.categories=[\"mapbox\",\"gl\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatterlike\"],n.meta={},e.exports=n},{\"../../plots/mapbox\":846,\"../scatter/colorbar\":1070,\"../scattergeo/calc\":1105,\"./attributes\":1116,\"./defaults\":1118,\"./event_data\":1119,\"./hover\":1120,\"./plot\":1122,\"./select\":1123}],1122:[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)),t[0].trace._glTrace=this},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=new n(t,e[0].trace.uid);return r.update(e),r}},{\"./convert\":1117}],1123:[function(t,e,r){\"use strict\";var n=t(\"../scatter/subtypes\");e.exports=function(t,e){var r,i,a,o,s,l=t.cd,c=t.xaxis,u=t.yaxis,f=[],h=l[0].trace;if(!n.hasMarkers(h))return[];if(!1===e)for(s=0;s<l.length;s++)l[s].selected=0;else for(s=0;s<l.length;s++)i=(r=l[s]).lonlat,a=c.c2p(i),o=u.c2p(i),e.contains([a,o])?(f.push({pointNumber:s,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0;return f}},{\"../scatter/subtypes\":1088}],1124:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat,i=t(\"../scatter/attributes\"),a=t(\"../../plots/attributes\"),o=i.line;e.exports={mode:i.mode,r:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},theta:{valType:\"data_array\",editType:\"calc+clearAxisTypes\"},thetaunit:{valType:\"enumerated\",values:[\"radians\",\"degrees\",\"gradians\"],dflt:\"degrees\",editType:\"calc+clearAxisTypes\"},text:i.text,hovertext:i.hovertext,line:{color:o.color,width:o.width,dash:o.dash,shape:n({},o.shape,{values:[\"linear\",\"spline\"]}),smoothing:o.smoothing,editType:\"calc\"},connectgaps:i.connectgaps,marker:i.marker,cliponaxis:n({},i.cliponaxis,{dflt:!1}),textposition:i.textposition,textfont:i.textfont,fill:n({},i.fill,{values:[\"none\",\"toself\",\"tonext\"]}),fillcolor:i.fillcolor,hoverinfo:n({},a.hoverinfo,{flags:[\"r\",\"theta\",\"text\",\"name\"]}),hoveron:i.hoveron,selected:i.selected,unselected:i.unselected}},{\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1125:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../../constants/numerical\").BADNUM,a=t(\"../../plots/cartesian/axes\"),o=t(\"../scatter/colorscale_calc\"),s=t(\"../scatter/arrays_to_calcdata\"),l=t(\"../scatter/calc_selection\"),c=t(\"../scatter/calc\").calcMarkerSize;e.exports=function(t,e){function r(t){return d.c2rad(t,e.thetaunit)}for(var u=t._fullLayout,f=e.subplot,h=u[f].radialaxis,d=u[f].angularaxis,p=h.makeCalcdata(e,\"r\"),m=d.makeCalcdata(e,\"theta\"),g=p.length,v=new Array(g),y=0;y<g;y++){var x=p[y],b=m[y],_=v[y]={};n(x)&&n(b)?(_.r=x,_.theta=b,_.rad=r(b)):_.r=i}var w=c(e,g);return a.expand(h,p,{ppad:w}),\"linear\"!==d.type&&(d.autorange=!0,a.expand(d,m)),o(e),s(v,e),l(v,e),v}},{\"../../constants/numerical\":721,\"../../plots/cartesian/axes\":789,\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1126:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/line_shape_defaults\"),l=t(\"../scatter/text_defaults\"),c=t(\"../scatter/fillcolor_defaults\"),u=t(\"../scatter/constants\").PTS_LINESONLY,f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,r,i)}var p=d(\"r\"),m=d(\"theta\"),g=p&&m?Math.min(p.length,m.length):0;if(g){g<p.length&&(e.r=p.slice(0,g)),g<m.length&&(e.theta=m.slice(0,g)),d(\"thetaunit\"),d(\"mode\",g<u?\"lines+markers\":\"lines\"),d(\"text\"),d(\"hovertext\"),i.hasLines(e)&&(o(t,e,r,h,d),s(t,e,d),d(\"connectgaps\")),i.hasMarkers(e)&&a(t,e,r,h,d,{gradient:!0}),i.hasText(e)&&l(t,e,h,d);var v=[];(i.hasMarkers(e)||i.hasText(e))&&(d(\"cliponaxis\"),d(\"marker.maxdisplayed\"),v.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(c(t,e,r,d),i.hasLines(e)||s(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||v.push(\"fills\"),d(\"hoveron\",v.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1124}],1127:[function(t,e,r){\"use strict\";function n(t,e,r){function n(t,e){c.push(t._hovertitle+\": \"+a.tickText(t,e,\"hover\").text)}var i=r.radialAxis,s=r.angularAxis,l=(t.hi||e.hoverinfo).split(\"+\"),c=[];i._hovertitle=\"r\",s._hovertitle=\"\\u03b8\";var u,f=s._c2rad(t.theta,e.thetaunit);return u=\"linear\"===s.type&&e.thetaunit!==s.thetaunit?\"degrees\"===s.thetaunit?o.rad2deg(f):f:t.theta,-1!==l.indexOf(\"all\")&&(l=[\"r\",\"theta\"]),-1!==l.indexOf(\"r\")&&n(i,i.c2r(t.r)),-1!==l.indexOf(\"theta\")&&n(s,u),c.join(\"<br>\")}var i=t(\"../scatter/hover\"),a=t(\"../../plots/cartesian/axes\"),o=t(\"../../lib\");e.exports={hoverPoints:function(t,e,r,a){var o=i(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtWithinSector(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,s.extraText=n(c,u,l),o}},makeHoverPointText:n}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../scatter/hover\":1077}],1128:[function(t,e,r){\"use strict\";e.exports={moduleType:\"trace\",name:\"scatterpolar\",basePlotModule:t(\"../../plots/polar\"),categories:[\"polar\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:t(\"./calc\"),plot:t(\"./plot\"),style:t(\"../scatter/style\").style,hoverPoints:t(\"./hover\").hoverPoints,selectPoints:t(\"../scatter/select\"),meta:{}}},{\"../../plots/polar\":855,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1124,\"./calc\":1125,\"./defaults\":1126,\"./hover\":1127,\"./plot\":1129}],1129:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\"),i=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e,r){var a,o,s,l={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.circle:null},c=e.radialAxis,u=c.range;for(s=u[0]>u[1]?function(t){return t<=0}:function(t){return t>=0},a=0;a<r.length;a++)for(o=0;o<r[a].length;o++){var f=r[a][o],h=f.r;if(h!==i){var d=c.c2r(h)-u[0];if(s(d)){var p=f.rad;f.x=d*Math.cos(p),f.y=d*Math.sin(p);continue}f.intoCenter=[e.cxx,e.cyy]}f.x=i,f.y=i}n(t,l,r)}},{\"../../constants/numerical\":721,\"../scatter/plot\":1085}],1130:[function(t,e,r){\"use strict\";var n=t(\"../scatterpolar/attributes\"),i=t(\"../scattergl/attributes\");e.exports={mode:n.mode,r:n.r,theta:n.theta,thetaunit:n.thetaunit,text:n.text,line:i.line,connectgaps:i.connectgaps,marker:i.marker,fill:i.fill,fillcolor:i.fillcolor,hoverinfo:n.hoverinfo,hoveron:n.hoveron,selected:n.selected,unselected:n.unselected}},{\"../scattergl/attributes\":1113,\"../scatterpolar/attributes\":1124}],1131:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../scatter/subtypes\"),a=t(\"../scatter/marker_defaults\"),o=t(\"../scatter/line_defaults\"),s=t(\"../scatter/fillcolor_defaults\"),l=t(\"../scatter/constants\").PTS_LINESONLY,c=t(\"./attributes\");e.exports=function(t,e,r,u){function f(r,i){return n.coerce(t,e,c,r,i)}var h=f(\"r\"),d=f(\"theta\"),p=h&&d?Math.min(h.length,d.length):0;if(p){p<h.length&&(e.r=h.slice(0,p)),p<d.length&&(e.theta=d.slice(0,p)),f(\"thetaunit\"),f(\"mode\",p<l?\"lines+markers\":\"lines\"),f(\"text\"),i.hasLines(e)&&(o(t,e,r,u,f),f(\"connectgaps\"));var m=[];i.hasMarkers(e)&&(a(t,e,r,u,f),m.push(\"points\")),f(\"fill\"),\"none\"!==e.fill&&s(t,e,r,f),\"tonext\"!==e.fill&&\"toself\"!==e.fill||m.push(\"fills\"),f(\"hoveron\",m.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,f)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"./attributes\":1130}],1132:[function(t,e,r){\"use strict\";var n=t(\"kdgrass\"),i=t(\"fast-isnumeric\"),a=t(\"../scattergl\"),o=t(\"../scatter/colorscale_calc\"),s=t(\"../../plots/cartesian/axes\"),l=t(\"../scatterpolar/hover\").makeHoverPointText,c=t(\"../scatter/subtypes\");e.exports={moduleType:\"trace\",name:\"scatterpolargl\",basePlotModule:t(\"../../plots/polar\"),categories:[\"gl\",\"regl\",\"polar\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],attributes:t(\"./attributes\"),supplyDefaults:t(\"./defaults\"),calc:function(t,e){var r=t._fullLayout,n=e.subplot,i=r[n].radialaxis,a=r[n].angularaxis,l=i.makeCalcdata(e,\"r\"),c=a.makeCalcdata(e,\"theta\"),u={};return o(e),u.r=l,u.theta=c,s.expand(i,l,{tozero:!0}),\"linear\"!==a.type&&(a.autorange=!0,s.expand(a,c)),[{x:!1,y:!1,t:u,trace:e}]},plot:function(t,e,r){var o=e.radialAxis,s=e.angularAxis,l=o.range,u=a.sceneUpdate(t,e);return u.clear(),r.forEach(function(f,h){function d(t){return s.c2rad(t,b.thetaunit)}if(f&&f[0]&&f[0].trace){var p,m,g,v,y,x=f[0],b=x.trace,_=x.t,w=_.r,M=_.theta,k=w.slice(),A=M.slice();for(p=0;p<w.length;p++)m=w[p],v=M[p],y=s.c2rad(v,b.thetaunit),e.isPtWithinSector({r:m,rad:y})||(k[p]=NaN,A[p]=NaN);var T=w.length,S=new Array(2*T),E=Array(T),L=Array(T);for(p=0;p<T;p++)m=k[p],v=A[p],i(m)&&i(v)&&m>=0?(g=o.c2r(m)-l[0],y=d(v),E[p]=S[2*p]=g*Math.cos(y),L[p]=S[2*p+1]=g*Math.sin(y)):E[p]=L[p]=S[2*p]=S[2*p+1]=NaN;var C=a.sceneOptions(t,e,b,S);C.fill&&!u.fill2d&&(u.fill2d=!0),C.marker&&!u.scatter2d&&(u.scatter2d=!0),C.line&&!u.line2d&&(u.line2d=!0),!C.errorX&&!C.errorY||u.error2d||(u.error2d=!0),c.hasMarkers(b)&&(C.selected.positions=C.unselected.positions=C.marker.positions),u.lineOptions.push(C.line),u.errorXOptions.push(C.errorX),u.errorYOptions.push(C.errorY),u.fillOptions.push(C.fill),u.markerOptions.push(C.marker),u.selectedOptions.push(C.selected),u.unselectedOptions.push(C.unselected),u.count=r.length,_.scene=u,_.index=h,_.x=E,_.y=L,_.rawx=E,_.rawy=L,_.r=w,_.theta=M,_.positions=S,_.count=T,_.tree=n(S,512)}}),a.plot(t,e,r)},hoverPoints:function(t,e,r,n){var i=t.cd[0].t,o=i.r,s=i.theta,c=a.hoverPoints(t,e,r,n);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var f=t.subplot,h=f.angularAxis,d=u.cd[u.index],p=u.trace;if(d.r=o[u.index],d.theta=s[u.index],d.rad=h.c2rad(d.theta,p.thetaunit),f.isPtWithinSector(d))return u.xLabelVal=void 0,u.yLabelVal=void 0,u.extraText=l(d,p,f),c}},style:a.style,selectPoints:a.selectPoints,meta:{}}},{\"../../plots/cartesian/axes\":789,\"../../plots/polar\":855,\"../scatter/colorscale_calc\":1071,\"../scatter/subtypes\":1088,\"../scattergl\":1115,\"../scatterpolar/hover\":1127,\"./attributes\":1130,\"./defaults\":1131,\"fast-isnumeric\":140,kdgrass:292}],1133:[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,c=n.marker,u=n.line,f=c.line;e.exports={a:{valType:\"data_array\",editType:\"calc\"},b:{valType:\"data_array\",editType:\"calc\"},c:{valType:\"data_array\",editType:\"calc\"},sum:{valType:\"number\",dflt:0,min:0,editType:\"calc\"},mode:l({},n.mode,{dflt:\"markers\"}),text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:s,shape:l({},u.shape,{values:[\"linear\",\"spline\"]}),smoothing:u.smoothing,editType:\"calc\"},connectgaps:n.connectgaps,cliponaxis:n.cliponaxis,fill:l({},n.fill,{values:[\"none\",\"toself\",\"tonext\"]}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:\"calc\"},a(\"marker.line\")),gradient:c.gradient,editType:\"calc\"},a(\"marker\"),{showscale:c.showscale,colorbar:o}),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:[\"a\",\"b\",\"c\",\"text\",\"name\"]}),hoveron:n.hoveron}},{\"../../components/colorbar/attributes\":619,\"../../components/colorscale/color_attributes\":626,\"../../components/drawing/attributes\":642,\"../../lib/extend\":732,\"../../plots/attributes\":787,\"../scatter/attributes\":1066}],1134:[function(t,e,r){\"use strict\";var n=t(\"fast-isnumeric\"),i=t(\"../scatter/colorscale_calc\"),a=t(\"../scatter/arrays_to_calcdata\"),o=t(\"../scatter/calc_selection\"),s=t(\"../scatter/calc\").calcMarkerSize,l=[\"a\",\"b\",\"c\"],c={a:[\"b\",\"c\"],b:[\"a\",\"c\"],c:[\"a\",\"b\"]};e.exports=function(t,e){var r,u,f,h,d,p,m=t._fullLayout[e.subplot].sum,g=e.sum||m;for(r=0;r<l.length;r++)if(f=l[r],!e[f]){for(d=e[c[f][0]],p=e[c[f][1]],h=new Array(d.length),u=0;u<d.length;u++)h[u]=g-d[u]-p[u];e[f]=h}var v,y,x,b,_,w,M=e.a.length,k=new Array(M);for(r=0;r<M;r++)v=e.a[r],y=e.b[r],x=e.c[r],n(v)&&n(y)&&n(x)?(1!==(b=m/((v=+v)+(y=+y)+(x=+x)))&&(v*=b,y*=b,x*=b),w=v,_=x-y,k[r]={x:_,y:w,a:v,b:y,c:x}):k[r]={x:!1,y:!1};return s(e,M),i(e),a(k,e),o(k,e),k}},{\"../scatter/arrays_to_calcdata\":1065,\"../scatter/calc\":1067,\"../scatter/calc_selection\":1068,\"../scatter/colorscale_calc\":1071,\"fast-isnumeric\":140}],1135:[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\"),c=t(\"../scatter/text_defaults\"),u=t(\"../scatter/fillcolor_defaults\"),f=t(\"./attributes\");e.exports=function(t,e,r,h){function d(r,i){return n.coerce(t,e,f,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){m&&p<m.length&&(e.a=m.slice(0,p)),g&&p<g.length&&(e.b=g.slice(0,p)),v&&p<v.length&&(e.c=v.slice(0,p)),d(\"sum\"),d(\"text\"),d(\"hovertext\");d(\"mode\",p<i.PTS_LINESONLY?\"lines+markers\":\"lines\"),a.hasLines(e)&&(s(t,e,r,h,d),l(t,e,d),d(\"connectgaps\")),a.hasMarkers(e)&&o(t,e,r,h,d,{gradient:!0}),a.hasText(e)&&c(t,e,h,d);var y=[];(a.hasMarkers(e)||a.hasText(e))&&(d(\"cliponaxis\"),d(\"marker.maxdisplayed\"),y.push(\"points\")),d(\"fill\"),\"none\"!==e.fill&&(u(t,e,r,d),a.hasLines(e)||l(t,e,d)),\"tonext\"!==e.fill&&\"toself\"!==e.fill||y.push(\"fills\"),d(\"hoveron\",y.join(\"+\")||\"points\"),n.coerceSelectionMarkerOpacity(e,d)}else e.visible=!1}},{\"../../lib\":743,\"../scatter/constants\":1072,\"../scatter/fillcolor_defaults\":1075,\"../scatter/line_defaults\":1079,\"../scatter/line_shape_defaults\":1081,\"../scatter/marker_defaults\":1084,\"../scatter/subtypes\":1088,\"../scatter/text_defaults\":1089,\"./attributes\":1133}],1136:[function(t,e,r){\"use strict\";e.exports=function(t,e,r,n,i){if(e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),n[i]){var a=n[i];t.a=a.a,t.b=a.b,t.c=a.c}else t.a=e.a,t.b=e.b,t.c=e.c;return t}},{}],1137:[function(t,e,r){\"use strict\";var n=t(\"../scatter/hover\"),i=t(\"../../plots/cartesian/axes\");e.exports=function(t,e,r,a){function o(t,e){v.push(t._hovertitle+\": \"+i.tickText(t,e,\"hover\").text)}var s=n(t,e,r,a);if(s&&!1!==s[0].index){var l=s[0];if(void 0===l.index){var c=1-l.y0/t.ya._length,u=t.xa._length,f=u*c/2,h=u-f;return l.x0=Math.max(Math.min(l.x0,h),f),l.x1=Math.max(Math.min(l.x1,h),f),s}var d=l.cd[l.index];l.a=d.a,l.b=d.b,l.c=d.c,l.xLabelVal=void 0,l.yLabelVal=void 0;var p=l.trace,m=l.subplot,g=(d.hi||p.hoverinfo).split(\"+\"),v=[];return-1!==g.indexOf(\"all\")&&(g=[\"a\",\"b\",\"c\"]),-1!==g.indexOf(\"a\")&&o(m.aaxis,d.a),-1!==g.indexOf(\"b\")&&o(m.baxis,d.b),-1!==g.indexOf(\"c\")&&o(m.caxis,d.c),l.extraText=v.join(\"<br>\"),s}}},{\"../../plots/cartesian/axes\":789,\"../scatter/hover\":1077}],1138:[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(\"../scatter/style\").style,n.hoverPoints=t(\"./hover\"),n.selectPoints=t(\"../scatter/select\"),n.eventData=t(\"./event_data\"),n.moduleType=\"trace\",n.name=\"scatterternary\",n.basePlotModule=t(\"../../plots/ternary\"),n.categories=[\"ternary\",\"symbols\",\"markerColorscale\",\"showLegend\",\"scatter-like\"],n.meta={},e.exports=n},{\"../../plots/ternary\":866,\"../scatter/colorbar\":1070,\"../scatter/select\":1086,\"../scatter/style\":1087,\"./attributes\":1133,\"./calc\":1134,\"./defaults\":1135,\"./event_data\":1136,\"./hover\":1137,\"./plot\":1139}],1139:[function(t,e,r){\"use strict\";var n=t(\"../scatter/plot\");e.exports=function(t,e,r){var i=e.plotContainer;i.select(\".scatterlayer\").selectAll(\"*\").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null};n(t,a,r)}},{\"../scatter/plot\":1085}],1140:[function(t,e,r){\"use strict\";function n(t){return{show:{valType:\"boolean\",dflt:!1},project:{x:{valType:\"boolean\",dflt:!1},y:{valType:\"boolean\",dflt:!1},z:{valType:\"boolean\",dflt:!1}},color:{valType:\"color\",dflt:i.defaultLine},usecolormap:{valType:\"boolean\",dflt:!1},width:{valType:\"number\",min:1,max:16,dflt:2},highlight:{valType:\"boolean\",dflt:!0},highlightcolor:{valType:\"color\",dflt:i.defaultLine},highlightwidth:{valType:\"number\",min:1,max:16,dflt:2}}}var i=t(\"../../components/color\"),a=t(\"../../components/colorscale/attributes\"),o=t(\"../../components/colorbar/attributes\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"../../plot_api/edit_types\").overrideAll,c=e.exports=l({z:{valType:\"data_array\"},x:{valType:\"data_array\"},y:{valType:\"data_array\"},text:{valType:\"data_array\"},surfacecolor:{valType:\"data_array\"},cauto:a.zauto,cmin:a.zmin,cmax:a.zmax,colorscale:a.colorscale,autocolorscale:s({},a.autocolorscale,{dflt:!1}),reversescale:a.reversescale,showscale:a.showscale,colorbar:o,contours:{x:n(),y:n(),z:n()},hidesurface:{valType:\"boolean\",dflt:!1},lightposition:{x:{valType:\"number\",min:-1e5,max:1e5,dflt:10},y:{valType:\"number\",min:-1e5,max:1e5,dflt:1e4},z:{valType:\"number\",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:\"number\",min:0,max:1,dflt:.8},diffuse:{valType:\"number\",min:0,max:1,dflt:.8},specular:{valType:\"number\",min:0,max:2,dflt:.05},roughness:{valType:\"number\",min:0,max:1,dflt:.5},fresnel:{valType:\"number\",min:0,max:5,dflt:.2}},opacity:{valType:\"number\",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})}},\"calc\",\"nested\");c.x.editType=c.y.editType=c.z.editType=\"calc+clearAxisTypes\"},{\"../../components/color\":618,\"../../components/colorbar/attributes\":619,\"../../components/colorscale/attributes\":624,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773}],1141:[function(t,e,r){\"use strict\";var n=t(\"../../components/colorscale/calc\");e.exports=function(t,e){e.surfacecolor?n(e,e.surfacecolor,\"\",\"c\"):n(e,e.z,\"\",\"c\")}},{\"../../components/colorscale/calc\":625}],1142:[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=\"cb\"+r.uid,c=r.cmin,u=r.cmax,f=r.surfacecolor||r.z;if(n(c)||(c=i.aggNums(Math.min,null,f)),n(u)||(u=i.aggNums(Math.max,null,f)),t._fullLayout._infolayer.selectAll(\".\"+l).remove(),r.showscale){var h=e[0].t.cb=s(t,l),d=o.makeColorScaleFunc(o.extractScale(r.colorscale,c,u),{noNumericCheck:!0});h.fillcolor(d).filllevels({start:c,end:u,size:(u-c)/254}).options(r.colorbar)()}else a.autoMargin(t,l)}},{\"../../components/colorbar/draw\":622,\"../../components/colorscale\":633,\"../../lib\":743,\"../../plots/plots\":852,\"fast-isnumeric\":140}],1143:[function(t,e,r){\"use strict\";function n(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.dataScale=1}function i(t){var e=t.shape,r=[e[0]+2,e[1]+2],n=o(new Float32Array(r[0]*r[1]),r);return c.assign(n.lo(1,1).hi(e[0],e[1]),t),c.assign(n.lo(1).hi(e[0],1),t.hi(e[0],1)),c.assign(n.lo(1,r[1]-1).hi(e[0],1),t.lo(0,e[1]-1).hi(e[0],1)),c.assign(n.lo(0,1).hi(1,e[1]),t.hi(1)),c.assign(n.lo(r[0]-1,1).hi(1,e[1]),t.lo(e[0]-1)),n.set(0,0,t.get(0,0)),n.set(0,r[1]-1,t.get(0,e[1]-1)),n.set(r[0]-1,0,t.get(e[0]-1,0)),n.set(r[0]-1,r[1]-1,t.get(e[0]-1,e[1]-1)),n}var a=t(\"gl-surface3d\"),o=t(\"ndarray\"),s=t(\"ndarray-homography\"),l=t(\"ndarray-fill\"),c=t(\"ndarray-ops\"),u=t(\"tinycolor2\"),f=t(\"../../lib/str2rgbarray\"),h=128,d=n.prototype;d.handlePick=function(t){if(t.object===this.surface){var e=t.index=[Math.min(0|Math.round(t.data.index[0]/this.dataScale-1),this.data.z[0].length-1),Math.min(0|Math.round(t.data.index[1]/this.dataScale-1),this.data.z.length-1)],r=[0,0,0];Array.isArray(this.data.x[0])?r[0]=this.data.x[e[1]][e[0]]:r[0]=this.data.x[e[0]],Array.isArray(this.data.y[0])?r[1]=this.data.y[e[1]][e[0]]:r[1]=this.data.y[e[1]],r[2]=this.data.z[e[1]][e[0]],t.traceCoordinate=r;var n=this.scene.fullSceneLayout;t.dataCoordinate=[n.xaxis.d2l(r[0],0,this.data.xcalendar)*this.scene.dataScale[0],n.yaxis.d2l(r[1],0,this.data.ycalendar)*this.scene.dataScale[1],n.zaxis.d2l(r[2],0,this.data.zcalendar)*this.scene.dataScale[2]];var i=this.data.text;return i&&i[e[1]]&&void 0!==i[e[1]][e[0]]?t.textLabel=i[e[1]][e[0]]:t.textLabel=\"\",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}},d.setContourLevels=function(){for(var t=[[],[],[]],e=!1,r=0;r<3;++r)this.showContour[r]&&(e=!0,t[r]=this.scene.contourLevels[r]);e&&this.surface.update({levels:t})},d.update=function(t){var e,r=this.scene,n=r.fullSceneLayout,a=this.surface,c=t.opacity,d=function(t,e){return void 0===e&&(e=1),t.map(function(t){var r=t[0],n=u(t[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,e]}})}(t.colorscale,c),p=t.z,m=t.x,g=t.y,v=n.xaxis,y=n.yaxis,x=n.zaxis,b=r.dataScale,_=p[0].length,w=p.length,M=[o(new Float32Array(_*w),[_,w]),o(new Float32Array(_*w),[_,w]),o(new Float32Array(_*w),[_,w])],k=M[0],A=M[1],T=r.contourLevels;this.data=t;var S=t.xcalendar,E=t.ycalendar,L=t.zcalendar;l(M[2],function(t,e){return x.d2l(p[e][t],0,L)*b[2]}),Array.isArray(m[0])?l(k,function(t,e){return v.d2l(m[e][t],0,S)*b[0]}):l(k,function(t){return v.d2l(m[t],0,S)*b[0]}),Array.isArray(g[0])?l(A,function(t,e){return y.d2l(g[e][t],0,E)*b[1]}):l(A,function(t,e){return y.d2l(g[e],0,E)*b[1]});var C={colormap:d,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:t.opacity};if(C.intensityBounds=[t.cmin,t.cmax],t.surfacecolor){var z=o(new Float32Array(_*w),[_,w]);l(z,function(e,r){return t.surfacecolor[r][e]}),M.push(z)}else C.intensityBounds[0]*=b[2],C.intensityBounds[1]*=b[2];this.dataScale=function(t){var e=Math.max(t[0].shape[0],t[0].shape[1]);if(e<h){for(var r=h/e,n=[0|Math.floor(t[0].shape[0]*r+1),0|Math.floor(t[0].shape[1]*r+1)],a=n[0]*n[1],l=0;l<t.length;++l){var c=i(t[l]),u=o(new Float32Array(a),n);s(u,c,[r,0,0,0,r,0,0,0,1]),t[l]=u}return r}return 1}(M),t.surfacecolor&&(C.intensity=M.pop());var D=[!0,!0,!0],I=[\"x\",\"y\",\"z\"];for(e=0;e<3;++e){var P=t.contours[I[e]];D[e]=P.highlight,C.showContour[e]=P.show||P.highlight,C.showContour[e]&&(C.contourProject[e]=[P.project.x,P.project.y,P.project.z],P.show?(this.showContour[e]=!0,C.levels[e]=T[e],a.highlightColor[e]=C.contourColor[e]=f(P.color),P.usecolormap?a.highlightTint[e]=C.contourTint[e]=0:a.highlightTint[e]=C.contourTint[e]=1,C.contourWidth[e]=P.width):this.showContour[e]=!1,P.highlight&&(C.dynamicColor[e]=f(P.highlightcolor),C.dynamicWidth[e]=P.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(d)&&(C.vertexColor=!0),C.coords=M,a.update(C),a.visible=t.visible,a.enableDynamic=D,a.snapToData=!0,\"lighting\"in t&&(a.ambientLight=t.lighting.ambient,a.diffuseLight=t.lighting.diffuse,a.specularLight=t.lighting.specular,a.roughness=t.lighting.roughness,a.fresnel=t.lighting.fresnel),\"lightposition\"in t&&(a.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z]),c&&c<1&&(a.supportsTransparency=!0)},d.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},e.exports=function(t,e){var r=t.glplot.gl,i=a({gl:r}),o=new n(t,i,e.uid);return i._trace=o,o.update(e),t.glplot.add(i),o}},{\"../../lib/str2rgbarray\":765,\"gl-surface3d\":254,ndarray:458,\"ndarray-fill\":448,\"ndarray-homography\":450,\"ndarray-ops\":452,tinycolor2:546}],1144:[function(t,e,r){\"use strict\";function n(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}var i=t(\"../../registry\"),a=t(\"../../lib\"),o=t(\"../../components/colorscale/defaults\"),s=t(\"./attributes\");e.exports=function(t,e,r,l){function c(r,n){return a.coerce(t,e,s,r,n)}var u,f,h=c(\"z\");if(h){var d=h[0].length,p=h.length;c(\"x\"),c(\"y\");if(i.getComponentMethod(\"calendars\",\"handleTraceDefaults\")(t,e,[\"x\",\"y\",\"z\"],l),!Array.isArray(e.x))for(e.x=[],u=0;u<d;++u)e.x[u]=u;if(c(\"text\"),!Array.isArray(e.y))for(e.y=[],u=0;u<p;++u)e.y[u]=u;[\"lighting.ambient\",\"lighting.diffuse\",\"lighting.specular\",\"lighting.roughness\",\"lighting.fresnel\",\"lightposition.x\",\"lightposition.y\",\"lightposition.z\",\"hidesurface\",\"opacity\"].forEach(function(t){c(t)});var m=c(\"surfacecolor\");c(\"colorscale\");var g=[\"x\",\"y\",\"z\"];for(u=0;u<3;++u){var v=\"contours.\"+g[u],y=c(v+\".show\"),x=c(v+\".highlight\");if(y||x)for(f=0;f<3;++f)c(v+\".project.\"+g[f]);y&&(c(v+\".color\"),c(v+\".width\"),c(v+\".usecolormap\")),x&&(c(v+\".highlightcolor\"),c(v+\".highlightwidth\"))}m||(n(t,\"zmin\",\"cmin\"),n(t,\"zmax\",\"cmax\"),n(t,\"zauto\",\"cauto\")),o(t,e,l,c,{prefix:\"\",cLetter:\"c\"})}else e.visible=!1}},{\"../../components/colorscale/defaults\":628,\"../../lib\":743,\"../../registry\":873,\"./attributes\":1140}],1145:[function(t,e,r){\"use strict\";var n={};n.attributes=t(\"./attributes\"),n.supplyDefaults=t(\"./defaults\"),n.colorbar=t(\"./colorbar\"),n.calc=t(\"./calc\"),n.plot=t(\"./convert\"),n.moduleType=\"trace\",n.name=\"surface\",n.basePlotModule=t(\"../../plots/gl3d\"),n.categories=[\"gl3d\",\"2dMap\",\"noOpacity\"],n.meta={},e.exports=n},{\"../../plots/gl3d\":832,\"./attributes\":1140,\"./calc\":1141,\"./colorbar\":1142,\"./convert\":1143,\"./defaults\":1144}],1146:[function(t,e,r){\"use strict\";var n=t(\"../../components/annotations/attributes\"),i=t(\"../../lib/extend\").extendFlat,a=t(\"../../plot_api/edit_types\").overrideAll,o=t(\"../../plots/font_attributes\"),s=t(\"../../plots/domain_attributes\");e.exports=a({domain:s({name:\"table\",trace:!0}),columnwidth:{valType:\"number\",arrayOk:!0,dflt:null},columnorder:{valType:\"data_array\"},header:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[]},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:28},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))},cells:{values:{valType:\"data_array\",dflt:[]},format:{valType:\"data_array\",dflt:[]},prefix:{valType:\"string\",arrayOk:!0,dflt:null},suffix:{valType:\"string\",arrayOk:!0,dflt:null},height:{valType:\"number\",dflt:20},align:i({},n.align,{arrayOk:!0}),line:{width:{valType:\"number\",arrayOk:!0,dflt:1},color:{valType:\"color\",arrayOk:!0,dflt:\"grey\"}},fill:{color:{valType:\"color\",arrayOk:!0,dflt:\"white\"}},font:i({},o({arrayOk:!0}))}},\"calc\",\"from-root\")},{\"../../components/annotations/attributes\":601,\"../../lib/extend\":732,\"../../plot_api/edit_types\":773,\"../../plots/domain_attributes\":815,\"../../plots/font_attributes\":816}],1147:[function(t,e,r){\"use strict\";var n=t(\"../../plots/get_data\").getModuleCalcData,i=t(\"./plot\");r.name=\"table\",r.plot=function(t){var e=n(t.calcdata,\"table\");e.length&&i(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has(\"table\"),a=e._has&&e._has(\"table\");i&&!a&&n._paperdiv.selectAll(\".table\").remove()}},{\"../../plots/get_data\":826,\"./plot\":1154}],1148:[function(t,e,r){\"use strict\";var n=t(\"../../lib/gup\").wrap;e.exports=function(t,e){return n(e)}},{\"../../lib/gup\":740}],1149:[function(t,e,r){\"use strict\";e.exports={maxDimensionCount:60,overdrag:45,cellPad:8,latexCheck:/^\\$.*\\$$/,wrapSplitCharacter:\" \",wrapSpacer:\" \",lineBreaker:\"<br>\",uplift:5,goldenRatio:1.618,columnTitleOffset:28,columnExtentOffset:10,transitionEase:\"cubic-out\",transitionDuration:100,releaseTransitionEase:\"cubic-out\",releaseTransitionDuration:120,scrollbarWidth:8,scrollbarCaptureWidth:18,scrollbarOffset:5,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,cn:{table:\"table\",tableControlView:\"table-control-view\",scrollBackground:\"scroll-background\",yColumn:\"y-column\",columnBlock:\"column-block\",scrollAreaClip:\"scroll-area-clip\",scrollAreaClipRect:\"scroll-area-clip-rect\",columnBoundary:\"column-boundary\",columnBoundaryClippath:\"column-boundary-clippath\",columnBoundaryRect:\"column-boundary-rect\",columnCells:\"column-cells\",columnCell:\"column-cell\",cellRect:\"cell-rect\",cellText:\"cell-text\",cellTextHolder:\"cell-text-holder\",scrollbarKit:\"scrollbar-kit\",scrollbar:\"scrollbar\",scrollbarSlider:\"scrollbar-slider\",scrollbarGlyph:\"scrollbar-glyph\",scrollbarCaptureZone:\"scrollbar-capture-zone\"}}},{}],1150:[function(t,e,r){\"use strict\";function n(t){return t.calcdata.columns.reduce(function(e,r){return r.xIndex<t.xIndex?e+r.columnWidth:e},0)}function i(t,e){return Object.keys(t).map(function(r){return s({},t[r],{auxiliaryBlocks:e})})}function a(t,e){for(var r,n={},i=0,a=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<t.length;c++)r=t[c],o.rows.push({rowIndex:c,rowHeight:r}),((a+=r)>=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}var o=t(\"./constants\"),s=t(\"../../lib/extend\").extendFlat,l=t(\"fast-isnumeric\");e.exports=function(t,e){var r=e.header.values.map(function(t){return Array.isArray(t)?t:[t]}),c=e.cells.values,u=e.domain,f=Math.floor(t._fullLayout._size.w*(u.x[1]-u.x[0])),h=Math.floor(t._fullLayout._size.h*(u.y[1]-u.y[0])),d=r.length?r[0].map(function(){return e.header.height}):[],p=c.length?c[0].map(function(){return e.cells.height}):[],m=d.reduce(function(t,e){return t+e},0),g=a(p,h-m+o.uplift),v=i(a(d,m),[]),y=i(g,v),x={},b=e._fullInput.columnorder,_=r.map(function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return l(n)?Number(n):1}),w=_.reduce(function(t,e){return t+e},0);_=_.map(function(t){return t/w*f});var M={key:e.index,translateX:u.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-u.y[1]),size:t._fullLayout._size,width:f,height:h,columnOrder:b,groupHeight:h,rowBlocks:y,headerRowBlocks:v,scrollY:0,cells:e.cells,headerCells:s({},e.header,{values:r}),gdColumns:r.map(function(t){return t[0]}),gdColumnsOriginalOrder:r.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:r.map(function(t,e){var r=x[t];x[t]=(r||0)+1;return{key:t+\"__\"+x[t],label:t,specIndex:e,xIndex:b[e],xScale:n,x:void 0,calcdata:void 0,columnWidth:_[e]}})};return M.columns.forEach(function(t){t.calcdata=M,t.x=n(t)}),M}},{\"../../lib/extend\":732,\"./constants\":1149,\"fast-isnumeric\":140}],1151:[function(t,e,r){\"use strict\";var n=t(\"../../lib/extend\").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:\"header\",type:\"header\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:\"cells1\",type:\"cells\",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:\"cells2\",type:\"cells\",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0;return[r,e?r+e.rows.length:0]}(t);return t.values.slice(e[0],e[1]).map(function(r,n){return{keyWithinBlock:n+(\"string\"==typeof r&&r.match(/[<$&> ]/)?\"_keybuster_\"+Math.random():\"\"),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}})}},{\"../../lib/extend\":732}],1152:[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)}o(\"domain.x\"),o(\"domain.y\"),o(\"columnwidth\"),o(\"header.values\"),o(\"header.format\"),o(\"header.align\"),o(\"header.prefix\"),o(\"header.suffix\"),o(\"header.height\"),o(\"header.line.width\"),o(\"header.line.color\"),o(\"header.fill.color\"),n.coerceFont(o,\"header.font\",n.extendFlat({},a.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s<n;s++)o.push(s);e(\"columnorder\",o)}(e,o),o(\"cells.values\"),o(\"cells.format\"),o(\"cells.align\"),o(\"cells.prefix\"),o(\"cells.suffix\"),o(\"cells.height\"),o(\"cells.line.width\"),o(\"cells.line.color\"),o(\"cells.fill.color\"),n.coerceFont(o,\"cells.font\",n.extendFlat({},a.font))}},{\"../../lib\":743,\"./attributes\":1146}],1153:[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.moduleType=\"trace\",n.name=\"table\",n.basePlotModule=t(\"./base_plot\"),n.categories=[\"noOpacity\"],n.meta={},e.exports=n},{\"./attributes\":1146,\"./base_plot\":1147,\"./calc\":1148,\"./defaults\":1152,\"./plot\":1154}],1154:[function(t,e,r){\"use strict\";function n(t,e){return\"clip\"+t._fullLayout._uid+\"_scrollAreaBottomClip_\"+e.key}function i(t,e){return\"clip\"+t._fullLayout._uid+\"_columnBoundaryClippath_\"+e.calcdata.key+\"_\"+e.specIndex}function a(t){return[].concat.apply([],t.map(function(t){return t})).map(function(t){return t.__data__})}function o(t,e,r){var n=t.selectAll(\".\"+M.cn.scrollbarKit).data(A.repeat,A.keyFun);n.enter().append(\"g\").classed(M.cn.scrollbarKit,!0).style(\"shape-rendering\",\"geometricPrecision\"),n.each(function(t){var e=t.scrollbarState;e.totalHeight=function(t){var e=t.rowBlocks;return b(e,e.length-1)+(e.length?_(e[e.length-1],1/0):1)}(t),e.scrollableAreaHeight=t.groupHeight-p(t),e.currentlyVisibleHeight=Math.min(e.totalHeight,e.scrollableAreaHeight),e.ratio=e.currentlyVisibleHeight/e.totalHeight,e.barLength=Math.max(e.ratio*e.currentlyVisibleHeight,M.goldenRatio*M.scrollbarWidth),e.barWiggleRoom=e.currentlyVisibleHeight-e.barLength,e.wiggleRoom=Math.max(0,e.totalHeight-e.scrollableAreaHeight),e.topY=0===e.barWiggleRoom?0:t.scrollY/e.wiggleRoom*e.barWiggleRoom,e.bottomY=e.topY+e.barLength,e.dragMultiplier=e.wiggleRoom/e.barWiggleRoom}).attr(\"transform\",function(t){return\"translate(\"+(t.width+M.scrollbarWidth/2+M.scrollbarOffset)+\" \"+p(t)+\")\"});var i=n.selectAll(\".\"+M.cn.scrollbar).data(A.repeat,A.keyFun);i.enter().append(\"g\").classed(M.cn.scrollbar,!0);var a=i.selectAll(\".\"+M.cn.scrollbarSlider).data(A.repeat,A.keyFun);a.enter().append(\"g\").classed(M.cn.scrollbarSlider,!0),a.attr(\"transform\",function(t){return\"translate(0 \"+(t.scrollbarState.topY||0)+\")\"});var o=a.selectAll(\".\"+M.cn.scrollbarGlyph).data(A.repeat,A.keyFun);o.enter().append(\"line\").classed(M.cn.scrollbarGlyph,!0).attr(\"stroke\",\"black\").attr(\"stroke-width\",M.scrollbarWidth).attr(\"stroke-linecap\",\"round\").attr(\"y1\",M.scrollbarWidth/2),o.attr(\"y2\",function(t){return t.scrollbarState.barLength-M.scrollbarWidth/2}).attr(\"stroke-opacity\",function(t){return t.columnDragInProgress||!t.scrollbarState.barWiggleRoom||r?0:.4}),o.transition().delay(0).duration(0),o.transition().delay(M.scrollbarHideDelay).duration(M.scrollbarHideDuration).attr(\"stroke-opacity\",0);var s=i.selectAll(\".\"+M.cn.scrollbarCaptureZone).data(A.repeat,A.keyFun);s.enter().append(\"line\").classed(M.cn.scrollbarCaptureZone,!0).attr(\"stroke\",\"white\").attr(\"stroke-opacity\",.01).attr(\"stroke-width\",M.scrollbarCaptureWidth).attr(\"stroke-linecap\",\"butt\").attr(\"y1\",0).on(\"mousedown\",function(r){var n=k.event.y,i=this.getBoundingClientRect(),a=r.scrollbarState,o=n-i.top,s=k.scale.linear().domain([0,a.scrollableAreaHeight]).range([0,a.totalHeight]).clamp(!0);a.topY<=o&&o<=a.bottomY||g(e,t,null,s(o-a.barLength/2))(r)}).call(k.behavior.drag().origin(function(t){return k.event.stopPropagation(),t.scrollbarState.scrollbarScrollInProgress=!0,t}).on(\"drag\",g(e,t)).on(\"dragend\",function(){})),s.attr(\"y2\",function(t){return t.scrollbarState.scrollableAreaHeight})}function s(t,e,r,n){var i=function(t){var e=t.selectAll(\".\"+M.cn.columnCell).data(z.splitToCells,function(t){return t.keyWithinBlock});return e.enter().append(\"g\").classed(M.cn.columnCell,!0),e.exit().remove(),e}(function(t){var e=t.selectAll(\".\"+M.cn.columnCells).data(A.repeat,A.keyFun);return e.enter().append(\"g\").classed(M.cn.columnCells,!0),e.exit().remove(),e}(r));!function(t){t.each(function(t,e){var r=t.calcdata.cells.font,n=t.column.specIndex,i={size:u(r.size,n,e),color:u(r.color,n,e),family:u(r.family,n,e)};t.rowNumber=t.key,t.align=u(t.calcdata.cells.align,n,e),t.cellBorderWidth=u(t.calcdata.cells.line.width,n,e),t.font=i})}(i);!function(t){t.attr(\"width\",function(t){return t.column.columnWidth}).attr(\"stroke-width\",function(t){return t.cellBorderWidth}).each(function(t){var e=k.select(this);D.stroke(e,u(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),D.fill(e,u(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}(function(t){var e=t.selectAll(\".\"+M.cn.cellRect).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"rect\").classed(M.cn.cellRect,!0),e}(i));var a=function(t){var e=t.selectAll(\".\"+M.cn.cellText).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"text\").classed(M.cn.cellText,!0).style(\"cursor\",function(){return\"auto\"}).on(\"mousedown\",function(){k.event.stopPropagation()}),e}(function(t){var e=t.selectAll(\".\"+M.cn.cellTextHolder).data(A.repeat,function(t){return t.keyWithinBlock});return e.enter().append(\"g\").classed(M.cn.cellTextHolder,!0).style(\"shape-rendering\",\"geometricPrecision\"),e}(i));!function(t){t.each(function(t){T.font(k.select(this),t.font)})}(a),l(a,e,n,t),x(i)}function l(t,e,r,n){t.text(function(t){var e=t.column.specIndex,r=t.rowNumber,n=t.value,i=\"string\"==typeof n,a=i&&n.match(/<br>/i),o=!i||a;t.mayHaveMarkup=i&&n.match(/[<&>]/);var s=function(t){return\"string\"==typeof t&&t.match(M.latexCheck)}(n);t.latex=s;var l,f=s?\"\":u(t.calcdata.cells.prefix,e,r)||\"\",h=s?\"\":u(t.calcdata.cells.suffix,e,r)||\"\",d=s?null:u(t.calcdata.cells.format,e,r)||null,p=f+(d?k.format(d)(t.value):t.value)+h;t.wrappingNeeded=!t.wrapped&&!o&&!s&&(l=c(p)),t.cellHeightMayIncrease=a||s||t.mayHaveMarkup||(void 0===l?c(p):l),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex;var m;if(t.wrappingNeeded){var g=(\" \"===M.wrapSplitCharacter?p.replace(/<a href=/gi,\"<a_href=\"):p).split(M.wrapSplitCharacter),v=\" \"===M.wrapSplitCharacter?g.map(function(t){return t.replace(/<a_href=/gi,\"<a href=\")}):g;t.fragments=v.map(function(t){return{text:t,width:null}}),t.fragments.push({fragment:M.wrapSpacer,width:null}),m=v.join(M.lineBreaker)+M.lineBreaker+M.wrapSpacer}else delete t.fragments,m=p;return m}).attr(\"dy\",function(t){return t.needsConvertToTspans?0:\"0.75em\"}).each(function(t){var i=k.select(this),a=t.wrappingNeeded?function(t,e,r){return function(){var n=k.select(e.parentNode);n.each(function(t){var e=t.fragments;n.selectAll(\"tspan.line\").each(function(t,r){e[r].width=this.getComputedTextLength()});var r,i,a=e[e.length-1].width,o=e.slice(0,-1),s=[],l=0,c=t.column.columnWidth-2*M.cellPad;for(t.value=\"\";o.length;)r=o.shift(),i=r.width+a,l+i>c&&(t.value+=s.join(M.wrapSpacer)+M.lineBreaker,s=[],l=0),s.push(r.text),l+=i;l&&(t.value+=s.join(M.wrapSpacer)),t.wrapped=!0}),n.selectAll(\"tspan.line\").remove(),l(n.select(\".\"+M.cn.cellText),r,t),k.select(e.parentNode.parentNode).call(x)}}:function(t,e,r,n,i){return function(){if(!i.settledY){var a=k.select(e.parentNode),s=w(i),l=i.key-s.firstRowIndex,c=s.rows[l].rowHeight,u=i.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*M.cellPad:c,f=Math.max(u,c),d=f-s.rows[l].rowHeight;d&&(s.rows[l].rowHeight=f,t.selectAll(\".\"+M.cn.columnCell).call(x),m(null,t.filter(h),0),o(r,n,!0)),a.attr(\"transform\",function(){var t=this.parentNode,e=t.getBoundingClientRect(),r=k.select(this.parentNode).select(\".\"+M.cn.cellRect).node().getBoundingClientRect(),n=this.transform.baseVal.consolidate(),a=r.top-e.top+(n?n.matrix.f:M.cellPad);return\"translate(\"+y(i,k.select(this.parentNode).select(\".\"+M.cn.cellTextHolder).node().getBoundingClientRect().width)+\" \"+a+\")\"}),i.settledY=!0}}};t.needsConvertToTspans?S.convertToTspans(i,n,a(r,this,e,n,t)):k.select(this.parentNode).attr(\"transform\",function(t){return\"translate(\"+y(t)+\" \"+M.cellPad+\")\"}).attr(\"text-anchor\",function(t){return{left:\"start\",center:\"middle\",right:\"end\"}[t.align]})})}function c(t){return-1!==t.indexOf(M.wrapSplitCharacter)}function u(t,e,r){if(Array.isArray(t)){var n=t[Math.min(e,t.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return t}function f(t,e,r){t.transition().ease(M.releaseTransitionEase).duration(M.releaseTransitionDuration).attr(\"transform\",\"translate(\"+e.x+\" \"+r+\")\")}function h(t){return\"cells\"===t.type}function d(t){return\"header\"===t.type}function p(t){return(t.rowBlocks.length?t.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(t,e){return t+_(e,1/0)},0)}function m(t,e,r){var n=a(e)[0];if(void 0!==n){var i=n.rowBlocks,s=n.calcdata,l=b(i,i.length),c=n.calcdata.groupHeight-p(n),u=s.scrollY=Math.max(0,Math.min(l-c,s.scrollY)),f=function(t,e,r){for(var n=[],i=0,a=0;a<t.length;a++){for(var o=t[a],s=o.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,e<i+l&&e+r>i&&n.push(a),i+=l}return n}(i,u,c);1===f.length&&(f[0]===i.length-1?f.unshift(f[0]-1):f.push(f[0]+1)),f[0]%2&&f.reverse(),e.each(function(t,e){t.page=f[e],t.scrollY=u}),e.attr(\"transform\",function(t){return\"translate(0 \"+(b(t.rowBlocks,t.page)-t.scrollY)+\")\"}),t&&(v(t,r,e,f,n.prevPages,n,0),v(t,r,e,f,n.prevPages,n,1),o(r,t))}}function g(t,e,r,n){return function(i){var a=i.calcdata?i.calcdata:i,o=e.filter(function(t){return a.key===t.key}),s=r||a.scrollbarState.dragMultiplier;a.scrollY=void 0===n?a.scrollY+s*k.event.dy:n;var l=o.selectAll(\".\"+M.cn.yColumn).selectAll(\".\"+M.cn.columnBlock).filter(h);m(t,l,o)}}function v(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var a=r.filter(function(t,e){return e===o&&n[e]!==i[e]});s(t,e,a,r),i[o]=n[o]}))}function y(t,e){switch(t.align){case\"left\":return M.cellPad;case\"right\":return t.column.columnWidth-(e||0)-M.cellPad;case\"center\":return(t.column.columnWidth-(e||0))/2;default:return M.cellPad}}function x(t){t.attr(\"transform\",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+_(e,1/0)},0);return\"translate(0 \"+(_(w(t),t.key)+e)+\")\"}).selectAll(\".\"+M.cn.cellRect).attr(\"height\",function(t){return function(t,e){return t.rows[e-t.firstRowIndex]}(w(t),t.key).rowHeight})}function b(t,e){for(var r=0,n=e-1;n>=0;n--)r+=function(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n<t.rows.length;n++)r+=t.rows[n].rowHeight;return t.allRowsHeight=r,r}(t[n]);return r}function _(t,e){for(var r=0,n=0;n<t.rows.length&&t.rows[n].rowIndex<e;n++)r+=t.rows[n].rowHeight;return r}function w(t){return t.rowBlocks[t.page]}var M=t(\"./constants\"),k=t(\"d3\"),A=t(\"../../lib/gup\"),T=t(\"../../components/drawing\"),S=t(\"../../lib/svg_text_utils\"),E=t(\"../../lib\").raiseToTop,L=t(\"../../lib\").cancelTransition,C=t(\"./data_preparation_helper\"),z=t(\"./data_split_helpers\"),D=t(\"../../components/color\");e.exports=function(t,e){var r=t._fullLayout._paper.selectAll(\".\"+M.cn.table).data(e.map(function(e){var r=A.unwrap(e).trace;return C(t,r)}),A.keyFun);r.exit().remove(),r.enter().append(\"g\").classed(M.cn.table,!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\",\"all\"),r.attr(\"width\",function(t){return t.width+t.size.l+t.size.r}).attr(\"height\",function(t){return t.height+t.size.t+t.size.b}).attr(\"transform\",function(t){return\"translate(\"+t.translateX+\",\"+t.translateY+\")\"});var l=r.selectAll(\".\"+M.cn.tableControlView).data(A.repeat,A.keyFun);l.enter().append(\"g\").classed(M.cn.tableControlView,!0).style(\"box-sizing\",\"content-box\").on(\"mousemove\",function(e){l.filter(function(t){return e===t}).call(o,t)}).on(\"mousewheel\",function(e){e.scrollbarState.wheeling||(e.scrollbarState.wheeling=!0,k.event.stopPropagation(),k.event.preventDefault(),g(t,l,null,e.scrollY+k.event.deltaY)(e),e.scrollbarState.wheeling=!1)}).call(o,t,!0),l.attr(\"transform\",function(t){return\"translate(\"+t.size.l+\" \"+t.size.t+\")\"});var c=l.selectAll(\".\"+M.cn.scrollBackground).data(A.repeat,A.keyFun);c.enter().append(\"rect\").classed(M.cn.scrollBackground,!0).attr(\"fill\",\"none\"),c.attr(\"width\",function(t){return t.width}).attr(\"height\",function(t){return t.height}),l.each(function(e){T.setClipUrl(k.select(this),n(t,e))});var u=l.selectAll(\".\"+M.cn.yColumn).data(function(t){return t.columns},A.keyFun);u.enter().append(\"g\").classed(M.cn.yColumn,!0),u.exit().remove(),u.attr(\"transform\",function(t){return\"translate(\"+t.x+\" 0)\"}).call(k.behavior.drag().origin(function(e){return f(k.select(this),e,-M.uplift),E(this),e.calcdata.columnDragInProgress=!0,o(l.filter(function(t){return e.calcdata.key===t.key}),t),e}).on(\"drag\",function(t){var e=k.select(this),r=function(e){return(t===e?k.event.x:e.x)+e.columnWidth/2};t.x=Math.max(-M.overdrag,Math.min(t.calcdata.width+M.overdrag-t.columnWidth,k.event.x));a(u).filter(function(e){return e.calcdata.key===t.calcdata.key}).sort(function(t,e){return r(t)-r(e)}).forEach(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e)}),u.filter(function(e){return t!==e}).transition().ease(M.transitionEase).duration(M.transitionDuration).attr(\"transform\",function(t){return\"translate(\"+t.x+\" 0)\"}),e.call(L).attr(\"transform\",\"translate(\"+t.x+\" -\"+M.uplift+\" )\")}).on(\"dragend\",function(e){var r=k.select(this),n=e.calcdata;e.x=e.xScale(e),e.calcdata.columnDragInProgress=!1,f(r,e,0),function(t,e,r){var n=e.gdColumnsOriginalOrder;e.gdColumns.sort(function(t,e){return r[n.indexOf(t)]-r[n.indexOf(e)]}),e.columnorder=r,t.emit(\"plotly_restyle\")}(t,n,n.columns.map(function(t){return t.xIndex}))})),u.each(function(e){T.setClipUrl(k.select(this),i(t,e))});var p=u.selectAll(\".\"+M.cn.columnBlock).data(z.splitToPanels,A.keyFun);p.enter().append(\"g\").classed(M.cn.columnBlock,!0).attr(\"id\",function(t){return t.key}),p.style(\"cursor\",function(t){return t.dragHandle?\"ew-resize\":t.calcdata.scrollbarState.barWiggleRoom?\"ns-resize\":\"default\"});var v=p.filter(d),y=p.filter(h);y.call(k.behavior.drag().origin(function(t){return k.event.stopPropagation(),t}).on(\"drag\",g(t,l,-1)).on(\"dragend\",function(){})),s(t,l,v,p),s(t,l,y,p);var x=l.selectAll(\".\"+M.cn.scrollAreaClip).data(A.repeat,A.keyFun);x.enter().append(\"clipPath\").classed(M.cn.scrollAreaClip,!0).attr(\"id\",function(e){return n(t,e)});var b=x.selectAll(\".\"+M.cn.scrollAreaClipRect).data(A.repeat,A.keyFun);b.enter().append(\"rect\").classed(M.cn.scrollAreaClipRect,!0).attr(\"x\",-M.overdrag).attr(\"y\",-M.uplift).attr(\"fill\",\"none\"),b.attr(\"width\",function(t){return t.width+2*M.overdrag}).attr(\"height\",function(t){return t.height+M.uplift});u.selectAll(\".\"+M.cn.columnBoundary).data(A.repeat,A.keyFun).enter().append(\"g\").classed(M.cn.columnBoundary,!0);var _=u.selectAll(\".\"+M.cn.columnBoundaryClippath).data(A.repeat,A.keyFun);_.enter().append(\"clipPath\").classed(M.cn.columnBoundaryClippath,!0),_.attr(\"id\",function(e){return i(t,e)});var w=_.selectAll(\".\"+M.cn.columnBoundaryRect).data(A.repeat,A.keyFun);w.enter().append(\"rect\").classed(M.cn.columnBoundaryRect,!0).attr(\"fill\",\"none\"),w.attr(\"width\",function(t){return t.columnWidth}).attr(\"height\",function(t){return t.calcdata.height+M.uplift}),m(null,y,l)}},{\"../../components/color\":618,\"../../components/drawing\":643,\"../../lib\":743,\"../../lib/gup\":740,\"../../lib/svg_text_utils\":766,\"./constants\":1149,\"./data_preparation_helper\":1150,\"./data_split_helpers\":1151,d3:128}],1155:[function(t,e,r){\"use strict\";var n=t(\"../box/attributes\"),i=t(\"../../lib/extend\").extendFlat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:n.name,orientation:i({},n.orientation,{}),bandwidth:{valType:\"number\",min:0,editType:\"calc\"},scalegroup:{valType:\"string\",dflt:\"\",editType:\"calc\"},scalemode:{valType:\"enumerated\",values:[\"width\",\"count\"],dflt:\"width\",editType:\"calc\"},spanmode:{valType:\"enumerated\",values:[\"soft\",\"hard\",\"manual\"],dflt:\"soft\",editType:\"calc\"},span:{valType:\"info_array\",items:[{valType:\"any\",editType:\"calc\"},{valType:\"any\",editType:\"calc\"}],editType:\"calc\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,dflt:2,editType:\"style\"},editType:\"plot\"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{}),jitter:i({},n.jitter,{}),pointpos:i({},n.pointpos,{}),marker:n.marker,text:n.text,box:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},width:{valType:\"number\",min:0,max:1,dflt:.25,editType:\"plot\"},fillcolor:{valType:\"color\",editType:\"style\"},line:{color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"style\"},editType:\"plot\"},meanline:{visible:{valType:\"boolean\",dflt:!1,editType:\"plot\"},color:{valType:\"color\",editType:\"style\"},width:{valType:\"number\",min:0,editType:\"style\"},editType:\"plot\"},side:{valType:\"enumerated\",values:[\"both\",\"positive\",\"negative\"],dflt:\"both\",editType:\"plot\"},selected:n.selected,unselected:n.unselected,hoveron:{valType:\"flaglist\",flags:[\"violins\",\"points\",\"kde\"],dflt:\"violins+points+kde\",extras:[\"all\"],editType:\"style\"}}},{\"../../lib/extend\":732,\"../box/attributes\":896}],1156:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../box/calc\"),o=t(\"./helpers\"),s=t(\"../../constants/numerical\").BADNUM;e.exports=function(t,e){var r=a(t,e);if(r[0].t.empty)return r;var l=t._fullLayout,c=i.getFromId(t,e[\"h\"===e.orientation?\"xaxis\":\"yaxis\"]),u=l._violinScaleGroupStats,f=e.scalegroup,h=u[f];h||(h=u[f]={maxWidth:0,maxCount:0});for(var d=0;d<r.length;d++){var p=r[d],m=p.pts.map(o.extractVal),g=m.length,v=function(t,e,r){return 1.059*Math.min(e,r/1.349)*Math.pow(t.length,-.2)}(m,n.stdev(m,g-1,p.mean),p.q3-p.q1),y=p.bandwidth=e.bandwidth||v,x=p.span=function(t,e,r,n){function a(n){var i=c[n],a=r.d2c(i,0,t[e.valLetter+\"calendar\"]);return a===s?f[n]:a}var o,l=t.spanmode,c=t.span||[],u=[e.min,e.max],f=[e.min-2*n,e.max+2*n],h={type:\"linear\",range:o=\"soft\"===l?f:\"hard\"===l?u:[a(0),a(1)]};return i.setConvert(h),h.cleanRange(),o}(e,p,c,y),b=x[1]-x[0],_=Math.ceil(b/(Math.min(v,y)/3)),w=b/_;if(!isFinite(w)||!isFinite(_))return n.error(\"Something went wrong with computing the violin span\"),r[0].t.empty=!0,r;var M=o.makeKDE(p,e,m);p.density=new Array(_);for(var k=0,A=x[0];A<x[1]+w/2;k++,A+=w){var T=M(A);h.maxWidth=Math.max(h.maxWidth,T),p.density[k]={v:T,t:A}}i.expand(c,x,{padded:!0}),h.maxCount=Math.max(h.maxCount,m.length)}return r[0].t.labels.kde=n._(t,\"kde:\"),r}},{\"../../constants/numerical\":721,\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../box/calc\":897,\"./helpers\":1158}],1157:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../components/color\"),a=t(\"../box/defaults\"),o=t(\"./attributes\");e.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}function c(r,i){return n.coerce2(t,e,o,r,i)}if(a.handleSampleDefaults(t,e,l,s),!1!==e.visible){l(\"bandwidth\"),l(\"scalegroup\",e.name),l(\"scalemode\"),l(\"side\");var u,f=l(\"span\");Array.isArray(f)&&(u=\"manual\"),l(\"spanmode\",u);var h=l(\"line.color\",(t.marker||{}).color||r),d=l(\"line.width\"),p=l(\"fillcolor\",i.addOpacity(e.line.color,.5));a.handlePointsDefaults(t,e,l,{prefix:\"\"});var m=c(\"box.width\"),g=c(\"box.fillcolor\",p),v=c(\"box.line.color\",h),y=c(\"box.line.width\",d);l(\"box.visible\",Boolean(m||g||v||y))||delete e.box;var x=c(\"meanline.color\",h),b=c(\"meanline.width\",d);l(\"meanline.visible\",Boolean(x||b))||delete e.meanline}}},{\"../../components/color\":618,\"../../lib\":743,\"../box/defaults\":898,\"./attributes\":1155}],1158:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*t*t)};r.makeKDE=function(t,e,r){var n=r.length,a=i,o=t.bandwidth,s=1/(n*o);return function(t){for(var e=0,i=0;i<n;i++)e+=a((t-r[i])/o);return s*e}},r.getPositionOnKdePath=function(t,e,r){var i,a;\"h\"===e.orientation?(i=\"y\",a=\"x\"):(i=\"x\",a=\"y\");var o=n.findPointOnPath(t.path,r,a,{pathLength:t.pathLength}),s=t.posCenterPx,l=o[i];return[l,\"both\"===e.side?2*s-l:s]},r.getKdeValue=function(t,e,n){var i=t.pts.map(r.extractVal);return r.makeKDE(t,e,i)(n)/t.posDensityScale},r.extractVal=function(t){return t.v}},{\"../../lib\":743}],1159:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"../../plots/cartesian/axes\"),a=t(\"../box/hover\"),o=t(\"./helpers\");e.exports=function(t,e,r,s,l){var c,u,f=t.cd,h=f[0].trace,d=h.hoveron,p=-1!==d.indexOf(\"violins\"),m=-1!==d.indexOf(\"kde\"),g=[];if(p||m){var v=a.hoverOnBoxes(t,e,r,s);if(p&&(g=g.concat(v)),m&&v.length>0){var y,x,b,_,w,M=t.xa,k=t.ya;\"h\"===h.orientation?(w=e,y=\"y\",b=k,x=\"x\",_=M):(w=r,y=\"x\",b=M,x=\"y\",_=k);var A=f[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(A,h,w),L=o.getPositionOnKdePath(A,h,S),C=b._offset,z=b._length;T[y+\"0\"]=L[0],T[y+\"1\"]=L[1],T[x+\"0\"]=T[x+\"1\"]=S,T[x+\"Label\"]=x+\": \"+i.hoverLabelText(_,w)+\", \"+f[0].t.labels.kde+\" \"+E.toFixed(3),g.push(T),(u={stroke:t.color})[y+\"1\"]=n.constrain(C+L[0],C,C+z),u[y+\"2\"]=n.constrain(C+L[1],C,C+z),u[x+\"1\"]=u[x+\"2\"]=_._offset+S}}}-1!==d.indexOf(\"points\")&&(c=a.hoverOnPoints(t,e,r));var D=l.selectAll(\".violinline-\"+h.uid).data(u?[0]:[]);return D.enter().append(\"line\").classed(\"violinline-\"+h.uid,!0).attr(\"stroke-width\",1.5),D.exit().remove(),D.attr(u),\"closest\"===s?c?[c]:g:c?(g.push(c),g):g}},{\"../../lib\":743,\"../../plots/cartesian/axes\":789,\"../box/hover\":899,\"./helpers\":1158}],1160:[function(t,e,r){\"use strict\";e.exports={attributes:t(\"./attributes\"),layoutAttributes:t(\"./layout_attributes\"),supplyDefaults:t(\"./defaults\"),supplyLayoutDefaults:t(\"./layout_defaults\"),calc:t(\"./calc\"),setPositions:t(\"./set_positions\"),plot:t(\"./plot\"),style:t(\"./style\"),hoverPoints:t(\"./hover\"),selectPoints:t(\"../box/select\"),moduleType:\"trace\",name:\"violin\",basePlotModule:t(\"../../plots/cartesian\"),categories:[\"cartesian\",\"symbols\",\"oriented\",\"box-violin\",\"showLegend\"],meta:{}}},{\"../../plots/cartesian\":800,\"../box/select\":904,\"./attributes\":1155,\"./calc\":1156,\"./defaults\":1157,\"./hover\":1159,\"./layout_attributes\":1161,\"./layout_defaults\":1162,\"./plot\":1163,\"./set_positions\":1164,\"./style\":1165}],1161:[function(t,e,r){\"use strict\";var n=t(\"../box/layout_attributes\"),i=t(\"../../lib\").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{\"../../lib\":743,\"../box/layout_attributes\":901}],1162:[function(t,e,r){\"use strict\";var n=t(\"../../lib\"),i=t(\"./layout_attributes\"),a=t(\"../box/layout_defaults\");e.exports=function(t,e,r){a._supply(t,e,r,function(r,a){return n.coerce(t,e,i,r,a)},\"violin\")}},{\"../../lib\":743,\"../box/layout_defaults\":902,\"./layout_attributes\":1161}],1163:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../lib\"),a=t(\"../../components/drawing\"),o=t(\"../box/plot\"),s=t(\"../scatter/line_points\"),l=t(\"./helpers\");e.exports=function(t,e,r){function c(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:\"spline\",simplify:!0});return a.smoothopen(e[0],1)}var u=t._fullLayout,f=e.xaxis,h=e.yaxis;e.plot.select(\".violinlayer\").selectAll(\"g.trace.violins\").data(r).enter().append(\"g\").attr(\"class\",\"trace violins\").each(function(t){var r=t[0],a=r.t,s=r.trace,d=r.node3=n.select(this),p=u._numViolins,m=\"group\"===u.violinmode&&p>1,g=a.bdPos=a.dPos*(1-u.violingap)*(1-u.violingroupgap)/(m?p:1),v=a.bPos=m?2*a.dPos*((a.num+.5)/p-.5)*(1-u.violingap):0;if(!0!==s.visible||a.empty)n.select(this).remove();else{var y=e[a.valLetter+\"axis\"],x=e[a.posLetter+\"axis\"],b=\"both\"===s.side,_=b||\"positive\"===s.side,w=b||\"negative\"===s.side,M=s.box&&s.box.visible,k=s.meanline&&s.meanline.visible,A=u._violinScaleGroupStats[s.scalegroup];if(d.selectAll(\"path.violin\").data(i.identity).enter().append(\"path\").style(\"vector-effect\",\"non-scaling-stroke\").attr(\"class\",\"violin\").each(function(t){var e,r=n.select(this),i=t.density,o=i.length,l=t.pos+v,u=x.c2p(l);switch(s.scalemode){case\"width\":e=A.maxWidth/g;break;case\"count\":e=A.maxWidth/g*(A.maxCount/t.pts.length)}var f,h,d,p,m,M,k;if(_){for(M=new Array(o),p=0;p<o;p++)(k=M[p]={})[a.posLetter]=l+i[p].v/e,k[a.valLetter]=i[p].t;f=c(M)}if(w){for(M=new Array(o),m=0,p=o-1;m<o;m++,p--)(k=M[m]={})[a.posLetter]=l-i[p].v/e,k[a.valLetter]=i[p].t;h=c(M)}if(b)d=f+\"L\"+h.substr(1)+\"Z\";else{var T=[u,y.c2p(i[0].t)],S=[u,y.c2p(i[o-1].t)];\"h\"===s.orientation&&(T.reverse(),S.reverse()),d=_?\"M\"+T+\"L\"+f.substr(1)+\"L\"+S:\"M\"+S+\"L\"+h.substr(1)+\"L\"+T}r.attr(\"d\",d),t.posCenterPx=u,t.posDensityScale=e*g,t.path=r.node(),t.pathLength=t.path.getTotalLength()/(b?2:1)}),M){var T,S,E=s.box.width,L=s.box.line.width;b?(T=g*E,S=0):_?(T=[0,g*E/2],S=-L):(T=[g*E/2,0],S=L),s.whiskerwidth=0,o.plotBoxAndWhiskers(d,{pos:x,val:y},s,{bPos:v,bdPos:T,bPosPxOffset:S}),k&&o.plotBoxMean(d,{pos:x,val:y},s,{bPos:v,bdPos:T,bPosPxOffset:S})}else k&&d.selectAll(\"path.mean\").data(i.identity).enter().append(\"path\").attr(\"class\",\"mean\").style({fill:\"none\",\"vector-effect\":\"non-scaling-stroke\"}).each(function(t){var e=y.c2p(t.mean,!0),r=l.getPositionOnKdePath(t,s,e);n.select(this).attr(\"d\",\"h\"===s.orientation?\"M\"+e+\",\"+r[0]+\"V\"+r[1]:\"M\"+r[0]+\",\"+e+\"H\"+r[1])});s.points&&o.plotPoints(d,{x:f,y:h},s,a)}})}},{\"../../components/drawing\":643,\"../../lib\":743,\"../box/plot\":903,\"../scatter/line_points\":1080,\"./helpers\":1158,d3:128}],1164:[function(t,e,r){\"use strict\";var n=t(\"../box/set_positions\").setPositionOffset,i=[\"v\",\"h\"];e.exports=function(t,e){for(var r=t.calcdata,a=e.xaxis,o=e.yaxis,s=0;s<i.length;s++){for(var l=i[s],c=\"h\"===l?o:a,u=[],f=0,h=0,d=0;d<r.length;d++){var p=r[d],m=p[0].t,g=p[0].trace;!0!==g.visible||\"violin\"!==g.type||m.empty||g.orientation!==l||g.xaxis!==a._id||g.yaxis!==o._id||(u.push(d),!1!==g.points&&(f=Math.max(f,g.jitter-g.pointpos-1),h=Math.max(h,g.jitter+g.pointpos-1)))}n(\"violin\",t,u,c,[f,h])}}},{\"../box/set_positions\":905}],1165:[function(t,e,r){\"use strict\";var n=t(\"d3\"),i=t(\"../../components/color\"),a=t(\"../scatter/style\").stylePoints;e.exports=function(t,e){var r=e?e[0].node3:n.select(t).selectAll(\"g.trace.violins\");r.style(\"opacity\",function(t){return t[0].trace.opacity}),r.each(function(e){var r=e[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll(\"path.violin\").style(\"stroke-width\",r.line.width+\"px\").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),o.selectAll(\"path.box\").style(\"stroke-width\",l.width+\"px\").call(i.stroke,l.color).call(i.fill,s.fillcolor),o.selectAll(\"path.mean\").style({\"stroke-width\":u+\"px\",\"stroke-dasharray\":2*u+\"px,\"+u+\"px\"}).call(i.stroke,c.color),a(o,r,t)})}},{\"../../components/color\":618,\"../scatter/style\":1087,d3:128}],1166:[function(t,e,r){\"use strict\";function n(t,e,r,n){if(n.enabled){for(var c=n.target,u=l.nestedProperty(e,c),h=u.get(),d=function(t,e){var r=t.func,n=e.d2c,s=e.c2d;switch(r){case\"count\":return i;case\"first\":return a;case\"last\":return o;case\"sum\":return function(t,e){for(var r=0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r+=a)}return s(r)};case\"avg\":return function(t,e){for(var r=0,i=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==f&&(r+=o,i++)}return i?s(r/i):f};case\"min\":return function(t,e){for(var r=1/0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r=Math.min(r,a))}return r===1/0?f:s(r)};case\"max\":return function(t,e){for(var r=-1/0,i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&(r=Math.max(r,a))}return r===-1/0?f:s(r)};case\"median\":return function(t,e){for(var r=[],i=0;i<e.length;i++){var a=n(t[e[i]]);a!==f&&r.push(a)}if(!r.length)return f;r.sort();var o=(r.length-1)/2;return s((r[Math.floor(o)]+r[Math.ceil(o)])/2)};case\"mode\":return function(t,e){for(var r={},i=0,a=f,o=0;o<e.length;o++){var l=n(t[e[o]]);if(l!==f){var c=r[l]=(r[l]||0)+1;c>i&&(i=c,a=l)}}return i?s(a):f};case\"rms\":return function(t,e){for(var r=0,i=0,a=0;a<e.length;a++){var o=n(t[e[a]]);o!==f&&(r+=o*o,i++)}return i?s(Math.sqrt(r/i)):f};case\"stddev\":return function(e,r){var i,a=0,o=0,s=1,l=f;for(i=0;i<r.length&&l===f;i++)l=n(e[r[i]]);if(l===f)return f;for(;i<r.length;i++){var c=n(e[r[i]]);if(c!==f){var u=c-l;a+=u,o+=u*u,s++}}var h=\"sample\"===t.funcmode?s-1:s;return h?Math.sqrt((o-a*a/s)/h):0}}}(n,s.getDataConversions(t,e,c,h)),p=new Array(r.length),m=0;m<r.length;m++)p[m]=d(h,r[m]);u.set(p)}}function i(t,e){return e.length}function a(t,e){return t[e[0]]}function o(t,e){return t[e[e.length-1]]}var s=t(\"../plots/cartesian/axes\"),l=t(\"../lib\"),c=t(\"../plot_api/plot_schema\"),u=t(\"./helpers\").pointsAccessorFunction,f=t(\"../constants/numerical\").BADNUM;r.moduleType=\"transform\",r.name=\"aggregate\";var h=r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},aggregations:{_isLinkedToArray:\"aggregation\",target:{valType:\"string\",editType:\"calc\"},func:{valType:\"enumerated\",values:[\"count\",\"sum\",\"avg\",\"median\",\"mode\",\"rms\",\"stddev\",\"min\",\"max\",\"first\",\"last\"],dflt:\"first\",editType:\"calc\"},funcmode:{valType:\"enumerated\",values:[\"sample\",\"population\"],dflt:\"sample\",editType:\"calc\"},enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},d=h.aggregations;r.supplyDefaults=function(t,e){function r(e,r){return l.coerce(t,a,h,e,r)}function n(t,e){return l.coerce(p[i],f,d,t,e)}var i,a={};if(!r(\"enabled\"))return a;var o=c.findArrayAttributes(e),s={};for(i=0;i<o.length;i++)s[o[i]]=1;var u=r(\"groups\");if(!Array.isArray(u)){if(!s[u])return void(a.enabled=!1);s[u]=0}var f,p=t.aggregations||[],m=a.aggregations=new Array(p.length);for(i=0;i<p.length;i++){f={_index:i};var g=n(\"target\"),v=n(\"func\");n(\"enabled\")&&g&&(s[g]||\"count\"===v&&void 0===s[g])?(\"stddev\"===v&&n(\"funcmode\"),s[g]=0,m[i]=f):m[i]={enabled:!1,_index:i}}for(i=0;i<o.length;i++)s[o[i]]&&m.push({target:o[i],func:d.func.dflt,enabled:!0,_index:-1});return a},r.calcTransform=function(t,e,r){if(r.enabled){var i=r.groups,a=l.getTargetArray(e,{target:i});if(a){var o,s,c,f,h={},d={},p=[],m=u(e.transforms,r);for(o=0;o<a.length;o++)void 0===(c=h[s=a[o]])?(h[s]=p.length,f=[o],p.push(f),d[h[s]]=m(o)):(p[c].push(o),d[h[s]]=(d[h[s]]||[]).concat(m(o)));r._indexToPoints=d;var g=r.aggregations;for(o=0;o<g.length;o++)n(t,e,p,g[o]);\"string\"==typeof i&&n(t,e,p,{target:i,func:\"first\",enabled:!0})}}}},{\"../constants/numerical\":721,\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plots/cartesian/axes\":789,\"./helpers\":1169}],1167:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../registry\"),a=t(\"../plots/cartesian/axes\"),o=t(\"./helpers\").pointsAccessorFunction,s=[\"=\",\"!=\",\"<\",\">=\",\">\",\"<=\"],l=[\"[]\",\"()\",\"[)\",\"(]\",\"][\",\")(\",\"](\",\")[\"],c=[\"{}\",\"}{\"];r.moduleType=\"transform\",r.name=\"filter\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},operation:{valType:\"enumerated\",values:[].concat(s).concat(l).concat(c),dflt:\"=\",editType:\"calc\"},value:{valType:\"any\",dflt:0,editType:\"calc\"},preservegaps:{valType:\"boolean\",dflt:!1,editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){function e(e,i){return n.coerce(t,a,r.attributes,e,i)}var a={};if(e(\"enabled\")){e(\"preservegaps\"),e(\"operation\"),e(\"value\"),e(\"target\");var o=i.getComponentMethod(\"calendars\",\"handleDefaults\");o(t,a,\"valuecalendar\",null),o(t,a,\"targetcalendar\",null)}return a},r.calcTransform=function(t,e,r){function i(t,r){for(var i=0;i<p.length;i++){t(n.nestedProperty(e,p[i]),r)}}if(r.enabled){var u=n.getTargetArray(e,r);if(u){var f=r.target,h=u.length,d=r.targetcalendar,p=e._arrayAttrs;if(\"string\"==typeof f){var m=n.nestedProperty(e,f+\"calendar\").get();m&&(d=m)}var g,v,y=function(t,e,r){function n(t){return-1!==t.indexOf(a)}var i,a=t.operation,o=t.value,u=Array.isArray(o),f=function(r){return e(r,0,t.valuecalendar)},h=function(t){return e(t,0,r)};switch(n(s)?i=f(u?o[0]:o):n(l)?i=u?[f(o[0]),f(o[1])]:[f(o),f(o)]:n(c)&&(i=u?o.map(f):[f(o)]),a){case\"=\":return function(t){return h(t)===i};case\"!=\":return function(t){return h(t)!==i};case\"<\":return function(t){return h(t)<i};case\"<=\":return function(t){return h(t)<=i};case\">\":return function(t){return h(t)>i};case\">=\":return function(t){return h(t)>=i};case\"[]\":return function(t){var e=h(t);return e>=i[0]&&e<=i[1]};case\"()\":return function(t){var e=h(t);return e>i[0]&&e<i[1]};case\"[)\":return function(t){var e=h(t);return e>=i[0]&&e<i[1]};case\"(]\":return function(t){var e=h(t);return e>i[0]&&e<=i[1]};case\"][\":return function(t){var e=h(t);return e<=i[0]||e>=i[1]};case\")(\":return function(t){var e=h(t);return e<i[0]||e>i[1]};case\"](\":return function(t){var e=h(t);return e<=i[0]||e>i[1]};case\")[\":return function(t){var e=h(t);return e<i[0]||e>=i[1]};case\"{}\":return function(t){return-1!==i.indexOf(h(t))};case\"}{\":return function(t){return-1===i.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,f,u),d),x={},b={},_=0;r.preservegaps?(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),i(g);for(var w=o(e.transforms,r),M=0;M<h;M++){y(u[M])&&(i(v,M),b[_++]=w(M))}r._indexToPoints=b}}}},{\"../lib\":743,\"../plots/cartesian/axes\":789,\"../registry\":873,\"./helpers\":1169}],1168:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plot_api/plot_schema\"),a=t(\"../plots/plots\"),o=t(\"./helpers\").pointsAccessorFunction;r.moduleType=\"transform\",r.name=\"groupby\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},groups:{valType:\"data_array\",dflt:[],editType:\"calc\"},nameformat:{valType:\"string\",editType:\"calc\"},styles:{_isLinkedToArray:\"style\",target:{valType:\"string\",editType:\"calc\"},value:{valType:\"any\",dflt:{},editType:\"calc\"},editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t,e,i){function a(e,i){return n.coerce(t,s,r.attributes,e,i)}var o,s={};if(!a(\"enabled\"))return s;a(\"groups\"),a(\"nameformat\",i._dataLength>1?\"%{group} (%{trace})\":\"%{group}\");var l=t.styles,c=s.styles=[];if(l)for(o=0;o<l.length;o++)c[o]={},n.coerce(l[o],c[o],r.attributes.styles,\"target\"),n.coerce(l[o],c[o],r.attributes.styles,\"value\");return s},r.transform=function(t,e){var r,s,l,c=[];for(s=0;s<t.length;s++)for(r=function(t,e){var r,s,l,c,u,f,h,d,p,m,g=e.transform,v=t.transforms[e.transformIndex].groups,y=o(t.transforms,g);if(!Array.isArray(v)||0===v.length)return[t];var x=n.filterUnique(v),b=new Array(x.length),_=v.length,w=i.findArrayAttributes(t),M=g.styles||[],k={};for(r=0;r<M.length;r++)k[M[r].target]=M[r].value;g.styles&&(m=n.keyedContainer(g,\"styles\",\"target\",\"value.name\"));var A={},T={};for(r=0;r<x.length;r++){A[f=x[r]]=r,T[f]=0,(h=b[r]=n.extendDeepNoArrays({},t))._group=f,h.transforms[e.transformIndex]._indexToPoints={};var S=null;for(m&&(S=m.get(f)),h.name=S||n.templateString(g.nameformat,{trace:t.name,group:f}),d=h.transforms,h.transforms=[],s=0;s<d.length;s++)h.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s<w.length;s++)n.nestedProperty(h,w[s]).set([])}for(l=0;l<w.length;l++){for(c=w[l],s=0,p=[];s<x.length;s++)p[s]=n.nestedProperty(b[s],c).get();for(u=n.nestedProperty(t,c).get(),s=0;s<_;s++)p[A[v[s]]].push(u[s])}for(s=0;s<_;s++)(h=b[A[v[s]]]).transforms[e.transformIndex]._indexToPoints[T[v[s]]]=y(s),T[v[s]]++;for(r=0;r<x.length;r++)f=x[r],h=b[r],a.clearExpandedTraceDefaultColors(h),h=n.extendDeepNoArrays(h,k[f]||{});return b}(t[s],e),l=0;l<r.length;l++)c.push(r[l]);return c}},{\"../lib\":743,\"../plot_api/plot_schema\":778,\"../plots/plots\":852,\"./helpers\":1169}],1169:[function(t,e,r){\"use strict\";r.pointsAccessorFunction=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(t){return n[t]}:function(t){return[t]}}},{}],1170:[function(t,e,r){\"use strict\";var n=t(\"../lib\"),i=t(\"../plots/cartesian/axes\"),a=t(\"./helpers\").pointsAccessorFunction;r.moduleType=\"transform\",r.name=\"sort\",r.attributes={enabled:{valType:\"boolean\",dflt:!0,editType:\"calc\"},target:{valType:\"string\",strict:!0,noBlank:!0,arrayOk:!0,dflt:\"x\",editType:\"calc\"},order:{valType:\"enumerated\",values:[\"ascending\",\"descending\"],dflt:\"ascending\",editType:\"calc\"},editType:\"calc\"},r.supplyDefaults=function(t){function e(e,a){return n.coerce(t,i,r.attributes,e,a)}var i={};return e(\"enabled\")&&(e(\"target\"),e(\"order\")),i},r.calcTransform=function(t,e,r){if(r.enabled){var o=n.getTargetArray(e,r);if(o){var s,l,c=r.target,u=o.length,f=e._arrayAttrs,h=function(t,e,r){for(var n=e.length,i=new Array(n),a=e.slice().sort(function(t,e){switch(t.order){case\"ascending\":return function(t,r){return e(t)-e(r)};case\"descending\":return function(t,r){return e(r)-e(t)}}}(t,r)),o=0;o<n;o++)for(var s=e[o],l=0;l<n;l++)if(s===a[l]){i[l]=o,a[l]=null;break}return i}(r,o,i.getDataToCoordFunc(t,e,c,o)),d=a(e.transforms,r),p={};for(s=0;s<f.length;s++){var m=n.nestedProperty(e,f[s]),g=m.get(),v=new Array(u);for(l=0;l<u;l++)v[l]=g[h[l]];m.set(v)}for(l=0;l<u;l++)p[l]=d(h[l]);r._indexToPoints=p}}}},{\"../lib\":743,\"../plots/cartesian/axes\":789,\"./helpers\":1169}]},{},[20])(20)});\n", "});require(['plotly'], function(Plotly) {window.Plotly = Plotly;});}</script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "\n", "import pandas as pd\n", "\n", "import seaborn as sns\n", "sns.set_style(\"whitegrid\")\n", "\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "plt.rcParams['patch.force_edgecolor']=True\n", "\n", "from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot\n", "import cufflinks as cf\n", "init_notebook_mode(connected=True)\n", "cf.go_offline()\n", "import plotly.graph_objs as go" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Doing the imports" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\gilew\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2698: DtypeWarning:\n", "\n", "Columns (3,4,5,6,12) have mixed types. Specify dtype option on import or set low_memory=False.\n", "\n" ] } ], "source": [ "salaries = pd.read_csv('Salaries.csv')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Because of the DtypeWarning, I have to convert the types of the following columns: 3,4,5,6. I will take care of column 12 later." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Converting types" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "for column in ['BasePay', 'OvertimePay', 'OtherPay', 'Benefits']:\n", " salaries[column]=pd.to_numeric(salaries[column], errors='coerce')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Checking the head of the data" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>Id</th>\n", " <th>EmployeeName</th>\n", " <th>JobTitle</th>\n", " <th>BasePay</th>\n", " <th>OvertimePay</th>\n", " <th>OtherPay</th>\n", " <th>Benefits</th>\n", " <th>TotalPay</th>\n", " <th>TotalPayBenefits</th>\n", " <th>Year</th>\n", " <th>Notes</th>\n", " <th>Agency</th>\n", " <th>Status</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>1</td>\n", " <td>NATHANIEL FORD</td>\n", " <td>GENERAL MANAGER-METROPOLITAN TRANSIT AUTHORITY</td>\n", " <td>167411.18</td>\n", " <td>0.00</td>\n", " <td>400184.25</td>\n", " <td>NaN</td>\n", " <td>567595.43</td>\n", " <td>567595.43</td>\n", " <td>2011</td>\n", " <td>NaN</td>\n", " <td>San Francisco</td>\n", " <td>NaN</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>2</td>\n", " <td>GARY JIMENEZ</td>\n", " <td>CAPTAIN III (POLICE DEPARTMENT)</td>\n", " <td>155966.02</td>\n", " <td>245131.88</td>\n", " <td>137811.38</td>\n", " <td>NaN</td>\n", " <td>538909.28</td>\n", " <td>538909.28</td>\n", " <td>2011</td>\n", " <td>NaN</td>\n", " <td>San Francisco</td>\n", " <td>NaN</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>3</td>\n", " <td>ALBERT PARDINI</td>\n", " <td>CAPTAIN III (POLICE DEPARTMENT)</td>\n", " <td>212739.13</td>\n", " <td>106088.18</td>\n", " <td>16452.60</td>\n", " <td>NaN</td>\n", " <td>335279.91</td>\n", " <td>335279.91</td>\n", " <td>2011</td>\n", " <td>NaN</td>\n", " <td>San Francisco</td>\n", " <td>NaN</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>4</td>\n", " <td>CHRISTOPHER CHONG</td>\n", " <td>WIRE ROPE CABLE MAINTENANCE MECHANIC</td>\n", " <td>77916.00</td>\n", " <td>56120.71</td>\n", " <td>198306.90</td>\n", " <td>NaN</td>\n", " <td>332343.61</td>\n", " <td>332343.61</td>\n", " <td>2011</td>\n", " <td>NaN</td>\n", " <td>San Francisco</td>\n", " <td>NaN</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>5</td>\n", " <td>PATRICK GARDNER</td>\n", " <td>DEPUTY CHIEF OF DEPARTMENT,(FIRE DEPARTMENT)</td>\n", " <td>134401.60</td>\n", " <td>9737.00</td>\n", " <td>182234.59</td>\n", " <td>NaN</td>\n", " <td>326373.19</td>\n", " <td>326373.19</td>\n", " <td>2011</td>\n", " <td>NaN</td>\n", " <td>San Francisco</td>\n", " <td>NaN</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " Id EmployeeName JobTitle \\\n", "0 1 NATHANIEL FORD GENERAL MANAGER-METROPOLITAN TRANSIT AUTHORITY \n", "1 2 GARY JIMENEZ CAPTAIN III (POLICE DEPARTMENT) \n", "2 3 ALBERT PARDINI CAPTAIN III (POLICE DEPARTMENT) \n", "3 4 CHRISTOPHER CHONG WIRE ROPE CABLE MAINTENANCE MECHANIC \n", "4 5 PATRICK GARDNER DEPUTY CHIEF OF DEPARTMENT,(FIRE DEPARTMENT) \n", "\n", " BasePay OvertimePay OtherPay Benefits TotalPay TotalPayBenefits \\\n", "0 167411.18 0.00 400184.25 NaN 567595.43 567595.43 \n", "1 155966.02 245131.88 137811.38 NaN 538909.28 538909.28 \n", "2 212739.13 106088.18 16452.60 NaN 335279.91 335279.91 \n", "3 77916.00 56120.71 198306.90 NaN 332343.61 332343.61 \n", "4 134401.60 9737.00 182234.59 NaN 326373.19 326373.19 \n", "\n", " Year Notes Agency Status \n", "0 2011 NaN San Francisco NaN \n", "1 2011 NaN San Francisco NaN \n", "2 2011 NaN San Francisco NaN \n", "3 2011 NaN San Francisco NaN \n", "4 2011 NaN San Francisco NaN " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Cleaning the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I create a heatmap, to see the distribution of Nans in our data." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "<matplotlib.axes._subplots.AxesSubplot at 0x1b756755e10>" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAE3CAYAAAAJ55KLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAHlFJREFUeJzt3XucnVV59vHfBIiJHCpgFBAFRLxF\nUCiCRUSQ6uuJ1sOLchCUg0pFKeCpKAKtFYpYtaJoEUmEcJSDCgoFDwgipQiIYN7qJXKqJoJEoYgJ\nISHz/nGvnezEDBiynrWzJ9f385nP7JnJPOvJ7JlrP8863GtkdHQUMzNrY8KgT8DMbFXi0DUza8ih\na2bWkEPXzKwhh66ZWUMOXTOzhlZ/nK+Prj7xGZ2ewIJHZtJ1G25n5W2j18782Xd03s4aT322n5sn\n0M54e24a/X9Gxvqar3TNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5dM7OGHLpmZg05dM3M\nGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuiamTXk0DUza8iha2bW\nkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5dM7OG\nHLpmZg05dM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuiamTXk\n0DUza8iha2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNraPVBn4AZwOSNXtZ5\nGwsemdl5G2aPx1e6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5dM7OGHLpmZg05\ndM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuiamTXk0DUza8ih\na2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5d\nM7OGHLpmZg05dM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuia\nmTXk0DUza8iha2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fM\nrCGHrplZQw5dM7OGHLpmZg05dM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZm\nDTl0zcwacuiamTXk0DUza8iha2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNr\nyKFrZtaQQ9fMrCGHrplZQw5dM7OGHLpmZg05dM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlD\nDl0zs4YcumZmDTl0zcwacuiamTXk0DUza8iha2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNOXTNzBpy\n6JqZNeTQNTNryKFrZtaQQ9fMrKHVB30C49HcWdcM+hTMbCXl0O3A5I1e1nkbCx6Z2XkbZlafuxfM\nzBpy6JqZNeTQNTNryKFrZtaQB9LMbJUy6IFuX+mamTXk0DUza8iha2bWkEPXzKwhh66ZWUMOXTOz\nhhy6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5dM7OGHLpmZg05dM3MGnLompk1\n5NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuiamTXk0DUza8iha2bWkEPXzKwh\nh66ZWUMOXTOzhhy6ZmYNOXTNzBpy6JqZNeTQNTNryKFrZtaQQ9fMrCGHrplZQw5dM7OGHLpmZg05\ndM3MGnLompk15NA1M2vIoWtm1pBD18ysIYeumVlDDl0zs4YcumZmDTl0zcwacuiamTXk0DUza8ih\na2bWkEPXzKwhh66ZWUMOXTOzhhy6ZmYNjYyOjg76HMzMVhm+0jUza8iha2bWkEPXzKwhh67ZOBYR\nfzHoc7AlOXStiohYY9DnYMt06aBPoKaIePqgz2FFrdDshYg4dqyvSfrnJ3zgsdtbGzgS2JD8ZbpV\n0i8rt7EacADwLOD7wAxJs2u20dfWjcBZwHRJv++ojc8DUyX9pIvj97VzK3AlcJqkGV221bWIOBw4\ns6vnpK+dpwPrAfOBDwFfkHRr5TYuAb4HCFgIIOnbNdtoKSJ+CNwHTAUuk7Sww7YmACPATsD1kh6p\ncdzVV/D77y3v3wjcCVwL7EAGVhemAf8B7Er+0KeWxzV9CZgF/B/gRmA68LrKbfS8Engr8M2I+BUZ\nWN+t3MalwFERsTFwJnC2pAcrtwGwLfAa4B8jYgr5YnKepIdqNhIRuwBPJu/SPg8cI+mcmm0AjwKX\nRsTd5AvWdyofv+dM4BPAIcDFwGeBv67cxu/I52bb8vEo0EnotnhuJO0cEVsCBwFHR8T3yOfojprt\nRMSJwB3AJsB2ZNbtX+PYK9S9IOlLkr4ETJD0HklnSzoCWLvGyS3D+pKmAfMl/Sf5KlTb5pKOBeZK\n+ibQWZ+YpAckfRF4J/mHfk5EXB8Ru1ds43JJewJvAF4G/CYiTo+ITWq1UdpZSL4gTiP/0P8euCIi\nDq7ZDvBJ4DbgMOClwLsrHx9JJ0t6CXACcGBE3BkRR0fEOpWbWgO4ClhX0lms+EXQn5B0YP8b8NHa\nbfTp/LkpZpGBOAfYGjgpImrfWe9csu0lkl4DbFzrwLWe5PUjYnNJt0fE84Dav5yLlONTrtwe7aCJ\n1SPiqaWNtSm3ZF2IiPcAbwceBE4juzXWAP6LSn1x5argAOBvyT/wncnn/SJg+xptlHY+SQb71cCJ\nkn5Ubs9uAk6t1Q4wl7zqWCDpnoh4UsVjA4ue973IK5s5wD+QP7OLgd0qNjUR+FfgmnKVWL1fPCI+\nBryntPVk4BfAVrXbKVo8N+eTQXsWsJ+kWeXzNwJjdnc+AatFxIuBuyJiIjCl1oFrhe7h5FXaM4B7\ngP0qHXdphwFfAbYELiR/mWo7muwm2ZAMvyM6aKPnGcA+ku7s+9z8iPi7im2cRobeP0ma2/tkRHyl\nYhuQVzgv6u9OkLQwIt5UuZ0/AN8FvhgR7wX+p/LxAW4GzgXe3v/cRMQ2lds5CHg1+fy8EXhb5eMD\nvJa8Svs34DPAFztoo+dBun9uvgxcJ+mhiNiw7/M7V25nOtlFchB5BX9SrQOv6EDadWQfESx5qz8q\naacVObFBK/2SsyV1tk46ItYHXkVe4YwAG0k6oYN2Nlyqjes6aGML4M1LtVPzxaPXztrAMyX9d0Rs\nTT5H91RuYzVJj/Z9PEXSfTXbKMc9SdLhfR9Pk3RQ5Tb+Q9JrI+JMSW+LiB9Kqh1QvbaeRHbP9Z6b\n2yTNq9zGPwLrSPpARFwA3CTpEzXb6NqKXunuXeUs/kwRcTz5yrMoCCVtVOnY/S8g/Z+nwxeQC8jb\nvReSt2ZzajcQEVOBlwBrkreXtwM71m4HOAP4JnnFMQtYq+bBI2IDsttqOvC2iHgu2b10CfDimm0B\nH42IQ8kXkDXJn9mWtQ5eupU+AkwpdwIj5a3qTJzi1xFxEPDHiDiBDrv+gKeSg7ZTyDvRNYHrK7fx\nekkvApD0loi4lhyMrCoi7mTJPHhQ0rZj/fvlsUKhK+nuGiexHHYHNq396ln0XkAmAv1TQ9broK1F\nJL07IqaRg2k/6KCJLck+vC8BR5F/DF2YI+mEiNhC0kERcU3l4+9IdmMFi/uIFwJXVG4H8vfsWcCn\ngc+Vt2okfTEiTiWfj+PLpxd2dFf1d2T3wgVk336XF0qnkj+zY8jf5TOo/wK/MCImSnqkzA3vaq3B\n88r7EeBFwFtqHXjYFkfcDEzq6NjzgCeR03gmlseTybDqTERMIq8IRql8dVj8ofwxr1nmG0/soA2A\nkXI1ulZErEnlFytJ35C0G7CvpN3K2yskHVOzneJ+SQ+Tt7Ei7xCqiYjXSloAzCQH6/YnZ0lU7Voo\n1gQOJqejzWTJC4raJkm6kuxeFPBwB22cAsyIiIuAn5SPq5M0r7w9LOlactpYFdWnqHRsBjnl6R7y\nFWhU0rMrHbvllVTPF8iBum8DvwJ+2EEbN0XEB4FZEXEesFoHbQB8DHgTOap8J9kNUE1EHC3pOLJr\nYYmBWklvrdkWMDMiDgDmRsTHgadUPv5zyvtNKx93WVrMbe+ZFxGvJkf+d6SD0JU0tSz4eDZwe4cL\nl05gcffChlScxTRsobsXsBnwQO0DS/oG8I2IeJ2ky2off4w2L+o9jogLuli0IOmoMvg0lxzJ/lHt\nNsr81Rsl9bpHnla7DXJkHPKWde5j/cMKDia7F74GvINcwFLTW8iR8XUlHVr52EtbX9K0iNhP0n9G\nRBdz23sOBj5F9u1+kA7m6UbEtqWdSeVjag8+Fj/ve3wL+cJVxbCF7t3AH7vo0215JRURbyGn78wh\n5xreUDtwy/zc48gpVkdK+gM50FVVGXD6ALAgIg6V1NWdwX5lUPDD5GrB6uEREU8D3g88BHxG0hxy\nqlVtD5eB2+dFxAv7vyBpl9qNNZjb3vMaSYv6jCPiMCr3hwOnAyeTd4Zd2qH/BTEippNz6lfYsIXu\nM4HbI6K35K/m1LRLyvtO+oiWcgQ5Y2Fdsq/t9R20cQq5omo9cp5hlSWMy/BWsktmHbI/vKvQ/Q7Z\nh7cxWUegF7qj5K1mDdOBb5HPy4nkqrouvI78f3yJXALcxQvICyT9lOwy63Rue0TsQ/4O7xYRvWXM\nE4AXUD9075F0WuVjLlLmFx8NrBsR/7d8egT471ptDFvo7tXhsT8K7CXp6g7b6Jkn6X7g/jLo1IVH\nJV0O0NEATc/DykIgs8vKnU5I+ig5lesYSR/vqJmJkk4GiIjaNTAWKYNod0XE68iFRJuQxZX+X8Vm\nLoiIUyR9lpwy2KXLgd8A67N44HkhOdWutrsi4sPkoPoo1C3gI+kLwBci4ihJ/1LruP2GLXTXIPvD\nFk3AJ6fE1FBtmd9y6rKPrafVLJUW/5evRMRZ5PN1IVlprtZc0P4pWy1+Zv8OzCaL3NxC3inUqrvx\nIuBTEXEFsH/tBST9ygXEVcBV5YVkK+AXkmpPG4ScVRTlDbor4HNKuYKvvnBp2EJ3Ot1NwN88Ipb5\nyibpqIrt9Lc1snS7FdtaPyJeVdpYrzzutVHzl3SriDintNN73Gun9gAU5JVUV3NBnxwRm5GBO7k8\nHgFQ5SpWxRaSDo6I70u6OCL+odaBJf0ROKTUdLg2Iq7v+1oXz0tvxP+5wDXA/hGxi6QP1GxD0oFl\nYczmwE/JHOjChXS0cGnYQrfLCfhzyL7CFo4d43FNPwb2KY9v7ntc+8pgz/J+Ndr0h0+SdGUZ+FRE\n1JyW9CiLp7ot6Hs8ClQf4ALWiIj1gNHSzVS1uFIZQDuBvAqtOoVvDLtIemlp+ySydklVZeD2TeRY\nxenAFkAnM0C6Wrg0bKHb5QT8eySdUfF4Y+pvJyJeQQ4EXU++stZq48C+NtYh+w3vKFdA1fT6wCPi\n25Je9Xj/voLO5oJ2VZPgMRxLBtPTyal81a4KI+JIcsrWoZJa7R6xRkRMUJb5HGEZy+or2JssUXql\npJMi4oYO2gC6W7g0bKHb5QT8myoe689SuhU2JkeWHyHX4+/zmN+0/G3sQY7Grg6cHxGjZWpcbQ9E\nxBtYcoeCai8ifZaeC3pIrQOXO6dlBkUXU7nKFXsAGwD3qu4uCNsD20v6XcVjPp7zyK6M/wL+qnxc\nW6+vvfc8dVESADpcuDRUoVsm33cyAV/SB2FRpaR3kR31M8jdHLqa27izpF1Kn94ZEVEtQPq8n+zz\nvJyct3tjeV/bFJYsgzlK/V0QkPRruqsfcEBHx12mcpdzOEtO9K9ytyCpWq2AxxMRvfmrs4Gzyf/P\nOSxe0FLTuWQGbBIRlwHf6KANgLt7i5ciq5n9Za0DD0XoRsT3WfYVyKikV1Ru7gxyEcZ3yduYaXQ3\nx3X1cgszGrk3WxfhvlDSvHKFOxoRVbsXeiTtFrnzbK8bo+o2PT0RcRRZVHwOi5eCV6k0J+n20sZm\nLFWmEnhvjTaW8llyb7SuJ/p3bekKbCPAgeRzVLUvWdLny3S+rYGfl7nI1UTEy4DnA++LiM+UT69G\nPv9b12hjKEKXP11OuA1ZVLj23lgAG/Stqrk4Irqct/tvZLfGFLJPt4vVT9dExLnAxhFxCtBJH1jD\nbow9yek71ctg9jmLvDPYhdwJYXJH7fyqN5d6mEn6SO9xRDyHHOD6Fh1sAFAGtnpeGxHzyRetL5Sp\nayvqfrK750nl/Xrk9lPVZpYMReiWikWUdeMfJpfj7V1zIUPfxP47I2IHSTeUJZpd9EsCIOmC8qr9\nHPLqsHr/W6m98BpyNsPPJH2rdhtFq26Mu+i+9sJcSR+PUlS88iyZfvdGxMksOdF/2mN/y8qrrOY6\nAnhfh79nk8lFF9eQv287AL8l71BrrOycSI4b7Ur2i/87WevllgrHBoYkdGHRzgTTgVvJddG1b19F\n/uKPAC+PiF6pxy7K0wF/snvqeWW1VdWr93Kr/Fzy//X8iHi+pE/WbKNo0o1B/lH8NCJ+yuKgqj3v\ndCSyEPdaETGZ7moq/7q837Sj4zcRuU3XV4DfAy+udMU5limSeoPNV5RZM8dERK0pXceT2zT9T0Rc\nThaJ+iVZ8OaSx/zOP9NQhG6Zm/f+8nZZ+dxEAFXai17SZn3tjZC3/LMrjygv7ZPAvuRI6UuB86nf\nZXIxWS2ryz8EaNSNQdZE6Npx5JLzc8l9vs7uopESFi9n8ZTBLnaOaGEGOfvmSnIJ7aIvdPCCuE5E\nPE/SzyOLOq0Vue1VrSldEyTdGhEbkTWofwwQEatcacfe/MXe5npdFDsBoPwRTAP+lyx68S5J36nZ\nRp/Od08l+w3/qYPjLqFhN8aPgSPJGqeXknc+tU3q1WAAvl76q6uLrNW7OXknMkruJLFvF2117I0N\n2zoUODty37+5ZP/xXizegWNF9aakvYYcTO/NaFq70vGHI3T7r0IbOI6cyjWr3DZ9jaxw1YUWu6d+\nMyI+QV+VJEnVVydFxKbk6O5kYLuI2E7SP9duhw6LckfE7mQ/4X4RcWb59ARgD3LL+tp27Zsy+JWo\nuwt0M42KRPXa+lGZWnkouanr0ysXQPpu5L5rzwReHxGbk/26X63VwFCEbk9EbEUuNX0Kecs3o4Mr\nqkclzQKQNLPyMtOl7cmSu6d+uYM29gZ+xuJpPV3tbnwuOYjWWWGVosui3DPIEet55LRByIUe+435\nHStm9XIV1eWUwXGhdCfuQ07dmkeWEt1MUtVBVUknRu5M8VtJv+uFrqSv12pjqEKXrM15IBlOU8kr\nntqh+2BE/D05AXsXcnCgK88E3hARb6Z+1bSeeZK6WHSxtDmSPtagnc6Kcis3Wp0aWbB6c/KF6jZJ\nM2q1sZTPkbM8ngZcRxbntmW7i3xh31fSbZFby3cyi0XSz/oe307lEpXDFrpI+mUZIb8vIv5Q67iR\nlYsguxc+SPbp/IYM+a50WTWt5+6I+AjZF1q9/mjfz+3eyFJ4/e10Md3uMHKkfFuyElQXLyjvIp/3\n64GjI+IsSdXnUEs6r0wZ3AL4paT7arcxjpxEFszfNCJOo00Z0U4MW+j+vvR7rRkRe1N3r7Rl7fr7\nEnKPrE9XbKdf19uWQ66qem55g/pVxvp/bgf3Pa66DLiE+6fJmhsfBr5OhtXW5DzXmt4G7CRpfrmt\nvZaKC1ci4slk5aq7yGA/liwW8yFJtf8v44KkE4ETI2JX8me3Q0ScCJzZ4Z1IJ4YtdN9BjvDOJicu\nv6PWgZXbey8hIiaQZfG6Ct1e1bS1o3LVtIhYXblDQaeDM72fW0T8TX//ekTsOfZ3PSHTyIJH65Fd\nStsB95H9yGc+xvc9ESOS5kNOSYyI2tuWn06+eGxFFu/5FLmq6nPk0nMbQxm0uzoinkK+OJ5JxboI\nLQxV6Ep6sNyO3U5eIXS2FLQMbOxMd0tAIUPkjeQvzh3UDY/p5O1Yb9EHLC63V22aXUT8DTnHeJ+I\n6O1Xtxq5Ouj8Wu2Q0+q+U9o8XNJt5XEXNR6ui9yu/hryd6DWzhQ9G0raEyAibpV0anlcteD3eCbp\nAXJH5c8P+lyW11CFbjQohdhnErkx4WG1D7zUrfKF5K0yVJxz2jcpfU9JixYqlHnINd1C7o21Iblt\n9QSyAPi5ldvpn5zeP6Ok2rY6EfFVSXtJel9kmcotgfMkXVyrjWJ+3+PZfY9bbatkAzRUoUubUojA\nou1O3tzR4ftvlS9lyVvlKnNoI2Jn8va1v1rSBHJ+Y5VqScX95M/pFnLwcQtyLXztF8NlbQs0QlaE\nqmXRPnklaGuHbc9GkZuFjiz1eMOO2rOVyLCFbotSiC20uFV+gMXVknp/zAupWC2p+ARwQf+Ci4h4\nB/Cv1O1P7u8jPmWMxyuq1T55FwCbLePxhRXbsJXUsIXu0qUQP/PY/3yl1fmtchnRnVGm13WxMqxn\nG0lL7FElaWpEvLNmI41WPTXZJ0/SMQARcQQwXVKXc8FtJTNsofsDcmDjOcCdkmY/zr9fWbW4Ve55\neUQcr+52v5g/xucXdNRel5rtk1csAC6NiLuBqR3W+LCVyLCF7kVk3+dUBrCnWUUtbpV7pgCzIuJO\ncubCqKSdHud7lsfvI2J7STf2PhER29PtSr6uNP2dKkV1To6IbYAjI+JU8nf7c5K62OrGVgIjo6Nd\nLcXvRinndhA5n/F75BXCHYM9q5VXRGyy9OfKctdax9+UrDN6FTmVbzPglcDfSrqzVjvjUUSsTVbI\n2p/s2jiNvBA6eFnzxm18GMYpKrPIOa1zyFH4kyKiyz7LYbeALHt3KlmVaYOaB5d0F/Bi4GqywPiP\ngL9y4P5Zbib3lHu7pFdLukDSudSfF2wrkaG60o2I88mgPQs4vVcNLCJulLT9QE9uJRURl5Jzgo8h\n95o7Q9KOgz0rg1yA09/XHhFTXH9h/Bu2Pt0vjzHYsHPzMxkekyRdGRFHS1LHpSpt+Xw0cleUNYA1\nye6ZpXfWtXFm2LoX7o2IGyLiNxFxc0RsByDJQTK2eRHxamC1iNiRDvd8s+W2O/AscoumF9BNEXtb\nyQxb6J4EvFPShmTpvaFbdz0AB5M/q6eSJStb1Na1P8/95YJhHUkiNym1cW7YuhcmSLoFQNJPImIY\n54K2tgdwSMc7tNoTMzMiDgDmlv3SnjLg87EGhi1055eqVteQuzrMG/D5DIM1gO9EhMg+8asGfD62\n2MFk98LXyDKltXfOtZXQsM1e2ISsPboludHih2rOOR3PImIH4EPAX0raYtDnsyqLiKcB7wceAj4j\nqbMSpbbyGYor3VK9H3L7nH1ZXBfWHkdETCa7GPYnf27HDvaMjKwk9y1gXeBEsoSorSKGInRZXIi7\nP2yrF+Qepx4iFyy8vVfNzAZuYlkCTCnKb6uQoQhdSb3Sd70dHaaQWyQvHPu7Vm0RsRZZSPxmslj6\nORHxW2Afr+sfuP67tGGbQWQraChCtyci3kSWc7wfWCciDnFlpjEtq87tO6lf59aW35MjYjMycCeX\nxyMAriMy/g3bq+yx5Lr+7ch9uY4f8PmszLbpD1wASacBLxzQ+dhij5L9uqeTtTGmA2eUj22cG6or\nXeB3kn4LIOneiPBt8tjGU53bcUWSl62vwoYtdB+MiCvIilbbk7dp/wLVt1MZD8ZTndtxJSKuYYzZ\nN5J2aXw61tiwhW7/RoEzB3YWw+GDwCURcRVL1bkd5EkZAAcM+gRscIZtccRfALuS26MDIOn8wZ3R\nyq1s4rk7Oa1uJnBx2eXYVgJlAO3N5KrBEWAjSe8d7FlZ14btSvfb5Eq0B8rHo4BDdwylmMpFgz4P\nG9NZwOXkkvZ7gcmDPR1rYdhC938lHTjokzCrZK6kj0fENEkHlb5eG+eGLXSviIh3k1e7AEj6wQDP\nx2xFjETEFGCtslx7vUGfkHVv2EL3ZcCTyH5dyO4Fh64Nq+PIjSnPJQuYnz3Y07EWhi1015L0ykGf\nhFklk3o1GICvR8QeAz0ba2LYZi98ltwp9ceUeY6SfjHQkzJbThGxO7AjsB9wZvn0BGAPSd4jbZwb\ntivdbchlrCPl40nASwZ3OmZPyAxgA7IIf68e9EIyhG2cG4raCxHxVQBJuwGXSdqtPPYmizZ0JN0t\naSq5GeW15CrBGyTdNNgzsxaGInSBp/U9fl3f4+HpGzH7U+8iuxdeAZwREe8b8PlYA8MSuv1GHv+f\nmA2FtwE7STqU7CbzHmmrgGEJ3dExHpsNsxFJ8wEkPQI8MuDzsQaGZSBtq4g4h7zK7X/8/MGeltkK\nuS4iziN3t96ZnJlj49xQTBmLiF3H+pqkq1uei9mKioivStqrPH4Dubv1zyRd/NjfaePBUISu2XgS\nEVdK+utBn4cNhkPXrLGIuJsxlvy6GP/4Nyx9umbjyRxAgz4JGwyHrll790g6Y9AnYYMxLFPGzMYT\nrzxbhblP18ysIV/pmpk15NA1M2vIoWtm1pBD18ysIYeumVlD/x9X2OljIz+wwQAAAABJRU5ErkJg\ngg==\n", "text/plain": [ "<matplotlib.figure.Figure at 0x1b74f5f0d68>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sns.heatmap(salaries.isnull(), yticklabels=False, cbar=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are two columns which are practically filled with Nans, so I decided to drop them. \n", "I also drop the Nan values in BasePay, since there is only few of them and Agency, since I do not need it.\n", "Next I will try to analize the Benefits column and decide whether I can fill in the values or drop the column." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Dropping columns, which have too many nans (Notes, Status)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "salaries.drop(['Notes', 'Agency', 'Status'], axis=1, inplace=True)\n", "salaries = salaries[np.isfinite(salaries['BasePay'])]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plotting a distribution of benefits" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "<matplotlib.axes._subplots.AxesSubplot at 0x1b75674f128>" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEBCAYAAAB4wNK4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl4k9eB7/GvNq/YBluADWFzICcm\nCRDIAklolmZvkibt3JlO2pvbtGlJl+l2e7tMp03bJ22mz0wmbbrO0HbSjS7TNG3SNGuzQxIaAwkE\nc4CACYsNtsGbbMm2pPvH+5oII9sSyJYt/z7PwwM675F0jgH99J5z3vN64vE4IiIi3mw3QERExgYF\ngoiIAAoEERFxKRBERARQIIiIiEuBICIiAPiz3YCTUVtbqzWzIiJpWrZsmSdZ+bgOBIBly5aN6vvV\n1dVRU1Mzqu852tTH3DER+qk+pqe2tnbQYxoyEhERQIEgIiIuBYKIiAAKBBERcSkQREQEUCCIiIhL\ngSAiIoACQUREXOP+wrTR9MOf3McW+wbBiuAx5ZXBMj7ywfdnpU0iIpmiQEhDY3Mb1RdeR1Vl1THl\n9pkHstQiEZHM0ZCRiIgACgQREXEpEEREBFAgiIiIS4EgIiKAAkFERFwKBBERARQIIiLiUiCIiAig\nQBAREdewW1cYY7zAD4DFQAS4zVq7M+H4h4BVQB9wp7X2z8aYILAGKAQOALdaa7vSrPtZ4B+BGPBN\na632hxARGUGpnCHcCBRYa1cAXwDu7j9gjKkEPgFcCFwF3GWMyQe+Aqyx1q4ENgKr0qw72a27ArgS\n+HYmOisiIoNLJRAuAh4FsNa+BJyTcOw8YK21NmKtbQN2AosSnwM8AlyeZt0QsAcodn/FTrSDIiKS\nmlR2Oy0F2hIeR40xfmttX5JjHUDZgPJkZcPVBdgLbAV8wF2DNa6uri6FLmRGc0szRb29NDQ2HFc+\nmu0YaeFwOKf6k8xE6CNMjH6qj5mTSiC0AyUJj71uGCQ7VgK0JpR3JylLpe41QBUwz637mDFmrbV2\n/cDG1dTUpNCFzAhWBPEHAsdtf91eERzVdoy0urq6nOpPMhOhjzAx+qk+pqe2tnbQY6kMGa0FrgUw\nxiwHNiccWw+sNMYUGGPKgBpgS+JzcD7cn0+z7hGcgIhYa8M4ITE5hbaKiMgJSiUQHgDCxph1wD3A\np40xnzHG3GCtbQTuxfkQfwr4kvsBfifwHmPMWpyJ4e+lWfd54G/AS8aYF4HtwBOZ67aIiAw07JCR\ntTYG3D6geFvC8dXA6gHPOQhcneS10ql7B3DHcO0TEZHM0IVpIiICKBBERMSlQBAREUCBICIiLgWC\niIgACgQREXEpEEREBFAgiIiIS4EgIiKAAkFERFwKBBERARQIIiLiUiCIiAigQBAREZcCQUREAAWC\niIi4FAgiIgIoEERExKVAEBERQIEgIiIuBYKIiAAKBBERcSkQREQEUCCIiIhLgSAiIoACQUREXAoE\nEREBFAgiIuJSIIiICKBAEBERlwJBREQABYKIiLgUCCIiAigQRETEpUAQERFAgSAiIi4FgoiIAAoE\nERFxKRBERARQIIiIiMs/XAVjjBf4AbAYiAC3WWt3Jhz/ELAK6APutNb+2RgTBNYAhcAB4FZrbVea\nda8B7nDfZgPwMWttPCO9FhGR46RyhnAjUGCtXQF8Abi7/4AxphL4BHAhcBVwlzEmH/gKsMZauxLY\nCKxKs24J8G/Addba5UA9EMxAf0VEZBCpBMJFwKMA1tqXgHMSjp0HrLXWRqy1bcBOYFHic4BHgMvT\nrHsBsBm42xjzPHDQWtt0wr0UEZFhDTtkBJQCbQmPo8YYv7W2L8mxDqBsQHmysuHqBoFLgSVAJ/C8\nMeZFa+32gY2rq6tLoQuZ0dzSTFFvLw2NDceVj2Y7Rlo4HM6p/iQzEfoIE6Of6mPmpBII7UBJwmOv\nGwbJjpUArQnl3UnKUqnbAvzNWtsIYIx5DiccjguEmpqaFLqQGcGKIP5AgKrKqmPK2yuCo9qOkVZX\nV5dT/UlmIvQRJkY/1cf01NbWDnoslSGjtcC1AMaY5ThDOf3WAyuNMQXGmDKgBtiS+BzgGuD5NOvW\nAmcaY4LGGD+wHNiaQltFROQEpRIIDwBhY8w64B7g08aYzxhjbnC/wd+L8yH+FPAla20YuBN4jzFm\nLbAC+F6adZuALwKPAS8Df7DWbslct0VEZKBhh4ystTHg9gHF2xKOrwZWD3jOQeDqJK+VTt3fAL8Z\nrn0iIpIZujBNREQABYKIiLgUCCIiAigQRETEpUAQERFAgSAiIi4FgoiIAAoEERFxKRBERARQIIiI\niEuBICIigAJBRERcCgQREQEUCCIi4lIgiIgIoEAQERGXAkFERAAFgoiIuBQIIiICKBBERMSlQBAR\nEUCBICIiLgWCiIgACgQREXEpEEREBFAgiIiIS4EgIiKAAkFERFwKBBERARQIIiLiUiCIiAigQBAR\nEZcCQUREAAWCiIi4FAgiIgIoEERExKVAEBERQIEgIiIuBUIamvryebWhO9vNEBEZEQqENGyLTOa5\n+hBvNHVmuykiIhnnH66CMcYL/ABYDESA26y1OxOOfwhYBfQBd1pr/2yMCQJrgELgAHCrtbYrnboJ\n7/0w8Cdr7Y8y1ekT1R4NAPDwaw18/LL5eD2eLLdIRCRzhg0E4EagwFq7whizHLgbeCeAMaYS+ARw\nDlAAvGCMeQL4CrDGWnufMeYLwCpjzK9TrQvc4773nUB5hvp60jpiAUrzvTS2h6mtP8K588ZM08a0\nH/7kPhqb244rrwyW8ZEPvn/U2yMiyaUSCBcBjwJYa18yxpyTcOw8YK21NgJEjDE7gUXuc77p1nnE\n/fMbadS9xxjzd0DMLcu61q4eInEf51QWsK8THt/ayFmnlFEQ8GW7aWNeY3Mb5pKbjiu3zzyQhdaI\nyGBSCYRSIPHrXdQY47fW9iU51gGUDShPVjZkXWPMmcDNwN/hnEEMqq6uLoUunDzbFAagJADnVAa4\nv6WLl+1eTgvm09zSPGrtGA3hcDij/Wluaaa0sSFpebZ+bpnu41g1EfqpPmZOKoHQDpQkPPa6YZDs\nWAnQmlDenaQslbq3ADOBp4C5QI8xpt5a++jAxtXU1KTQhZO3PbIfOEBFcR7zZ8/g/tfbIK+Yqsqp\ntFcER60do6Guri6j/QlWBKmqrDquPJs/t0z3cayaCP1UH9NTW1s76LFUAmEtcD3wO3cOYXPCsfXA\nN4wxBUA+UANscZ9zLXAfcA3wfDp1rbXf6n8DY8xXgcZkYTCadjeHgDilBT7y/T4KAz5au3qy2aQJ\nJdk8hOYgRDIrlUB4ALjCGLMO8AC3GmM+A+y01j5ojLkX5wPfC3zJWhs2xtwJ/MxdVdQM3GytDaVa\nN+O9zIA9LV0Ue/vwe52VRZOLArR29Wa5VRNHsnkIzUGIZNawgWCtjQG3DyjelnB8NbB6wHMOAlcn\nea2U6yYc/+pwbRwN9S0hSrxvBcDkojyOhHSGICK5Qxempai+OURpYiAUBjiiISMRySGpDBlNeG1d\nvRzp6qW6MPEMIUCkL0Z3TzSLLRs/DrWH+eu2QxxsD9PW3cvy6gpmx1N/fiwOOw524PF4qJ5arIsC\nRUaAAiEFew6HAI49QyjKA6C1W2cJw4nH4Q8b93OwPcy8YDEVk/J5dnsTM/1VfLa7l7LCwKDPbevu\n5TtP7uB/2uYSXlcPwNSSfN62IEhxGoEiIsNTIKTAWWEEJb5jh4wAWrt6Ne42jP19RbzZ2cWNS2Zy\nnnt198u7W3hw035u+v5a/uuWc5g/bdJxz6vdc4RP/mYjDW1hZvm7uWjpmUT6oryws5n7N+znnMKy\n0e6KSE7TZ1kK9rR0AQyYVHYDoVsrjYYSj8fZ2F3OlKIAy+ZMOVp+/rwKrpq0n7buXm76/lqe3HqQ\neNz5yn+oPczXH9rK3//niwD8z+0ruHjSQRbOKOXs2VP4+KXzWVhVSm13kNo9R7LSL5FcpDOEFNS3\nhKgqK8DveWuMojjfj9/robWrZ+xstjQGPfZ6I4ejBfzd6dPxeY8d958eCPPgqov48M9f4bafv8KU\nogALppWwaV8r0Vicdy+dyZfesZCywgB/Sniex+Ph3UtP4Z5HWvj4mg08/ImVlBfnjW7HRHKQAiEF\n9c0h5lYUQ8KXUa/HQ1mhrkUYzvee3kmpt4fFsyYnPT5zciG/v/0C7t+wjy3726hr7OBdZ8/kI5ec\nypyK4kFftzDPxyXFjTzemc+df97Kf/zDkpHqgsiEoUBIwZ6WLq48Y/oxgQD9F6dpUnkwh9rDbNnf\nzrLC9uPODhIV5vl43/I5gHtF8s42frrz6WPq1G569bgL0yr8Ed5/4Vx+/PwuPnrp/KTzECKSOgXC\nMCJ9UVpCPVSVFdIy4Njkwjx2HOpw7uQgx3lxl/MTq/Inv8tc7YaN3PGt7xxbtulVbv7UV4+r+9yL\n65O+xqq3VfPLl/Zw7193cO8/nn1yDRaZ4BQIwzgScoaEyovzjg+EogAd4T6iBaPfrvFg3c4WSgv8\nTPFFkh4PRXqP+9Y/2Ad/MrUbNnLv939EtbeCB1/tw7P7RSb7erXHkcgJUiAMoyXkfJgFJ+WxY8Cx\nyUUB4kAoph9jv8RN6B5um8MUX4SNr75KzaXH3w/hZPUHyqxIH9sft7xRsoibz5utPY5ETpCWnQ7j\nsLtfUXlx/nHH+i9OC8UGv7BqounfhG7aee+gMxZgcc0CQt3JzxAypSjfz4rqCl7f33b070tE0qdA\nGMZbgXD8ssb+i9N0hnC8XU3OxXzVU0dnond5dQUeD6zffXhU3k8kFykQhtHS6QRCRZJAKFMgDGpX\nUyfFeT6mlxx/ZjUSygoD1FSV8sqew0Tj2udI5EQoEIZxONSDz+tJut+O3+elJN9Pp4aMjhGPx9nV\nHKJ66iQ8o7gJ3fnzKujqiVLfM/j1CyIyOAXCMFpCPUwpCuAdZB19WVFAZwgDtIR6aOvupXrq6H4w\nnzq1mOCkfGxEexyJnAgFwjBaOiNDbotQWhCgK+YbxRaNfXsPO3s/zR3iSuOR4PF4OH9eOU3RQrbs\nbxv+CSJyDAXCMA6HeqhIssKoX2lhgK64zhASNbSF8Xs9BCeNzvxBoqWzp+Alxv0b9o36e4uMdwqE\nYRwO9VA+afAzhLICP71xH109faPYqrHtQFs3lWUFQ25XMVIK83zMCnTx0KsH6IvGRv39RcYzBcIw\nWkI9SVcY9StxJ5sPto/sWvvxIh6HhtYwVWXZu3x7Xl4HzZ09rH1j4LXlIjIUjXUMoTcao627d9g5\nBIDGNuduYBNdV9xPd2+UqrLsbfB0aMs68qpv5Gu/fJKVxYcAtJ2FSAoUCEM40jX4NQj9SgudH+HB\n9vCotGmsO9zn/KyyeYbQHYmwaHaQ1/YHmHfRCvL8Xm1nIZICDRkNYahtK/qVFfQPGSkQAA5H8/EA\nlaXZ3fFvyazJ9PTFqGtoz2o7RMYTBcIQDvdfpTzEpHJ+wIefGI0KBACORPMpL84jP5Ddpbhzg8WU\nFQbYtLc1q+0QGU8UCENoDg0/ZARQ5O3TGYLrcDSPqsnZv0GE1+PhrJll7GzqJNwbzXZzRMYFBcIQ\nDnc6K4eGu1+vEwhaZdQR7qUjlpfV+YNEC6tKicbi2IMd2W6KyLigQBjC4VAPHs9b21wPpsjbR2Ob\nzhC2NTofvGMlEGZXFDEp38/rBzSPIJIKBcIQnH2M8oa9wKrIE+VQR5hYLD5KLRubtrofvNlccprI\n6/GwsKqU7Y0d2gFVJAUKhCEcDvUMO1wEzhlCbzR+dJnqRLX1QDv5niilBWNnNfPCGaX0RGMc6B0b\nISUylikQhtCSRiAAE36l0daGdsp9kVHd8no41VOLKQh42dM7OjfqERnPFAhDOBzqITjEktN+/YEw\nkVca9UZj2IMdlPvG1uS63+vl9MpS9vUWa28jkWEoEIaQ+pCRs6xxIq802tUUoqcvNuYCAZzVRpG4\nT7fXFBmGAmEQ0ZgzJzDUVcr9Cj19eDxM6JVG/VcET/GPvXmU06aX4CPGo683ZrspImOaAmEQR7p6\niMeHvygNwOuBiuL8CT1ktLWhnTy/lzLv2AuEPL+XmYEuHn/94IRfCSYyFAXCIN7ax2j4QACoLJvg\ngXCgHTO9hCzcAiElswOdNLaHeXWftrIQGYwCYRAtnaltW9FvekkBjRN0DiEej7O1oZ2FVaXZbsqg\nTgl04fd6NGwkMgQFwiCOniGksMoIYHpZwYQ9QzjYHuFwqIeFM8ZuIOR7Y6w4tYLHtjQSj2vYSCQZ\nBcIgWkLOt/2h7qecqLK0gMOhHiJ9E28jta0Nzg3tx3IgAFx9ZiX1LV1sP9iZ7aaIjEkKhEE0d0Tw\netKZQ3D275mIK436t6w4vbIkyy0Z2hULp+PxwKNbNGwkkowCYRBNnc41CKneKH5OeREAe1q6RrJZ\nY9LWhnbmVBRR4t4saKyaVlLAstlTeEzzCCJJDbvpjDHGC/wAWAxEgNustTsTjn8IWAX0AXdaa/9s\njAkCa4BC4ABwq7W2K826nwbe477NX6y1X8tMl1PT3BkhOCm14SJwbsgCsKclBEwdoVaNTXUNHdRU\nju3hon5Xn1nJnQ/X0dBRRk22GyMyxqRyhnAjUGCtXQF8Abi7/4AxphL4BHAhcBVwlzEmH/gKsMZa\nuxLYCKxKs2418F7gAmAFcKUxZlEmOpyqdANhWkk+hQEfu5sn1hlCZ6SP+pYQNWN4hVGiq86oBGDd\nm6Est0Rk7EklEC4CHgWw1r4EnJNw7DxgrbU2Yq1tA3YCixKfAzwCXJ5m3b3A1dbaqLU2BgSAUR2c\ndwIhtfkDAI/Hw5yKIvcMYeLYvK+NeBwWzSrLdlNSMqu8iIVVpQoEkSRS2ae4FGhLeBw1xvittX1J\njnUAZQPKk5UNWdda2ws0G2M8wL8BG62125M1rq6uLoUupK+pPYy3J3TM6ze3NFPU20tDY8MxdZtb\nmqmrq6MiL8r2hiMj1qbREg6HU+7D45udC70Kuw5RV9dCc0szpQN+Pl3d3cf9zAYrH6m6/X9HAMum\n+/jlpghrazdTXjR2tuoeCen8XY5X6mPmpPK/oR1IXD7idcMg2bESoDWhvDtJWSp1McYUAD/FCYmP\nDta4mprMjwR39fQR7tvFgtlV1NScerQ8WBHEHwhQVVl1TP32iiA1NTWcWQ9/e6Ge08zpKU9Gj0V1\ndXUp/1wbXqllTkURy88+E3B+RgN/PkWFhceVDVY+UnWf3rOX3zz4OABt0TzizOa7D7/CxTM9fOSD\n7x+2n+NVOn+X45X6mJ7a2tpBj6USCGuB64HfGWOWA5sTjq0HvuF+eOcDNcAW9znXAvcB1wDPp1PX\nPTP4E/CUtfZbKfYzY5o7nIvS0hkyAphXUezcjKW1m1nuqqNct2lvK+fNK892M4YVivRiLrkJcK6s\nfu7RrbRMqqaxeVOWWyYydqQyh/AAEDbGrAPuAT5tjPmMMeYGa20jcC/OB/5TwJestWHgTuA9xpi1\nOJPC30unLs5E9sXANcaYZ9xfKzLY7yE1dToXpQVLUp9UBphT0b/SaGJMLDe2hWlsD7Nk1uRsNyUt\nHo+HU8vzeaOpk66YL9vNERkzhj1DcCd1bx9QvC3h+Gpg9YDnHASuTvJaqdZ9AMjandqb3UCYmsYq\nI4C5QeesoL4lxEULghlv11jTv1Hc4nEWCAALpxVQe6CbHZHxsTpKZDTowrQk+gMhnWWn4Gxwl+/3\nTpiVRpv2tuL3ejhjjG9ZkczkQh8Lpk1ie6RMd1ITcSkQkuifQ6hIcw7B6/Uwt6J4wlyL8OreVmqq\nSikIjM9hl/PnVdAV9/Nk3aFsN0VkTFAgJNHcGWFyUYCAL/0fz0S5FiEai/PavjYWj5PrD5IxlSUU\ne3r51ct7st0UkTFBgZBEulcpJ5obLGbP4a6cvzPXrqZOOiN9LJk1JdtNOWE+r4cF+e08v6OZXU3a\nAVVEgZBES2dP2ktO+82pKKKnL0Zjjt8bYeNeZ0J5yTg+QwA4Ld+59eePnn0j200RyToFQhIndYbg\nLj2tb87tYaMX32ihvDiP6uCkbDflpBR6o7z3/Nncv2F/zv+diQwnt6/bP0FNJzlkBFDf0sUF8zPZ\nqrEjGovz6Gt7qfJ18rV/u/eYY7WbXj16Adh4ULthIwtjPojN4QP3PsjK4kNUBsty+uplkcEoEAYI\n90bpCPed8JBRVWkBRXk+tjW2Z7hlY8dr+1rpjno59+wzMLMuPObYcy+uz1KrTkwo0suSy26gYUsD\nL+zwcsPKZTRueCTbzRLJCg0ZDdAS6t+24sTOELxeD8vmTOHlXYcz2awx5WnbhIc4C6aN7+GiRCsX\nTCXg8/Jk3cFsN0UkaxQIAzR3nNhFaYmWV1dgD3bQ4l7glmuesYcI+sIU5efOCeakfD8rTwuy5UA7\nDb2F2W6OSFYoEAZoPsF9jBKtOLUCgJd3595ZQlNHhNf2tXFKIPcuvnvbgqlMKQrwcleQXl29LBOQ\nAmGAt7atOLE5BICzZpZRlOfjpV0tmWrWmPHs9iYAZgZyb0VOwOflukUzaIvlc9/a+mw3R2TUKRAG\naO48uTkEcD5YzplbnpOB8LQ9xLSSfMp9PdluyoioqSrllECIbz+5nYM5fi2JyEAKhAGaOyOU5PtP\nen+e5dXlbD/YefSMIxe0dfXy9LZDvL1mGp7xe/+fYZ1b2ExvNM43/5Lbd+ESGSh3ZgUzpLmzJ+35\ng9oNG7njW985pqypLx+Yxfrdh7n2rOPv6jUerVn/Jl09Uf738rn8dke2WzNySn29rLq4mu8+tZN/\nPG82y6srst0kkVGhQBiguSNCRXF68weJd+PqNz8W5/E/vcaLb7TkRCD09MW4b91uLpxfwcJxuN11\nOmo3bGRx3EOxdza3//hZri/di9eDLliTnKchowH2Huli5pSTX3bo83qY7u/mhZ3NxOPjf6O7hzcf\n4GB7hNtWVme7KSMuFOnljEtv5MZzT6U1lk/LKRdhLrmJxua2bDdNZEQpEBJE+qIcaO0+uh/RyZqb\n18nu5hCPbx3fFzvF43FWP7eb+dMmcfGCqdluzqhZWFWKmV7CE3UHORzKzUl0kUQKhAR7D3cRi8O8\nYGYCoTqvg3nBYu55Yvu43g77kS2NbG1o57aL5uH15vBs8gAej4d3LpmB1+PhDxv3kQMneiJDUiAk\n6L/T2dwMBYLXA598+wK2NXbwyJbGjLzmaNvTEuLzv3+NxaeU8a6lp2S7OaNuclEeV59Zya6mEDt6\ncnvuRESBkKB/++O5FUUZe83rF89g/rRJfPvJ7UTH2VlCuDfKR3+1Aa/Xw/duXkqef2L+czl3bjnV\nwWJe6QpOiLvhycSlVUYJ6ltCTC4KMLnoxK9SHsjn9fCpyxfw8TUb+ddH6vjna2vwjINF/O3hXj77\nu1d5/UA7lxUf4Merj12TP962uT4ZXo+Hdy87he88vpWPrdnA/R+5gHz/+LyPtMhQFAgJ6ltCGZtQ\nTvSOs6pYv+Iwq5/fTU9fjDuuP2NMj8Xb5jCrHnqB/a3dnFvYxOVXXnVcnfG2zfXJmlKUx4VFh3h6\nv4+7/rKNr95wRrabJJJxCoQE9c1dnDs3c/cIPuaCtTgszK/gZy9CY3uYf3nHQmaVZ25o6mTF43HW\nvdHCf6+t5691B6kqK+C3H17OQ7/9RbabNmbMzgvxgSXz+Ona3SyaoHMqktsUCK5wb5QDbd3MDWbu\nP/nAC9ZMPM4fHnuGZ7d7eXrbs9x8/mzet3wO87NwX4FoLM7u5k4272/jhR0tPLejiaaOCPmeKKfG\nGziHHh767ZYJNTSUii9cczrbGtv5f79/jbLCAG+vmZ7tJolkjALBtfdwF/EMLjlNxuPxENn6NNct\nOYdN3RX8bF2U+9bVE/SFOWNyH595z1WcObMM3zDDSd09UepbQuxudn7tagqx90gXvdEYsVgcv89L\nUZ6PgoCPwoCPgoCXaAx6ojFau3o40NrN/tZuwr3OFs9lhQFWLgjStnMjl1/+dpqbplNV6VxdPdGG\nhoZSu2Ej37j7u8yNe7CemXz4Z+v5+5nt3PVP781200QyQoHg2n10hdHIBQI4Zw1LL7uBpUBHuJdN\ne1vZtLeVZ1vCPPv9tRQEvMwLTqI6WExpYYCiPB990Rit3b00d0aob+5if2v3Ma9Z5OnDF2mjpKgQ\nD3FieOiLe+jDS3ekF2+gAI8njo84AU+MeNcRqksLmVIUocIfoczbg3cv1Ne9SuCqK0a0/+NZ4hnf\nvEgf//X8Ln67H87fuJ8bz56Z5daJnDwFgqu+ZXQCIVFJQYCVC6aycsFUNj31IBdd+y5e3dvKrqZO\ntja00xHuo6unj4DPS1lhgPLiPM6bV87uutc4/awlBCflUzEpj3y/j9V3fZEPffGu494jWfnqu77I\n+5LU1dlA6orz/Xx4ZTU/fnwDn/rtJuzBDj5zxWkEfBNzaa7kBgWCa3dzF1OKApQVBbLy/ls3vUKh\nNwrAbPfX9t3bOO20050KcaDT+dVnX2XRNZdkpZ3yluJ8P1dM2k/0tMv44TNv8Nz2Jr717kWcObMs\n200TOSEKBFd9cyhjVyifiGQ7pj734he5PsmErr7Jjx2bNm5kmQcuKS7m5YY+rv/u8yzIa+ftM/r4\n/O23ZLt5ImlRILj2tIS0772krT/IDbCyJ8oTdY38bbeXnfUx2h7YzC0r5nB6pba8kPFBgUD/ktMw\nc0Zx/kByT2GejxsWz2Tlgqn86en1/L52H2tefpOlsydzw+IZXHlGJTMmn/zW6iIjRYEA2MYOAKqn\nKhDk5E0pyiPPPs5NS5bxRk8pO/ZF+OqbrXz1oa1My+vjunMXsLy6nPPnVWRtzkokGQUC8MTWg3g9\ncOH8YLabIjkiFOll8WXvZLH7+FBHmK0H2nlt+25+9fIefrp2Nx6Pc8+FFdUVLK+u4Nx55ZQVKiAk\nexQIwGOvN3L+vArK07x1pkiqppUUMM0UcODh73H52Utp6svnYF8hjYe6+Mn+I/z4hd14iFPui1Dp\n72ZOXidnTi/go7e9P9tNlwlkwgfCzkOd7DjUyfuWz8l2U2QCCEV6WXjpjceU/ee/fokrbvsiu5qc\nK8+3He7i9cgUXgj10PvkDm60j5/CAAAImElEQVQ8e4bmt2RUTPhAeOx158Y1V56hPWkkO7zxGNXB\nSVQHnT2twr1RtuxvY93mHXz7r9u558ntLJ09mZuWnsJ1Z1UxRWeyMkIUCK83snjWZKrKtPpDxoaC\ngI9z5paz/Q8Pc9GSc9nVM4ld+yJ8+c1W7vjjZi46bRpXLJzOFTXTqSwryHZzJYdM6EDY39rNa/va\n+PzVp2e7KSLHcfa9up6lONuTN7SFeXrd39jTUsyX/7iFL/9xC4tOKeOKmulcMD/IolPKtHWGnJQJ\nHQh/3LgfgKs0XCRjnMfjYcbkQjzbnuTis8+mtTSPvT3F7G0Ic/e+Nu5+YjuFAR/L5kzh/HnlnDuv\nHDO9JNvNlnFm2EAwxniBHwCLgQhwm7V2Z8LxDwGrgD7gTmvtn40xQWANUAgcAG611nadbN2M9Rp4\ndEsD//HEdi4+bSrVU0f/fgQiJyIU6eX0S53tTJa7ZZ2RPn7x3z+hePZCXt/dxQs7m4/WLyvwcnpV\nK/OnTWJesJgZkwupKitgxuRCpk7KH9N37pPRl8oZwo1AgbV2hTFmOXA38E4AY0wl8AngHKAAeMEY\n8wTwFWCNtfY+Y8wXgFXGmF+fbF1rbSQTnX562yH+6dcbWXxKGT9479JMvKRI1kzK9+M/Us8tt68C\noKunj31Hunn0oT8SKK9i15shNtbn0RM/9j7Qfq+H6aUFzJhcQGVZIRXFeZQX5zGlOI+K4jzKCgMU\n5/spzvNR1P97np88v4alclUqgXAR8CiAtfYlY8w5CcfOA9a6H9QRY8xOYJH7nG+6dR5x//xGBur+\n7YR7muCuR+owlSX8963nUZw/oUfNJAcV5fk5bXoJzzZt5brrLqeqsop4PE53b5S27l7+tOY+qqpP\noyvmJ9Tl583OAJt3xogGCugdEBrJBHweCgM+8vw+Aj4PAZ/36O95fu8xj/1eD16PB6/Xg8/jwesF\nr8eDr7/c48HnBZ/Xg8fjof+ExYPzB8/Rx2/xeI49qzly5DDlO18f9DlHH7t/OPrsYd7LM1xbBrze\nYPWHagsDy5O8VxzY33CE0je30dMXo6cvxtmzp4zIPTg88Xh8yArGmB8D91trH3EfvwlUW2v7jDHv\nA86y1n7ePfZz4OfAj9zybmNM9YCyE65rrX0ysW21tbVDN15ERI6zbNmypGOFqXw9bgcSZ6e81tq+\nQY6VAK0J5d1Jyk6mbkqdEhGR9KUyGLgWuBbAnUPYnHBsPbDSGFNgjCkDaoAtic8BrgGez1BdEREZ\nIakMGfWvMlqEM6R1K84H+E5r7YPuaqAP44TLN6219xtjpgM/w/lm3wzcbK0NnWzdTHdeRETeMmwg\nyPBLb8cqY0wA+CkwF8gH7gS2AvfhzFVtAT5mrY0ZY+4A3oGzzPdT1tr1xpj5qdYdzX4NxhgzDagF\nrsBp233kUD+NMV8EbgDycP49Pkvu9TGA8wVxLhAFPkQO/V0aY84HvmWtvSSdtmaibirt0/qx1Bxd\negt8AWfp7XjwPqDFWrsSZzjue8B/AP/ilnmAdxpjlgIXA+cD7wG+7z4/nbpZ5X6Q/CfOXBTkWD+N\nMZcAFwAX4rRrFjnWR9e1gN9aewHwdeAb5Eg/jTGfA36Ms5Q+3baeVN1U26hASM0xS29xro8YD/4H\n+HLC4z5gGc43S3CW+V6O07/HrbVxa+2bgN8YMzXNutn27zir0w64j3Otn1fhzN89ADwE/Jnc6yPA\ndrcdXqAU6CV3+vkG8K6ExyPVr2R1U6JASE0p0JbwOGqMGfMXMFhrO621HcaYEuD3wL8AHmtt/zhh\nB1DG8f3rL0+nbtYYY94PNFlrH0sozrV+BnG+iPwv4HbgVzgr/nKpjwCdOMNF24DVwL3kyN+lOw/a\nm1A0Uv1KVjclCoTUDLX0dkwzxswCngZ+Ya1dAySOJQ63zDedutn0AeAKY8wzwBKca1mmJRzPhX62\nAI9Za3ustRYIc+x/9FzoI8Cncfp5Gs6c3c9w5kz65Uo/YeT+LyarmxIFQmqGWno7ZrkruB4HPm+t\n/albvNEdj4a3lvmuBa4yxniNMbNxAq85zbpZY619m7X2YmvtJcAm4BbgkRzr5wvA1cYYjzFmBlAM\n/DXH+ghwhLe+9R4GAuTgv1nXSPUrWd2UjPlhjzHiAZxvoOt4a+ntePDPwBTgy8aY/rmETwL3GmPy\ngDrg99baqDHmeeBFnC8JH3Pr/l9gdYp1x5p02j7m++luBPk2nGt0+tuzmxzqo+se4Kduu/Jw/g2/\nQu71E0bu3+hxdVNtkJadiogIoCEjERFxKRBERARQIIiIiEuBICIigAJBRERcWnYqMoC7hvt3OBsB\nenDWwn/AWrstA6/9DZxtKH4JlFprv26MuQl42Vp7YOhni4wsBYJIck9Za98DYIy5EmevpOsy8Lr/\nAJxtre1IKPskznYUCgTJKgWCyPCmAPXGmLNw99bB2UriA8DZwOeBHmAe8Ftr7TfcLUP+C2dnyzDO\nvT1uBU4BHjbG3AX8H+AXuNttGGMuxzlzKAMKgc9Za58ZrU6KaA5BJLnLjDHPGGNexLmnxO9xNlv7\nmLtFxl+Az7l15wDvBlYklP07cK+19lL3z/9qrf060AhcibtNt7X2Yd7abmMWUAlcD9wMFI1wH0WO\noTMEkeQSh4wMzvYAxcAPnIcEcLZqBtjsbnbYZ4zpvx/DWcA/G2M+j3NG0TPcG1prXzfGfB/4tfv6\n92awPyLD0hmCyPAOur+/BtziniF8DnjYLU+2/8s2nE0FLwFWMfR+MjHA6w5JlVhr34EznPTdk2+6\nSOp0hiCS3GXudtpRnC2EP4Ozy+3PjTE+t84HgRmDPP+zwA+NMQU48wGfHOK91uFs2X0DcIkx5hac\nM4qvnGwnRNKhze1ERATQkJGIiLgUCCIiAigQRETEpUAQERFAgSAiIi4FgoiIAAoEERFxKRBERASA\n/w9bXBIMnZoHRgAAAABJRU5ErkJggg==\n", "text/plain": [ "<matplotlib.figure.Figure at 0x1b75676e780>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sns.distplot(salaries['Benefits'].dropna())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We decite, that with a distribution like this, it is a good idea to fill the Nan benefits values with the mean values." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Filling nans with mean values of benefits" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "salaries['Benefits']=salaries['Benefits'].fillna(value=salaries['Benefits'].mean())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Checking our data once again" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I decide to take a look at the datato make sure I got rid of all the Nan values." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "<matplotlib.axes._subplots.AxesSubplot at 0x1b756661390>" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAE3CAYAAAAJ55KLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAGc1JREFUeJzt3Xu0ZVV15/Fv8ZK3CkIEH2AjziBG\nbMQ0GoKixgckbRwYkAgiiESUiBoNhlfHCCEaJT6IDQRKq0BAEBUNRtBWkSAiEHzQsWcUkDYgKAJB\nBHne/mPtQx2KKrC768512PX9jHFHnTq3Lmty77m/s/faa8+1YG5uDklSjVV6FyBJKxNDV5IKGbqS\nVMjQlaRChq4kFTJ0JanQag/z+bnV1nhCSSHLc89d19K7hlmpYxZqmJU6ZqGGWaljFmqYlTpmoYah\njgXL+5xHupJUyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWp\nkKErSYUMXUkqZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZupJU\nyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUMXUkq\nZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZupJUyNCVpEKGriQV\nMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUMXUkqZOhKUiFDV5IK\nGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZupJUyNCVpEKGriQVMnQlqZChK0mF\nDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUMXUkqZOhKUiFDV5IKGbqSVMjQlaRC\nhq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZupJUyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIh\nQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUMXUkqZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQ\noStJhQxdSSpk6EpSIUNXkgoZupJUyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI\n0JWkQoauJBUydCWpkKErSYUMXUkqZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk\n6EpSIUNXkgoZupJUyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUy\ndCWpkKErSYUMXUkqZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZ\nupJUyNCVpEKGriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUM\nXUkqZOhKUiFDV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgoZupJUyNCVpEKG\nriQVMnQlqZChK0mFDF1JKmToSlIhQ1eSChm6klTI0JWkQoauJBUydCWpkKErSYUMXUkqZOhKUiFD\nV5IKGbqSVMjQlaRChq4kFTJ0JamQoStJhQxdSSpk6EpSIUNXkgotmJub612DJK00PNKVpEKGriQV\nMnQlqZChK2mlFxGPrhrL0NVKJSJW712DZtI5VQOttiL/YxFxxPI+l5l/tSLH+nVExHrAwcAmtG/q\ndzPzh8U1rAq8Dngy8FXgisy8sbKGoY5LgVOAxZl5U/X4Qw0fAU7KzG/3GH9wWUR8BTgxM6/oWEd3\nEXEQcHKv18NUHb8BbADcDbwT+PvM/G5xGTcN348E7gPIzPPmY6AVfaR7w/DxXODxwJW0b+azVvA4\nv66FwFXA04DrgZM61HA8sBnwEmA9YHGHGgBeDNwFfD4iTo+IF3eo4RzgkIj4RkQcEBHrd6jhWcB5\nwH+LiK9FxH4RsW51ERGxY0S8LCJ2jogrI+KPq2sA7gXOGV4Pv9dh/ImTaQdGRwMXAB/sUMPPaa+N\n3YE9gFfP10ArNHQz8/jMPB5YJTPflJmfyMy30sKmhw0zcyFwd2Z+A1jQoYYtMvMI4I7M/DxQNnc0\nLTNvycyPAvvRftlOjYiLI2KXwhq+mJm7Aa8Afhf4SUR8PCI2K6zhPuCfaG/IPwf+FDg3IvavqmHw\nPuAHwFuA3wHeWDw+mXlsZj6XFnb7RMTVEXFYhzfD1YGvAY/NzFNYwWfgv47M3Gf6Azh0vsaar/+5\nDSNii8y8MiJ+E+hxRAPAMD4R8URa2FRbLSIeN9SwHsOpS7WIeBPwWuBW4ETalMfqwDcpms+KiK2G\ncf+A9ku2A+01eBawXVEN76OF/vnAezPzWxGxCnAZcEJFDYM7aGeF92Tm9RHxqMKxgftfj7sDewO3\nA39O+3mcDexUWMoawN8CF0TEjrTXZamIeDfwpqGWtYF/A7aej7HmK3QPoh1JPYF2Wr/nPI3zcN4C\nfAzYCvgU7Zta7TDgQtrp0zeBt3aoAeAJwB6ZefXUc3dHxJ8U1nAiLdj+MjPvmDwZER8rrOEHwLMz\n87bJE5l5X0S8srAGgF8AXwY+GhFvBv538fgAlwOnAa+dfl1ExDbFdewLvJT22vhDYK/i8QFeDjwR\n+DvgGOCj8zXQCr0NOCIuAib/welT+bnMfN4KG+gRKCI2Am7MzC73XUfEhrR55dVpP5tNM/PoDnVs\nslQNFxWPvyXwqqVqqHzjmdSxHvCkzPzXiHgG7bVxfXENq2bmvVN/3ygzf1ZZwzDuhzLzoKm/L8zM\nfYtr+KfMfHlEnJyZe0XEP2fmDvMx1oo+0p23yef/FxFxFO1d9P6gy8xNi8aefgOafp5Ob0Bn0k6Z\nnkk7tb29uoCIOIl2kXUd2inclcD2xWUsAj5Pm9q4Dii9iBYRj6dNty0G9oqIp9GmvT4H/HZlLcCh\nEXEg7Q1oHdrPY6uqwYcpr78ANhrONBYMH6UrjAb/HhH7Ar+MiKOZxynRFRq6mXnNivzvrQC7AJtn\n5p0dxp68Aa1BWzUwsUGHWgDIzDdGxELaxbSvdyhhK9o82fHAIbQpn2q3Z+bREbFlZu4bERcUj789\nbfotWDKHfB9wbnEd0H4/ngx8APjw8FEmMz8aESfQXgtHDU/f1+ls8E9o0wtn0q47PDJWL8ygy4E1\nO419J/Ao2nKYNYbHa9ECp4uIWJN2RDNH8RHe4BfDL9Q6w1rlNTrUsGA42lw3Itah+E0wMz+bmTsB\nr8nMnYaPF2Xm4ZV1DG7OzF8B62dm0s4+ykTEyzPzHuBa2sW8vWmrKEqnFgbrAPvTlqtdywMPlFao\n8qUZxa6gLUu6nnbaMpeZ/6lo7Fk6ogH4e9pFvPOAHwP/3KGGyyLiHcB1EXE6sGqHGt4NvJJ2o8jV\nFK+bjojDMvNI2tTCAy4wZ2b1Wt1rI+J1wB0R8R7gMcXjP3X4c/PicZdlIW0p4fNp6/lPGh6vcGMP\n3d2BpwC3VA+cmZ8FPhsRO2fmF6rHX0Y9Z00eR8SZmXlrhxoOGS4g3UG7WvytyvGH9aeXZuZkamXj\nyvEHk+/7Itr3oaf9adMLnwZeD1SH/h8BH6Gtzz2weOylbZiZCyNiz8z8RkTM25r+sYfuNcAve8zp\nzsoRTUT8EW0JzO3Anpl5SXXgDutzj6Qtkzo4M39Bu5hVWcOBwJ8B90TEgZnZ64xjz+GC4ruA36PD\nDTsRsTHwduA24JjMvJ22VKrar4YLzr8ZEc+c/kRm7lhdTNWa/rGH7pOAKyPiquHvlUvXPjf8eVzR\neMvzVtqKhcfS5qv+a4cajqPd9bQB7U6svTvU8Me0qZ71afPsvUL3S8C3aRdtkiWhOwdUTX0tBv6R\n9pp4L+2uvB52pn0fjgcOoM8b0G9l5vdoU4Ela/rHHrq7dxz7UGD3zDy/Yw0Ad2bmzcDNw4WjHu7N\nzC8CdLpIAvCrzLwLuDEielzAAyAzD6Ut1To8M9/TqYw1MvNYgIj4cqcaGC6i/SgidqbdQLUZrSnU\n/yws48yIOC4zP0hbzjjvxh66q9Pmje5fCE9bGlJho6Jx/m/06D2xtFlYMTML34ePRcQptNfJp2gd\n8C4uGnt6SdYs/Dz+O3Aj8ELgO7QzkaqeIM8G3h8R5wJ7V9ygMvbQXUy/hfBbRMRfL+sTmXlIhzoW\nLF1TYR0bRsRLhho2GB5PapiX9nnLsHVEnDrUMHk8qaFHh6/jaetjD6etmV5E3Y0ia0fEU2iBu9bw\neAFAZl71kF85P7bMzP0j4quZeXZE/HnVwJn5S+CAoefDhRFx8dTn5uV1MfbQ7bkQ/nbanF1vRyzn\ncaV/obXLg7Z2evJ4jraErcJuw5+r0n+eHWDNzPzKcME1I+JXhWPfy5KlcvdMPZ4Dyi9gAatHxAbA\n3DAFVtoUariAdjStCdO8LyEce+j2XAh/fWYuKhxvmaZriIgX0S7WXEy7Jbiqhn2malifNnd31XCU\nUVXD+cP452XmSx7u3xe4MyJeCqwaEdsDZaE7Xz0F/j8cQWsG9Ru0ZYR/VjVwRBxMa6t5YGaWdNsb\ne+j2XAh/WeFYD2uYVngi7ersXbR73vd4yC9a8TXsSuu6thpwRkTMDcvqKt0SEa/ggTsElL0BTdkf\neD/wOOAdtKv3JYYzvmXeattjqdZwxB+0jQ9uGHoeV9kO2C4zf1414ArtMqYHG/qkvoG2XOkK2jYx\n5X19I+LrmbnjMG+2U0R8MzNLm81ExIW0iyVfHP68NDOfXVzDV5d6ai4zX1hZQ28RscXyPpeZV1bW\nAvefgR3E1C37M3I2Mi9GeaQ7/GIt691kLjNfVFzOItpNGl+m7ZawkD7rVFcbei/MRdu3rUdD9/sy\n887hCHcuIsqmFyaGN5xHs2SK47aH+5r5EBGH0JqG386SW9RLOuBNgnW4gPaANpfAmytqWMoHaXuj\n/bjD2OVGGbo8eOuTbYAPAacu49/Ot8dn5qRj0dkR0Wvd7t/Rpjw2os3p9rgD6YKIOA14YkQcB1xS\nXcCMTHFAu7C36XA3WC+n0M46dqTtYrFWpzp+PFnHvTIYZegOHZMY7p9+F22bmldX3qgwtQD/6oh4\nTmZeMtzq2GP+kMw8c1gI/1TaEV7ZHNZUDYdExMtoqxm+n5n/WF0D7fbX7WlhcyRw6fBntR/Rv/fC\nHZn5nknT8A5tLiduiIhjaStb5gCy7W04SqMMXbh/h4DFwHeB53Q4jUzaC2gB8IKImLR6rFwadL9h\nHeLatLWZpw93RJUe+Q+ns0+jfU+eHhFPz8z3VdbADExxDNYAvhcR32NJ0FSvF14QbUeTdSNiLfr1\nev734c/NO41fapShOzQ3efvw8YXhuTUAhltB511mPmWqngW00/obi6/MTnsf8Bpai8ffAc6gfrrl\nbFpHq5uLx53WfYpj8N5O4047knar/Gm0Pdo+0aOIzDw8Il7AkuWMPXaOKDPK0GXJOr/JJnM9mooA\nMLyYFgL/ATw2It6QmV+qrGHQffdZ2tzdX3YY934zMsXBMP7BtA1Lz6GdkVVbc9KDAfjMMN9dbujl\nuwXtLGiOtpPEa3rUUmGUoTt9lDkDjgR2yMzrou2O/Glap6lqt9J/99nPR8TfAP86eSIzq5uIbw48\ng3bRaNuI2DYz/6qyhkFZ0+ylRcQutHntPSPi5OHpVYBdgbOW+4Xz5/lTyxk/FrU7VJcbZehORMTW\ntFs+H0M7dbqiw5HNvZl5HUBmXlt8u+e03YAtcsnus//QoYZXA99nyeaHPRaJn0a7iFa68+4ylDXN\nXoYraDci3ElbzgjtRpE9l/sV82u14cyr53LGMqMOXdpGe/vQAuYk2pFFdejeGhF/SmtqsiNwU/H4\nE08CXhERr6K+49rEnZlZdufVctyeme/uXANQ1zR7adk2kD0pIhbTTuu3An6QmVdU1bCUD9NWkWwM\nXAQc+9D//JFt7KFLZv5wuFL9s4j4RdW40bbWhja98A7gZcBPaG8CPfTsuDZxTUT8BW0+c3LFvqTh\nzdTP44aI2GOpGnos43sLrWn2s2itHXu8Gb2B9nq8GDgsIk7JzPL125l5+rCccUvgh5n5s+oaKo09\ndG8a5ofWiYhXU7tX2rJ2/X0ubS+qDxTWMdF763Fodz49bfiA2i5j0z+P/acez9FuSS4xhP8HaL1A\n3gV8hhY2z6CtU620F/C8zLx7WN1zIYU3zUTE2sB+tDXLF9Ma36weEe/MzOrvRZmxh+7raVdCb6Q1\ntnh91cDZttl+gIhYhdY+rkfoTjqurVfdcS0iVht2Ceh2gWTy84iI35+e14+I3Zb/VfNiIa0R0wa0\nqa5tgZ/R5plPfoivmw8LMvNuaEspI6JkOeWUj9PefLamNf95P+1W4A/TbpkfpVGHbmbeOpy2XEl7\nJ+12y+VwgWAH+t1q+W7gD2m/2FdR+wu+mLZH2eSGERj6DVC0hC8ifp+2PnmPiJjsk7cqbc+4Mypq\nGNwzWTIYEQdl5g+Gxz16QFwUEacDF9Bem1U7V0xskpm7AUTEdzPzhOFxWWvHHkYdurPQznDKmrQN\nAN9SOehSp7Ofop3OQuG60Kk7rXbLzPtvRhjWMFf5DrAhbV3s/6ItkbqHtpqh0vTNMdMrWcq2zYmI\nT2bm7pn5tqHN5VbA6Zl5dlUNg7unHt849XgWthCaN6MOXdr62Mn6v0UR0e3K+dCw+1Udhp4+nT2H\nB57OlqyRjYgdaKeQb4uIY4anVwEOpM1lVriZ9v3/Du2i5pbAT6l/E17WtkELgKcX1nD//n1D0FaH\n7cSm0TYqXbDU40061VNi7KE7C+0Me5uF09lbaOtCH8WSX6j7aK0Nq/wNcOb0zRgR8Xrgb6mda56e\nQz5uOY/n26zs33cm8JRlPP5UYQ3lxh66S7czPOah//kodT+dHdZ/XjEs3etx9xfANpl54FJ1nRQR\n+1UWUdnp7iHMxP59mXk4QES8FVicmb3WsJcae+h+nXaB4KnA1Zl548P8+zGahdPZiRdExFE9ds7g\ngfOH0+4prWI2zMT+fVPuAc6JiGuAkzr1Jikz9tA9izZ/eRIztmdZoVk4nZ3YCLguIq6mrVyYy8zn\nPczXrCg3RcR2mXnp5ImI2I5+dwj2NFO/C0PTnWMjYhvg4Ig4gfY7++HMvLVvdSve6PdIi4itgH1p\n6/7+B+2d9Kq+Va2cImKzpZ8bbkmtGHtz4HO0ddJX0uYPXwz8QWZeXVGDli0i1qO1mNybNvVxIu2A\ncP9lrXd/pBv10ozBdbR1qbfTrpR/KCJ6zSuu7O4BjgJOAF5Cu7hWIjN/BPw2cD6tgfi3gP9i4M6E\ny2l71r02M1+amWdm5mnUrxsuMeoj3Yg4gxa0pwAfn3T7iohLM3O7rsWthCLiHNqa4cNp+9gtqt6R\nWLMnIladnuePiI3G3H9h7HO6/7CcSfkdyisRtKbZX4mIwzIzO7a51Gw5dNjtZXVgHdr0z1YP/SWP\nXGOfXrghIi6JiJ9ExOURsS1AZvrL3sedEfFSYNWI2J5O+8Vp5uwCPJm2fdRv0afBfpmxh+6HgP0y\ncxNaC7uPdK5nZbc/7efwOFq7y969dTUbbh4OhNYfdvJeu3dB82ns0wurZOZ3ADLz2xGxMq7JnCW7\nAgdkZs+NKTV7ro2I1wF3DPulPaZzPfNq7KF799Bd6gLarg13dq5nZbc68KWISNp8+9c616PZsD9t\neuHTtPar1VvRlxr76oXNaD06t6JthvjOqnWhWr6IeA7wTuA/Z+aWvetRHxGxMfB24DbgmMzs1nq1\n0iiPdIcu+NC2x3kNS3q3qqOIWIs2xbA37WdyRN+K1NliWiP3xwLvpbU+Hb1Rhi5LmmVPh21p02wt\n0220mxJeO+l2ppXaGsMtwAybDawURhm6mTlpETfZsWEj4KeZed/yv0rzJSLWpTULv5zWTP3UiPgp\nsMcY763Xr2367HPsK6nuN8rQnYiIV9LaOd4MrB8RB4y9g9GMWlYv2/2o72Wr2bJ2RDyFFrhrDY8X\nAIy5P8rY312OoN1fvy1tf6yjOtezstpmOnABMvNE4Jmd6tFsuJc2r/txWl+OxcCi4e+jNeojXeDn\nmflTgMy8ISI8le3DXrZ6kMxcKW/HH3vo3hoR59I6S21HO535ayjflmRlZy9bPUhEXMByVhVl5o7F\n5ZQZe+hOb7h3bbcq9A7gcxHxNZbqZduzKHX3ut4F9DD2myMeDTyftv05AJl5Rr+KVl7DBqG70Jbs\nXQucPeyQrJXccAHtVbQ7FhcAm2bmm/tWNX/GfqR7Hu1OtFuGv88Bhm4HQ0OTs3rXoZl0CvBF2q36\nNwBr9S1nfo09dP8jM/fpXYSkh3RHZr4nIhZm5r7DXO9ojT10z42IN9KOdgHIzK93rEfSgy2IiI2A\ndYdbxTfoXdB8Gnvo/i7wKNq8LrTpBUNXmi1H0jamPI3WwPwTfcuZX2MP3XUz88W9i5D0kNac9GAA\nPhMRu3atZp6NffXCB2k7iv4Lw3rAzPy3rkVJAiAidgG2B/YETh6eXgXYNTNHu0fa2I90t6Hdarpg\n+PuawHP7lSNpyhXA42mbC0z6XN9HC+HRGmXvhYj4JEBm7gR8ITN3Gh67EaI0IzLzmsw8ibYZ5YW0\nOxQvyczL+lY2v0YZusDGU493nno83rkU6ZHrDbTphRcBiyLibZ3rmVdjDd1pCx7+n0jqaC/geZl5\nIG36b9R7pI01dOeW81jS7FmQmXcDZOZdwF2d65lXY72QtnVEnEo7yp1+/PS+ZUlahosi4nTart07\n0FYcjdYol4xFxPOX97nMPL+yFknLFhGfzMzdh8evoO3a/f3MPPuhv/KRbZShK2n2RcRXMvOFveuo\nZuhK6iIirmE5t/yOeZOBsc7pSpp9twPZu4hqhq6kXq7PzEW9i6g21iVjkmbfqO88Wx7ndCWpkEe6\nklTI0JWkQoauJBUydCWpkKErSYX+Dyc/AXubTNhbAAAAAElFTkSuQmCC\n", "text/plain": [ "<matplotlib.figure.Figure at 0x1b75670a518>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sns.heatmap(salaries.isnull(), yticklabels=False, cbar=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Looking at our clean data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now I take a look at the data, to get familiar with it." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>Id</th>\n", " <th>EmployeeName</th>\n", " <th>JobTitle</th>\n", " <th>BasePay</th>\n", " <th>OvertimePay</th>\n", " <th>OtherPay</th>\n", " <th>Benefits</th>\n", " <th>TotalPay</th>\n", " <th>TotalPayBenefits</th>\n", " <th>Year</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>1</td>\n", " <td>NATHANIEL FORD</td>\n", " <td>GENERAL MANAGER-METROPOLITAN TRANSIT AUTHORITY</td>\n", " <td>167411.18</td>\n", " <td>0.00</td>\n", " <td>400184.25</td>\n", " <td>25114.34451</td>\n", " <td>567595.43</td>\n", " <td>567595.43</td>\n", " <td>2011</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>2</td>\n", " <td>GARY JIMENEZ</td>\n", " <td>CAPTAIN III (POLICE DEPARTMENT)</td>\n", " <td>155966.02</td>\n", " <td>245131.88</td>\n", " <td>137811.38</td>\n", " <td>25114.34451</td>\n", " <td>538909.28</td>\n", " <td>538909.28</td>\n", " <td>2011</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>3</td>\n", " <td>ALBERT PARDINI</td>\n", " <td>CAPTAIN III (POLICE DEPARTMENT)</td>\n", " <td>212739.13</td>\n", " <td>106088.18</td>\n", " <td>16452.60</td>\n", " <td>25114.34451</td>\n", " <td>335279.91</td>\n", " <td>335279.91</td>\n", " <td>2011</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>4</td>\n", " <td>CHRISTOPHER CHONG</td>\n", " <td>WIRE ROPE CABLE MAINTENANCE MECHANIC</td>\n", " <td>77916.00</td>\n", " <td>56120.71</td>\n", " <td>198306.90</td>\n", " <td>25114.34451</td>\n", " <td>332343.61</td>\n", " <td>332343.61</td>\n", " <td>2011</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>5</td>\n", " <td>PATRICK GARDNER</td>\n", " <td>DEPUTY CHIEF OF DEPARTMENT,(FIRE DEPARTMENT)</td>\n", " <td>134401.60</td>\n", " <td>9737.00</td>\n", " <td>182234.59</td>\n", " <td>25114.34451</td>\n", " <td>326373.19</td>\n", " <td>326373.19</td>\n", " <td>2011</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " Id EmployeeName JobTitle \\\n", "0 1 NATHANIEL FORD GENERAL MANAGER-METROPOLITAN TRANSIT AUTHORITY \n", "1 2 GARY JIMENEZ CAPTAIN III (POLICE DEPARTMENT) \n", "2 3 ALBERT PARDINI CAPTAIN III (POLICE DEPARTMENT) \n", "3 4 CHRISTOPHER CHONG WIRE ROPE CABLE MAINTENANCE MECHANIC \n", "4 5 PATRICK GARDNER DEPUTY CHIEF OF DEPARTMENT,(FIRE DEPARTMENT) \n", "\n", " BasePay OvertimePay OtherPay Benefits TotalPay \\\n", "0 167411.18 0.00 400184.25 25114.34451 567595.43 \n", "1 155966.02 245131.88 137811.38 25114.34451 538909.28 \n", "2 212739.13 106088.18 16452.60 25114.34451 335279.91 \n", "3 77916.00 56120.71 198306.90 25114.34451 332343.61 \n", "4 134401.60 9737.00 182234.59 25114.34451 326373.19 \n", "\n", " TotalPayBenefits Year \n", "0 567595.43 2011 \n", "1 538909.28 2011 \n", "2 335279.91 2011 \n", "3 332343.61 2011 \n", "4 326373.19 2011 " ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries.head()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<class 'pandas.core.frame.DataFrame'>\n", "Int64Index: 148045 entries, 0 to 148653\n", "Data columns (total 10 columns):\n", "Id 148045 non-null int64\n", "EmployeeName 148045 non-null object\n", "JobTitle 148045 non-null object\n", "BasePay 148045 non-null float64\n", "OvertimePay 148045 non-null float64\n", "OtherPay 148045 non-null float64\n", "Benefits 148045 non-null float64\n", "TotalPay 148045 non-null float64\n", "TotalPayBenefits 148045 non-null float64\n", "Year 148045 non-null int64\n", "dtypes: float64(6), int64(2), object(2)\n", "memory usage: 12.4+ MB\n" ] } ], "source": [ "salaries.info()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>BasePay</th>\n", " <th>OvertimePay</th>\n", " <th>OtherPay</th>\n", " <th>Benefits</th>\n", " <th>TotalPay</th>\n", " <th>TotalPayBenefits</th>\n", " <th>Year</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>count</th>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " <td>148045.000000</td>\n", " </tr>\n", " <tr>\n", " <th>mean</th>\n", " <td>66325.448841</td>\n", " <td>5086.740800</td>\n", " <td>3645.661408</td>\n", " <td>25114.344510</td>\n", " <td>75057.851048</td>\n", " <td>94038.185067</td>\n", " <td>2012.520653</td>\n", " </tr>\n", " <tr>\n", " <th>std</th>\n", " <td>42764.635495</td>\n", " <td>11473.181557</td>\n", " <td>8019.498636</td>\n", " <td>13364.208347</td>\n", " <td>50409.761170</td>\n", " <td>62683.477905</td>\n", " <td>1.119390</td>\n", " </tr>\n", " <tr>\n", " <th>min</th>\n", " <td>-166.010000</td>\n", " <td>-0.010000</td>\n", " <td>-7058.590000</td>\n", " <td>-13.800000</td>\n", " <td>-618.130000</td>\n", " <td>-618.130000</td>\n", " <td>2011.000000</td>\n", " </tr>\n", " <tr>\n", " <th>25%</th>\n", " <td>33588.200000</td>\n", " <td>0.000000</td>\n", " <td>0.000000</td>\n", " <td>22747.200000</td>\n", " <td>36958.160000</td>\n", " <td>45077.410000</td>\n", " <td>2012.000000</td>\n", " </tr>\n", " <tr>\n", " <th>50%</th>\n", " <td>65007.450000</td>\n", " <td>0.000000</td>\n", " <td>817.170000</td>\n", " <td>25114.344510</td>\n", " <td>71644.710000</td>\n", " <td>92675.510000</td>\n", " <td>2013.000000</td>\n", " </tr>\n", " <tr>\n", " <th>75%</th>\n", " <td>94691.050000</td>\n", " <td>4695.710000</td>\n", " <td>4242.900000</td>\n", " <td>33507.310000</td>\n", " <td>106028.000000</td>\n", " <td>133085.410000</td>\n", " <td>2014.000000</td>\n", " </tr>\n", " <tr>\n", " <th>max</th>\n", " <td>319275.010000</td>\n", " <td>245131.880000</td>\n", " <td>400184.250000</td>\n", " <td>96570.660000</td>\n", " <td>567595.430000</td>\n", " <td>567595.430000</td>\n", " <td>2014.000000</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " BasePay OvertimePay OtherPay Benefits \\\n", "count 148045.000000 148045.000000 148045.000000 148045.000000 \n", "mean 66325.448841 5086.740800 3645.661408 25114.344510 \n", "std 42764.635495 11473.181557 8019.498636 13364.208347 \n", "min -166.010000 -0.010000 -7058.590000 -13.800000 \n", "25% 33588.200000 0.000000 0.000000 22747.200000 \n", "50% 65007.450000 0.000000 817.170000 25114.344510 \n", "75% 94691.050000 4695.710000 4242.900000 33507.310000 \n", "max 319275.010000 245131.880000 400184.250000 96570.660000 \n", "\n", " TotalPay TotalPayBenefits Year \n", "count 148045.000000 148045.000000 148045.000000 \n", "mean 75057.851048 94038.185067 2012.520653 \n", "std 50409.761170 62683.477905 1.119390 \n", "min -618.130000 -618.130000 2011.000000 \n", "25% 36958.160000 45077.410000 2012.000000 \n", "50% 71644.710000 92675.510000 2013.000000 \n", "75% 106028.000000 133085.410000 2014.000000 \n", "max 567595.430000 567595.430000 2014.000000 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries.drop('Id', axis=1).describe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Putting people into different groups based on their job" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I use the very convenient job title bin function from https://www.kaggle.com/mevanoff24/data-exploration-predicting-salaries" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def findJobTitle(row):\n", " \n", " police_title = ['police', 'sherif', 'probation', 'sergeant', 'officer', 'lieutenant']\n", " fire_title = ['fire']\n", " transit_title = ['mta', 'transit']\n", " medical_title = ['anesth', 'medical', 'nurs', 'health', 'physician', 'orthopedic', 'pharm', 'care']\n", " court_title = ['court', 'legal']\n", " automotive_title = ['automotive', 'mechanic', 'truck']\n", " engineer_title = ['engineer', 'engr', 'eng', 'program']\n", " general_laborer_title = ['general laborer', 'painter', 'inspector', 'carpenter', \n", " 'electrician', 'plumber', 'maintenance']\n", " aide_title = ['aide', 'assistant', 'secretary', 'attendant']\n", " \n", " for police in police_title:\n", " if police in row.lower():\n", " return 'police' \n", " for fire in fire_title:\n", " if fire in row.lower():\n", " return 'fire'\n", " for aide in aide_title:\n", " if aide in row.lower():\n", " return 'assistant'\n", " for transit in transit_title:\n", " if transit in row.lower():\n", " return 'transit'\n", " for medical in medical_title:\n", " if medical in row.lower():\n", " return 'medical'\n", " if 'airport' in row.lower():\n", " return 'airport'\n", " if 'worker' in row.lower():\n", " return 'social worker'\n", " if 'architect' in row.lower():\n", " return 'architect'\n", " for court in court_title:\n", " if court in row.lower():\n", " return 'court'\n", " if 'major' in row.lower():\n", " return 'mayor'\n", " if 'librar' in row.lower():\n", " return 'library'\n", " if 'guard' in row.lower():\n", " return 'guard'\n", " if 'public' in row.lower():\n", " return 'public works'\n", " if 'attorney' in row.lower():\n", " return 'attorney'\n", " if 'custodian' in row.lower():\n", " return 'custodian'\n", " if 'account' in row.lower():\n", " return 'account'\n", " if 'garden' in row.lower():\n", " return 'gardener'\n", " if 'recreation' in row.lower():\n", " return 'recreation leader'\n", " for automotive in automotive_title:\n", " if automotive in row.lower():\n", " return 'automotive'\n", " for engineer in engineer_title:\n", " if engineer in row.lower():\n", " return 'engineer'\n", " for general_laborer in general_laborer_title:\n", " if general_laborer in row.lower():\n", " return 'general laborer'\n", " if 'food serv' in row.lower():\n", " return 'food service'\n", " if 'clerk' in row.lower():\n", " return 'clerk'\n", " if 'porter' in row.lower():\n", " return 'porter' \n", " if 'analy' in row.lower():\n", " return 'analyst'\n", " if 'manager' in row.lower():\n", " return 'manager'\n", " else:\n", " return 'other'\n", " \n", "salaries['GeneralJobTitle'] = salaries['JobTitle'].map(findJobTitle)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exploring the data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Changes in salaries over time between different groups of people" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>TotalPay</th>\n", " </tr>\n", " <tr>\n", " <th>Year</th>\n", " <th></th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>2011</th>\n", " <td>71744.103871</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>74113.262265</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>78808.285041</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>75471.836912</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " TotalPay\n", "Year \n", "2011 71744.103871\n", "2012 74113.262265\n", "2013 78808.285041\n", "2014 75471.836912" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pay_by_year=salaries[['Year', 'TotalPay']].groupby('Year').mean()\n", "pay_by_year" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "<matplotlib.axes._subplots.AxesSubplot at 0x1b755166ef0>" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEBCAYAAABv4kJxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAFCNJREFUeJzt3X+MXfV55/H3DMYxU9uQSdnQpCC2\ncfpoolZIcbKQiBRH2QQDraialVK1oSWkTZN65ZBSUZqaQhS2VVaE3bosSzcBkZ8lWyIalYCLqpbI\npdCEqalCmT54aIK3cRMRDw44EwL2zP5xz4TJdDzc75x77o+575eEuPfM95z7nMf2fO73nHPPHZmf\nn0eSpHaN9roASdJgMTgkSUUMDklSEYNDklTE4JAkFTE4JElF1vW6gG6YnJz0mmNJWoWtW7eOLF02\nFMEBsHXr1l6XIEkDZXJyctnlHqqSJBUxOCRJRQwOSVIRg0OSVMTgkCQVMTgkSUUMDklSkaH5HIck\n1bVnzx7uvvvuWtuYmZkBYHx8vNZ2LrzwQrZv315rG6tlcEhSFx06dAioHxy9ZHBIUpu2b99e+13+\nzp07Adi9e3cnSuoJg0Nawzy0oiYYHJJWtBYOraizDA5pDfPQiprg5biSpCIGhySpiMEhSSpicEiS\nihgckqQiBockqYjBIUkqYnBIkor4AUD1nbq3yfAWGVKzOh4cEXEicCtwJvAS4DrgUeA2YB54BNiR\nmXMRcQ1wEXAUuDwzvxwRW+qO7fQ+abB4iwypWU3MON4JHMrMSyLiZcA+4GFgV2beFxE3AxdHxBPA\necDZwOnA54HXAzfUGQvc2cA+qYvq3ibDW2RIzWoiOP4MuGPR86PAVuBL1fN7gLcBCdybmfPAgYhY\nFxGndmBs14OjX+5A6qEVSd3Q8eDIzCMAEbGJVoDsAq6vfukDPAOcDGwGDi1adWH5SM2xy5qamqqx\nVys7ePAgs7Oztbbx5JNPArBhw4ZadTS5n4Ni4c/CXnSG/eystdDPRk6OR8TptN7535SZn42I/77o\nx5uAw8DT1eOly+dqjl3WxMRE+Y60aWJigssuu6zWNjy80jljY2NAs3/mw8R+dtYg9XNycnLZ5R2/\nHDciXg7cC/xOZt5aLd4XEduqxxcAe4H7gfMjYjQizgBGM/PbHRgrSWpQEzOODwIvBa6OiKurZe8H\ndkfEemAKuCMzj0XEXuABWgG2oxp7BfCx1Y5tYH8kSYs0cY7j/bSCYqnzlhl7LXDtkmWP1R0rSWqO\nnxyXJBUxOCRJRQwOSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFTE4JElFDA5JUhGDQ5JU\nxOCQJBUxOCRJRQwOSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFTE4JElFDA5JUhGDQ5JU\nxOCQJBUxOCRJRQwOSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFTE4JElFDA5JUhGDQ5JU\nxOCQJBVZ19SGI+Js4COZuS0iXgv8BbC/+vH/zszPRcQ1wEXAUeDyzPxyRGwBbgPmgUeAHZk5VzK2\nqX2SJDU044iIK4GPAxuqRa8FbsjMbdV/n6vC5DzgbOAXgf9Vjb0B2JWZbwJGgItLxjaxP5KkFzQ1\n43gc+AXgU9XzrUBExMW0Zh2XA+cC92bmPHAgItZFxKnV2C9V690DvA3IgrF3NrRPkiQaCo7M/HxE\nnLlo0ZeBj2fmZET8HnANcBg4tGjMM8DJwEgVEIuXbS4Yu6ypqanV71AXzM7OAv1f5yCwl51lPztr\nLfSzsXMcS9yZmYcXHgN/DHwB2LRozCZaYTK3zLKnC8Yua2JiYrW1d8XY2BjQ/3UOAnvZWfazswap\nn5OTk8su79ZVVX8ZEf+pevwWYBK4Hzg/IkYj4gxgNDO/DeyLiG3V2AuAvYVjJUkN6taM433AjRHx\nHPBN4D2Z+XRE7AUeoBVgO6qxVwAfi4j1wBRwR2Yea3dsl/ZHkoZWY8GRmV8Hzqke/wPwxmXGXAtc\nu2TZY7SuoFr1WElSc/wAoCSpiMEhSSpicEiSihgckqQiBockqYjBIUkqYnBIkooYHJKkIgaHJKmI\nwSFJKmJwSJKKGBySpCIGhySpiMEhSSryosEREe+PiPFuFCNJ6n/tzDiOAV+MiNsj4q1NFyRJ6m8v\nGhyZeWNmvgH4Q+BdEfG1iNgVEZubL0+S1G9e9BsAI2IT8A7gV4FZ4MpqvS8Ab260OklS32nnq2P3\nAX8K/Epmfm1hYUSc1VhVkqS+1U5wRGYe+8GTiFMz88nMvKrBuiRJfaqd4Pi9iPivwInAjwCPAxON\nViVJ6lvtXFV1EXAG8Fngp4EDjVYkSepr7QTHU5n5LLA5MxMYa7gmSVIfayc4vhERlwLfi4gPA6c0\nW5IkqZ+1ExzvAb4E/DYwA/xSoxVJkvracU+OR8R/AH4LOALckJmzwP/oVmGSpP600ozjk8C/AiPA\nR7pTjiSp3610Oe76zLwRICL+qkv1SJL63Eozjvk2x0mShshKM46xiPiPtELjpOrxCEBm/ks3ipMk\n9Z+VguMYrfMcAEcXPZ4HfqbJoiS17N69m+np6Z7WsH//fgB27tzZ0zoAtmzZ0hd1DLvjBkdmntvN\nQiT9e9PT0+z7p329/fRUdaB63zf29bAI4HBvX14vWOly3L388HmOH8hMZxxSt5wCc9vmel1Fz43e\nV+9Uaz/M3qB/ZnB1Zm8rHaq6dFVblKQ+ND09zT8//DCn9biOk6r/H3744Z7V8M2a6690qOpxgOqk\n+H+hdXfcEeAVwI6arytJXXca8O7WNT5D7ZblDya1rZ3bqn8a2EPrhPi3eCEwpX+nHw4H9MuhAPBk\nrtamdoLje5n54Yi4NTMvq859SMuanp7msUf+gTM2HnvxwQ3ZPN96R/ns17/SsxoADhw5oaevLzWl\nneAYiYhTgY0RcRIw3s6GI+Js4COZuS0itgC30TrZ/giwIzPnIuIaWt/3cRS4PDO/3Imxbe470B/v\nkKF/3iV34h3yGRuPset1RzpU0eC67qGNvS5BakQ7wXEd8A5a3zt+APjMi60QEVcClwDfrRbdAOzK\nzPsi4mbg4oh4AjgPOBs4Hfg88Pq6Y4E729rzyvT0NPu++ihzY23lYWNGjrX+KCYfr3vaavVGZ2d6\n9tqSBkc7wbFh4Z5VwJ0R8fY21nkc+AXgU9XzrbRuzQ5wD/A2IIF7M3MeOBAR66qZTd2xRcEBMDc2\nzrOv+dnS1dacDY/e1esSJA2AlT7HcRFwDvDOiFgIgFHg7bTe8R9XZn4+Is5ctGik+qUP8AxwMrAZ\nOLRozMLyumOXNTU1tezy2dnZlXZl6MzOzh63V+2u743NXtCJfuoFdfppL39YnV6uNON4hNbVa98H\nnqiWzQHvXMXrLD7vsInWZ0Cfrh4vXV537LImJiaWXT42NlZtXtDqx/F61e76z3awnkHXiX7yVAcL\nGnB1+jk2NsZzHa5nkLXTy8nJyWWXH/fNYWY+kZm3AD8N3E/r2/++kpnLb2ll+yJiW/X4AmBvtc3z\nI2I0Is4ARjPz2x0YK0lqUDtHFX6d1rmKtwCfiIgPrOJ1rgA+FBEPAOuBO6oA2gs8QOvQ145OjF1F\nbZKkAu2cHL8EeGNmPh8R62m9+3/Rr5DNzK/TOkdCZj5G66qopWOuBa5dsqz2WElSc9qZcYxk5vMA\nmfkceJhQkoZZOzOOByLidlqHis4F/r7ZkiRJ/ey4M46I+BxAZn6A1of/NgG3Z+Zvdak2SVIfWmnG\ncerCg8z8AvCF5suRJPW7lYLjVRHxB8v9IDM/2FA9kqQ+t1JwzNK61YckST+wUnB8MzM/0bVKJEkD\nYaXLcVfzCXFJ0hq30i1HfrubhUiSBoM3MpUkFTE4JElFDA5JUhGDQ5JUxOCQJBUxOCRJRQwOSVKR\ndm6rLqlHZmZm4DCM3ud7PA7DzEkzva5COOOQJBVyxiH1sfHxcZ743hPMbZvrdSk9N3rfKOPj470u\nQxgckobEzMwM3wJuYb7XpfTcvwFzM6s/7GdwqKNmZmZ48pkTuO6hjb0upeeeeOYETq3xj1PqVwaH\npKEwPj7O6IEDvJuRXpfSc7cwzyk1DvsZHOqo8fFxxp5+nF2vO9LrUnruuoc2ssFj8lqDhj44ZmZm\nGJ09xIZH7+p1KT03OnuImZn1vS5DUp/zclxJUpGhn3GMj4/ztaee49nX/GyvS+m5DY/e5eWOkl6U\nMw5JUhGDQ5JUxOCQJBUxOCRJRQwOSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFenqvaoi\nYh/wnerp14A/Af4IOArcm5kfiohR4CbgLOD7wK9l5nREnNPu2G7ukyQNm64FR0RsAMjMbYuWPQy8\nHfgX4IsR8VrgTGBDZr6hCouPAhcDNxeMlSQ1pJszjrOAsYi4t3rda4GXZObjABHxl8BbgB8D9gBk\n5oMR8bqI2Nzu2C7ujyQNpW4GxyxwPfBx4NXAPcDhRT9/BvgJYDMvHM4COFYte7qdsRGxLjOPLn3x\nqamp5YuanS3djzVtdnb2uL1qd31PnL2gE/3UC+r0017+sDq97GZwPAZMZ+Y88FhEfAdY/OUPm2gF\nyVj1eMEordDY1M7Y5UIDYGJiYtmixsbG+OFMGm5jY2PH7VW76z/bwXoGXSf6yVMdLGjA1enn2NgY\nz3W4nkHWTi8nJyeXXd7NN4eX0ToHQUS8gtYv/e9GxKsiYgQ4H9gL3A9cWI07B/hqZj4NPNfO2C7u\njyQNpW7OOG4BbouIvwXmaQXJHPAZ4ARaV0r9fUR8BXhrRPwdMAK8q1r/vQVjJUkN6VpwZOZzwC8t\n86NzloyboxUSS9d/sN2xkqTmeB5TklTE4JAkFTE4JElFunrLEUmrcBhG7+vhe7yF66s39K4EoHUB\n/it7XIMAg0Pqa1u2bOl1Cezfvx+AV7/y1b0t5JX90Q8ZHGrAgSMncN1DG3v2+t95bgSAk9fP96wG\naPXhJ2tuY+fOnR2ppRM17N69u8eVqF8YHMDo7AwbHr2rpzWMPP89AOZPPKlnNYzOzgCn1dpGP7wj\n/H/VO+SXn9nbd8g/SX/0Q+q0oQ+OfvmH/YPDAa+q94u7ntNq98N3yNLaN/TB0Q+/6MBfdpIGx9AH\nh6Th8U3gFnp77utI9f/enQVs9eGUGusbHJKGQr8cln6yOiz946/u3Tm4U6jXD4ND0lDwsHTn+Mlx\nSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFTE4JElFDA5JUhGDQ5JUxOCQJBUxOCRJRQwO\nSVIRg0OSVMTgkCQVMTgkSUUMDklSEYNDklTE4JAkFTE4JElFDA5JUhGDQ5JUxOCQJBUxOCRJRQwO\nSVKRdb0uoK6IGAVuAs4Cvg/8WmZO97YqSVq71sKM4+eBDZn5BuAq4KM9rkeS1rSBn3EA5wJ7ADLz\nwYh4XbcL2LNnD3fffXetbezfvx+AnTt3rnobF154Idu3b69VRz+o289O9BLWRj/75e8m2M8Fa6Gf\nayE4NgPfWfT8WESsy8yjiwdNTU01VsDBgweZnZ2ttY2NGzcC1NrOwYMHG93Pbqnbz070cqGOQe9n\nv/zdXKjFfq6Nfo7Mz8/35IU7JSJuAB7MzP9bPf/XzPzxxWMmJyfnt27d2pP6JGlQTU5OsnXr1pGl\ny9fCOY77gQsBIuIc4Ku9LUeS1ra1cKjqTuCtEfF3wAjwrh7XI0lr2sAHR2bOAe/tdR2SNCzWwqEq\nSVIXGRySpCIGhySpiMEhSSpicEiSigz8VVXtmpyc7HUJkrQmDPwnxyVJ3eWhKklSEYNDklRkaM5x\n9EpEnAjcCpwJvAS4DngUuA2YBx4BdlSfgCcitgB/npk/tWQ7lwOnZeZVXSu+z9TtZUScUa2/jtbt\nad6TmdndvegfHejnacBngPXAvwGXZma9W74OsA7+W/8Z4DOZeXrXii/kjKN57wQOZeabgAuAG4Eb\ngF3VshHgYoCIuAS4HfjRhZUj4qSI+DSwo9uF96FavQQ+DNyYmduAPwD+sHul96W6/bwK+EQ19lHg\nN7pYez+q208i4nTgCuDELtZdzOBo3p8BVy96fhTYCnypen4P8J+rx08B5y1ZfwPwSeC/NVjjoKjb\nyyuAL1aP1wHPNlPmwKjbzw8An66+vvl04FvNlToQavUzIjYANwO/2WyZ9RkcDcvMI5n5TERsAu4A\ndgEjmblwOdszwMnV2Lsy87tL1n8qM+/tatF9qgO9/HZmPh8RAVwPfKiL5fedDvRzHjiB1iGYN9P6\nioOhVbeftGYo12fmN7pW9CoZHF1QTT//BvhUZn4WmFv0403A4Z4UNoDq9jIi3gz8OXDJMJ/fWFC3\nn5n5fGa+BngPrZnxUFttPyPiFcCbgGsi4j5gPCJub7jcVTM4GhYRLwfuBX4nM2+tFu+LiG3V4wuA\nvb2obdDU7WUVGn8EbM/Mh5qsdRB0oJ83VT2F1rvpueONHQZ1+pmZBzMzMnNbdQ5uJjN/semaV8ur\nqpr3QeClwNURsXD88/3A7ohYD0zRmtbqxdXt5f+kdQXQJ1pHq8jMHOYTunX7uRu4OSJ+n1Zo9P2x\n+YYNzb91PzkuSSrioSpJUhGDQ5JUxOCQJBUxOCRJRQwOSVIRg0NqSETcERFXLXq+MSIyIs7qZV1S\nXQaH1Jz3Au+LiNdUz68H/k9m/mMPa5Jq83McUoMi4ueA363+2wW8DfgpWh+eGwEOAZcBR4A/oXWz\nwJcB92Tm1RFxW/X8ZcBFmflUt/dBWsoZh9SgzPwL4J9pfSfDpdUN7z5G63sZtgF3A1fSCowHM/N8\n4FzgfYs289eZ+UZDQ/3CW45IzfskMLborqcTwE3VbU9OBB4DZoDXV/d+eprWFwEtGPqbMaq/OOOQ\nui+BX6lmHFfS+o6QS4HDmfnLwEeBsYgYqcYP9c0D1X+ccUjd9z7gkxFxQvX83bRugHd7RLwJ+C6w\nH3hFj+qTVuTJcUlSEQ9VSZKKGBySpCIGhySpiMEhSSpicEiSihgckqQiBockqYjBIUkq8v8BXgyX\n5FTFelEAAAAASUVORK5CYII=\n", "text/plain": [ "<matplotlib.figure.Figure at 0x1b754f41748>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "sns.boxplot(x='Year', y='TotalPay', data=salaries, showfliers=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I can notice the upward trend in the TotalPay in years 2011-2013, but in 2014 the TotalPay mean slightly decreased." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Checking how the pays changed over the years in groups of people" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th></th>\n", " <th>TotalPay</th>\n", " </tr>\n", " <tr>\n", " <th>GeneralJobTitle</th>\n", " <th>Year</th>\n", " <th></th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">account</th>\n", " <th>2011</th>\n", " <td>56177.342558</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>63186.929962</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>66857.307417</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>63641.837870</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">airport</th>\n", " <th>2011</th>\n", " <td>92273.242673</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>94104.593235</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>98160.944660</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>94067.513077</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">analyst</th>\n", " <th>2011</th>\n", " <td>79492.329936</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>81830.453873</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>87654.166634</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>83168.412823</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">architect</th>\n", " <th>2011</th>\n", " <td>96071.390972</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>113270.148969</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>125333.457143</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>124302.629417</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">assistant</th>\n", " <th>2011</th>\n", " <td>43198.079421</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>40129.112925</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>40410.167382</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>39600.355957</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">attorney</th>\n", " <th>2011</th>\n", " <td>126626.434486</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>133973.170860</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>144234.833244</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>138208.046967</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">automotive</th>\n", " <th>2011</th>\n", " <td>78395.460507</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>81830.392473</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>84965.658302</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>83083.261233</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">clerk</th>\n", " <th>2011</th>\n", " <td>40999.051714</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>42632.039917</td>\n", " </tr>\n", " <tr>\n", " <th>...</th>\n", " <th>...</th>\n", " <td>...</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">medical</th>\n", " <th>2013</th>\n", " <td>79212.934761</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>77210.463099</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">other</th>\n", " <th>2011</th>\n", " <td>66222.015069</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>75053.523929</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>80126.012794</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>78234.947040</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">police</th>\n", " <th>2011</th>\n", " <td>109707.702262</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>110355.916599</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>119961.317699</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>113887.308085</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">porter</th>\n", " <th>2011</th>\n", " <td>40985.904961</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>42379.496088</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>46010.055586</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>45553.476173</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">public works</th>\n", " <th>2011</th>\n", " <td>36133.666306</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>37266.939199</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>35909.203407</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>34340.963239</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">recreation leader</th>\n", " <th>2011</th>\n", " <td>10438.966533</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>11370.921782</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>12207.075927</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>12449.075208</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">social worker</th>\n", " <th>2011</th>\n", " <td>60714.044061</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>61365.984920</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>63954.010630</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>62010.384171</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"4\" valign=\"top\">transit</th>\n", " <th>2011</th>\n", " <td>70427.436251</td>\n", " </tr>\n", " <tr>\n", " <th>2012</th>\n", " <td>74160.880798</td>\n", " </tr>\n", " <tr>\n", " <th>2013</th>\n", " <td>77607.464635</td>\n", " </tr>\n", " <tr>\n", " <th>2014</th>\n", " <td>71134.737660</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "<p>104 rows × 1 columns</p>\n", "</div>" ], "text/plain": [ " TotalPay\n", "GeneralJobTitle Year \n", "account 2011 56177.342558\n", " 2012 63186.929962\n", " 2013 66857.307417\n", " 2014 63641.837870\n", "airport 2011 92273.242673\n", " 2012 94104.593235\n", " 2013 98160.944660\n", " 2014 94067.513077\n", "analyst 2011 79492.329936\n", " 2012 81830.453873\n", " 2013 87654.166634\n", " 2014 83168.412823\n", "architect 2011 96071.390972\n", " 2012 113270.148969\n", " 2013 125333.457143\n", " 2014 124302.629417\n", "assistant 2011 43198.079421\n", " 2012 40129.112925\n", " 2013 40410.167382\n", " 2014 39600.355957\n", "attorney 2011 126626.434486\n", " 2012 133973.170860\n", " 2013 144234.833244\n", " 2014 138208.046967\n", "automotive 2011 78395.460507\n", " 2012 81830.392473\n", " 2013 84965.658302\n", " 2014 83083.261233\n", "clerk 2011 40999.051714\n", " 2012 42632.039917\n", "... ...\n", "medical 2013 79212.934761\n", " 2014 77210.463099\n", "other 2011 66222.015069\n", " 2012 75053.523929\n", " 2013 80126.012794\n", " 2014 78234.947040\n", "police 2011 109707.702262\n", " 2012 110355.916599\n", " 2013 119961.317699\n", " 2014 113887.308085\n", "porter 2011 40985.904961\n", " 2012 42379.496088\n", " 2013 46010.055586\n", " 2014 45553.476173\n", "public works 2011 36133.666306\n", " 2012 37266.939199\n", " 2013 35909.203407\n", " 2014 34340.963239\n", "recreation leader 2011 10438.966533\n", " 2012 11370.921782\n", " 2013 12207.075927\n", " 2014 12449.075208\n", "social worker 2011 60714.044061\n", " 2012 61365.984920\n", " 2013 63954.010630\n", " 2014 62010.384171\n", "transit 2011 70427.436251\n", " 2012 74160.880798\n", " 2013 77607.464635\n", " 2014 71134.737660\n", "\n", "[104 rows x 1 columns]" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries_jobs_years=salaries[['GeneralJobTitle', 'TotalPay', 'Year']].groupby(['GeneralJobTitle', 'Year']).mean()\n", "salaries_jobs_years" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "name": "2011", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 56177.342558139564, 92273.2426732673, 79492.32993576021, 96071.3909722222, 43198.07942143331, 126626.43448616585, 78395.46050724639, 40999.051714459914, 68546.73194782622, 40521.552776381934, 81251.4860434056, 142172.54780640136, 42686.877323943656, 53697.759342105266, 79013.0795906433, 19500.85446393766, 34683.7253180212, 115523.68841196792, 69088.4893665589, 66222.01506878574, 109707.70226150741, 40985.90496062993, 36133.66630560935, 10438.966532663315, 60714.0440606705, 70427.43625082301 ] }, { "name": "2012", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 63186.92996240612, 94104.59323529412, 81830.45387337073, 113270.14896907205, 40129.112925414505, 133973.17086021506, 81830.39247334749, 42632.03991691398, 64781.44596685088, 43639.09918787882, 84647.20845991567, 148795.11949920497, 45434.13726027398, 51507.85037617552, 86891.14136308804, 19211.737847358123, 39617.340386740296, 120077.08837209288, 74049.6819703387, 75053.52392894666, 110355.91659884396, 42379.49608808286, 37266.93919866444, 11370.92178176795, 61365.98491978606, 74160.88079762689 ] }, { "name": "2013", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 66857.30741697413, 98160.94466019416, 87654.16663392863, 125333.45714285708, 40410.16738194091, 144234.8332439679, 84965.65830227743, 48565.42210256415, 71246.31403571427, 49467.61480769224, 90204.47242597395, 158751.63883199994, 49410.07479452056, 56403.07606811142, 92613.47836024873, 19129.360374999982, 43176.11009469695, 127630.41192307706, 79212.93476139763, 80126.01279387012, 119961.3176992791, 46010.05558583111, 35909.20340694003, 12207.07592692829, 63954.010629515025, 77607.46463486848 ] }, { "name": "2014", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 63641.83786971834, 94067.51307692307, 83168.41282264778, 124302.62941747568, 39600.35595712471, 138208.04696658088, 83083.2612326044, 45449.74066744737, 62198.70878378374, 48750.94450248754, 87231.11888122212, 144454.13814253244, 47433.87616438354, 54012.492067901265, 88374.48909538469, 18247.304958263805, 46201.31738241313, 123976.42938106811, 77210.46309862063, 78234.9470399353, 113887.30808534652, 45553.476172506766, 34340.96323903821, 12449.075208070622, 62010.38417070799, 71134.7376604809 ] } ], "layout": { "barmode": "group" } }, "text/html": [ "<div id=\"7ca6a7d0-c0af-4f76-ae7e-523ebf5bd7f9\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"7ca6a7d0-c0af-4f76-ae7e-523ebf5bd7f9\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [56177.342558139564, 92273.2426732673, 79492.32993576021, 96071.3909722222, 43198.07942143331, 126626.43448616585, 78395.46050724639, 40999.051714459914, 68546.73194782622, 40521.552776381934, 81251.4860434056, 142172.54780640136, 42686.877323943656, 53697.759342105266, 79013.0795906433, 19500.85446393766, 34683.7253180212, 115523.68841196792, 69088.4893665589, 66222.01506878574, 109707.70226150741, 40985.90496062993, 36133.66630560935, 10438.966532663315, 60714.0440606705, 70427.43625082301], \"name\": \"2011\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [63186.92996240612, 94104.59323529412, 81830.45387337073, 113270.14896907205, 40129.112925414505, 133973.17086021506, 81830.39247334749, 42632.03991691398, 64781.44596685088, 43639.09918787882, 84647.20845991567, 148795.11949920497, 45434.13726027398, 51507.85037617552, 86891.14136308804, 19211.737847358123, 39617.340386740296, 120077.08837209288, 74049.6819703387, 75053.52392894666, 110355.91659884396, 42379.49608808286, 37266.93919866444, 11370.92178176795, 61365.98491978606, 74160.88079762689], \"name\": \"2012\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [66857.30741697413, 98160.94466019416, 87654.16663392863, 125333.45714285708, 40410.16738194091, 144234.8332439679, 84965.65830227743, 48565.42210256415, 71246.31403571427, 49467.61480769224, 90204.47242597395, 158751.63883199994, 49410.07479452056, 56403.07606811142, 92613.47836024873, 19129.360374999982, 43176.11009469695, 127630.41192307706, 79212.93476139763, 80126.01279387012, 119961.3176992791, 46010.05558583111, 35909.20340694003, 12207.07592692829, 63954.010629515025, 77607.46463486848], \"name\": \"2013\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [63641.83786971834, 94067.51307692307, 83168.41282264778, 124302.62941747568, 39600.35595712471, 138208.04696658088, 83083.2612326044, 45449.74066744737, 62198.70878378374, 48750.94450248754, 87231.11888122212, 144454.13814253244, 47433.87616438354, 54012.492067901265, 88374.48909538469, 18247.304958263805, 46201.31738241313, 123976.42938106811, 77210.46309862063, 78234.9470399353, 113887.30808534652, 45553.476172506766, 34340.96323903821, 12449.075208070622, 62010.38417070799, 71134.7376604809], \"name\": \"2014\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ], "text/vnd.plotly.v1+html": [ "<div id=\"7ca6a7d0-c0af-4f76-ae7e-523ebf5bd7f9\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"7ca6a7d0-c0af-4f76-ae7e-523ebf5bd7f9\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [56177.342558139564, 92273.2426732673, 79492.32993576021, 96071.3909722222, 43198.07942143331, 126626.43448616585, 78395.46050724639, 40999.051714459914, 68546.73194782622, 40521.552776381934, 81251.4860434056, 142172.54780640136, 42686.877323943656, 53697.759342105266, 79013.0795906433, 19500.85446393766, 34683.7253180212, 115523.68841196792, 69088.4893665589, 66222.01506878574, 109707.70226150741, 40985.90496062993, 36133.66630560935, 10438.966532663315, 60714.0440606705, 70427.43625082301], \"name\": \"2011\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [63186.92996240612, 94104.59323529412, 81830.45387337073, 113270.14896907205, 40129.112925414505, 133973.17086021506, 81830.39247334749, 42632.03991691398, 64781.44596685088, 43639.09918787882, 84647.20845991567, 148795.11949920497, 45434.13726027398, 51507.85037617552, 86891.14136308804, 19211.737847358123, 39617.340386740296, 120077.08837209288, 74049.6819703387, 75053.52392894666, 110355.91659884396, 42379.49608808286, 37266.93919866444, 11370.92178176795, 61365.98491978606, 74160.88079762689], \"name\": \"2012\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [66857.30741697413, 98160.94466019416, 87654.16663392863, 125333.45714285708, 40410.16738194091, 144234.8332439679, 84965.65830227743, 48565.42210256415, 71246.31403571427, 49467.61480769224, 90204.47242597395, 158751.63883199994, 49410.07479452056, 56403.07606811142, 92613.47836024873, 19129.360374999982, 43176.11009469695, 127630.41192307706, 79212.93476139763, 80126.01279387012, 119961.3176992791, 46010.05558583111, 35909.20340694003, 12207.07592692829, 63954.010629515025, 77607.46463486848], \"name\": \"2013\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [63641.83786971834, 94067.51307692307, 83168.41282264778, 124302.62941747568, 39600.35595712471, 138208.04696658088, 83083.2612326044, 45449.74066744737, 62198.70878378374, 48750.94450248754, 87231.11888122212, 144454.13814253244, 47433.87616438354, 54012.492067901265, 88374.48909538469, 18247.304958263805, 46201.31738241313, 123976.42938106811, 77210.46309862063, 78234.9470399353, 113887.30808534652, 45553.476172506766, 34340.96323903821, 12449.075208070622, 62010.38417070799, 71134.7376604809], \"name\": \"2014\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "salaries_jobs_by_year=salaries[['GeneralJobTitle', 'TotalPay', 'Year']].groupby(['Year', 'GeneralJobTitle']).mean()\n", "job_names=salaries_jobs_by_year.xs(2011, level='Year').index.values.tolist()\n", "\n", "trace1 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_by_year.xs(2011, level='Year')['TotalPay'],\n", " name='2011'\n", ")\n", "trace2 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_by_year.xs(2012, level='Year')['TotalPay'],\n", " name='2012'\n", ")\n", "trace3 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_by_year.xs(2013, level='Year')['TotalPay'],\n", " name='2013'\n", ")\n", "trace4 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_by_year.xs(2014, level='Year')['TotalPay'],\n", " name='2014'\n", ")\n", "\n", "data = [trace1, trace2, trace3, trace4]\n", "layout = go.Layout(\n", " barmode='group'\n", ")\n", "\n", "fig = go.Figure(data=data, layout=layout)\n", "cf.iplot(fig, filename='grouped-bar')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now I made sure that the Total Pay was building up in almost every group until 2014, when it dropped a little bit. <br>\n", "The job groups which were affected the most by whatever happened in 2014 are: Court and Firefighters. <br>\n", "We can also notice, that only the Library and Recreation Leader group maintained it's upward trend. <br>\n", "The jobs which remained almost unaffected were: Assistants and Guards." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Looking at how base pay, overtime pay and benefits are allocated between job groups" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>BasePay</th>\n", " <th>OvertimePay</th>\n", " <th>Benefits</th>\n", " </tr>\n", " <tr>\n", " <th>GeneralJobTitle</th>\n", " <th></th>\n", " <th></th>\n", " <th></th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>account</th>\n", " <td>61613.504421</td>\n", " <td>287.140250</td>\n", " <td>25708.762000</td>\n", " </tr>\n", " <tr>\n", " <th>airport</th>\n", " <td>84780.208073</td>\n", " <td>6566.248195</td>\n", " <td>30316.527111</td>\n", " </tr>\n", " <tr>\n", " <th>analyst</th>\n", " <td>82264.012407</td>\n", " <td>166.780416</td>\n", " <td>29064.369347</td>\n", " </tr>\n", " <tr>\n", " <th>architect</th>\n", " <td>114872.575135</td>\n", " <td>73.958757</td>\n", " <td>35758.150797</td>\n", " </tr>\n", " <tr>\n", " <th>assistant</th>\n", " <td>37802.116122</td>\n", " <td>1831.490932</td>\n", " <td>16931.972103</td>\n", " </tr>\n", " <tr>\n", " <th>attorney</th>\n", " <td>132583.724982</td>\n", " <td>54.810232</td>\n", " <td>36687.825837</td>\n", " </tr>\n", " <tr>\n", " <th>automotive</th>\n", " <td>68174.963729</td>\n", " <td>9124.607881</td>\n", " <td>27314.619298</td>\n", " </tr>\n", " <tr>\n", " <th>clerk</th>\n", " <td>42546.542254</td>\n", " <td>1090.232306</td>\n", " <td>20997.084503</td>\n", " </tr>\n", " <tr>\n", " <th>court</th>\n", " <td>64585.883368</td>\n", " <td>199.010068</td>\n", " <td>25710.071452</td>\n", " </tr>\n", " <tr>\n", " <th>custodian</th>\n", " <td>41832.585984</td>\n", " <td>1526.100917</td>\n", " <td>22156.731947</td>\n", " </tr>\n", " <tr>\n", " <th>engineer</th>\n", " <td>80059.337953</td>\n", " <td>2414.459648</td>\n", " <td>27963.838882</td>\n", " </tr>\n", " <tr>\n", " <th>fire</th>\n", " <td>107372.900930</td>\n", " <td>25623.372684</td>\n", " <td>34720.246376</td>\n", " </tr>\n", " <tr>\n", " <th>food service</th>\n", " <td>42747.673862</td>\n", " <td>1746.415862</td>\n", " <td>23226.094070</td>\n", " </tr>\n", " <tr>\n", " <th>gardener</th>\n", " <td>50754.503024</td>\n", " <td>2010.765047</td>\n", " <td>23284.807426</td>\n", " </tr>\n", " <tr>\n", " <th>general laborer</th>\n", " <td>75538.164022</td>\n", " <td>6700.997761</td>\n", " <td>27975.448840</td>\n", " </tr>\n", " <tr>\n", " <th>guard</th>\n", " <td>16689.208360</td>\n", " <td>1791.476922</td>\n", " <td>9832.407203</td>\n", " </tr>\n", " <tr>\n", " <th>library</th>\n", " <td>39851.052761</td>\n", " <td>1.457051</td>\n", " <td>19297.451219</td>\n", " </tr>\n", " <tr>\n", " <th>manager</th>\n", " <td>118890.980502</td>\n", " <td>37.074164</td>\n", " <td>39049.842377</td>\n", " </tr>\n", " <tr>\n", " <th>medical</th>\n", " <td>68053.483246</td>\n", " <td>2123.112259</td>\n", " <td>23100.226239</td>\n", " </tr>\n", " <tr>\n", " <th>other</th>\n", " <td>70091.195464</td>\n", " <td>2890.044988</td>\n", " <td>26482.241173</td>\n", " </tr>\n", " <tr>\n", " <th>police</th>\n", " <td>93186.880378</td>\n", " <td>11636.756749</td>\n", " <td>30192.136074</td>\n", " </tr>\n", " <tr>\n", " <th>porter</th>\n", " <td>38968.082877</td>\n", " <td>3260.083322</td>\n", " <td>20179.401089</td>\n", " </tr>\n", " <tr>\n", " <th>public works</th>\n", " <td>30809.095124</td>\n", " <td>3133.818901</td>\n", " <td>14508.889048</td>\n", " </tr>\n", " <tr>\n", " <th>recreation leader</th>\n", " <td>11374.130731</td>\n", " <td>2.426723</td>\n", " <td>8759.502923</td>\n", " </tr>\n", " <tr>\n", " <th>social worker</th>\n", " <td>57299.132002</td>\n", " <td>2809.181354</td>\n", " <td>24439.990860</td>\n", " </tr>\n", " <tr>\n", " <th>transit</th>\n", " <td>57626.474168</td>\n", " <td>12847.276152</td>\n", " <td>27828.666833</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " BasePay OvertimePay Benefits\n", "GeneralJobTitle \n", "account 61613.504421 287.140250 25708.762000\n", "airport 84780.208073 6566.248195 30316.527111\n", "analyst 82264.012407 166.780416 29064.369347\n", "architect 114872.575135 73.958757 35758.150797\n", "assistant 37802.116122 1831.490932 16931.972103\n", "attorney 132583.724982 54.810232 36687.825837\n", "automotive 68174.963729 9124.607881 27314.619298\n", "clerk 42546.542254 1090.232306 20997.084503\n", "court 64585.883368 199.010068 25710.071452\n", "custodian 41832.585984 1526.100917 22156.731947\n", "engineer 80059.337953 2414.459648 27963.838882\n", "fire 107372.900930 25623.372684 34720.246376\n", "food service 42747.673862 1746.415862 23226.094070\n", "gardener 50754.503024 2010.765047 23284.807426\n", "general laborer 75538.164022 6700.997761 27975.448840\n", "guard 16689.208360 1791.476922 9832.407203\n", "library 39851.052761 1.457051 19297.451219\n", "manager 118890.980502 37.074164 39049.842377\n", "medical 68053.483246 2123.112259 23100.226239\n", "other 70091.195464 2890.044988 26482.241173\n", "police 93186.880378 11636.756749 30192.136074\n", "porter 38968.082877 3260.083322 20179.401089\n", "public works 30809.095124 3133.818901 14508.889048\n", "recreation leader 11374.130731 2.426723 8759.502923\n", "social worker 57299.132002 2809.181354 24439.990860\n", "transit 57626.474168 12847.276152 27828.666833" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries_jobs_benefits=salaries[['GeneralJobTitle', 'BasePay', 'OvertimePay', 'Benefits']].groupby(['GeneralJobTitle']).mean()\n", "salaries_jobs_benefits" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "name": "Base Pay", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 61613.50442071801, 84780.20807317077, 82264.01240702174, 114872.57513513515, 37802.11612181428, 132583.72498170714, 68174.96372926715, 42546.54225424753, 64585.88336758029, 41832.58598439947, 80059.33795344448, 107372.90092991511, 42747.67386206894, 50754.50302362204, 75538.16402207575, 16689.208360055003, 39851.05276105357, 118890.98050200132, 68053.48324613085, 70091.19546367193, 93186.88037768792, 38968.08287707646, 30809.09512413508, 11374.130730668434, 57299.13200154768, 57626.47416807743 ] }, { "name": "Overtime Pay", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 287.1402498864152, 6566.24819512195, 166.78041580041574, 73.95875675675676, 1831.4909315654986, 54.81023170731708, 9124.607881219921, 1090.232305825244, 199.01006849315067, 1526.1009173166924, 2414.45964822806, 25623.372684025027, 1746.4158620689648, 2010.7650472440937, 6700.997761194034, 1791.4769216674306, 1.4570507996237065, 37.07416384354789, 2123.1122593411055, 2890.0449882478647, 11636.756748889124, 3260.083322259147, 3133.8189010988967, 2.4267234600262126, 2809.181353723061, 12847.27615210895 ] }, { "name": "Benefits", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 25708.761999550567, 30316.52711096509, 29064.36934677926, 35758.150796512986, 16931.972102684962, 36687.82583657839, 27314.61929752882, 20997.084502678703, 25710.071451580254, 22156.73194691025, 27963.83888246543, 34720.24637571046, 23226.09406965497, 23284.807425981882, 27975.448840278812, 9832.407202729017, 19297.451219463772, 39049.84237729196, 23100.226238798936, 26482.24117326679, 30192.136074445927, 20179.401088542254, 14508.88904826899, 8759.50292262364, 24439.990859984708, 27828.66683288528 ] } ], "layout": { "barmode": "group" } }, "text/html": [ "<div id=\"b5ddd952-99a9-48d7-8127-7dcc96bf7a19\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"b5ddd952-99a9-48d7-8127-7dcc96bf7a19\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [61613.50442071801, 84780.20807317077, 82264.01240702174, 114872.57513513515, 37802.11612181428, 132583.72498170714, 68174.96372926715, 42546.54225424753, 64585.88336758029, 41832.58598439947, 80059.33795344448, 107372.90092991511, 42747.67386206894, 50754.50302362204, 75538.16402207575, 16689.208360055003, 39851.05276105357, 118890.98050200132, 68053.48324613085, 70091.19546367193, 93186.88037768792, 38968.08287707646, 30809.09512413508, 11374.130730668434, 57299.13200154768, 57626.47416807743], \"name\": \"Base Pay\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [287.1402498864152, 6566.24819512195, 166.78041580041574, 73.95875675675676, 1831.4909315654986, 54.81023170731708, 9124.607881219921, 1090.232305825244, 199.01006849315067, 1526.1009173166924, 2414.45964822806, 25623.372684025027, 1746.4158620689648, 2010.7650472440937, 6700.997761194034, 1791.4769216674306, 1.4570507996237065, 37.07416384354789, 2123.1122593411055, 2890.0449882478647, 11636.756748889124, 3260.083322259147, 3133.8189010988967, 2.4267234600262126, 2809.181353723061, 12847.27615210895], \"name\": \"Overtime Pay\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [25708.761999550567, 30316.52711096509, 29064.36934677926, 35758.150796512986, 16931.972102684962, 36687.82583657839, 27314.61929752882, 20997.084502678703, 25710.071451580254, 22156.73194691025, 27963.83888246543, 34720.24637571046, 23226.09406965497, 23284.807425981882, 27975.448840278812, 9832.407202729017, 19297.451219463772, 39049.84237729196, 23100.226238798936, 26482.24117326679, 30192.136074445927, 20179.401088542254, 14508.88904826899, 8759.50292262364, 24439.990859984708, 27828.66683288528], \"name\": \"Benefits\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ], "text/vnd.plotly.v1+html": [ "<div id=\"b5ddd952-99a9-48d7-8127-7dcc96bf7a19\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"b5ddd952-99a9-48d7-8127-7dcc96bf7a19\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [61613.50442071801, 84780.20807317077, 82264.01240702174, 114872.57513513515, 37802.11612181428, 132583.72498170714, 68174.96372926715, 42546.54225424753, 64585.88336758029, 41832.58598439947, 80059.33795344448, 107372.90092991511, 42747.67386206894, 50754.50302362204, 75538.16402207575, 16689.208360055003, 39851.05276105357, 118890.98050200132, 68053.48324613085, 70091.19546367193, 93186.88037768792, 38968.08287707646, 30809.09512413508, 11374.130730668434, 57299.13200154768, 57626.47416807743], \"name\": \"Base Pay\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [287.1402498864152, 6566.24819512195, 166.78041580041574, 73.95875675675676, 1831.4909315654986, 54.81023170731708, 9124.607881219921, 1090.232305825244, 199.01006849315067, 1526.1009173166924, 2414.45964822806, 25623.372684025027, 1746.4158620689648, 2010.7650472440937, 6700.997761194034, 1791.4769216674306, 1.4570507996237065, 37.07416384354789, 2123.1122593411055, 2890.0449882478647, 11636.756748889124, 3260.083322259147, 3133.8189010988967, 2.4267234600262126, 2809.181353723061, 12847.27615210895], \"name\": \"Overtime Pay\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [25708.761999550567, 30316.52711096509, 29064.36934677926, 35758.150796512986, 16931.972102684962, 36687.82583657839, 27314.61929752882, 20997.084502678703, 25710.071451580254, 22156.73194691025, 27963.83888246543, 34720.24637571046, 23226.09406965497, 23284.807425981882, 27975.448840278812, 9832.407202729017, 19297.451219463772, 39049.84237729196, 23100.226238798936, 26482.24117326679, 30192.136074445927, 20179.401088542254, 14508.88904826899, 8759.50292262364, 24439.990859984708, 27828.66683288528], \"name\": \"Benefits\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "trace1 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_benefits['BasePay'],\n", " name='Base Pay'\n", ")\n", "trace2 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_benefits['OvertimePay'],\n", " name='Overtime Pay'\n", ")\n", "trace3 = go.Bar(\n", " x=job_names,\n", " y=salaries_jobs_benefits['Benefits'],\n", " name='Benefits'\n", ")\n", "\n", "data = [trace1, trace2, trace3]\n", "layout = go.Layout(\n", " barmode='group'\n", ")\n", "\n", "fig = go.Figure(data=data, layout=layout)\n", "cf.iplot(fig, filename='grouped-bar')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The most important insights from these plots are:<br>\n", "-Firefighters, Policeman and Transit are groups which work overtime the most.<br>\n", "-Attorney, Manager, Architect and Firefighters are gropus which earn the most Base Pay.<br>\n", "-The groups which earn the least are Guards and Recreation Leader.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Checking if there is any evidence of pay discrimination based on gender" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Creating gender column with some help of gender guesser library" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import gender_guesser.detector as gender\n", "d = gender.Detector(case_sensitive=False)\n", "salaries['Gender']=salaries['EmployeeName'].apply(lambda x: x.split()[0]).apply(lambda x: d.get_gender(x.lower()))" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": true }, "outputs": [], "source": [ "salaries_job_gender=salaries[(salaries['Gender']=='male') | (salaries['Gender']=='female')][['GeneralJobTitle', 'TotalPay', 'Gender']].groupby(['GeneralJobTitle', 'Gender']).mean()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Taking a look at data and plotting it" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th></th>\n", " <th>TotalPay</th>\n", " </tr>\n", " <tr>\n", " <th>GeneralJobTitle</th>\n", " <th>Gender</th>\n", " <th></th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">account</th>\n", " <th>female</th>\n", " <td>62720.881249</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>61554.983552</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">airport</th>\n", " <th>female</th>\n", " <td>89959.928741</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>97818.146010</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">analyst</th>\n", " <th>female</th>\n", " <td>81847.317095</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>84359.228566</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">architect</th>\n", " <th>female</th>\n", " <td>113353.711455</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>114559.383938</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">assistant</th>\n", " <th>female</th>\n", " <td>45963.404888</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>37698.158883</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">attorney</th>\n", " <th>female</th>\n", " <td>134018.130759</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>138007.626231</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">automotive</th>\n", " <th>female</th>\n", " <td>72252.454815</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>81672.705192</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">clerk</th>\n", " <th>female</th>\n", " <td>47233.568245</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>37452.355623</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">court</th>\n", " <th>female</th>\n", " <td>69189.877951</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>65668.484733</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">custodian</th>\n", " <th>female</th>\n", " <td>45257.969013</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>45336.296070</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">engineer</th>\n", " <th>female</th>\n", " <td>71264.697426</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>89319.615244</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">fire</th>\n", " <th>female</th>\n", " <td>139360.142473</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>149907.709934</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">food service</th>\n", " <th>female</th>\n", " <td>39156.752889</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>54430.824388</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">gardener</th>\n", " <th>female</th>\n", " <td>50016.638519</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>55155.304686</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">general laborer</th>\n", " <th>female</th>\n", " <td>80573.823189</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>87667.235885</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">guard</th>\n", " <th>female</th>\n", " <td>16436.266490</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>23580.319757</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">library</th>\n", " <th>female</th>\n", " <td>46529.025088</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>36206.884371</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">manager</th>\n", " <th>female</th>\n", " <td>121272.730786</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>122426.874990</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">medical</th>\n", " <th>female</th>\n", " <td>73540.648174</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>80181.323528</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">other</th>\n", " <th>female</th>\n", " <td>70579.012167</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>79993.082152</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">police</th>\n", " <th>female</th>\n", " <td>95458.979664</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>120337.144226</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">porter</th>\n", " <th>female</th>\n", " <td>47195.294830</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>44687.008480</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">public works</th>\n", " <th>female</th>\n", " <td>41433.817635</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>32639.754413</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">recreation leader</th>\n", " <th>female</th>\n", " <td>11693.305312</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>12549.577932</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">social worker</th>\n", " <th>female</th>\n", " <td>63067.066715</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>62496.266117</td>\n", " </tr>\n", " <tr>\n", " <th rowspan=\"2\" valign=\"top\">transit</th>\n", " <th>female</th>\n", " <td>63954.873872</td>\n", " </tr>\n", " <tr>\n", " <th>male</th>\n", " <td>76903.350026</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " TotalPay\n", "GeneralJobTitle Gender \n", "account female 62720.881249\n", " male 61554.983552\n", "airport female 89959.928741\n", " male 97818.146010\n", "analyst female 81847.317095\n", " male 84359.228566\n", "architect female 113353.711455\n", " male 114559.383938\n", "assistant female 45963.404888\n", " male 37698.158883\n", "attorney female 134018.130759\n", " male 138007.626231\n", "automotive female 72252.454815\n", " male 81672.705192\n", "clerk female 47233.568245\n", " male 37452.355623\n", "court female 69189.877951\n", " male 65668.484733\n", "custodian female 45257.969013\n", " male 45336.296070\n", "engineer female 71264.697426\n", " male 89319.615244\n", "fire female 139360.142473\n", " male 149907.709934\n", "food service female 39156.752889\n", " male 54430.824388\n", "gardener female 50016.638519\n", " male 55155.304686\n", "general laborer female 80573.823189\n", " male 87667.235885\n", "guard female 16436.266490\n", " male 23580.319757\n", "library female 46529.025088\n", " male 36206.884371\n", "manager female 121272.730786\n", " male 122426.874990\n", "medical female 73540.648174\n", " male 80181.323528\n", "other female 70579.012167\n", " male 79993.082152\n", "police female 95458.979664\n", " male 120337.144226\n", "porter female 47195.294830\n", " male 44687.008480\n", "public works female 41433.817635\n", " male 32639.754413\n", "recreation leader female 11693.305312\n", " male 12549.577932\n", "social worker female 63067.066715\n", " male 62496.266117\n", "transit female 63954.873872\n", " male 76903.350026" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "salaries_job_gender" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "name": "Male", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 61554.98355191258, 97818.14600985224, 84359.22856594122, 114559.38393805308, 37698.15888322724, 138007.6262314542, 81672.70519206935, 37452.35562259317, 65668.48473282444, 45336.29606965172, 89319.61524365652, 149907.7099344591, 54430.82438775509, 55155.304686098614, 87667.23588492218, 23580.31975659227, 36206.88437125747, 122426.8749904398, 80181.32352803125, 79993.08215249506, 120337.1442256307, 44687.00847988083, 32639.754412903196, 12549.577932053193, 62496.266117136576, 76903.3500260415 ] }, { "name": "Female", "type": "bar", "x": [ "account", "airport", "analyst", "architect", "assistant", "attorney", "automotive", "clerk", "court", "custodian", "engineer", "fire", "food service", "gardener", "general laborer", "guard", "library", "manager", "medical", "other", "police", "porter", "public works", "recreation leader", "social worker", "transit" ], "y": [ 62720.881248808415, 89959.92874125874, 81847.3170949434, 113353.71145454547, 45963.404887693934, 134018.1307586208, 72252.4548148148, 47233.56824512543, 69189.87795107042, 45257.96901345292, 71264.69742566509, 139360.14247295228, 39156.75288888888, 50016.638518518535, 80573.82318944839, 16436.266490066213, 46529.0250882353, 121272.7307857143, 73540.64817394386, 70579.01216710889, 95458.97966369026, 47195.29482972139, 41433.817634782645, 11693.305311653117, 63067.066714723864, 63954.87387221697 ] } ], "layout": { "barmode": "group" } }, "text/html": [ "<div id=\"603feeb2-9234-48a2-8991-edd71ef07376\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"603feeb2-9234-48a2-8991-edd71ef07376\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [61554.98355191258, 97818.14600985224, 84359.22856594122, 114559.38393805308, 37698.15888322724, 138007.6262314542, 81672.70519206935, 37452.35562259317, 65668.48473282444, 45336.29606965172, 89319.61524365652, 149907.7099344591, 54430.82438775509, 55155.304686098614, 87667.23588492218, 23580.31975659227, 36206.88437125747, 122426.8749904398, 80181.32352803125, 79993.08215249506, 120337.1442256307, 44687.00847988083, 32639.754412903196, 12549.577932053193, 62496.266117136576, 76903.3500260415], \"name\": \"Male\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [62720.881248808415, 89959.92874125874, 81847.3170949434, 113353.71145454547, 45963.404887693934, 134018.1307586208, 72252.4548148148, 47233.56824512543, 69189.87795107042, 45257.96901345292, 71264.69742566509, 139360.14247295228, 39156.75288888888, 50016.638518518535, 80573.82318944839, 16436.266490066213, 46529.0250882353, 121272.7307857143, 73540.64817394386, 70579.01216710889, 95458.97966369026, 47195.29482972139, 41433.817634782645, 11693.305311653117, 63067.066714723864, 63954.87387221697], \"name\": \"Female\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ], "text/vnd.plotly.v1+html": [ "<div id=\"603feeb2-9234-48a2-8991-edd71ef07376\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"603feeb2-9234-48a2-8991-edd71ef07376\", [{\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [61554.98355191258, 97818.14600985224, 84359.22856594122, 114559.38393805308, 37698.15888322724, 138007.6262314542, 81672.70519206935, 37452.35562259317, 65668.48473282444, 45336.29606965172, 89319.61524365652, 149907.7099344591, 54430.82438775509, 55155.304686098614, 87667.23588492218, 23580.31975659227, 36206.88437125747, 122426.8749904398, 80181.32352803125, 79993.08215249506, 120337.1442256307, 44687.00847988083, 32639.754412903196, 12549.577932053193, 62496.266117136576, 76903.3500260415], \"name\": \"Male\"}, {\"type\": \"bar\", \"x\": [\"account\", \"airport\", \"analyst\", \"architect\", \"assistant\", \"attorney\", \"automotive\", \"clerk\", \"court\", \"custodian\", \"engineer\", \"fire\", \"food service\", \"gardener\", \"general laborer\", \"guard\", \"library\", \"manager\", \"medical\", \"other\", \"police\", \"porter\", \"public works\", \"recreation leader\", \"social worker\", \"transit\"], \"y\": [62720.881248808415, 89959.92874125874, 81847.3170949434, 113353.71145454547, 45963.404887693934, 134018.1307586208, 72252.4548148148, 47233.56824512543, 69189.87795107042, 45257.96901345292, 71264.69742566509, 139360.14247295228, 39156.75288888888, 50016.638518518535, 80573.82318944839, 16436.266490066213, 46529.0250882353, 121272.7307857143, 73540.64817394386, 70579.01216710889, 95458.97966369026, 47195.29482972139, 41433.817634782645, 11693.305311653117, 63067.066714723864, 63954.87387221697], \"name\": \"Female\"}], {\"barmode\": \"group\"}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "salaries_gender=salaries[(salaries['Gender']=='male') | (salaries['Gender']=='female')][['GeneralJobTitle', 'TotalPay', 'Gender']].groupby(['Gender', 'GeneralJobTitle']).mean()\n", "\n", "trace1 = go.Bar(\n", " x=job_names,\n", " y=salaries_gender.xs('male', level='Gender')['TotalPay'],\n", " name='Male'\n", ")\n", "trace2 = go.Bar(\n", " x=job_names,\n", " y=salaries_gender.xs('female', level='Gender')['TotalPay'],\n", " name='Female'\n", ")\n", "\n", "data = [trace1, trace2]\n", "layout = go.Layout(\n", " barmode='group'\n", ")\n", "\n", "fig = go.Figure(data=data, layout=layout)\n", "cf.iplot(fig, filename='grouped-bar')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I can easily notice that there is evidence of pay discrimination based on gender. <br>\n", "In only 4 gropus (15%) women earn noticeably more than men. <br>\n", "In 9 groups (35%) women and men earn more or less the same amount of money.<br>\n", "In remaining 13 (50%!) groups men earn significantly more than women. <br>\n", "The biggest difference can be seen in the engineer group." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Looking at the number of people in every job, that earn more than $200k" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "color": "rgba(255, 153, 51, 0.6)", "line": { "color": "rgba(255, 153, 51, 1.0)", "width": 1 } }, "name": "GeneralJobTitle", "orientation": "v", "text": "", "type": "bar", "x": [ "fire", "police", "medical", "assistant", "manager", "general laborer", "transit", "attorney", "public works", "architect", "automotive" ], "y": [ 638, 470, 322, 74, 58, 46, 44, 14, 6, 2, 1 ] } ], "layout": { "legend": { "bgcolor": "#F5F6F9", "font": { "color": "#4D5663" } }, "paper_bgcolor": "#F5F6F9", "plot_bgcolor": "#F5F6F9", "titlefont": { "color": "#4D5663" }, "xaxis1": { "gridcolor": "#E1E5ED", "showgrid": true, "tickfont": { "color": "#4D5663" }, "title": "", "titlefont": { "color": "#4D5663" }, "zerolinecolor": "#E1E5ED" }, "yaxis1": { "gridcolor": "#E1E5ED", "showgrid": true, "tickfont": { "color": "#4D5663" }, "title": "", "titlefont": { "color": "#4D5663" }, "zerolinecolor": "#E1E5ED" } } }, "text/html": [ "<div id=\"69aa6efa-95dc-40ea-9938-d6717f8d79f0\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"69aa6efa-95dc-40ea-9938-d6717f8d79f0\", [{\"type\": \"bar\", \"x\": [\"fire\", \"police\", \"medical\", \"assistant\", \"manager\", \"general laborer\", \"transit\", \"attorney\", \"public works\", \"architect\", \"automotive\"], \"y\": [638, 470, 322, 74, 58, 46, 44, 14, 6, 2, 1], \"name\": \"GeneralJobTitle\", \"text\": \"\", \"marker\": {\"color\": \"rgba(255, 153, 51, 0.6)\", \"line\": {\"color\": \"rgba(255, 153, 51, 1.0)\", \"width\": 1}}, \"orientation\": \"v\"}], {\"legend\": {\"bgcolor\": \"#F5F6F9\", \"font\": {\"color\": \"#4D5663\"}}, \"paper_bgcolor\": \"#F5F6F9\", \"plot_bgcolor\": \"#F5F6F9\", \"yaxis1\": {\"tickfont\": {\"color\": \"#4D5663\"}, \"gridcolor\": \"#E1E5ED\", \"titlefont\": {\"color\": \"#4D5663\"}, \"zerolinecolor\": \"#E1E5ED\", \"showgrid\": true, \"title\": \"\"}, \"xaxis1\": {\"tickfont\": {\"color\": \"#4D5663\"}, \"gridcolor\": \"#E1E5ED\", \"titlefont\": {\"color\": \"#4D5663\"}, \"zerolinecolor\": \"#E1E5ED\", \"showgrid\": true, \"title\": \"\"}, \"titlefont\": {\"color\": \"#4D5663\"}}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ], "text/vnd.plotly.v1+html": [ "<div id=\"69aa6efa-95dc-40ea-9938-d6717f8d79f0\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"69aa6efa-95dc-40ea-9938-d6717f8d79f0\", [{\"type\": \"bar\", \"x\": [\"fire\", \"police\", \"medical\", \"assistant\", \"manager\", \"general laborer\", \"transit\", \"attorney\", \"public works\", \"architect\", \"automotive\"], \"y\": [638, 470, 322, 74, 58, 46, 44, 14, 6, 2, 1], \"name\": \"GeneralJobTitle\", \"text\": \"\", \"marker\": {\"color\": \"rgba(255, 153, 51, 0.6)\", \"line\": {\"color\": \"rgba(255, 153, 51, 1.0)\", \"width\": 1}}, \"orientation\": \"v\"}], {\"legend\": {\"bgcolor\": \"#F5F6F9\", \"font\": {\"color\": \"#4D5663\"}}, \"paper_bgcolor\": \"#F5F6F9\", \"plot_bgcolor\": \"#F5F6F9\", \"yaxis1\": {\"tickfont\": {\"color\": \"#4D5663\"}, \"gridcolor\": \"#E1E5ED\", \"titlefont\": {\"color\": \"#4D5663\"}, \"zerolinecolor\": \"#E1E5ED\", \"showgrid\": true, \"title\": \"\"}, \"xaxis1\": {\"tickfont\": {\"color\": \"#4D5663\"}, \"gridcolor\": \"#E1E5ED\", \"titlefont\": {\"color\": \"#4D5663\"}, \"zerolinecolor\": \"#E1E5ED\", \"showgrid\": true, \"title\": \"\"}, \"titlefont\": {\"color\": \"#4D5663\"}}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "salaries_more_than_100k=salaries[salaries['TotalPay']>200000]['GeneralJobTitle'].value_counts().drop('other')\n", "salaries_more_than_100k.iplot(kind='bar')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The job groups in which the most people earn supranormal amount of moneyare clearly Firemen, Policemen and Medical." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }